@payloadcms/richtext-lexical 3.0.0-beta.5 → 3.0.0-beta.50

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 (968) hide show
  1. package/README.md +1 -1
  2. package/dist/cell/index.d.ts +5 -2
  3. package/dist/cell/index.d.ts.map +1 -1
  4. package/dist/cell/index.js +45 -31
  5. package/dist/cell/index.js.map +1 -1
  6. package/dist/exports/client/Component-6AVANNNR.js +2 -0
  7. package/dist/exports/client/Component-6AVANNNR.js.map +7 -0
  8. package/dist/exports/client/Component-SZVAYRJX.js +2 -0
  9. package/dist/exports/client/Component-SZVAYRJX.js.map +7 -0
  10. package/dist/exports/client/Field-U5PHZTST.js +2 -0
  11. package/dist/exports/client/Field-U5PHZTST.js.map +7 -0
  12. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js +2 -0
  13. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js.map +7 -0
  14. package/dist/exports/client/bundled.css +1 -0
  15. package/dist/exports/client/chunk-35NZOHAF.js +2 -0
  16. package/dist/exports/client/chunk-35NZOHAF.js.map +7 -0
  17. package/dist/exports/client/chunk-3PZ2ZFQG.js +3 -0
  18. package/dist/exports/client/chunk-3PZ2ZFQG.js.map +7 -0
  19. package/dist/exports/client/chunk-FSTRW2TI.js +2 -0
  20. package/dist/exports/client/chunk-FSTRW2TI.js.map +7 -0
  21. package/dist/exports/client/chunk-M6MN4CA5.js +2 -0
  22. package/dist/exports/client/chunk-M6MN4CA5.js.map +7 -0
  23. package/dist/exports/client/chunk-Y5455JF3.js +2 -0
  24. package/dist/exports/client/chunk-Y5455JF3.js.map +7 -0
  25. package/dist/exports/client/component-FFLILIUZ.js +2 -0
  26. package/dist/exports/client/component-FFLILIUZ.js.map +7 -0
  27. package/dist/exports/client/component-RAVN56DE.js +2 -0
  28. package/dist/exports/client/component-RAVN56DE.js.map +7 -0
  29. package/dist/exports/client/component-Z34HXRX3.js +2 -0
  30. package/dist/exports/client/component-Z34HXRX3.js.map +7 -0
  31. package/dist/exports/client/index.d.ts +52 -0
  32. package/dist/exports/client/index.d.ts.map +1 -0
  33. package/dist/exports/client/index.js +36 -0
  34. package/dist/exports/client/index.js.map +7 -0
  35. package/dist/field/Field.d.ts +1 -2
  36. package/dist/field/Field.d.ts.map +1 -1
  37. package/dist/field/Field.js +69 -55
  38. package/dist/field/Field.js.map +1 -1
  39. package/dist/field/bundled.css +0 -0
  40. package/dist/field/features/align/feature.client.d.ts +4 -1
  41. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  42. package/dist/field/features/align/feature.client.js +135 -54
  43. package/dist/field/features/align/feature.client.js.map +1 -1
  44. package/dist/field/features/align/feature.server.d.ts.map +1 -1
  45. package/dist/field/features/align/feature.server.js +4 -1
  46. package/dist/field/features/align/feature.server.js.map +1 -1
  47. package/dist/field/features/align/i18n.d.ts +3 -0
  48. package/dist/field/features/align/i18n.d.ts.map +1 -0
  49. package/dist/field/features/align/i18n.js +196 -0
  50. package/dist/field/features/align/i18n.js.map +1 -0
  51. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  52. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  53. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  54. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  55. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  56. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  57. package/dist/field/features/blockquote/feature.client.js +60 -46
  58. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  59. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  60. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  61. package/dist/field/features/blockquote/feature.server.js +10 -7
  62. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  63. package/dist/field/features/blockquote/i18n.d.ts +3 -0
  64. package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
  65. package/dist/field/features/blockquote/i18n.js +100 -0
  66. package/dist/field/features/blockquote/i18n.js.map +1 -0
  67. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  68. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  69. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  70. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  71. package/dist/field/features/blocks/component/BlockContent.js +77 -67
  72. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  73. package/dist/field/features/blocks/component/FormSavePlugin.d.ts +1 -2
  74. package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -1
  75. package/dist/field/features/blocks/component/FormSavePlugin.js +2 -2
  76. package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
  77. package/dist/field/features/blocks/component/index.d.ts +0 -1
  78. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  79. package/dist/field/features/blocks/component/index.js +60 -30
  80. package/dist/field/features/blocks/component/index.js.map +1 -1
  81. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts +1 -1
  82. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -1
  83. package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  84. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  85. package/dist/field/features/blocks/drawer/index.js +5 -11
  86. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  87. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  88. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  89. package/dist/field/features/blocks/feature.client.js +58 -27
  90. package/dist/field/features/blocks/feature.client.js.map +1 -1
  91. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  92. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  93. package/dist/field/features/blocks/feature.server.js +62 -82
  94. package/dist/field/features/blocks/feature.server.js.map +1 -1
  95. package/dist/field/features/blocks/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  96. package/dist/field/features/blocks/graphQLPopulationPromise.d.ts.map +1 -0
  97. package/dist/field/features/blocks/graphQLPopulationPromise.js +31 -0
  98. package/dist/field/features/blocks/graphQLPopulationPromise.js.map +1 -0
  99. package/dist/field/features/blocks/i18n.d.ts +3 -0
  100. package/dist/field/features/blocks/i18n.d.ts.map +1 -0
  101. package/dist/field/features/blocks/i18n.js +100 -0
  102. package/dist/field/features/blocks/i18n.js.map +1 -0
  103. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +2 -4
  104. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  105. package/dist/field/features/blocks/nodes/BlocksNode.js +3 -3
  106. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  107. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  108. package/dist/field/features/blocks/plugin/commands.js +1 -2
  109. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  110. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  111. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  112. package/dist/field/features/blocks/plugin/index.js +10 -11
  113. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  114. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  115. package/dist/field/features/blocks/validate.js +22 -36
  116. package/dist/field/features/blocks/validate.js.map +1 -1
  117. package/dist/field/features/converters/html/field/index.d.ts +14 -2
  118. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  119. package/dist/field/features/converters/html/field/index.js +97 -57
  120. package/dist/field/features/converters/html/field/index.js.map +1 -1
  121. package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
  122. package/dist/field/features/createFeaturePropComponent.js +6 -3
  123. package/dist/field/features/createFeaturePropComponent.js.map +1 -1
  124. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
  125. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  126. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  127. package/dist/field/features/debug/testRecorder/feature.server.d.ts.map +1 -0
  128. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +3 -2
  129. package/dist/field/features/debug/testRecorder/feature.server.js.map +1 -0
  130. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  131. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  132. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +68 -45
  133. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  134. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
  135. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
  136. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  137. package/dist/field/features/debug/treeView/feature.server.d.ts.map +1 -0
  138. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +3 -2
  139. package/dist/field/features/debug/treeView/feature.server.js.map +1 -0
  140. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  141. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  142. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +6 -8
  143. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  144. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  145. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  146. package/dist/field/features/format/bold/feature.client.js +26 -23
  147. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  148. package/dist/field/features/format/bold/feature.server.d.ts.map +1 -1
  149. package/dist/field/features/format/bold/feature.server.js +2 -1
  150. package/dist/field/features/format/bold/feature.server.js.map +1 -1
  151. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
  152. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  153. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  154. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  155. package/dist/field/features/format/inlineCode/feature.server.d.ts.map +1 -0
  156. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +3 -2
  157. package/dist/field/features/format/inlineCode/feature.server.js.map +1 -0
  158. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  159. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  160. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  161. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  162. package/dist/field/features/format/italic/feature.client.js +27 -24
  163. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  164. package/dist/field/features/format/italic/feature.server.d.ts.map +1 -1
  165. package/dist/field/features/format/italic/feature.server.js +2 -1
  166. package/dist/field/features/format/italic/feature.server.js.map +1 -1
  167. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  168. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  169. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  170. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  171. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  172. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  173. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  174. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  175. package/dist/field/features/format/strikethrough/feature.server.d.ts.map +1 -1
  176. package/dist/field/features/format/strikethrough/feature.server.js +2 -1
  177. package/dist/field/features/format/strikethrough/feature.server.js.map +1 -1
  178. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  179. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  180. package/dist/field/features/format/subscript/feature.client.js +25 -22
  181. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  182. package/dist/field/features/format/subscript/feature.server.d.ts.map +1 -1
  183. package/dist/field/features/format/subscript/feature.server.js +2 -1
  184. package/dist/field/features/format/subscript/feature.server.js.map +1 -1
  185. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  186. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  187. package/dist/field/features/format/superscript/feature.client.js +25 -22
  188. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  189. package/dist/field/features/format/superscript/feature.server.d.ts.map +1 -1
  190. package/dist/field/features/format/superscript/feature.server.js +2 -1
  191. package/dist/field/features/format/superscript/feature.server.js.map +1 -1
  192. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  193. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  194. package/dist/field/features/format/underline/feature.client.js +25 -22
  195. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  196. package/dist/field/features/format/underline/feature.server.d.ts.map +1 -1
  197. package/dist/field/features/format/underline/feature.server.js +2 -1
  198. package/dist/field/features/format/underline/feature.server.js.map +1 -1
  199. package/dist/field/features/heading/feature.client.d.ts +4 -1
  200. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  201. package/dist/field/features/heading/feature.client.js +75 -54
  202. package/dist/field/features/heading/feature.client.js.map +1 -1
  203. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  204. package/dist/field/features/heading/feature.server.js +9 -6
  205. package/dist/field/features/heading/feature.server.js.map +1 -1
  206. package/dist/field/features/heading/i18n.d.ts +3 -0
  207. package/dist/field/features/heading/i18n.d.ts.map +1 -0
  208. package/dist/field/features/heading/i18n.js +100 -0
  209. package/dist/field/features/heading/i18n.js.map +1 -0
  210. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  211. package/dist/field/features/heading/markdownTransformer.js +1 -2
  212. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  213. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  214. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  215. package/dist/field/features/horizontalRule/component/index.js +67 -0
  216. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  217. package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
  218. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  219. package/dist/field/features/horizontalRule/feature.client.js +77 -0
  220. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  221. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  222. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  223. package/dist/field/features/horizontalRule/feature.server.js +39 -0
  224. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  225. package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
  226. package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
  227. package/dist/field/features/horizontalRule/i18n.js +100 -0
  228. package/dist/field/features/horizontalRule/i18n.js.map +1 -0
  229. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  230. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  231. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  232. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  233. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  234. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  235. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +92 -0
  236. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  237. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  238. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  239. package/dist/field/features/horizontalRule/plugin/index.js +30 -0
  240. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  241. package/dist/field/features/indent/feature.client.d.ts +4 -1
  242. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  243. package/dist/field/features/indent/feature.client.js +47 -42
  244. package/dist/field/features/indent/feature.client.js.map +1 -1
  245. package/dist/field/features/indent/feature.server.d.ts.map +1 -1
  246. package/dist/field/features/indent/feature.server.js +4 -1
  247. package/dist/field/features/indent/feature.server.js.map +1 -1
  248. package/dist/field/features/indent/i18n.d.ts +3 -0
  249. package/dist/field/features/indent/i18n.d.ts.map +1 -0
  250. package/dist/field/features/indent/i18n.js +132 -0
  251. package/dist/field/features/indent/i18n.js.map +1 -0
  252. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  253. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  254. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  255. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  256. package/dist/field/features/link/drawer/baseFields.d.ts +2 -3
  257. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  258. package/dist/field/features/link/drawer/baseFields.js +30 -43
  259. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  260. package/dist/field/features/link/drawer/index.d.ts.map +1 -1
  261. package/dist/field/features/link/drawer/index.js +32 -31
  262. package/dist/field/features/link/drawer/index.js.map +1 -1
  263. package/dist/field/features/link/drawer/types.d.ts +5 -3
  264. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  265. package/dist/field/features/link/drawer/types.js.map +1 -1
  266. package/dist/field/features/link/feature.client.d.ts +13 -1
  267. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  268. package/dist/field/features/link/feature.client.js +65 -47
  269. package/dist/field/features/link/feature.client.js.map +1 -1
  270. package/dist/field/features/link/feature.server.d.ts +10 -6
  271. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  272. package/dist/field/features/link/feature.server.js +66 -17
  273. package/dist/field/features/link/feature.server.js.map +1 -1
  274. package/dist/field/features/link/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  275. package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +1 -0
  276. package/dist/field/features/link/graphQLPopulationPromise.js +31 -0
  277. package/dist/field/features/link/graphQLPopulationPromise.js.map +1 -0
  278. package/dist/field/features/link/i18n.d.ts +3 -0
  279. package/dist/field/features/link/i18n.d.ts.map +1 -0
  280. package/dist/field/features/link/i18n.js +100 -0
  281. package/dist/field/features/link/i18n.js.map +1 -0
  282. package/dist/field/features/link/markdownTransformer.d.ts +6 -0
  283. package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
  284. package/dist/field/features/link/markdownTransformer.js +50 -0
  285. package/dist/field/features/link/markdownTransformer.js.map +1 -0
  286. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  287. package/dist/field/features/link/nodes/AutoLinkNode.js +3 -2
  288. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  289. package/dist/field/features/link/nodes/LinkNode.d.ts +9 -8
  290. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  291. package/dist/field/features/link/nodes/LinkNode.js +28 -11
  292. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  293. package/dist/field/features/link/nodes/types.d.ts +2 -1
  294. package/dist/field/features/link/nodes/types.d.ts.map +1 -1
  295. package/dist/field/features/link/nodes/types.js.map +1 -1
  296. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  297. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  298. package/dist/field/features/link/plugins/autoLink/index.js +11 -12
  299. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  300. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  301. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  302. package/dist/field/features/link/plugins/clickableLink/index.js +5 -6
  303. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  304. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  305. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  306. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  307. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  308. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +179 -143
  309. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  310. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  311. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  312. package/dist/field/features/link/plugins/floatingLinkEditor/index.js +2 -2
  313. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  314. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -6
  315. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  316. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  317. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  318. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  319. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  320. package/dist/field/features/link/plugins/link/index.js +7 -16
  321. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  322. package/dist/field/features/link/validate.d.ts +6 -0
  323. package/dist/field/features/link/validate.d.ts.map +1 -0
  324. package/dist/field/features/link/validate.js +28 -0
  325. package/dist/field/features/link/validate.js.map +1 -0
  326. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  327. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  328. package/dist/field/features/lists/checklist/feature.client.js +69 -44
  329. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  330. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  331. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  332. package/dist/field/features/lists/checklist/feature.server.js +13 -10
  333. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  334. package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
  335. package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
  336. package/dist/field/features/lists/checklist/i18n.js +100 -0
  337. package/dist/field/features/lists/checklist/i18n.js.map +1 -0
  338. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  339. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  340. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  341. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  342. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  343. package/dist/field/features/lists/checklist/plugin/index.js +5 -5
  344. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  345. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  346. package/dist/field/features/lists/htmlConverter.js +13 -6
  347. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  348. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  349. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  350. package/dist/field/features/lists/orderedList/feature.client.js +97 -0
  351. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  352. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  353. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +12 -9
  354. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  355. package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
  356. package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
  357. package/dist/field/features/lists/orderedList/i18n.js +100 -0
  358. package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
  359. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  360. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  361. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  362. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  363. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  364. package/dist/field/features/lists/plugin/index.js +5 -5
  365. package/dist/field/features/lists/plugin/index.js.map +1 -1
  366. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  367. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  368. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  369. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
  370. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
  371. package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
  372. package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
  373. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  374. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  375. package/dist/field/features/lists/unorderedList/feature.client.js +97 -0
  376. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  377. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  378. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +11 -8
  379. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  380. package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
  381. package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
  382. package/dist/field/features/lists/unorderedList/i18n.js +100 -0
  383. package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
  384. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  385. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  386. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  387. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  388. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  389. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  390. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  391. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  392. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  393. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +2 -1
  394. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  395. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -2
  396. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  397. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
  398. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  399. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +4 -5
  400. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  401. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  402. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  403. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  404. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  405. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  406. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  407. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  408. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  409. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  410. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  411. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  412. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  413. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  414. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  415. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  416. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  417. package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  418. package/dist/field/features/migrations/slateToLexical/feature.server.js +2 -1
  419. package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
  420. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -2
  421. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  422. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
  423. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  424. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +4 -5
  425. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  426. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  427. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  428. package/dist/field/features/paragraph/feature.client.js +54 -41
  429. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  430. package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
  431. package/dist/field/features/paragraph/feature.server.js +4 -1
  432. package/dist/field/features/paragraph/feature.server.js.map +1 -1
  433. package/dist/field/features/paragraph/i18n.d.ts +3 -0
  434. package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
  435. package/dist/field/features/paragraph/i18n.js +132 -0
  436. package/dist/field/features/paragraph/i18n.js.map +1 -0
  437. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  438. package/dist/field/features/relationship/drawer/commands.js +1 -2
  439. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  440. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  441. package/dist/field/features/relationship/drawer/index.js +18 -16
  442. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  443. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  444. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  445. package/dist/field/features/relationship/feature.client.js +51 -28
  446. package/dist/field/features/relationship/feature.client.js.map +1 -1
  447. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  448. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  449. package/dist/field/features/relationship/feature.server.js +43 -8
  450. package/dist/field/features/relationship/feature.server.js.map +1 -1
  451. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts +5 -0
  452. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
  453. package/dist/field/features/relationship/graphQLPopulationPromise.js +29 -0
  454. package/dist/field/features/relationship/graphQLPopulationPromise.js.map +1 -0
  455. package/dist/field/features/relationship/i18n.d.ts +3 -0
  456. package/dist/field/features/relationship/i18n.d.ts.map +1 -0
  457. package/dist/field/features/relationship/i18n.js +100 -0
  458. package/dist/field/features/relationship/i18n.js.map +1 -0
  459. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +4 -9
  460. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  461. package/dist/field/features/relationship/nodes/RelationshipNode.js +12 -11
  462. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  463. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  464. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +119 -56
  465. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  466. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  467. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  468. package/dist/field/features/relationship/plugins/index.js +16 -18
  469. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  470. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  471. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -3
  472. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  473. package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
  474. package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
  475. package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
  476. package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
  477. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  478. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  479. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  480. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  481. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  482. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  483. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  484. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  485. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  486. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  487. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  488. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  489. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
  490. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  491. package/dist/field/features/toolbars/fixed/Toolbar/index.js +207 -0
  492. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  493. package/dist/field/features/toolbars/fixed/feature.client.d.ts +7 -0
  494. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  495. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  496. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  497. package/dist/field/features/toolbars/fixed/feature.server.d.ts +19 -0
  498. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  499. package/dist/field/features/toolbars/fixed/feature.server.js +21 -0
  500. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  501. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  502. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  503. package/dist/field/features/toolbars/inline/Toolbar/index.js +319 -0
  504. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  505. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  506. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  507. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  508. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  509. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  510. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  511. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  512. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  513. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  514. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  515. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +34 -23
  516. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  517. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +22 -0
  518. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  519. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +75 -102
  520. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  521. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  522. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  523. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +141 -0
  524. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  525. package/dist/field/features/toolbars/types.d.ts +48 -0
  526. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  527. package/dist/field/features/toolbars/types.js.map +1 -0
  528. package/dist/field/features/typeUtilities.d.ts +8 -0
  529. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  530. package/dist/field/features/typeUtilities.js +8 -0
  531. package/dist/field/features/typeUtilities.js.map +1 -0
  532. package/dist/field/features/types.d.ts +259 -69
  533. package/dist/field/features/types.d.ts.map +1 -1
  534. package/dist/field/features/types.js.map +1 -1
  535. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts +1 -1
  536. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  537. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +35 -37
  538. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  539. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  540. package/dist/field/features/upload/component/index.js +160 -85
  541. package/dist/field/features/upload/component/index.js.map +1 -1
  542. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  543. package/dist/field/features/upload/drawer/commands.js +1 -2
  544. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  545. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  546. package/dist/field/features/upload/drawer/index.js +17 -18
  547. package/dist/field/features/upload/drawer/index.js.map +1 -1
  548. package/dist/field/features/upload/feature.client.d.ts +4 -1
  549. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  550. package/dist/field/features/upload/feature.client.js +52 -26
  551. package/dist/field/features/upload/feature.client.js.map +1 -1
  552. package/dist/field/features/upload/feature.server.d.ts +10 -3
  553. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  554. package/dist/field/features/upload/feature.server.js +93 -15
  555. package/dist/field/features/upload/feature.server.js.map +1 -1
  556. package/dist/field/features/upload/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  557. package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
  558. package/dist/field/features/upload/graphQLPopulationPromise.js +52 -0
  559. package/dist/field/features/upload/graphQLPopulationPromise.js.map +1 -0
  560. package/dist/field/features/upload/i18n.d.ts +3 -0
  561. package/dist/field/features/upload/i18n.d.ts.map +1 -0
  562. package/dist/field/features/upload/i18n.js +100 -0
  563. package/dist/field/features/upload/i18n.js.map +1 -0
  564. package/dist/field/features/upload/nodes/UploadNode.d.ts +7 -19
  565. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  566. package/dist/field/features/upload/nodes/UploadNode.js +45 -15
  567. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  568. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  569. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  570. package/dist/field/features/upload/plugin/index.js +18 -20
  571. package/dist/field/features/upload/plugin/index.js.map +1 -1
  572. package/dist/field/features/upload/validate.d.ts +2 -1
  573. package/dist/field/features/upload/validate.d.ts.map +1 -1
  574. package/dist/field/features/upload/validate.js +37 -10
  575. package/dist/field/features/upload/validate.js.map +1 -1
  576. package/dist/field/index.d.ts +3 -1
  577. package/dist/field/index.d.ts.map +1 -1
  578. package/dist/field/index.js +35 -86
  579. package/dist/field/index.js.map +1 -1
  580. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  581. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  582. package/dist/field/lexical/EditorPlugin.js +8 -4
  583. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  584. package/dist/field/lexical/LexicalEditor.d.ts +3 -1
  585. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  586. package/dist/field/lexical/LexicalEditor.js +157 -77
  587. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  588. package/dist/field/lexical/LexicalProvider.d.ts +1 -2
  589. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  590. package/dist/field/lexical/LexicalProvider.js +52 -41
  591. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  592. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +15 -4
  593. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  594. package/dist/field/lexical/config/client/EditorConfigProvider.js +61 -11
  595. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  596. package/dist/field/lexical/config/client/default.d.ts +1 -1
  597. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  598. package/dist/field/lexical/config/client/default.js.map +1 -1
  599. package/dist/field/lexical/config/client/sanitize.d.ts +3 -2
  600. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  601. package/dist/field/lexical/config/client/sanitize.js +83 -33
  602. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  603. package/dist/field/lexical/config/server/default.d.ts +2 -3
  604. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  605. package/dist/field/lexical/config/server/default.js +12 -10
  606. package/dist/field/lexical/config/server/default.js.map +1 -1
  607. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  608. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  609. package/dist/field/lexical/config/server/loader.js +4 -2
  610. package/dist/field/lexical/config/server/loader.js.map +1 -1
  611. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  612. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  613. package/dist/field/lexical/config/server/sanitize.js +39 -9
  614. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  615. package/dist/field/lexical/config/types.d.ts +3 -1
  616. package/dist/field/lexical/config/types.d.ts.map +1 -1
  617. package/dist/field/lexical/config/types.js.map +1 -1
  618. package/dist/field/lexical/nodes/index.d.ts +1 -2
  619. package/dist/field/lexical/nodes/index.d.ts.map +1 -1
  620. package/dist/field/lexical/nodes/index.js.map +1 -1
  621. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  622. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +3 -3
  623. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  624. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +10 -10
  625. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  626. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  627. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  628. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +5 -5
  629. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  630. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +8 -10
  631. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  632. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  633. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  634. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  635. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  636. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  637. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  638. package/dist/field/lexical/plugins/SlashMenu/index.js +108 -93
  639. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  640. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +2 -2
  641. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  642. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +47 -126
  643. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  644. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +1 -1
  645. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  646. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  647. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +2 -2
  648. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  649. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +116 -67
  650. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  651. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +8 -1
  652. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  653. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +83 -16
  654. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  655. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
  656. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
  657. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +21 -0
  658. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
  659. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  660. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  661. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  662. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  663. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.d.ts +5 -1
  664. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
  665. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.js +5 -18
  666. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
  667. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  668. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  669. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  670. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  671. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  672. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +19 -7
  673. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  674. package/dist/field/lexical/theme/EditorTheme.d.ts.map +1 -1
  675. package/dist/field/lexical/theme/EditorTheme.js +1 -1
  676. package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
  677. package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
  678. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  679. package/dist/field/lexical/ui/ContentEditable.js +3 -4
  680. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  681. package/dist/field/lexical/ui/icons/AI/index.js +26 -17
  682. package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
  683. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  684. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  685. package/dist/field/lexical/ui/icons/Add/index.js +21 -0
  686. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  687. package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
  688. package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
  689. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  690. package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
  691. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  692. package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
  693. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  694. package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
  695. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
  696. package/dist/field/lexical/ui/icons/Block/index.js +30 -24
  697. package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
  698. package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
  699. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
  700. package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
  701. package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
  702. package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
  703. package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
  704. package/dist/field/lexical/ui/icons/Code/index.js +14 -9
  705. package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
  706. package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
  707. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  708. package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
  709. package/dist/field/lexical/ui/icons/H1/index.js +8 -6
  710. package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
  711. package/dist/field/lexical/ui/icons/H2/index.js +8 -6
  712. package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
  713. package/dist/field/lexical/ui/icons/H3/index.js +8 -6
  714. package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
  715. package/dist/field/lexical/ui/icons/H4/index.js +8 -6
  716. package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
  717. package/dist/field/lexical/ui/icons/H5/index.js +8 -6
  718. package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
  719. package/dist/field/lexical/ui/icons/H6/index.js +8 -6
  720. package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
  721. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  722. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  723. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +21 -0
  724. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  725. package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
  726. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  727. package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
  728. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  729. package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
  730. package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
  731. package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
  732. package/dist/field/lexical/ui/icons/Link/index.js +10 -18
  733. package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
  734. package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
  735. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
  736. package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
  737. package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
  738. package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
  739. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  740. package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
  741. package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
  742. package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
  743. package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
  744. package/dist/field/lexical/ui/icons/Text/index.js +8 -6
  745. package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
  746. package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
  747. package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
  748. package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
  749. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  750. package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
  751. package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
  752. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  753. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  754. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  755. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -2
  756. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  757. package/dist/field/lexical/utils/nodeFormat.js +1 -1
  758. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  759. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  760. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  761. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  762. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  763. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  764. package/dist/field/lexical/utils/url.js +13 -2
  765. package/dist/field/lexical/utils/url.js.map +1 -1
  766. package/dist/forEachNodeRecursively.d.ts +10 -0
  767. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  768. package/dist/forEachNodeRecursively.js +24 -0
  769. package/dist/forEachNodeRecursively.js.map +1 -0
  770. package/dist/generateComponentMap.d.ts +1 -1
  771. package/dist/generateComponentMap.d.ts.map +1 -1
  772. package/dist/generateComponentMap.js +21 -29
  773. package/dist/generateComponentMap.js.map +1 -1
  774. package/dist/generateSchemaMap.d.ts +1 -1
  775. package/dist/generateSchemaMap.d.ts.map +1 -1
  776. package/dist/generateSchemaMap.js +4 -12
  777. package/dist/generateSchemaMap.js.map +1 -1
  778. package/dist/i18n.d.ts +3 -0
  779. package/dist/i18n.d.ts.map +1 -0
  780. package/dist/i18n.js +164 -0
  781. package/dist/i18n.js.map +1 -0
  782. package/dist/index.d.ts +21 -36
  783. package/dist/index.d.ts.map +1 -1
  784. package/dist/index.js +592 -201
  785. package/dist/index.js.map +1 -1
  786. package/dist/{populate → populateGraphQL}/defaultValue.d.ts +0 -1
  787. package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
  788. package/dist/{populate → populateGraphQL}/defaultValue.js +1 -19
  789. package/dist/populateGraphQL/defaultValue.js.map +1 -0
  790. package/dist/populateGraphQL/populate.d.ts +17 -0
  791. package/dist/populateGraphQL/populate.d.ts.map +1 -0
  792. package/dist/populateGraphQL/populate.js +28 -0
  793. package/dist/populateGraphQL/populate.js.map +1 -0
  794. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +12 -0
  795. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
  796. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +37 -0
  797. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
  798. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +28 -0
  799. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
  800. package/dist/{populate/recurseNestedFields.js → populateGraphQL/recursivelyPopulateFieldsForGraphQL.js} +7 -5
  801. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
  802. package/dist/recurseNodeTree.d.ts +9 -0
  803. package/dist/recurseNodeTree.d.ts.map +1 -0
  804. package/dist/recurseNodeTree.js +27 -0
  805. package/dist/recurseNodeTree.js.map +1 -0
  806. package/dist/types.d.ts +45 -8
  807. package/dist/types.d.ts.map +1 -1
  808. package/dist/types.js.map +1 -1
  809. package/dist/useLexicalFeature.d.ts.map +1 -1
  810. package/dist/useLexicalFeature.js +6 -3
  811. package/dist/useLexicalFeature.js.map +1 -1
  812. package/dist/validate/index.d.ts +2 -2
  813. package/dist/validate/index.d.ts.map +1 -1
  814. package/dist/validate/index.js +3 -2
  815. package/dist/validate/index.js.map +1 -1
  816. package/dist/validate/validateNodes.d.ts +1 -1
  817. package/dist/validate/validateNodes.d.ts.map +1 -1
  818. package/dist/validate/validateNodes.js +1 -1
  819. package/dist/validate/validateNodes.js.map +1 -1
  820. package/package.json +71 -53
  821. package/components.d.ts +0 -6
  822. package/components.js +0 -7
  823. package/dist/exports/components.d.ts +0 -6
  824. package/dist/exports/components.d.ts.map +0 -1
  825. package/dist/exports/components.js +0 -7
  826. package/dist/exports/components.js.map +0 -1
  827. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  828. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  829. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  830. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  831. package/dist/field/features/blocks/component/index.scss +0 -153
  832. package/dist/field/features/blocks/populationPromise.d.ts.map +0 -1
  833. package/dist/field/features/blocks/populationPromise.js +0 -46
  834. package/dist/field/features/blocks/populationPromise.js.map +0 -1
  835. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  836. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  837. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  838. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  839. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  840. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  841. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  842. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  843. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  844. package/dist/field/features/debug/testrecorder/feature.server.d.ts.map +0 -1
  845. package/dist/field/features/debug/testrecorder/feature.server.js.map +0 -1
  846. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  847. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  848. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  849. package/dist/field/features/debug/testrecorder/plugin/index.scss +0 -49
  850. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  851. package/dist/field/features/debug/treeview/feature.server.d.ts.map +0 -1
  852. package/dist/field/features/debug/treeview/feature.server.js.map +0 -1
  853. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  854. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  855. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  856. package/dist/field/features/debug/treeview/plugin/index.scss +0 -78
  857. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  858. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  859. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  860. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  861. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  862. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  863. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  864. package/dist/field/features/format/inlinecode/feature.server.d.ts.map +0 -1
  865. package/dist/field/features/format/inlinecode/feature.server.js.map +0 -1
  866. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  867. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  868. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  869. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  870. package/dist/field/features/indent/index.scss +0 -4
  871. package/dist/field/features/link/drawer/index.scss +0 -50
  872. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +0 -78
  873. package/dist/field/features/link/populationPromise.d.ts.map +0 -1
  874. package/dist/field/features/link/populationPromise.js +0 -46
  875. package/dist/field/features/link/populationPromise.js.map +0 -1
  876. package/dist/field/features/lists/common/markdown.js.map +0 -1
  877. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  878. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  879. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  880. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  881. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  882. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  883. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  884. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  885. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  886. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  887. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  888. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  889. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  890. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  891. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -14
  892. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +0 -14
  893. package/dist/field/features/relationship/nodes/components/index.scss +0 -97
  894. package/dist/field/features/relationship/populationPromise.d.ts +0 -4
  895. package/dist/field/features/relationship/populationPromise.d.ts.map +0 -1
  896. package/dist/field/features/relationship/populationPromise.js +0 -24
  897. package/dist/field/features/relationship/populationPromise.js.map +0 -1
  898. package/dist/field/features/upload/component/index.scss +0 -152
  899. package/dist/field/features/upload/populationPromise.d.ts.map +0 -1
  900. package/dist/field/features/upload/populationPromise.js +0 -46
  901. package/dist/field/features/upload/populationPromise.js.map +0 -1
  902. package/dist/field/index.scss +0 -46
  903. package/dist/field/lexical/LexicalEditor.scss +0 -56
  904. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  905. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  906. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  907. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.scss +0 -37
  908. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  909. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  910. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  911. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  912. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  913. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  914. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  915. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.scss +0 -100
  916. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  917. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  918. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +0 -270
  919. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  920. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.scss +0 -57
  921. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  922. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  923. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  924. package/dist/field/lexical/plugins/SlashMenu/index.scss +0 -61
  925. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -31
  926. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +0 -1
  927. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +0 -1
  928. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -55
  929. package/dist/field/lexical/theme/EditorTheme.scss +0 -505
  930. package/dist/field/lexical/ui/ContentEditable.scss +0 -25
  931. package/dist/populate/defaultValue.d.ts.map +0 -1
  932. package/dist/populate/defaultValue.js.map +0 -1
  933. package/dist/populate/populate.d.ts +0 -21
  934. package/dist/populate/populate.d.ts.map +0 -1
  935. package/dist/populate/populate.js +0 -21
  936. package/dist/populate/populate.js.map +0 -1
  937. package/dist/populate/recurseNestedFields.d.ts +0 -25
  938. package/dist/populate/recurseNestedFields.d.ts.map +0 -1
  939. package/dist/populate/recurseNestedFields.js.map +0 -1
  940. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  941. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  942. package/dist/populate/richTextRelationshipPromise.js +0 -68
  943. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  944. package/dist/scss/app.scss +0 -209
  945. package/dist/scss/colors.scss +0 -269
  946. package/dist/scss/fonts.scss +0 -75
  947. package/dist/scss/queries.scss +0 -27
  948. package/dist/scss/resets.scss +0 -17
  949. package/dist/scss/styles.scss +0 -11
  950. package/dist/scss/svg.scss +0 -10
  951. package/dist/scss/toastify.scss +0 -58
  952. package/dist/scss/type.scss +0 -117
  953. package/dist/scss/vars.scss +0 -220
  954. package/dist/scss/z-index.scss +0 -9
  955. package/src/index.ts +0 -423
  956. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  957. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  958. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  959. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  960. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  961. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  962. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  963. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  964. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  965. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  966. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  967. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  968. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/field/index.tsx"],"sourcesContent":["'use client'\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'\n\nimport { ShimmerEffect } from '@payloadcms/ui/elements/ShimmerEffect'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { useClientFunctions } from '@payloadcms/ui/providers/ClientFunction'\nimport React, { Suspense, lazy, useEffect, useState } from 'react'\n\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\nimport type { FeatureProviderClient } from './features/types.js'\nimport type { SanitizedClientEditorConfig } from './lexical/config/types.js'\n\nimport { defaultEditorLexicalConfig } from './lexical/config/client/default.js'\nimport { loadClientFeatures } from './lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from './lexical/config/client/sanitize.js'\n\nconst RichTextEditor = lazy(() =>\n import('./Field.js').then((module) => ({ default: module.RichText })),\n)\n\nexport const RichTextField: React.FC<\n FormFieldBase & {\n lexicalEditorConfig: LexicalEditorConfig\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n> = (props) => {\n const { lexicalEditorConfig, richTextComponentMap } = props\n const { schemaPath } = useFieldProps()\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n let featureProviderComponents: GeneratedFeatureProviderComponent[] = richTextComponentMap.get(\n 'features',\n ) as GeneratedFeatureProviderComponent[] // TODO: Type better\n // order by order\n featureProviderComponents = featureProviderComponents.sort((a, b) => a.order - b.order)\n\n const featureComponentsWithFeaturesLength =\n Array.from(richTextComponentMap.keys()).filter(\n (key) => key.startsWith(`feature.`) && !key.includes('.fields.'),\n ).length + featureProviderComponents.length\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureComponentsWithFeaturesLength) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n ),\n )\n }\n }\n }, [\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n featureComponentsWithFeaturesLength,\n ])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n }) // TODO: Type better\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n {finalSanitizedEditorConfig && (\n <RichTextEditor {...props} editorConfig={finalSanitizedEditorConfig} />\n )}\n </Suspense>\n )\n}\n"],"names":["ShimmerEffect","useFieldProps","useClientFunctions","React","Suspense","lazy","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","RichTextEditor","then","module","default","RichText","RichTextField","props","lexicalEditorConfig","richTextComponentMap","schemaPath","clientFunctions","hasLoadedFeatures","setHasLoadedFeatures","featureProviders","setFeatureProviders","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","featureProviderComponents","get","sort","a","b","order","featureComponentsWithFeaturesLength","Array","from","keys","filter","key","startsWith","includes","length","featureProvidersLocal","featureProvidersAndComponentsLoaded","Object","entries","forEach","plugin","push","resolvedClientFeatures","unSanitizedEditorConfig","features","lexical","Fragment","isArray","map","featureProvider","featureComponentKeys","featureComponents","FeatureComponent","ClientComponent","fallback","height","editorConfig"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,aAAa,QAAQ,wCAAuC;AACrE,SAASC,aAAa,QAAQ,0CAAyC;AACvE,SAASC,kBAAkB,QAAQ,0CAAyC;AAC5E,OAAOC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAMlE,SAASC,0BAA0B,QAAQ,qCAAoC;AAC/E,SAASC,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,0BAA0B,QAAQ,sCAAqC;AAEhF,MAAMC,+BAAiBN,KAAK,IAC1B,MAAM,CAAC,cAAcO,IAAI,CAAC,CAACC,SAAY,CAAA;YAAEC,SAASD,OAAOE,QAAQ;QAAC,CAAA;AAGpE,OAAO,MAAMC,gBAMT,CAACC;IACH,MAAM,EAAEC,mBAAmB,EAAEC,oBAAoB,EAAE,GAAGF;IACtD,MAAM,EAAEG,UAAU,EAAE,GAAGnB;IACvB,MAAMoB,kBAAkBnB;IACxB,MAAM,CAACoB,mBAAmBC,qBAAqB,GAAGhB,SAAS;IAE3D,MAAM,CAACiB,kBAAkBC,oBAAoB,GAAGlB,SAA2C,EAAE;IAE7F,MAAM,CAACmB,4BAA4BC,8BAA8B,GAC/DpB,SAAsC;IAExC,IAAIqB,4BAAiET,qBAAqBU,GAAG,CAC3F,WACuC,oBAAoB;;IAC7D,iBAAiB;IACjBD,4BAA4BA,0BAA0BE,IAAI,CAAC,CAACC,GAAGC,IAAMD,EAAEE,KAAK,GAAGD,EAAEC,KAAK;IAEtF,MAAMC,sCACJC,MAAMC,IAAI,CAACjB,qBAAqBkB,IAAI,IAAIC,MAAM,CAC5C,CAACC,MAAQA,IAAIC,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAACD,IAAIE,QAAQ,CAAC,aACrDC,MAAM,GAAGd,0BAA0Bc,MAAM;IAE7CpC,UAAU;QACR,IAAI,CAACgB,mBAAmB;YACtB,MAAMqB,wBAA0D,EAAE;YAClE,IAAIC,sCAAsC;YAE1CC,OAAOC,OAAO,CAACzB,iBAAiB0B,OAAO,CAAC,CAAC,CAACR,KAAKS,OAAO;gBACpD,IAAIT,IAAIC,UAAU,CAAC,CAAC,eAAe,EAAEpB,WAAW,CAAC,CAAC,GAAG;oBACnD,IAAI,CAACmB,IAAIE,QAAQ,CAAC,iBAAiB;wBACjCE,sBAAsBM,IAAI,CAACD;oBAC7B;oBACAJ;gBACF;YACF;YAEA,IAAIA,wCAAwCV,qCAAqC;gBAC/ET,oBAAoBkB;gBACpBpB,qBAAqB;gBAErB;;SAEC,GAED,MAAM2B,yBAAyBzC,mBAAmB;oBAChDY;oBACAD;oBACA+B,yBAAyB;wBACvBC,UAAUT;wBACVU,SAASnC;oBACX;gBACF;gBAEAS,8BACEjB,2BACEQ,sBAAsBA,sBAAsBV,4BAC5C0C;YAGN;QACF;IACF,GAAG;QACD5B;QACAD;QACAD;QACAQ,0BAA0Bc,MAAM;QAChClB;QACAE;QACAR;QACAgB;KACD;IAED,IAAI,CAACZ,mBAAmB;QACtB,qBACE,oBAACnB,MAAMmD,QAAQ,QACZnB,MAAMoB,OAAO,CAAC3B,8BACbA,0BAA0B4B,GAAG,CAAC,CAACC;YAC7B,uGAAuG;YACvG,MAAMC,uBAAuBvB,MAAMC,IAAI,CAACjB,qBAAqBkB,IAAI,IAAIC,MAAM,CAAC,CAACC,MAC3EA,IAAIC,UAAU,CAAC,CAAC,QAAQ,EAAEiB,gBAAgBlB,GAAG,CAAC,YAAY,CAAC;YAE7D,MAAMoB,oBAAuCD,qBAAqBF,GAAG,CAAC,CAACjB;gBACrE,OAAOpB,qBAAqBU,GAAG,CAACU;YAClC,GAAG,oBAAoB;;YAEvB,qBACE,oBAACpC,MAAMmD,QAAQ;gBAACf,KAAKkB,gBAAgBlB,GAAG;eACrCoB,mBAAmBjB,SAChBiB,kBAAkBH,GAAG,CAAC,CAACI;gBACrB,OAAOA;YACT,KACA,MACHH,gBAAgBI,eAAe;QAGtC;IAGR;IAEA,qBACE,oBAACzD;QAAS0D,wBAAU,oBAAC9D;YAAc+D,QAAO;;OACvCrC,4CACC,oBAACf;QAAgB,GAAGM,KAAK;QAAE+C,cAActC;;AAIjD,EAAC"}
1
+ {"version":3,"sources":["../../src/field/index.tsx"],"sourcesContent":["'use client'\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui/client'\nimport React, { Suspense, lazy, useEffect, useState } from 'react'\n\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\nimport type { FeatureProviderClient } from './features/types.js'\nimport type { SanitizedClientEditorConfig } from './lexical/config/types.js'\n\nimport { defaultEditorLexicalConfig } from './lexical/config/client/default.js'\nimport { loadClientFeatures } from './lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from './lexical/config/client/sanitize.js'\n\nconst RichTextEditor = lazy(() =>\n import('./Field.js').then((module) => ({ default: module.RichText })),\n)\n\nexport const RichTextField: React.FC<\n FormFieldBase & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n const { schemaPath } = useFieldProps()\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n let featureProviderComponents: GeneratedFeatureProviderComponent[] = richTextComponentMap.get(\n 'features',\n ) as GeneratedFeatureProviderComponent[]\n // order by order\n featureProviderComponents = featureProviderComponents.sort((a, b) => a.order - b.order)\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n featureProvidersAndComponentsToLoad,\n ])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n }) // TODO: Type better\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n {finalSanitizedEditorConfig && (\n <RichTextEditor {...props} editorConfig={finalSanitizedEditorConfig} />\n )}\n </Suspense>\n )\n}\n"],"names":["ShimmerEffect","useClientFunctions","useFieldProps","React","Suspense","lazy","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","RichTextEditor","then","module","default","RichText","RichTextField","props","admin","lexicalEditorConfig","richTextComponentMap","schemaPath","clientFunctions","hasLoadedFeatures","setHasLoadedFeatures","featureProviders","setFeatureProviders","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","featureProviderComponents","get","sort","a","b","order","featureProvidersAndComponentsToLoad","featureProvider","featureComponentKeys","Array","from","keys","filter","key","startsWith","length","featureProvidersLocal","featureProvidersAndComponentsLoaded","Object","entries","forEach","plugin","includes","push","resolvedClientFeatures","unSanitizedEditorConfig","features","lexical","Fragment","isArray","map","featureComponents","FeatureComponent","ClientComponent","fallback","height","editorConfig"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import type { SanitizedPlugin } from '../features/types.js';
3
3
  export declare const EditorPlugin: React.FC<{
4
4
  anchorElem?: HTMLDivElement;
5
+ clientProps: any;
5
6
  plugin: SanitizedPlugin;
6
7
  }>;
7
8
  //# sourceMappingURL=EditorPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorPlugin.d.ts","sourceRoot":"","sources":["../../../src/field/lexical/EditorPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,MAAM,EAAE,eAAe,CAAA;CACxB,CAMA,CAAA"}
1
+ {"version":3,"file":"EditorPlugin.d.ts","sourceRoot":"","sources":["../../../src/field/lexical/EditorPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,WAAW,EAAE,GAAG,CAAA;IAChB,MAAM,EAAE,eAAe,CAAA;CACxB,CAQA,CAAA"}
@@ -1,11 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import * as React from 'react';
2
- export const EditorPlugin = ({ anchorElem, plugin })=>{
3
+ export const EditorPlugin = ({ anchorElem, clientProps, plugin })=>{
3
4
  if (plugin.position === 'floatingAnchorElem') {
4
- return plugin.Component && /*#__PURE__*/ React.createElement(plugin.Component, {
5
- anchorElem: anchorElem
5
+ return plugin.Component && /*#__PURE__*/ _jsx(plugin.Component, {
6
+ anchorElem: anchorElem,
7
+ clientProps: clientProps
6
8
  });
7
9
  }
8
- return plugin.Component && /*#__PURE__*/ React.createElement(plugin.Component, null);
10
+ return plugin.Component && /*#__PURE__*/ _jsx(plugin.Component, {
11
+ clientProps: clientProps
12
+ });
9
13
  };
10
14
 
11
15
  //# sourceMappingURL=EditorPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/lexical/EditorPlugin.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport type { SanitizedPlugin } from '../features/types.js'\n\nexport const EditorPlugin: React.FC<{\n anchorElem?: HTMLDivElement\n plugin: SanitizedPlugin\n}> = ({ anchorElem, plugin }) => {\n if (plugin.position === 'floatingAnchorElem') {\n return plugin.Component && <plugin.Component anchorElem={anchorElem} />\n }\n\n return plugin.Component && <plugin.Component />\n}\n"],"names":["React","EditorPlugin","anchorElem","plugin","position","Component"],"rangeMappings":";;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAO;AAI9B,OAAO,MAAMC,eAGR,CAAC,EAAEC,UAAU,EAAEC,MAAM,EAAE;IAC1B,IAAIA,OAAOC,QAAQ,KAAK,sBAAsB;QAC5C,OAAOD,OAAOE,SAAS,kBAAI,oBAACF,OAAOE,SAAS;YAACH,YAAYA;;IAC3D;IAEA,OAAOC,OAAOE,SAAS,kBAAI,oBAACF,OAAOE,SAAS;AAC9C,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/lexical/EditorPlugin.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport type { SanitizedPlugin } from '../features/types.js'\n\nexport const EditorPlugin: React.FC<{\n anchorElem?: HTMLDivElement\n clientProps: any\n plugin: SanitizedPlugin\n}> = ({ anchorElem, clientProps, plugin }) => {\n if (plugin.position === 'floatingAnchorElem') {\n return (\n plugin.Component && <plugin.Component anchorElem={anchorElem} clientProps={clientProps} />\n )\n }\n\n return plugin.Component && <plugin.Component clientProps={clientProps} />\n}\n"],"names":["React","EditorPlugin","anchorElem","clientProps","plugin","position","Component"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,YAAYA,WAAW,QAAO;AAI9B,OAAO,MAAMC,eAIR,CAAC,EAAEC,UAAU,EAAEC,WAAW,EAAEC,MAAM,EAAE;IACvC,IAAIA,OAAOC,QAAQ,KAAK,sBAAsB;QAC5C,OACED,OAAOE,SAAS,kBAAI,KAACF,OAAOE,SAAS;YAACJ,YAAYA;YAAYC,aAAaA;;IAE/E;IAEA,OAAOC,OAAOE,SAAS,kBAAI,KAACF,OAAOE,SAAS;QAACH,aAAaA;;AAC5D,EAAC"}
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { LexicalProviderProps } from './LexicalProvider.js';
3
3
  import './LexicalEditor.scss';
4
- export declare const LexicalEditor: React.FC<Pick<LexicalProviderProps, 'editorConfig' | 'onChange'>>;
4
+ export declare const LexicalEditor: React.FC<Pick<LexicalProviderProps, 'editorConfig' | 'onChange'> & {
5
+ editorContainerRef: React.RefObject<HTMLDivElement>;
6
+ }>;
5
7
  //# sourceMappingURL=LexicalEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../../src/field/lexical/LexicalEditor.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,sBAAsB,CAAA;AAQ7B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,CAgH3F,CAAA"}
1
+ {"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../../src/field/lexical/LexicalEditor.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,sBAAsB,CAAA;AAQ7B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG;IACxD,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;CACpD,CA4KF,CAAA"}
@@ -1,38 +1,68 @@
1
1
  'use client';
2
- import lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js';
3
- const { useLexicalComposerContext } = lexicalComposerContextImport;
4
- import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary.js';
5
- import lexicalHistoryPluginImport from '@lexical/react/LexicalHistoryPlugin.js';
6
- const { HistoryPlugin } = lexicalHistoryPluginImport;
7
- import lexicalOnChangePluginImport from '@lexical/react/LexicalOnChangePlugin.js';
8
- const { OnChangePlugin } = lexicalOnChangePluginImport;
9
- import lexicalRichTextPluginImport from '@lexical/react/LexicalRichTextPlugin.js';
10
- const { RichTextPlugin } = lexicalRichTextPluginImport;
11
- import lexicalTabIndentationPluginImport from '@lexical/react/LexicalTabIndentationPlugin.js';
12
- const { TabIndentationPlugin } = lexicalTabIndentationPluginImport;
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
4
+ import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary.js';
5
+ import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin.js';
6
+ import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin.js';
7
+ import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js';
8
+ import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin.js';
9
+ import { useTranslation } from '@payloadcms/ui/client';
10
+ import { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical';
13
11
  import * as React from 'react';
14
12
  import { useEffect, useState } from 'react';
15
13
  import { EditorPlugin } from './EditorPlugin.js';
16
- import './LexicalEditor.scss';
17
- import { FloatingSelectToolbarPlugin } from './plugins/FloatingSelectToolbar/index.js';
14
+ import { useEditorConfigContext } from './config/client/EditorConfigProvider.js';
18
15
  import { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js';
19
16
  import { SlashMenuPlugin } from './plugins/SlashMenu/index.js';
20
17
  import { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js';
21
18
  import { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js';
22
19
  import { LexicalContentEditable } from './ui/ContentEditable.js';
23
20
  export const LexicalEditor = (props)=>{
24
- const { editorConfig, onChange } = props;
21
+ const { editorConfig, editorContainerRef, onChange } = props;
22
+ const editorConfigContext = useEditorConfigContext();
25
23
  const [editor] = useLexicalComposerContext();
24
+ const { t } = useTranslation();
26
25
  const [floatingAnchorElem, setFloatingAnchorElem] = useState(null);
27
26
  const onRef = (_floatingAnchorElem)=>{
28
27
  if (_floatingAnchorElem !== null) {
29
28
  setFloatingAnchorElem(_floatingAnchorElem);
30
29
  }
31
30
  };
31
+ useEffect(()=>{
32
+ if (!editorConfigContext?.uuid) {
33
+ console.error('Lexical Editor must be used within an EditorConfigProvider');
34
+ return;
35
+ }
36
+ if (editorConfigContext?.parentEditor?.uuid) {
37
+ editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext);
38
+ }
39
+ const handleFocus = ()=>{
40
+ editorConfigContext.focusEditor(editorConfigContext);
41
+ };
42
+ const handleBlur = ()=>{
43
+ editorConfigContext.blurEditor(editorConfigContext);
44
+ };
45
+ const unregisterFocus = editor.registerCommand(FOCUS_COMMAND, ()=>{
46
+ handleFocus();
47
+ return true;
48
+ }, COMMAND_PRIORITY_LOW);
49
+ const unregisterBlur = editor.registerCommand(BLUR_COMMAND, ()=>{
50
+ handleBlur();
51
+ return true;
52
+ }, COMMAND_PRIORITY_LOW);
53
+ return ()=>{
54
+ unregisterFocus();
55
+ unregisterBlur();
56
+ editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid);
57
+ };
58
+ }, [
59
+ editor,
60
+ editorConfigContext
61
+ ]);
32
62
  const [isSmallWidthViewport, setIsSmallWidthViewport] = useState(false);
33
63
  useEffect(()=>{
34
64
  const updateViewPortWidth = ()=>{
35
- const isNextSmallWidthViewport = window.matchMedia('(max-width: 1025px)').matches;
65
+ const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches;
36
66
  if (isNextSmallWidthViewport !== isSmallWidthViewport) {
37
67
  setIsSmallWidthViewport(isNextSmallWidthViewport);
38
68
  }
@@ -45,68 +75,118 @@ export const LexicalEditor = (props)=>{
45
75
  }, [
46
76
  isSmallWidthViewport
47
77
  ]);
48
- const ErrorBoundaryComponent = LexicalErrorBoundary.default || LexicalErrorBoundary;
49
- return /*#__PURE__*/ React.createElement(React.Fragment, null, editorConfig.features.plugins.map((plugin)=>{
50
- if (plugin.position === 'top') {
51
- return /*#__PURE__*/ React.createElement(EditorPlugin, {
52
- key: plugin.key,
53
- plugin: plugin
54
- });
55
- }
56
- }), /*#__PURE__*/ React.createElement(RichTextPlugin, {
57
- //@ts-expect-error ts being dumb
58
- ErrorBoundary: ErrorBoundaryComponent,
59
- contentEditable: /*#__PURE__*/ React.createElement("div", {
60
- className: "editor-scroller"
61
- }, /*#__PURE__*/ React.createElement("div", {
62
- className: "editor",
63
- ref: onRef
64
- }, /*#__PURE__*/ React.createElement(LexicalContentEditable, null))),
65
- placeholder: /*#__PURE__*/ React.createElement("p", {
66
- className: "editor-placeholder"
67
- }, "Start typing, or press '/' for commands...")
68
- }), /*#__PURE__*/ React.createElement(OnChangePlugin, {
69
- // Selection changes can be ignored here, reducing the
70
- // frequency that the FieldComponent and Payload receive updates.
71
- // Selection changes are only needed if you are saving selection state
72
- ignoreSelectionChange: true,
73
- onChange: (editorState, editor, tags)=>{
74
- // Ignore any onChange event triggered by focus only
75
- if (!tags.has('focus') || tags.size > 1) {
76
- if (onChange != null) onChange(editorState, editor, tags);
77
- }
78
- }
79
- }), floatingAnchorElem && /*#__PURE__*/ React.createElement(React.Fragment, null, !isSmallWidthViewport && editor.isEditable() && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(DraggableBlockPlugin, {
80
- anchorElem: floatingAnchorElem
81
- }), /*#__PURE__*/ React.createElement(AddBlockHandlePlugin, {
82
- anchorElem: floatingAnchorElem
83
- })), editorConfig.features.plugins.map((plugin)=>{
84
- if (plugin.position === 'floatingAnchorElem' && !(plugin.desktopOnly === true && isSmallWidthViewport)) {
85
- return /*#__PURE__*/ React.createElement(EditorPlugin, {
86
- anchorElem: floatingAnchorElem,
87
- key: plugin.key,
88
- plugin: plugin
89
- });
90
- }
91
- }), editor.isEditable() && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(FloatingSelectToolbarPlugin, {
92
- anchorElem: floatingAnchorElem
93
- }), /*#__PURE__*/ React.createElement(SlashMenuPlugin, {
94
- anchorElem: floatingAnchorElem
95
- }))), editor.isEditable() && /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(HistoryPlugin, null), editorConfig?.features?.markdownTransformers?.length > 0 && /*#__PURE__*/ React.createElement(MarkdownShortcutPlugin, null)), /*#__PURE__*/ React.createElement(TabIndentationPlugin, null), editorConfig.features.plugins.map((plugin)=>{
96
- if (plugin.position === 'normal') {
97
- return /*#__PURE__*/ React.createElement(EditorPlugin, {
98
- key: plugin.key,
99
- plugin: plugin
100
- });
101
- }
102
- }), editorConfig.features.plugins.map((plugin)=>{
103
- if (plugin.position === 'bottom') {
104
- return /*#__PURE__*/ React.createElement(EditorPlugin, {
105
- key: plugin.key,
106
- plugin: plugin
107
- });
108
- }
109
- }));
78
+ return /*#__PURE__*/ _jsxs(React.Fragment, {
79
+ children: [
80
+ editorConfig.features.plugins.map((plugin)=>{
81
+ if (plugin.position === 'aboveContainer') {
82
+ return /*#__PURE__*/ _jsx(EditorPlugin, {
83
+ clientProps: plugin.clientProps,
84
+ plugin: plugin
85
+ }, plugin.key);
86
+ }
87
+ }),
88
+ /*#__PURE__*/ _jsxs("div", {
89
+ className: "editor-container",
90
+ ref: editorContainerRef,
91
+ children: [
92
+ editorConfig.features.plugins.map((plugin)=>{
93
+ if (plugin.position === 'top') {
94
+ return /*#__PURE__*/ _jsx(EditorPlugin, {
95
+ clientProps: plugin.clientProps,
96
+ plugin: plugin
97
+ }, plugin.key);
98
+ }
99
+ }),
100
+ /*#__PURE__*/ _jsx(RichTextPlugin, {
101
+ ErrorBoundary: LexicalErrorBoundary,
102
+ contentEditable: /*#__PURE__*/ _jsx("div", {
103
+ className: "editor-scroller",
104
+ children: /*#__PURE__*/ _jsx("div", {
105
+ className: "editor",
106
+ ref: onRef,
107
+ children: /*#__PURE__*/ _jsx(LexicalContentEditable, {})
108
+ })
109
+ }),
110
+ placeholder: /*#__PURE__*/ _jsx("p", {
111
+ className: "editor-placeholder",
112
+ children: t('lexical:general:placeholder')
113
+ })
114
+ }),
115
+ /*#__PURE__*/ _jsx(OnChangePlugin, {
116
+ // Selection changes can be ignored here, reducing the
117
+ // frequency that the FieldComponent and Payload receive updates.
118
+ // Selection changes are only needed if you are saving selection state
119
+ ignoreSelectionChange: true,
120
+ onChange: (editorState, editor, tags)=>{
121
+ // Ignore any onChange event triggered by focus only
122
+ if (!tags.has('focus') || tags.size > 1) {
123
+ if (onChange != null) onChange(editorState, editor, tags);
124
+ }
125
+ }
126
+ }),
127
+ floatingAnchorElem && /*#__PURE__*/ _jsxs(React.Fragment, {
128
+ children: [
129
+ !isSmallWidthViewport && editor.isEditable() && /*#__PURE__*/ _jsxs(React.Fragment, {
130
+ children: [
131
+ /*#__PURE__*/ _jsx(DraggableBlockPlugin, {
132
+ anchorElem: floatingAnchorElem
133
+ }),
134
+ /*#__PURE__*/ _jsx(AddBlockHandlePlugin, {
135
+ anchorElem: floatingAnchorElem
136
+ })
137
+ ]
138
+ }),
139
+ editorConfig.features.plugins.map((plugin)=>{
140
+ if (plugin.position === 'floatingAnchorElem' && !(plugin.desktopOnly === true && isSmallWidthViewport)) {
141
+ return /*#__PURE__*/ _jsx(EditorPlugin, {
142
+ anchorElem: floatingAnchorElem,
143
+ clientProps: plugin.clientProps,
144
+ plugin: plugin
145
+ }, plugin.key);
146
+ }
147
+ }),
148
+ editor.isEditable() && /*#__PURE__*/ _jsx(React.Fragment, {
149
+ children: /*#__PURE__*/ _jsx(SlashMenuPlugin, {
150
+ anchorElem: floatingAnchorElem
151
+ })
152
+ })
153
+ ]
154
+ }),
155
+ editor.isEditable() && /*#__PURE__*/ _jsxs(React.Fragment, {
156
+ children: [
157
+ /*#__PURE__*/ _jsx(HistoryPlugin, {}),
158
+ editorConfig?.features?.markdownTransformers?.length > 0 && /*#__PURE__*/ _jsx(MarkdownShortcutPlugin, {})
159
+ ]
160
+ }),
161
+ /*#__PURE__*/ _jsx(TabIndentationPlugin, {}),
162
+ editorConfig.features.plugins.map((plugin)=>{
163
+ if (plugin.position === 'normal') {
164
+ return /*#__PURE__*/ _jsx(EditorPlugin, {
165
+ clientProps: plugin.clientProps,
166
+ plugin: plugin
167
+ }, plugin.key);
168
+ }
169
+ }),
170
+ editorConfig.features.plugins.map((plugin)=>{
171
+ if (plugin.position === 'bottom') {
172
+ return /*#__PURE__*/ _jsx(EditorPlugin, {
173
+ clientProps: plugin.clientProps,
174
+ plugin: plugin
175
+ }, plugin.key);
176
+ }
177
+ })
178
+ ]
179
+ }),
180
+ editorConfig.features.plugins.map((plugin)=>{
181
+ if (plugin.position === 'belowContainer') {
182
+ return /*#__PURE__*/ _jsx(EditorPlugin, {
183
+ clientProps: plugin.clientProps,
184
+ plugin: plugin
185
+ }, plugin.key);
186
+ }
187
+ })
188
+ ]
189
+ });
110
190
  };
111
191
 
112
192
  //# sourceMappingURL=LexicalEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/lexical/LexicalEditor.tsx"],"sourcesContent":["'use client'\nimport lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js'\nconst { useLexicalComposerContext } = lexicalComposerContextImport\n\nimport LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary.js'\nimport lexicalHistoryPluginImport from '@lexical/react/LexicalHistoryPlugin.js'\nconst { HistoryPlugin } = lexicalHistoryPluginImport\n\nimport lexicalOnChangePluginImport from '@lexical/react/LexicalOnChangePlugin.js'\nconst { OnChangePlugin } = lexicalOnChangePluginImport\n\nimport lexicalRichTextPluginImport from '@lexical/react/LexicalRichTextPlugin.js'\nconst { RichTextPlugin } = lexicalRichTextPluginImport\n\nimport lexicalTabIndentationPluginImport from '@lexical/react/LexicalTabIndentationPlugin.js'\nconst { TabIndentationPlugin } = lexicalTabIndentationPluginImport\n\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\n\nimport type { LexicalProviderProps } from './LexicalProvider.js'\n\nimport { EditorPlugin } from './EditorPlugin.js'\nimport './LexicalEditor.scss'\nimport { FloatingSelectToolbarPlugin } from './plugins/FloatingSelectToolbar/index.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<Pick<LexicalProviderProps, 'editorConfig' | 'onChange'>> = (\n props,\n) => {\n const { editorConfig, onChange } = props\n const [editor] = useLexicalComposerContext()\n\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem)\n }\n }\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 1025px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n const ErrorBoundaryComponent = LexicalErrorBoundary.default || LexicalErrorBoundary\n\n return (\n <React.Fragment>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'top') {\n return <EditorPlugin key={plugin.key} plugin={plugin} />\n }\n })}\n <RichTextPlugin\n //@ts-expect-error ts being dumb\n ErrorBoundary={ErrorBoundaryComponent}\n contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable />\n </div>\n </div>\n }\n placeholder={\n <p className=\"editor-placeholder\">Start typing, or press '/' for commands...</p>\n }\n />\n <OnChangePlugin\n // Selection changes can be ignored here, reducing the\n // frequency that the FieldComponent and Payload receive updates.\n // Selection changes are only needed if you are saving selection state\n ignoreSelectionChange\n onChange={(editorState, editor, tags) => {\n // Ignore any onChange event triggered by focus only\n if (!tags.has('focus') || tags.size > 1) {\n if (onChange != null) onChange(editorState, editor, tags)\n }\n }}\n />\n {floatingAnchorElem && (\n <React.Fragment>\n {!isSmallWidthViewport && editor.isEditable() && (\n <React.Fragment>\n <DraggableBlockPlugin anchorElem={floatingAnchorElem} />\n <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n {editorConfig.features.plugins.map((plugin) => {\n if (\n plugin.position === 'floatingAnchorElem' &&\n !(plugin.desktopOnly === true && isSmallWidthViewport)\n ) {\n return (\n <EditorPlugin anchorElem={floatingAnchorElem} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n {editor.isEditable() && (\n <React.Fragment>\n <FloatingSelectToolbarPlugin anchorElem={floatingAnchorElem} />\n <SlashMenuPlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n </React.Fragment>\n )}\n {editor.isEditable() && (\n <React.Fragment>\n <HistoryPlugin />\n {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}\n </React.Fragment>\n )}\n\n <TabIndentationPlugin />\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'normal') {\n return <EditorPlugin key={plugin.key} plugin={plugin} />\n }\n })}\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'bottom') {\n return <EditorPlugin key={plugin.key} plugin={plugin} />\n }\n })}\n </React.Fragment>\n )\n}\n"],"names":["lexicalComposerContextImport","useLexicalComposerContext","LexicalErrorBoundary","lexicalHistoryPluginImport","HistoryPlugin","lexicalOnChangePluginImport","OnChangePlugin","lexicalRichTextPluginImport","RichTextPlugin","lexicalTabIndentationPluginImport","TabIndentationPlugin","React","useEffect","useState","EditorPlugin","FloatingSelectToolbarPlugin","MarkdownShortcutPlugin","SlashMenuPlugin","AddBlockHandlePlugin","DraggableBlockPlugin","LexicalContentEditable","LexicalEditor","props","editorConfig","onChange","editor","floatingAnchorElem","setFloatingAnchorElem","onRef","_floatingAnchorElem","isSmallWidthViewport","setIsSmallWidthViewport","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","ErrorBoundaryComponent","default","Fragment","features","plugins","map","plugin","position","key","ErrorBoundary","contentEditable","div","className","ref","placeholder","p","ignoreSelectionChange","editorState","tags","has","size","isEditable","anchorElem","desktopOnly","markdownTransformers","length"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
1
+ {"version":3,"sources":["../../../src/field/lexical/LexicalEditor.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary.js'\nimport { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin.js'\nimport { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin.js'\nimport { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js'\nimport { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin.js'\nimport { useTranslation } from '@payloadcms/ui/client'\nimport { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\n\nimport type { LexicalProviderProps } from './LexicalProvider.js'\n\nimport { EditorPlugin } from './EditorPlugin.js'\nimport './LexicalEditor.scss'\nimport { useEditorConfigContext } from './config/client/EditorConfigProvider.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<\n Pick<LexicalProviderProps, 'editorConfig' | 'onChange'> & {\n editorContainerRef: React.RefObject<HTMLDivElement>\n }\n> = (props) => {\n const { editorConfig, editorContainerRef, onChange } = props\n const editorConfigContext = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n const { t } = useTranslation<{}, string>()\n\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem)\n }\n }\n\n useEffect(() => {\n if (!editorConfigContext?.uuid) {\n console.error('Lexical Editor must be used within an EditorConfigProvider')\n return\n }\n if (editorConfigContext?.parentEditor?.uuid) {\n editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext)\n }\n\n const handleFocus = () => {\n editorConfigContext.focusEditor(editorConfigContext)\n }\n\n const handleBlur = () => {\n editorConfigContext.blurEditor(editorConfigContext)\n }\n\n const unregisterFocus = editor.registerCommand<MouseEvent>(\n FOCUS_COMMAND,\n () => {\n handleFocus()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n const unregisterBlur = editor.registerCommand<MouseEvent>(\n BLUR_COMMAND,\n () => {\n handleBlur()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n return () => {\n unregisterFocus()\n unregisterBlur()\n editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid)\n }\n }, [editor, editorConfigContext])\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n return (\n <React.Fragment>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'aboveContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n <div className=\"editor-container\" ref={editorContainerRef}>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'top') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n <RichTextPlugin\n ErrorBoundary={LexicalErrorBoundary}\n contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable />\n </div>\n </div>\n }\n placeholder={<p className=\"editor-placeholder\">{t('lexical:general:placeholder')}</p>}\n />\n <OnChangePlugin\n // Selection changes can be ignored here, reducing the\n // frequency that the FieldComponent and Payload receive updates.\n // Selection changes are only needed if you are saving selection state\n ignoreSelectionChange\n onChange={(editorState, editor, tags) => {\n // Ignore any onChange event triggered by focus only\n if (!tags.has('focus') || tags.size > 1) {\n if (onChange != null) onChange(editorState, editor, tags)\n }\n }}\n />\n {floatingAnchorElem && (\n <React.Fragment>\n {!isSmallWidthViewport && editor.isEditable() && (\n <React.Fragment>\n <DraggableBlockPlugin anchorElem={floatingAnchorElem} />\n <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n {editorConfig.features.plugins.map((plugin) => {\n if (\n plugin.position === 'floatingAnchorElem' &&\n !(plugin.desktopOnly === true && isSmallWidthViewport)\n ) {\n return (\n <EditorPlugin\n anchorElem={floatingAnchorElem}\n clientProps={plugin.clientProps}\n key={plugin.key}\n plugin={plugin}\n />\n )\n }\n })}\n {editor.isEditable() && (\n <React.Fragment>\n <SlashMenuPlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n </React.Fragment>\n )}\n {editor.isEditable() && (\n <React.Fragment>\n <HistoryPlugin />\n {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}\n </React.Fragment>\n )}\n\n <TabIndentationPlugin />\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'normal') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'bottom') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n </div>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'belowContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","LexicalErrorBoundary","HistoryPlugin","OnChangePlugin","RichTextPlugin","TabIndentationPlugin","useTranslation","BLUR_COMMAND","COMMAND_PRIORITY_LOW","FOCUS_COMMAND","React","useEffect","useState","EditorPlugin","useEditorConfigContext","MarkdownShortcutPlugin","SlashMenuPlugin","AddBlockHandlePlugin","DraggableBlockPlugin","LexicalContentEditable","LexicalEditor","props","editorConfig","editorContainerRef","onChange","editorConfigContext","editor","t","floatingAnchorElem","setFloatingAnchorElem","onRef","_floatingAnchorElem","uuid","console","error","parentEditor","registerChild","handleFocus","focusEditor","handleBlur","blurEditor","unregisterFocus","registerCommand","unregisterBlur","unregisterChild","isSmallWidthViewport","setIsSmallWidthViewport","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","Fragment","features","plugins","map","plugin","position","clientProps","key","div","className","ref","ErrorBoundary","contentEditable","placeholder","p","ignoreSelectionChange","editorState","tags","has","size","isEditable","anchorElem","desktopOnly","markdownTransformers","length"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -1,6 +1,5 @@
1
- import type { EditorState, SerializedEditorState } from 'lexical';
2
- import type { LexicalEditor } from 'lexical';
3
1
  import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
2
+ import type { EditorState, LexicalEditor, SerializedEditorState } from 'lexical';
4
3
  import * as React from 'react';
5
4
  import type { SanitizedClientEditorConfig } from './config/types.js';
6
5
  export type LexicalProviderProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalProvider.d.ts","sourceRoot":"","sources":["../../../src/field/lexical/LexicalProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAMpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,2BAA2B,CAAA;IACzC,UAAU,EAAE,aAAa,GAAG;QAC1B,YAAY,EAAE,2BAA2B,CAAA;QACzC,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,qBAAqB,CAAA;CAC7B,CAAA;AACD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2D1D,CAAA"}
1
+ {"version":3,"file":"LexicalProvider.d.ts","sourceRoot":"","sources":["../../../src/field/lexical/LexicalProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AASpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,2BAA2B,CAAA;IACzC,UAAU,EAAE,aAAa,GAAG;QAC1B,YAAY,EAAE,2BAA2B,CAAA;QACzC,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,qBAAqB,CAAA;CAC7B,CAAA;AACD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsE1D,CAAA"}
@@ -1,19 +1,43 @@
1
1
  'use client';
2
- import lexicalComposerImport from '@lexical/react/LexicalComposer.js';
3
- const { LexicalComposer } = lexicalComposerImport;
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { LexicalComposer } from '@lexical/react/LexicalComposer.js';
4
4
  import * as React from 'react';
5
+ import { useMemo } from 'react';
5
6
  import { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js';
6
- import { EditorConfigProvider } from './config/client/EditorConfigProvider.js';
7
+ import { EditorConfigProvider, useEditorConfigContext } from './config/client/EditorConfigProvider.js';
7
8
  import { getEnabledNodes } from './nodes/index.js';
8
9
  export const LexicalProvider = (props)=>{
9
- const { editorConfig, fieldProps, onChange, path, readOnly } = props;
10
- let { value } = props;
11
- const [initialConfig, setInitialConfig] = React.useState(null);
12
- // set lexical config in useEffect: // TODO: Is this the most performant way to do this? Prob not
13
- React.useEffect(()=>{
14
- const newInitialConfig = {
10
+ const { editorConfig, fieldProps, onChange, path, readOnly, value } = props;
11
+ const parentContext = useEditorConfigContext();
12
+ const editorContainerRef = React.useRef(null);
13
+ const processedValue = useMemo(()=>{
14
+ let processed = value;
15
+ if (editorConfig?.features?.hooks?.load?.length) {
16
+ editorConfig.features.hooks.load.forEach((hook)=>{
17
+ processed = hook({
18
+ incomingEditorState: processed
19
+ });
20
+ });
21
+ }
22
+ return processed;
23
+ }, [
24
+ editorConfig,
25
+ value
26
+ ]);
27
+ // useMemo for the initialConfig that depends on readOnly and processedValue
28
+ const initialConfig = useMemo(()=>{
29
+ if (processedValue && typeof processedValue !== 'object') {
30
+ throw new Error('The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: ' + JSON.stringify(processedValue));
31
+ }
32
+ if (processedValue && Array.isArray(processedValue) && !('root' in processedValue)) {
33
+ throw new Error('You have tried to pass in data from the old, Slate editor, to the new, Lexical editor. This is not supported. There is no automatic conversion from Slate to Lexical data available yet (coming soon). Please remove the data from the field and start again.');
34
+ }
35
+ if (processedValue && 'jsonContent' in processedValue) {
36
+ throw new Error('You have tried to pass in data from payload-plugin-lexical. This is not supported. The data structure has changed in this editor, compared to the plugin, and there is no automatic conversion available yet (coming soon). Please remove the data from the field and start again.');
37
+ }
38
+ return {
15
39
  editable: readOnly !== true,
16
- editorState: value != null ? JSON.stringify(value) : undefined,
40
+ editorState: processedValue != null ? JSON.stringify(processedValue) : undefined,
17
41
  namespace: editorConfig.lexical.namespace,
18
42
  nodes: [
19
43
  ...getEnabledNodes({
@@ -25,43 +49,30 @@ export const LexicalProvider = (props)=>{
25
49
  },
26
50
  theme: editorConfig.lexical.theme
27
51
  };
28
- setInitialConfig(newInitialConfig);
29
52
  }, [
30
53
  editorConfig,
31
- readOnly,
32
- value
54
+ processedValue,
55
+ readOnly
33
56
  ]);
34
- if (editorConfig?.features?.hooks?.load?.length) {
35
- editorConfig.features.hooks.load.forEach((hook)=>{
36
- value = hook({
37
- incomingEditorState: value
38
- });
39
- });
40
- }
41
- if (value && typeof value !== 'object') {
42
- throw new Error('The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: ' + JSON.stringify(value));
43
- }
44
- if (value && Array.isArray(value) && !('root' in value)) {
45
- throw new Error('You have tried to pass in data from the old, Slate editor, to the new, Lexical editor. This is not supported. There is no automatic conversion from Slate to Lexical data available yet (coming soon). Please remove the data from the field and start again.');
46
- }
47
- if (value && 'jsonContent' in value) {
48
- throw new Error('You have tried to pass in data from payload-plugin-lexical. This is not supported. The data structure has changed in this editor, compared to the plugin, and there is no automatic conversion available yet (coming soon). Please remove the data from the field and start again.');
49
- }
50
57
  if (!initialConfig) {
51
- return /*#__PURE__*/ React.createElement("p", null, "Loading...");
58
+ return /*#__PURE__*/ _jsx("p", {
59
+ children: "Loading..."
60
+ });
52
61
  }
53
- return /*#__PURE__*/ React.createElement(LexicalComposer, {
62
+ return /*#__PURE__*/ _jsx(LexicalComposer, {
54
63
  initialConfig: initialConfig,
55
- key: path
56
- }, /*#__PURE__*/ React.createElement(EditorConfigProvider, {
57
- editorConfig: editorConfig,
58
- fieldProps: fieldProps
59
- }, /*#__PURE__*/ React.createElement("div", {
60
- className: "editor-shell"
61
- }, /*#__PURE__*/ React.createElement(LexicalEditorComponent, {
62
- editorConfig: editorConfig,
63
- onChange: onChange
64
- }))));
64
+ children: /*#__PURE__*/ _jsx(EditorConfigProvider, {
65
+ editorConfig: editorConfig,
66
+ editorContainerRef: editorContainerRef,
67
+ fieldProps: fieldProps,
68
+ parentContext: parentContext,
69
+ children: /*#__PURE__*/ _jsx(LexicalEditorComponent, {
70
+ editorConfig: editorConfig,
71
+ editorContainerRef: editorContainerRef,
72
+ onChange: onChange
73
+ })
74
+ })
75
+ }, path);
65
76
  };
66
77
 
67
78
  //# sourceMappingURL=LexicalProvider.js.map