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

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 (645) hide show
  1. package/dist/cell/index.d.ts +1 -1
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -4
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/components.d.ts +8 -2
  6. package/dist/exports/components.d.ts.map +1 -1
  7. package/dist/exports/components.js +8 -2
  8. package/dist/exports/components.js.map +1 -1
  9. package/dist/field/Field.d.ts +0 -2
  10. package/dist/field/Field.d.ts.map +1 -1
  11. package/dist/field/Field.js.map +1 -1
  12. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  13. package/dist/field/features/align/feature.client.js +127 -54
  14. package/dist/field/features/align/feature.client.js.map +1 -1
  15. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  16. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  17. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  18. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  19. package/dist/field/features/blockquote/feature.client.d.ts +1 -1
  20. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  21. package/dist/field/features/blockquote/feature.client.js +53 -40
  22. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  23. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  24. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  25. package/dist/field/features/blockquote/feature.server.js +7 -7
  26. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  27. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  28. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  29. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  30. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  31. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  32. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  33. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  34. package/dist/field/features/blocks/component/index.js +37 -4
  35. package/dist/field/features/blocks/component/index.js.map +1 -1
  36. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  37. package/dist/field/features/blocks/drawer/index.js +2 -4
  38. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  39. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  40. package/dist/field/features/blocks/feature.client.js +56 -27
  41. package/dist/field/features/blocks/feature.client.js.map +1 -1
  42. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  43. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  44. package/dist/field/features/blocks/feature.server.js +109 -77
  45. package/dist/field/features/blocks/feature.server.js.map +1 -1
  46. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  47. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  49. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  50. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  51. package/dist/field/features/blocks/plugin/commands.js +1 -2
  52. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  53. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  54. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  55. package/dist/field/features/blocks/plugin/index.js +5 -8
  56. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  57. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  58. package/dist/field/features/blocks/populationPromise.js +4 -18
  59. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  60. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  61. package/dist/field/features/blocks/validate.js +22 -36
  62. package/dist/field/features/blocks/validate.js.map +1 -1
  63. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  64. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  65. package/dist/field/features/converters/html/field/index.js +6 -3
  66. package/dist/field/features/converters/html/field/index.js.map +1 -1
  67. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts.map +1 -1
  68. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  69. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  70. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  71. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  72. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  73. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  74. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +2 -4
  75. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  76. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts.map +1 -1
  77. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  78. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  79. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  80. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  81. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  82. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  83. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +4 -6
  84. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  85. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  86. package/dist/field/features/format/bold/feature.client.js +26 -23
  87. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  88. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  89. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  90. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  91. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  92. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  93. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  94. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  95. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  96. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  97. package/dist/field/features/format/italic/feature.client.js +27 -24
  98. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  99. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  100. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  101. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  102. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  103. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  104. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  105. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  106. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  107. package/dist/field/features/format/subscript/feature.client.js +25 -22
  108. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  109. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  110. package/dist/field/features/format/superscript/feature.client.js +25 -22
  111. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  112. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  113. package/dist/field/features/format/underline/feature.client.js +25 -22
  114. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  115. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  116. package/dist/field/features/heading/feature.client.js +71 -54
  117. package/dist/field/features/heading/feature.client.js.map +1 -1
  118. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  119. package/dist/field/features/heading/feature.server.js +5 -5
  120. package/dist/field/features/heading/feature.server.js.map +1 -1
  121. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  122. package/dist/field/features/heading/markdownTransformer.js +1 -2
  123. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  124. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  125. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  126. package/dist/field/features/horizontalRule/component/index.js +62 -0
  127. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  128. package/dist/field/features/horizontalRule/feature.client.d.ts +3 -0
  129. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  130. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  131. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  132. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  133. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  134. package/dist/field/features/horizontalRule/feature.server.js +37 -0
  135. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  136. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  137. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  138. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  139. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  140. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  141. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  142. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +88 -0
  143. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  144. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  145. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  146. package/dist/field/features/horizontalRule/plugin/index.js +31 -0
  147. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  148. package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
  149. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  150. package/dist/field/features/indent/feature.client.js +43 -42
  151. package/dist/field/features/indent/feature.client.js.map +1 -1
  152. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  153. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  154. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  155. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  156. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  157. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  158. package/dist/field/features/link/drawer/baseFields.js +30 -43
  159. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  160. package/dist/field/features/link/drawer/index.js +3 -2
  161. package/dist/field/features/link/drawer/index.js.map +1 -1
  162. package/dist/field/features/link/drawer/types.d.ts +4 -2
  163. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  164. package/dist/field/features/link/drawer/types.js.map +1 -1
  165. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  166. package/dist/field/features/link/feature.client.js +59 -47
  167. package/dist/field/features/link/feature.client.js.map +1 -1
  168. package/dist/field/features/link/feature.server.d.ts +10 -5
  169. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  170. package/dist/field/features/link/feature.server.js +48 -9
  171. package/dist/field/features/link/feature.server.js.map +1 -1
  172. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  173. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  174. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  175. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  176. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  177. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  178. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  179. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  180. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  181. package/dist/field/features/link/plugins/autoLink/index.js +5 -8
  182. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  183. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  184. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  185. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  186. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  187. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  188. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  189. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  190. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  191. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +93 -69
  192. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  193. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  194. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  195. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  196. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  197. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  198. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  199. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  200. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  201. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  202. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  203. package/dist/field/features/link/plugins/link/index.js +5 -14
  204. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  205. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  206. package/dist/field/features/link/populationPromise.js +10 -25
  207. package/dist/field/features/link/populationPromise.js.map +1 -1
  208. package/dist/field/features/link/validate.d.ts +5 -0
  209. package/dist/field/features/link/validate.d.ts.map +1 -0
  210. package/dist/field/features/link/validate.js +32 -0
  211. package/dist/field/features/link/validate.js.map +1 -0
  212. package/dist/field/features/lists/checklist/feature.client.d.ts +1 -1
  213. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  214. package/dist/field/features/lists/checklist/feature.client.js +56 -32
  215. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  216. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  217. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  218. package/dist/field/features/lists/checklist/feature.server.js +10 -10
  219. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  220. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  221. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  222. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  223. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  224. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  225. package/dist/field/features/lists/checklist/plugin/index.js +3 -4
  226. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  227. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  228. package/dist/field/features/lists/htmlConverter.js +13 -6
  229. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  230. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  231. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  232. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  233. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  234. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +7 -7
  235. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  236. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  237. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  238. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  239. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  240. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  241. package/dist/field/features/lists/plugin/index.js +3 -4
  242. package/dist/field/features/lists/plugin/index.js.map +1 -1
  243. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  244. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  245. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  246. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  247. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  248. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  249. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  250. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +7 -7
  251. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  252. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  253. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  254. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  255. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  256. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  257. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  258. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  259. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  260. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  261. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  262. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  263. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  264. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  265. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  266. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  267. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  268. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  269. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  270. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  271. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  272. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  273. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  274. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  275. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  276. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  277. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  278. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  279. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  280. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  281. package/dist/field/features/paragraph/feature.client.js +45 -33
  282. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  283. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  284. package/dist/field/features/relationship/drawer/commands.js +1 -2
  285. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  286. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  287. package/dist/field/features/relationship/drawer/index.js +7 -13
  288. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  289. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  290. package/dist/field/features/relationship/feature.client.js +37 -15
  291. package/dist/field/features/relationship/feature.client.js.map +1 -1
  292. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  293. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  294. package/dist/field/features/relationship/feature.server.js +5 -4
  295. package/dist/field/features/relationship/feature.server.js.map +1 -1
  296. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  297. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  298. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  299. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  300. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  301. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +56 -7
  302. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  303. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  304. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  305. package/dist/field/features/relationship/plugins/index.js +9 -12
  306. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  307. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  308. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  309. package/dist/field/features/relationship/populationPromise.js +25 -19
  310. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  311. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  312. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  313. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  314. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  315. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  316. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  317. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  318. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  319. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  320. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  321. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  322. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  323. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
  324. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  325. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  326. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  327. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +81 -0
  328. package/dist/field/features/toolbars/fixed/feature.client.d.ts +3 -0
  329. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  330. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  331. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  332. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  333. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  334. package/dist/field/features/toolbars/fixed/feature.server.js +16 -0
  335. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  336. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  337. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  338. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +112 -70
  339. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  340. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  341. package/dist/field/features/toolbars/inline/feature.client.d.ts +3 -0
  342. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  343. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  344. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  345. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  346. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  347. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  348. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  349. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  350. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  351. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +29 -19
  352. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  353. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  354. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  355. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  356. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +27 -72
  357. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  358. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  359. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  360. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  361. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  362. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  363. package/dist/field/features/toolbars/types.d.ts +48 -0
  364. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  365. package/dist/field/features/toolbars/types.js.map +1 -0
  366. package/dist/field/features/typeUtilities.d.ts +8 -0
  367. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  368. package/dist/field/features/typeUtilities.js +8 -0
  369. package/dist/field/features/typeUtilities.js.map +1 -0
  370. package/dist/field/features/types.d.ts +128 -57
  371. package/dist/field/features/types.d.ts.map +1 -1
  372. package/dist/field/features/types.js.map +1 -1
  373. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  374. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  375. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  376. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  377. package/dist/field/features/upload/component/index.js +59 -9
  378. package/dist/field/features/upload/component/index.js.map +1 -1
  379. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  380. package/dist/field/features/upload/drawer/commands.js +1 -2
  381. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  382. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  383. package/dist/field/features/upload/drawer/index.js +8 -12
  384. package/dist/field/features/upload/drawer/index.js.map +1 -1
  385. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  386. package/dist/field/features/upload/feature.client.js +35 -10
  387. package/dist/field/features/upload/feature.client.js.map +1 -1
  388. package/dist/field/features/upload/feature.server.d.ts +10 -3
  389. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  390. package/dist/field/features/upload/feature.server.js +39 -11
  391. package/dist/field/features/upload/feature.server.js.map +1 -1
  392. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  393. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  394. package/dist/field/features/upload/nodes/UploadNode.js +24 -11
  395. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  396. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  397. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  398. package/dist/field/features/upload/plugin/index.js +6 -11
  399. package/dist/field/features/upload/plugin/index.js.map +1 -1
  400. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  401. package/dist/field/features/upload/populationPromise.js +15 -9
  402. package/dist/field/features/upload/populationPromise.js.map +1 -1
  403. package/dist/field/features/upload/validate.d.ts +2 -1
  404. package/dist/field/features/upload/validate.d.ts.map +1 -1
  405. package/dist/field/features/upload/validate.js +37 -12
  406. package/dist/field/features/upload/validate.js.map +1 -1
  407. package/dist/field/index.d.ts +1 -1
  408. package/dist/field/index.d.ts.map +1 -1
  409. package/dist/field/index.js.map +1 -1
  410. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  411. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  412. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  413. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  414. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  415. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  416. package/dist/field/lexical/EditorPlugin.js +6 -3
  417. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  418. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  419. package/dist/field/lexical/LexicalEditor.js +31 -15
  420. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  421. package/dist/field/lexical/LexicalEditor.scss +3 -19
  422. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  423. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  424. package/dist/field/lexical/LexicalProvider.js +4 -4
  425. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  426. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  427. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  428. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  429. package/dist/field/lexical/config/client/default.d.ts +1 -1
  430. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  431. package/dist/field/lexical/config/client/default.js.map +1 -1
  432. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  433. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  434. package/dist/field/lexical/config/client/sanitize.js +81 -32
  435. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  436. package/dist/field/lexical/config/server/default.d.ts +2 -3
  437. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  438. package/dist/field/lexical/config/server/default.js +12 -10
  439. package/dist/field/lexical/config/server/default.js.map +1 -1
  440. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  441. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  442. package/dist/field/lexical/config/server/loader.js +4 -2
  443. package/dist/field/lexical/config/server/loader.js.map +1 -1
  444. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  445. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  446. package/dist/field/lexical/config/server/sanitize.js +23 -8
  447. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  448. package/dist/field/lexical/config/types.d.ts +1 -1
  449. package/dist/field/lexical/config/types.d.ts.map +1 -1
  450. package/dist/field/lexical/config/types.js.map +1 -1
  451. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  452. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  453. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  454. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  455. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  456. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  457. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  458. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  459. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  460. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +6 -9
  461. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  462. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +17 -25
  463. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  464. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  465. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  466. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  467. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  468. package/dist/field/lexical/plugins/SlashMenu/index.js +72 -67
  469. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  470. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  471. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
  472. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  473. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  474. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  475. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +3 -4
  476. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  477. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  478. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -10
  479. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  480. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  481. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  482. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  483. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  484. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  485. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  486. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  487. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  488. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  489. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  490. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  491. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  492. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  493. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  494. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  495. package/dist/field/lexical/theme/EditorTheme.scss +13 -14
  496. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  497. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  498. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  499. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  500. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  501. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  502. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  503. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  504. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  505. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  506. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  507. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  508. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  509. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  510. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  511. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  512. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  513. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  514. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  515. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  516. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  517. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  518. package/dist/field/lexical/utils/url.js +3 -0
  519. package/dist/field/lexical/utils/url.js.map +1 -1
  520. package/dist/forEachNodeRecursively.d.ts +10 -0
  521. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  522. package/dist/forEachNodeRecursively.js +24 -0
  523. package/dist/forEachNodeRecursively.js.map +1 -0
  524. package/dist/generateComponentMap.d.ts.map +1 -1
  525. package/dist/generateComponentMap.js +16 -22
  526. package/dist/generateComponentMap.js.map +1 -1
  527. package/dist/generateSchemaMap.d.ts.map +1 -1
  528. package/dist/generateSchemaMap.js +4 -12
  529. package/dist/generateSchemaMap.js.map +1 -1
  530. package/dist/index.d.ts +24 -20
  531. package/dist/index.d.ts.map +1 -1
  532. package/dist/index.js +275 -184
  533. package/dist/index.js.map +1 -1
  534. package/dist/populate/defaultValue.d.ts.map +1 -1
  535. package/dist/populate/defaultValue.js +1 -0
  536. package/dist/populate/defaultValue.js.map +1 -1
  537. package/dist/populate/populate.d.ts +5 -4
  538. package/dist/populate/populate.d.ts.map +1 -1
  539. package/dist/populate/populate.js +13 -11
  540. package/dist/populate/populate.js.map +1 -1
  541. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  542. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  543. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  544. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  545. package/dist/populate/recurseNestedFields.d.ts +8 -4
  546. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  547. package/dist/populate/recurseNestedFields.js +4 -5
  548. package/dist/populate/recurseNestedFields.js.map +1 -1
  549. package/dist/scss/app.scss +2 -3
  550. package/dist/scss/vars.scss +0 -7
  551. package/dist/types.d.ts +12 -5
  552. package/dist/types.d.ts.map +1 -1
  553. package/dist/types.js.map +1 -1
  554. package/dist/validate/index.d.ts +1 -1
  555. package/dist/validate/index.d.ts.map +1 -1
  556. package/package.json +48 -47
  557. package/components.d.ts +0 -6
  558. package/components.js +0 -7
  559. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  560. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  561. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  562. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  563. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  564. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  565. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  566. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  567. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  568. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  569. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  570. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  571. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  572. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  573. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  574. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  575. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  576. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  577. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  578. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  579. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  580. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  581. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  582. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  583. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  584. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  585. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  586. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  587. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  588. package/dist/field/features/indent/index.scss +0 -4
  589. package/dist/field/features/lists/common/markdown.js.map +0 -1
  590. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  591. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  592. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  593. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  594. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  595. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  596. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  597. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  598. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  599. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  600. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  601. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  602. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  603. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  604. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  605. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  606. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  607. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  608. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  609. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  610. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  611. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  612. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  613. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  614. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  615. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  616. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  617. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  618. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  619. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  620. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  621. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  622. package/dist/populate/richTextRelationshipPromise.js +0 -68
  623. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  624. package/dist/scss/fonts.scss +0 -75
  625. package/src/index.ts +0 -423
  626. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +0 -0
  627. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  628. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  629. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  630. /package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +0 -0
  631. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  632. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  633. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  634. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +0 -0
  635. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  636. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  637. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  638. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +0 -0
  639. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  640. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  641. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  642. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +0 -0
  643. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  644. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  645. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultSanitizedServerEditorConfig,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { richTextRelationshipPromise } from './populate/richTextRelationshipPromise.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapter {\n let resolvedFeatureMap: ResolvedServerFeatureMap = null\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n let features: FeatureProviderServer<unknown, unknown>[] =\n props.features && typeof props.features === 'function'\n ? props.features({ defaultFeatures: cloneDeep(defaultEditorFeatures) })\n : (props.features as FeatureProviderServer<unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = loadFeatures({\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n afterReadPromise: ({ field, incomingEditorState, siblingDoc }) => {\n return new Promise<void>((resolve, reject) => {\n const promises: Promise<void>[] = []\n\n if (finalSanitizedEditorConfig?.features?.hooks?.afterReadPromises?.length) {\n for (const afterReadPromise of finalSanitizedEditorConfig.features.hooks\n .afterReadPromises) {\n const promise = afterReadPromise({\n field,\n incomingEditorState,\n siblingDoc,\n })\n if (promise) {\n promises.push(promise)\n }\n }\n }\n\n Promise.all(promises)\n .then(() => resolve())\n .catch((error) => reject(error))\n })\n },\n editorConfig: finalSanitizedEditorConfig,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n populationPromise({\n context,\n currentDepth,\n depth,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {\n return richTextRelationshipPromise({\n context,\n currentDepth,\n depth,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n\n return null\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockQuoteFeature } from './field/features/blockquote/feature.server.js'\nexport {\n BlocksFeature,\n type BlocksFeatureProps,\n type LexicalBlock,\n} from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { TextDropdownSectionWithEntries } from './field/features/common/floatingSelectToolbarTextDropdownSection/index.js'\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\n\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { createClientComponent } from './field/features/createClientComponent.js'\nexport { TestRecorderFeature } from './field/features/debug/testrecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeview/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { SectionWithEntries as FormatSectionWithEntries } from './field/features/format/common/floatingSelectToolbarSection.js'\nexport { InlineCodeFeature } from './field/features/format/inlinecode/feature.server.js'\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\n\nexport { HeadingFeature } from './field/features/heading/feature.server.js'\nexport { IndentFeature } from './field/features/indent/feature.server.js'\n\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { CheckListFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedlist/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedlist/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\n\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\n\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport { RelationshipFeature } from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport type {\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\n\nexport type { RawUploadPayload } from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\nexport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n defaultSanitizedServerEditorConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\n\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\n\nexport {\n type FloatingToolbarSection,\n type FloatingToolbarSectionEntry,\n} from './field/lexical/plugins/FloatingSelectToolbar/types.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport {\n SlashMenuGroup,\n SlashMenuOption,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","defaultSanitizedServerEditorConfig","loadFeatures","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","richTextRelationshipPromise","richTextValidateHOC","lexicalEditor","props","resolvedFeatureMap","finalSanitizedEditorConfig","features","lexical","defaultFeatures","unSanitizedEditorConfig","CellComponent","Component","toMergeIntoProps","lexicalEditorConfig","FieldComponent","afterReadPromise","field","incomingEditorState","siblingDoc","Promise","resolve","reject","promises","hooks","afterReadPromises","length","promise","push","all","then","catch","error","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","config","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromise","context","currentDepth","depth","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","size","editorPopulationPromises","validate","AlignFeature","BlockQuoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","TextDropdownSectionWithEntries","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","createClientComponent","TestRecorderFeature","TreeViewFeature","BoldFeature","SectionWithEntries","FormatSectionWithEntries","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","CheckListFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","sanitizeServerEditorConfig","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","SlashMenuGroup","SlashMenuOption","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipe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xB,0CAAyC;AAChD,SACEC,0BAA0B,EAC1BjJ,sBAAsB,QACjB,4CAA2C;AAQlD,SAASkJ,eAAe,QAAQ,iCAAgC;AAMhE,SAASC,yBAAyB,QAAQ,wEAAuE;AAGjH,SACEC,cAAc,EACdC,eAAe,QACV,wEAAuE;AAC9E,SAASC,WAAW,QAAQ,qCAAoC;AAChE,SAASrJ,SAAS,QAAQ,qCAAoC;AAC9D,SAASsJ,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,aAAa,QAAQ,iCAAgC;AAC9D,SAASC,SAAS,QAAQ,qCAAoC;AAC9D,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,eAAe,QAAQ,oDAAmD;AACnF,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,sCAAqC;AAC5C,SAASC,KAAK,EAAEC,OAAO,QAAQ,iCAAgC;AAC/D,SAASC,IAAI,QAAQ,gCAA+B;AACpD,SAASC,uBAAuB,QAAQ,mDAAkD;AAC1F,SAASC,oCAAoC,QAAQ,gEAA+D;AACpH,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,6BAA4B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapterProvider } from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { populateLexicalPopulationPromises } from './populate/populateLexicalPopulationPromises.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n }\n\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n let features: FeatureProviderServer<unknown, unknown>[] =\n props.features && typeof props.features === 'function'\n ? props.features({ defaultFeatures: cloneDeep(defaultEditorFeatures) })\n : (props.features as FeatureProviderServer<unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n editorConfig: finalSanitizedEditorConfig,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n /* hooks: {\n afterChange: finalSanitizedEditorConfig.features.hooks.afterChange,\n afterRead: finalSanitizedEditorConfig.features.hooks.afterRead,\n beforeChange: finalSanitizedEditorConfig.features.hooks.beforeChange,\n beforeDuplicate: finalSanitizedEditorConfig.features.hooks.beforeDuplicate,\n beforeValidate: finalSanitizedEditorConfig.features.hooks.beforeValidate,\n },*/\n /* // TODO: Figure out docWithLocales / originalSiblingDoc => node matching. Can't use indexes, as the order of nodes could technically change between hooks.\n hooks: {\n afterChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n afterRead: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeDuplicate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeDuplicateHooks = finalSanitizedEditorConfig.features.hooks.beforeDuplicate\n if (beforeDuplicateHooks?.has(node.type)) {\n for (const hook of beforeDuplicateHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeValidate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n /**\n * We cannot pass the originalNode here, as there is no way to map one node to a previous one, as a previous originalNode might be in a different position\n */ /*\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n },*/\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n populationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockquoteFeature } from './field/features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\nexport {\n HeadingFeature,\n type HeadingFeatureProps,\n} from './field/features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './field/features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\n\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { ChecklistFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js'\nexport { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js'\n\nexport { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js'\nexport { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js'\nexport { createNode } from './field/features/typeUtilities.js'\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n FieldNodeHook,\n FieldNodeHookArgs,\n NodeValidation,\n NodeWithHooks,\n PluginComponent,\n PluginComponentWithAnchor,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\n\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\n\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","populateLexicalPopulationPromises","richTextValidateHOC","defaultSanitizedServerEditorConfig","lexicalEditor","props","config","isRoot","resolvedFeatureMap","finalSanitizedEditorConfig","features","lexical","defaultFeatures","unSanitizedEditorConfig","CellComponent","Component","toMergeIntoProps","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","field","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromises","context","currentDepth","depth","draft","fieldPromises","findMany","flattenLocales","overrideAccess","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","validate","AlignFeature","BlockquoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","toolbarFormatGroupWithItems","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","toolbarAddDropdownGroupWithItems","toolbarFeatureButtonsGroupWithItems","toolbarTextDropdownGroupWithItems","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AQ,qCAAoC;AAC9D,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,eAAe,QAAQ,oDAAmD;AACnF,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,sCAAqC;AAC5C,SAASC,KAAK,EAAEC,OAAO,QAAQ,iCAAgC;AAC/D,SAASC,IAAI,QAAQ,gCAA+B;AACpD,SAASC,uBAAuB,QAAQ,mDAAkD;AAC1F,SAASC,oCAAoC,QAAQ,gEAA+D;AACpH,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,6BAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../src/populate/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG,eAAO,MAAM,oBAAoB,EAAE,qBA4BlC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,qBAkBpC,CAAA"}
1
+ {"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../src/populate/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG,eAAO,MAAM,oBAAoB,EAAE,qBA6BlC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,qBAkBpC,CAAA"}
@@ -18,6 +18,7 @@ export const defaultRichTextValue = {
18
18
  direction: null,
19
19
  format: '',
20
20
  indent: 0,
21
+ textFormat: 0,
21
22
  version: 1
22
23
  }
23
24
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/populate/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n\nexport const defaultRichTextValueV2: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n"],"names":["defaultRichTextValue","root","type","children","detail","format","mode","style","text","version","direction","indent","defaultRichTextValueV2"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,uBAA8C;IACzDC,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU;oBACR;wBACED,MAAM;wBACNE,QAAQ;wBACRC,QAAQ;wBACRC,MAAM;wBACNC,OAAO;wBACPC,MAAM;wBACNC,SAAS;oBACX;iBACD;gBACDC,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRF,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC;AAED,OAAO,MAAMG,yBAAgD;IAC3DX,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU,EAAE;gBACZO,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRF,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/populate/defaultValue.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\nexport const defaultRichTextValue: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n } as SerializedTextNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n\nexport const defaultRichTextValueV2: SerializedEditorState = {\n root: {\n type: 'root',\n children: [\n {\n type: 'paragraph',\n children: [],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n } as SerializedParagraphNode,\n ],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n}\n"],"names":["defaultRichTextValue","root","type","children","detail","format","mode","style","text","version","direction","indent","textFormat","defaultRichTextValueV2"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,uBAA8C;IACzDC,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU;oBACR;wBACED,MAAM;wBACNE,QAAQ;wBACRC,QAAQ;wBACRC,MAAM;wBACNC,OAAO;wBACPC,MAAM;wBACNC,SAAS;oBACX;iBACD;gBACDC,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRC,YAAY;gBACZH,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC;AAED,OAAO,MAAMI,yBAAgD;IAC3DZ,MAAM;QACJC,MAAM;QACNC,UAAU;YACR;gBACED,MAAM;gBACNC,UAAU,EAAE;gBACZO,WAAW;gBACXL,QAAQ;gBACRM,QAAQ;gBACRF,SAAS;YACX;SACD;QACDC,WAAW;QACXL,QAAQ;QACRM,QAAQ;QACRF,SAAS;IACX;AACF,EAAC"}
@@ -1,21 +1,22 @@
1
1
  import type { SerializedEditorState } from 'lexical';
2
- import type { PayloadRequest } from 'payload/types';
2
+ import type { PayloadRequestWithData } from 'payload/types';
3
3
  import type { Collection, Field, RichTextField } from 'payload/types';
4
4
  import type { AdapterProps } from '../types.js';
5
5
  type Arguments = {
6
6
  currentDepth?: number;
7
7
  data: unknown;
8
8
  depth: number;
9
+ draft: boolean;
9
10
  field: RichTextField<SerializedEditorState, AdapterProps>;
10
11
  key: number | string;
11
12
  overrideAccess?: boolean;
12
- req: PayloadRequest;
13
+ req: PayloadRequestWithData;
13
14
  showHiddenFields: boolean;
14
15
  };
15
- export declare const populate: ({ id, collection, currentDepth, data, depth, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, 'field'> & {
16
+ export declare const populate: ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields, }: Omit<Arguments, 'field'> & {
16
17
  collection: Collection;
17
18
  field: Field;
18
- id: string;
19
+ id: number | string;
19
20
  }) => Promise<void>;
20
21
  export {};
21
22
  //# sourceMappingURL=populate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populate/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,aAAa,CAAC,qBAAqB,EAAE,YAAY,CAAC,C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AQ,IAAI,CAuBf,CAAA"}
@@ -1,16 +1,18 @@
1
- export const populate = async ({ id, collection, currentDepth, data, depth, key, overrideAccess, req, showHiddenFields })=>{
1
+ import { createDataloaderCacheKey } from 'payload/utilities';
2
+ export const populate = async ({ id, collection, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields })=>{
2
3
  const dataRef = data;
3
- const doc = await req.payloadDataLoader.load(JSON.stringify([
4
- req.transactionID,
5
- collection.config.slug,
6
- id,
4
+ const doc = await req.payloadDataLoader.load(createDataloaderCacheKey({
5
+ collectionSlug: collection.config.slug,
6
+ currentDepth: currentDepth + 1,
7
7
  depth,
8
- currentDepth + 1,
9
- req.locale,
10
- req.fallbackLocale,
11
- typeof overrideAccess === 'undefined' ? false : overrideAccess,
12
- showHiddenFields
13
- ]));
8
+ docID: id,
9
+ draft,
10
+ fallbackLocale: req.fallbackLocale,
11
+ locale: req.locale,
12
+ overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,
13
+ showHiddenFields,
14
+ transactionID: req.transactionID
15
+ }));
14
16
  if (doc) {
15
17
  dataRef[key] = doc;
16
18
  } else {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/populate/populate.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { PayloadRequest } from 'payload/types'\nimport type { Collection, Field, RichTextField } from 'payload/types'\n\nimport type { AdapterProps } from '../types.js'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n field: RichTextField<SerializedEditorState, AdapterProps>\n key: number | string\n overrideAccess?: boolean\n req: PayloadRequest\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Omit<Arguments, 'field'> & {\n collection: Collection\n field: Field\n id: string\n}): Promise<void> => {\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n JSON.stringify([\n req.transactionID,\n collection.config.slug,\n id,\n depth,\n currentDepth + 1,\n req.locale,\n req.fallbackLocale,\n typeof overrideAccess === 'undefined' ? false : overrideAccess,\n showHiddenFields,\n ]),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["populate","id","collection","currentDepth","data","depth","key","overrideAccess","req","showHiddenFields","dataRef","doc","payloadDataLoader","load","JSON","stringify","transactionID","config","slug","locale","fallbackLocale"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAiBA,OAAO,MAAMA,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAKjB;IACC,MAAMC,UAAUN;IAEhB,MAAMO,MAAM,MAAMH,IAAII,iBAAiB,CAACC,IAAI,CAC1CC,KAAKC,SAAS,CAAC;QACbP,IAAIQ,aAAa;QACjBd,WAAWe,MAAM,CAACC,IAAI;QACtBjB;QACAI;QACAF,eAAe;QACfK,IAAIW,MAAM;QACVX,IAAIY,cAAc;QAClB,OAAOb,mBAAmB,cAAc,QAAQA;QAChDE;KACD;IAGH,IAAIE,KAAK;QACPD,OAAO,CAACJ,IAAI,GAAGK;IACjB,OAAO;QACLD,OAAO,CAACJ,IAAI,GAAG;IACjB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/populate/populate.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { PayloadRequestWithData } from 'payload/types'\nimport type { Collection, Field, RichTextField } from 'payload/types'\n\nimport { createDataloaderCacheKey } from 'payload/utilities'\n\nimport type { AdapterProps } from '../types.js'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n field: RichTextField<SerializedEditorState, AdapterProps>\n key: number | string\n overrideAccess?: boolean\n req: PayloadRequestWithData\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n draft,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Omit<Arguments, 'field'> & {\n collection: Collection\n field: Field\n id: number | string\n}): Promise<void> => {\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n createDataloaderCacheKey({\n collectionSlug: collection.config.slug,\n currentDepth: currentDepth + 1,\n depth,\n docID: id as string,\n draft,\n fallbackLocale: req.fallbackLocale,\n locale: req.locale,\n overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n }),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["createDataloaderCacheKey","populate","id","collection","currentDepth","data","depth","draft","key","overrideAccess","req","showHiddenFields","dataRef","doc","payloadDataLoader","load","collectionSlug","config","slug","docID","fallbackLocale","locale","transactionID"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,wBAAwB,QAAQ,oBAAmB;AAgB5D,OAAO,MAAMC,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAKjB;IACC,MAAMC,UAAUP;IAEhB,MAAMQ,MAAM,MAAMH,IAAII,iBAAiB,CAACC,IAAI,CAC1Cf,yBAAyB;QACvBgB,gBAAgBb,WAAWc,MAAM,CAACC,IAAI;QACtCd,cAAcA,eAAe;QAC7BE;QACAa,OAAOjB;QACPK;QACAa,gBAAgBV,IAAIU,cAAc;QAClCC,QAAQX,IAAIW,MAAM;QAClBZ,gBAAgB,OAAOA,mBAAmB,cAAc,QAAQA;QAChEE;QACAW,eAAeZ,IAAIY,aAAa;IAClC;IAGF,IAAIT,KAAK;QACPD,OAAO,CAACJ,IAAI,GAAGK;IACjB,OAAO;QACLD,OAAO,CAACJ,IAAI,GAAG;IACjB;AACF,EAAC"}
@@ -0,0 +1,12 @@
1
+ import type { SerializedEditorState } from 'lexical';
2
+ import type { RichTextAdapter } from 'payload/types';
3
+ import type { PopulationPromise } from '../field/features/types.js';
4
+ import type { AdapterProps } from '../types.js';
5
+ export type Args = Parameters<RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromises']>[0] & {
6
+ editorPopulationPromises: Map<string, Array<PopulationPromise>>;
7
+ };
8
+ /**
9
+ * Appends all new populationPromises to the populationPromises prop
10
+ */
11
+ export declare const populateLexicalPopulationPromises: ({ context, currentDepth, depth, draft, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: Args) => void;
12
+ //# sourceMappingURL=populateLexicalPopulationPromises.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"populateLexicalPopulationPromises.d.ts","sourceRoot":"","sources":["../../src/populate/populateLexicalPopulationPromises.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C,MAAM,MAAM,IAAI,GAAG,UAAU,CAC3B,eAAe,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAC3E,CAAC,CAAC,CAAC,GAAG;IACL,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAChE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,8LAe3C,IAAI,SA+BN,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { recurseNodes } from '../forEachNodeRecursively.js';
2
+ /**
3
+ * Appends all new populationPromises to the populationPromises prop
4
+ */ export const populateLexicalPopulationPromises = ({ context, currentDepth, depth, draft, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
5
+ if (depth <= 0 || currentDepth > depth) {
6
+ return;
7
+ }
8
+ recurseNodes({
9
+ callback: (node)=>{
10
+ if (editorPopulationPromises?.has(node.type)) {
11
+ for (const promise of editorPopulationPromises.get(node.type)){
12
+ promise({
13
+ context,
14
+ currentDepth,
15
+ depth,
16
+ draft,
17
+ editorPopulationPromises,
18
+ field,
19
+ fieldPromises,
20
+ findMany,
21
+ flattenLocales,
22
+ node,
23
+ overrideAccess,
24
+ populationPromises,
25
+ req,
26
+ showHiddenFields,
27
+ siblingDoc
28
+ });
29
+ }
30
+ }
31
+ },
32
+ nodes: siblingDoc[field?.name]?.root?.children ?? []
33
+ });
34
+ };
35
+
36
+ //# sourceMappingURL=populateLexicalPopulationPromises.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/populate/populateLexicalPopulationPromises.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { RichTextAdapter } from 'payload/types'\n\nimport type { PopulationPromise } from '../field/features/types.js'\nimport type { AdapterProps } from '../types.js'\n\nimport { recurseNodes } from '../forEachNodeRecursively.js'\n\nexport type Args = Parameters<\n RichTextAdapter<SerializedEditorState, AdapterProps>['populationPromises']\n>[0] & {\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n}\n\n/**\n * Appends all new populationPromises to the populationPromises prop\n */\nexport const populateLexicalPopulationPromises = ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: Args) => {\n if (depth <= 0 || currentDepth > depth) {\n return\n }\n\n recurseNodes({\n callback: (node) => {\n if (editorPopulationPromises?.has(node.type)) {\n for (const promise of editorPopulationPromises.get(node.type)) {\n promise({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n }\n },\n nodes: (siblingDoc[field?.name] as SerializedEditorState)?.root?.children ?? [],\n })\n}\n"],"names":["recurseNodes","populateLexicalPopulationPromises","context","currentDepth","depth","draft","editorPopulationPromises","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","callback","node","has","type","promise","get","nodes","name","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAMA,SAASA,YAAY,QAAQ,+BAA8B;AAQ3D;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAAC,EAChDC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACL;IACL,IAAIX,SAAS,KAAKD,eAAeC,OAAO;QACtC;IACF;IAEAJ,aAAa;QACXgB,UAAU,CAACC;YACT,IAAIX,0BAA0BY,IAAID,KAAKE,IAAI,GAAG;gBAC5C,KAAK,MAAMC,WAAWd,yBAAyBe,GAAG,CAACJ,KAAKE,IAAI,EAAG;oBAC7DC,QAAQ;wBACNlB;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAC;wBACAO;wBACAN;wBACAC;wBACAC;wBACAC;wBACAC;oBACF;gBACF;YACF;QACF;QACAO,OAAO,AAACP,UAAU,CAACR,OAAOgB,KAAK,EAA4BC,MAAMC,YAAY,EAAE;IACjF;AACF,EAAC"}
@@ -1,25 +1,29 @@
1
1
  import type { RequestContext } from 'payload';
2
- import type { Field, PayloadRequest } from 'payload/types';
2
+ import type { Field, PayloadRequestWithData } from 'payload/types';
3
3
  import type { PopulationPromise } from '../field/features/types.js';
4
4
  type NestedRichTextFieldsArgs = {
5
5
  context: RequestContext;
6
6
  currentDepth?: number;
7
7
  data: unknown;
8
8
  depth: number;
9
+ draft: boolean;
9
10
  /**
10
11
  * This maps all the population promises to the node types
11
12
  */
12
13
  editorPopulationPromises: Map<string, Array<PopulationPromise>>;
14
+ /**
15
+ * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises
16
+ */
17
+ fieldPromises: Promise<void>[];
13
18
  fields: Field[];
14
19
  findMany: boolean;
15
20
  flattenLocales: boolean;
16
21
  overrideAccess: boolean;
17
22
  populationPromises: Promise<void>[];
18
- promises: Promise<void>[];
19
- req: PayloadRequest;
23
+ req: PayloadRequestWithData;
20
24
  showHiddenFields: boolean;
21
25
  siblingDoc: Record<string, unknown>;
22
26
  };
23
- export declare const recurseNestedFields: ({ context, currentDepth, data, depth, fields, findMany, flattenLocales, overrideAccess, populationPromises, promises, req, showHiddenFields, siblingDoc, }: NestedRichTextFieldsArgs) => void;
27
+ export declare const recurseNestedFields: ({ context, currentDepth, data, depth, draft, fieldPromises, fields, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: NestedRichTextFieldsArgs) => void;
24
28
  export {};
25
29
  //# sourceMappingURL=recurseNestedFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recurseNestedFields.d.ts","sourceRoot":"","sources":["../../src/populate/recurseNestedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAI1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,wBAAwB,EAAE,GAAG,CAAC,MAAM,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kBAAkB,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IACnC,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mBAAmB,2KAe7B,wBAAwB,KAAG,IAuB7B,CAAA"}
@@ -1,13 +1,14 @@
1
1
  import { afterReadTraverseFields } from 'payload/utilities';
2
- export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fields, findMany, flattenLocales, overrideAccess = false, populationPromises, promises, req, showHiddenFields, siblingDoc })=>{
2
+ export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, draft, fieldPromises, fields, findMany, flattenLocales, overrideAccess = false, populationPromises, req, showHiddenFields, siblingDoc })=>{
3
3
  afterReadTraverseFields({
4
4
  collection: null,
5
5
  context,
6
6
  currentDepth,
7
7
  depth,
8
8
  doc: data,
9
+ draft,
9
10
  fallbackLocale: req.fallbackLocale,
10
- fieldPromises: promises,
11
+ fieldPromises,
11
12
  fields,
12
13
  findMany,
13
14
  flattenLocales,
@@ -17,9 +18,7 @@ export const recurseNestedFields = ({ context, currentDepth = 0, data, depth, fi
17
18
  populationPromises,
18
19
  req,
19
20
  showHiddenFields,
20
- siblingDoc,
21
- triggerAccessControl: false,
22
- triggerHooks: false
21
+ siblingDoc
23
22
  });
24
23
  };
25
24
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/populate/recurseNestedFields.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field, PayloadRequest } from 'payload/types'\n\nimport { afterReadTraverseFields } from 'payload/utilities'\n\nimport type { PopulationPromise } from '../field/features/types.js'\n\ntype NestedRichTextFieldsArgs = {\n context: RequestContext\n currentDepth?: number\n data: unknown\n depth: number\n /**\n * This maps all the population promises to the node types\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n fields: Field[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n promises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}\n\nexport const recurseNestedFields = ({\n context,\n currentDepth = 0,\n data,\n depth,\n fields,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n promises,\n req,\n showHiddenFields,\n siblingDoc,\n}: NestedRichTextFieldsArgs): void => {\n afterReadTraverseFields({\n collection: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n context,\n currentDepth,\n depth,\n doc: data as any, // Looks like it's only needed for hooks and access control, so doesn't matter what we pass here right now\n fallbackLocale: req.fallbackLocale,\n fieldPromises: promises, // Not sure if what I pass in here makes sense. But it doesn't seem like it's used at all anyways\n fields,\n findMany,\n flattenLocales,\n global: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n locale: req.locale,\n overrideAccess,\n populationPromises, // This is not the same as populationPromises passed into this recurseNestedFields. These are just promises resolved at the very end.\n req,\n showHiddenFields,\n siblingDoc,\n triggerAccessControl: false, // TODO: Enable this to support access control\n triggerHooks: false, // TODO: Enable this to support hooks\n })\n}\n"],"names":["afterReadTraverseFields","recurseNestedFields","context","currentDepth","data","depth","fields","findMany","flattenLocales","overrideAccess","populationPromises","promises","req","showHiddenFields","siblingDoc","collection","doc","fallbackLocale","fieldPromises","global","locale","triggerAccessControl","triggerHooks"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,uBAAuB,QAAQ,oBAAmB;AAwB3D,OAAO,MAAMC,sBAAsB,CAAC,EAClCC,OAAO,EACPC,eAAe,CAAC,EAChBC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,QAAQ,EACRC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACe;IACzBd,wBAAwB;QACtBe,YAAY;QACZb;QACAC;QACAE;QACAW,KAAKZ;QACLa,gBAAgBL,IAAIK,cAAc;QAClCC,eAAeP;QACfL;QACAC;QACAC;QACAW,QAAQ;QACRC,QAAQR,IAAIQ,MAAM;QAClBX;QACAC;QACAE;QACAC;QACAC;QACAO,sBAAsB;QACtBC,cAAc;IAChB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/populate/recurseNestedFields.ts"],"sourcesContent":["import type { RequestContext } from 'payload'\nimport type { Field, PayloadRequestWithData } from 'payload/types'\n\nimport { afterReadTraverseFields } from 'payload/utilities'\n\nimport type { PopulationPromise } from '../field/features/types.js'\n\ntype NestedRichTextFieldsArgs = {\n context: RequestContext\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n /**\n * This maps all the population promises to the node types\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n /**\n * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n fields: Field[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}\n\nexport const recurseNestedFields = ({\n context,\n currentDepth = 0,\n data,\n depth,\n draft,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: NestedRichTextFieldsArgs): void => {\n afterReadTraverseFields({\n collection: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n context,\n currentDepth,\n depth,\n doc: data as any, // Looks like it's only needed for hooks and access control, so doesn't matter what we pass here right now\n draft,\n fallbackLocale: req.fallbackLocale,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n global: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n locale: req.locale,\n overrideAccess,\n populationPromises, // This is not the same as populationPromises passed into this recurseNestedFields. These are just promises resolved at the very end.\n req,\n showHiddenFields,\n siblingDoc,\n //triggerAccessControl: false, // TODO: Enable this to support access control\n //triggerHooks: false, // TODO: Enable this to support hooks\n })\n}\n"],"names":["afterReadTraverseFields","recurseNestedFields","context","currentDepth","data","depth","draft","fieldPromises","fields","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","collection","doc","fallbackLocale","global","locale"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,uBAAuB,QAAQ,oBAAmB;AA4B3D,OAAO,MAAMC,sBAAsB,CAAC,EAClCC,OAAO,EACPC,eAAe,CAAC,EAChBC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACe;IACzBf,wBAAwB;QACtBgB,YAAY;QACZd;QACAC;QACAE;QACAY,KAAKb;QACLE;QACAY,gBAAgBL,IAAIK,cAAc;QAClCX;QACAC;QACAC;QACAC;QACAS,QAAQ;QACRC,QAAQP,IAAIO,MAAM;QAClBT;QACAC;QACAC;QACAC;QACAC;IAGF;AACF,EAAC"}
@@ -1,4 +1,3 @@
1
- @import 'fonts';
2
1
  @import 'styles';
3
2
  @import './toastify.scss';
4
3
  @import './colors.scss';
@@ -20,9 +19,9 @@
20
19
  --theme-overlay: rgba(5, 5, 5, 0.5);
21
20
  --theme-baseline: #{$baseline-px};
22
21
  --theme-baseline-body-size: #{$baseline-body-size};
23
- --font-body: 'Suisse Intl', system-ui;
22
+ --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
23
+ sans-serif;
24
24
  --font-mono: monospace;
25
- --font-serif: 'Merriweather', serif;
26
25
 
27
26
  --style-radius-s: #{$style-radius-s};
28
27
  --style-radius-m: #{$style-radius-m};
@@ -21,13 +21,6 @@ $baseline: math.div($baseline-px, $baseline-body-size) + rem;
21
21
  @return (math.div($baseline-px, $baseline-body-size) * $multiplier) + rem;
22
22
  }
23
23
 
24
- //////////////////////////////
25
- // FONTS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
26
- //////////////////////////////
27
-
28
- $font-body: 'Suisse Intl' !default;
29
- $font-mono: monospace !default;
30
-
31
24
  //////////////////////////////
32
25
  // COLORS (DEPRECATED. DO NOT USE. PREFER CSS VARIABLES)
33
26
  //////////////////////////////
package/dist/types.d.ts CHANGED
@@ -1,20 +1,27 @@
1
- import type { SerializedEditorState } from 'lexical';
2
- import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js';
1
+ import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical';
3
2
  import type { FieldPermissions } from 'payload/auth';
4
- import type { FieldTypes } from 'payload/config';
3
+ import type { FieldTypes, SanitizedConfig } from 'payload/config';
5
4
  import type { RichTextAdapter, RichTextFieldProps } from 'payload/types';
6
5
  import type React from 'react';
7
6
  import type { FeatureProviderServer } from './field/features/types.js';
8
7
  import type { SanitizedServerEditorConfig } from './field/lexical/config/types.js';
9
8
  export type LexicalEditorProps = {
10
9
  features?: (({ defaultFeatures, }: {
11
- defaultFeatures: FeatureProviderServer<unknown, unknown>[];
12
- }) => FeatureProviderServer<unknown, unknown>[]) | FeatureProviderServer<unknown, unknown>[];
10
+ defaultFeatures: FeatureProviderServer<any, any>[];
11
+ }) => FeatureProviderServer<any, any>[]) | FeatureProviderServer<any, any>[];
13
12
  lexical?: LexicalEditorConfig;
14
13
  };
15
14
  export type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {
16
15
  editorConfig: SanitizedServerEditorConfig;
17
16
  };
17
+ export type LexicalRichTextAdapterProvider =
18
+ /**
19
+ * This is being called during the payload sanitization process
20
+ */
21
+ ({ config, isRoot, }: {
22
+ config: SanitizedConfig;
23
+ isRoot?: boolean;
24
+ }) => Promise<LexicalRichTextAdapter>;
18
25
  export type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {
19
26
  fieldTypes: FieldTyp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AM,MAAM,8BAA8B;AACxC;;GAEG;AACH,CAAC,EACC,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAEvC,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,qBAAqB,EAAE,YAAY,EAAE,YAAY,CAAC,GAAG;IAC/F,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,gBAAgB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,2BAA2B,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'\nimport type { FieldPermissions } from 'payload/auth'\nimport type { FieldTypes } from 'payload/config'\nimport type { RichTextAdapter, RichTextFieldProps } from 'payload/types'\nimport type React from 'react'\n\nimport type { FeatureProviderServer } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\n\nexport type LexicalEditorProps = {\n features?:\n | (({\n defaultFeatures,\n }: {\n defaultFeatures: FeatureProviderServer<unknown, unknown>[]\n }) => FeatureProviderServer<unknown, unknown>[])\n | FeatureProviderServer<unknown, unknown>[]\n lexical?: LexicalEditorConfig\n}\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {\n fieldTypes: FieldTypes\n indexPath: string\n path?: string\n permissions: FieldPermissions\n}\n\nexport type AdapterProps = {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type GeneratedFeatureProviderComponent = {\n ClientComponent: React.ReactNode\n key: string\n order: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAqCA,WAIC"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical'\nimport type { FieldPermissions } from 'payload/auth'\nimport type { FieldTypes, SanitizedConfig } from 'payload/config'\nimport type { RichTextAdapter, RichTextFieldProps } from 'payload/types'\nimport type React from 'react'\n\nimport type { FeatureProviderServer } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\n\nexport type LexicalEditorProps = {\n features?:\n | (({\n defaultFeatures,\n }: {\n defaultFeatures: FeatureProviderServer<any, any>[]\n }) => FeatureProviderServer<any, any>[])\n | FeatureProviderServer<any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type LexicalRichTextAdapterProvider =\n /**\n * This is being called during the payload sanitization process\n */\n ({\n config,\n isRoot,\n }: {\n config: SanitizedConfig\n isRoot?: boolean\n }) => Promise<LexicalRichTextAdapter>\n\nexport type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {\n fieldTypes: FieldTypes\n indexPath: string\n path?: string\n permissions: FieldPermissions\n}\n\nexport type AdapterProps = {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type GeneratedFeatureProviderComponent = {\n ClientComponent: React.ReactNode\n key: string\n order: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AA+CA,WAIC"}
@@ -3,5 +3,5 @@ import type { RichTextField, Validate } from 'payload/types';
3
3
  import type { SanitizedServerEditorConfig } from '../field/lexical/config/types.js';
4
4
  export declare const richTextValidateHOC: ({ editorConfig, }: {
5
5
  editorConfig: SanitizedServerEditorConfig;
6
- }) => Validate<SerializedEditorState<import("lexical/LexicalNode.js").SerializedLexicalNode>, unknown, unknown, RichTextField>;
6
+ }) => Validate<SerializedEditorState<import("lexical").SerializedLexicalNode>, unknown, unknown, RichTextField>;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,6HAyCA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAyCA,CAAA"}