@payloadcms/richtext-lexical 3.0.0-beta.7 → 3.0.0-canary.03427d3

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 (971) 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.map +1 -0
  214. package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js +11 -8
  215. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  216. package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.d.ts +4 -1
  217. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  218. package/dist/field/features/horizontalRule/feature.client.js +77 -0
  219. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  220. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  221. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js +8 -5
  222. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  223. package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
  224. package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
  225. package/dist/field/features/horizontalRule/i18n.js +100 -0
  226. package/dist/field/features/horizontalRule/i18n.js.map +1 -0
  227. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts.map +1 -1
  228. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js.map +1 -1
  229. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts +3 -5
  230. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  231. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js +10 -7
  232. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  233. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  234. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  235. package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js +5 -9
  236. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  237. package/dist/field/features/indent/feature.client.d.ts +4 -1
  238. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  239. package/dist/field/features/indent/feature.client.js +47 -42
  240. package/dist/field/features/indent/feature.client.js.map +1 -1
  241. package/dist/field/features/indent/feature.server.d.ts.map +1 -1
  242. package/dist/field/features/indent/feature.server.js +4 -1
  243. package/dist/field/features/indent/feature.server.js.map +1 -1
  244. package/dist/field/features/indent/i18n.d.ts +3 -0
  245. package/dist/field/features/indent/i18n.d.ts.map +1 -0
  246. package/dist/field/features/indent/i18n.js +132 -0
  247. package/dist/field/features/indent/i18n.js.map +1 -0
  248. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  249. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  250. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  251. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  252. package/dist/field/features/link/drawer/baseFields.d.ts +2 -3
  253. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  254. package/dist/field/features/link/drawer/baseFields.js +30 -43
  255. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  256. package/dist/field/features/link/drawer/index.d.ts.map +1 -1
  257. package/dist/field/features/link/drawer/index.js +32 -31
  258. package/dist/field/features/link/drawer/index.js.map +1 -1
  259. package/dist/field/features/link/drawer/types.d.ts +5 -3
  260. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  261. package/dist/field/features/link/drawer/types.js.map +1 -1
  262. package/dist/field/features/link/feature.client.d.ts +13 -1
  263. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  264. package/dist/field/features/link/feature.client.js +65 -47
  265. package/dist/field/features/link/feature.client.js.map +1 -1
  266. package/dist/field/features/link/feature.server.d.ts +10 -6
  267. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  268. package/dist/field/features/link/feature.server.js +66 -17
  269. package/dist/field/features/link/feature.server.js.map +1 -1
  270. package/dist/field/features/link/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  271. package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +1 -0
  272. package/dist/field/features/link/graphQLPopulationPromise.js +31 -0
  273. package/dist/field/features/link/graphQLPopulationPromise.js.map +1 -0
  274. package/dist/field/features/link/i18n.d.ts +3 -0
  275. package/dist/field/features/link/i18n.d.ts.map +1 -0
  276. package/dist/field/features/link/i18n.js +100 -0
  277. package/dist/field/features/link/i18n.js.map +1 -0
  278. package/dist/field/features/link/markdownTransformer.d.ts +6 -0
  279. package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
  280. package/dist/field/features/link/markdownTransformer.js +50 -0
  281. package/dist/field/features/link/markdownTransformer.js.map +1 -0
  282. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  283. package/dist/field/features/link/nodes/AutoLinkNode.js +3 -2
  284. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  285. package/dist/field/features/link/nodes/LinkNode.d.ts +9 -8
  286. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  287. package/dist/field/features/link/nodes/LinkNode.js +28 -11
  288. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  289. package/dist/field/features/link/nodes/types.d.ts +2 -1
  290. package/dist/field/features/link/nodes/types.d.ts.map +1 -1
  291. package/dist/field/features/link/nodes/types.js.map +1 -1
  292. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  293. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  294. package/dist/field/features/link/plugins/autoLink/index.js +11 -12
  295. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  296. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  297. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  298. package/dist/field/features/link/plugins/clickableLink/index.js +5 -6
  299. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  300. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  301. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  302. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  303. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  304. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +179 -143
  305. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  306. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  307. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  308. package/dist/field/features/link/plugins/floatingLinkEditor/index.js +2 -2
  309. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  310. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -6
  311. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  312. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  313. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  314. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  315. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  316. package/dist/field/features/link/plugins/link/index.js +7 -16
  317. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  318. package/dist/field/features/link/validate.d.ts +6 -0
  319. package/dist/field/features/link/validate.d.ts.map +1 -0
  320. package/dist/field/features/link/validate.js +28 -0
  321. package/dist/field/features/link/validate.js.map +1 -0
  322. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  323. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  324. package/dist/field/features/lists/checklist/feature.client.js +69 -44
  325. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  326. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  327. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  328. package/dist/field/features/lists/checklist/feature.server.js +13 -10
  329. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  330. package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
  331. package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
  332. package/dist/field/features/lists/checklist/i18n.js +100 -0
  333. package/dist/field/features/lists/checklist/i18n.js.map +1 -0
  334. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  335. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  336. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  337. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  338. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  339. package/dist/field/features/lists/checklist/plugin/index.js +5 -5
  340. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  341. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  342. package/dist/field/features/lists/htmlConverter.js +13 -6
  343. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  344. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  345. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  346. package/dist/field/features/lists/orderedList/feature.client.js +97 -0
  347. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  348. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  349. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +12 -9
  350. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  351. package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
  352. package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
  353. package/dist/field/features/lists/orderedList/i18n.js +100 -0
  354. package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
  355. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  356. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  357. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  358. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  359. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  360. package/dist/field/features/lists/plugin/index.js +5 -5
  361. package/dist/field/features/lists/plugin/index.js.map +1 -1
  362. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  363. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  364. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  365. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
  366. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
  367. package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
  368. package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
  369. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  370. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  371. package/dist/field/features/lists/unorderedList/feature.client.js +97 -0
  372. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  373. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  374. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +11 -8
  375. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  376. package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
  377. package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
  378. package/dist/field/features/lists/unorderedList/i18n.js +100 -0
  379. package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
  380. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  381. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  382. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  383. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  384. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  385. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  386. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  387. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  388. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  389. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +2 -1
  390. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  391. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -2
  392. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  393. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
  394. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  395. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +4 -5
  396. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  397. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  398. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  399. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  400. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  401. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  402. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  403. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  404. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  405. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  406. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  407. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  408. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  409. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  410. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  411. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  412. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  413. package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  414. package/dist/field/features/migrations/slateToLexical/feature.server.js +2 -1
  415. package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
  416. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -2
  417. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  418. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
  419. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  420. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +4 -5
  421. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  422. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  423. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  424. package/dist/field/features/paragraph/feature.client.js +54 -41
  425. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  426. package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
  427. package/dist/field/features/paragraph/feature.server.js +4 -1
  428. package/dist/field/features/paragraph/feature.server.js.map +1 -1
  429. package/dist/field/features/paragraph/i18n.d.ts +3 -0
  430. package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
  431. package/dist/field/features/paragraph/i18n.js +132 -0
  432. package/dist/field/features/paragraph/i18n.js.map +1 -0
  433. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  434. package/dist/field/features/relationship/drawer/commands.js +1 -2
  435. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  436. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  437. package/dist/field/features/relationship/drawer/index.js +18 -16
  438. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  439. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  440. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  441. package/dist/field/features/relationship/feature.client.js +51 -28
  442. package/dist/field/features/relationship/feature.client.js.map +1 -1
  443. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  444. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  445. package/dist/field/features/relationship/feature.server.js +43 -8
  446. package/dist/field/features/relationship/feature.server.js.map +1 -1
  447. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts +5 -0
  448. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
  449. package/dist/field/features/relationship/graphQLPopulationPromise.js +29 -0
  450. package/dist/field/features/relationship/graphQLPopulationPromise.js.map +1 -0
  451. package/dist/field/features/relationship/i18n.d.ts +3 -0
  452. package/dist/field/features/relationship/i18n.d.ts.map +1 -0
  453. package/dist/field/features/relationship/i18n.js +100 -0
  454. package/dist/field/features/relationship/i18n.js.map +1 -0
  455. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +4 -9
  456. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  457. package/dist/field/features/relationship/nodes/RelationshipNode.js +12 -11
  458. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  459. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  460. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +119 -56
  461. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  462. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  463. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  464. package/dist/field/features/relationship/plugins/index.js +16 -18
  465. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  466. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  467. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -3
  468. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  469. package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
  470. package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
  471. package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
  472. package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
  473. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  474. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  475. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  476. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  477. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  478. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  479. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  480. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  481. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  482. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  483. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  484. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  485. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
  486. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  487. package/dist/field/features/toolbars/fixed/Toolbar/index.js +207 -0
  488. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  489. package/dist/field/features/toolbars/fixed/feature.client.d.ts +7 -0
  490. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  491. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  492. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  493. package/dist/field/features/toolbars/fixed/feature.server.d.ts +19 -0
  494. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  495. package/dist/field/features/toolbars/fixed/feature.server.js +21 -0
  496. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  497. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  498. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  499. package/dist/field/features/toolbars/inline/Toolbar/index.js +319 -0
  500. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  501. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  502. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  503. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  504. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  505. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  506. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  507. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  508. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  509. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  510. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  511. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +34 -23
  512. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  513. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +22 -0
  514. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  515. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +75 -102
  516. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  517. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  518. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  519. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +141 -0
  520. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  521. package/dist/field/features/toolbars/types.d.ts +48 -0
  522. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  523. package/dist/field/features/toolbars/types.js.map +1 -0
  524. package/dist/field/features/typeUtilities.d.ts +8 -0
  525. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  526. package/dist/field/features/typeUtilities.js +8 -0
  527. package/dist/field/features/typeUtilities.js.map +1 -0
  528. package/dist/field/features/types.d.ts +259 -69
  529. package/dist/field/features/types.d.ts.map +1 -1
  530. package/dist/field/features/types.js.map +1 -1
  531. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts +1 -1
  532. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  533. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +35 -37
  534. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  535. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  536. package/dist/field/features/upload/component/index.js +160 -85
  537. package/dist/field/features/upload/component/index.js.map +1 -1
  538. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  539. package/dist/field/features/upload/drawer/commands.js +1 -2
  540. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  541. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  542. package/dist/field/features/upload/drawer/index.js +17 -18
  543. package/dist/field/features/upload/drawer/index.js.map +1 -1
  544. package/dist/field/features/upload/feature.client.d.ts +4 -1
  545. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  546. package/dist/field/features/upload/feature.client.js +52 -26
  547. package/dist/field/features/upload/feature.client.js.map +1 -1
  548. package/dist/field/features/upload/feature.server.d.ts +10 -3
  549. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  550. package/dist/field/features/upload/feature.server.js +93 -15
  551. package/dist/field/features/upload/feature.server.js.map +1 -1
  552. package/dist/field/features/upload/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  553. package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
  554. package/dist/field/features/upload/graphQLPopulationPromise.js +52 -0
  555. package/dist/field/features/upload/graphQLPopulationPromise.js.map +1 -0
  556. package/dist/field/features/upload/i18n.d.ts +3 -0
  557. package/dist/field/features/upload/i18n.d.ts.map +1 -0
  558. package/dist/field/features/upload/i18n.js +100 -0
  559. package/dist/field/features/upload/i18n.js.map +1 -0
  560. package/dist/field/features/upload/nodes/UploadNode.d.ts +7 -19
  561. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  562. package/dist/field/features/upload/nodes/UploadNode.js +45 -15
  563. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  564. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  565. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  566. package/dist/field/features/upload/plugin/index.js +18 -20
  567. package/dist/field/features/upload/plugin/index.js.map +1 -1
  568. package/dist/field/features/upload/validate.d.ts +2 -1
  569. package/dist/field/features/upload/validate.d.ts.map +1 -1
  570. package/dist/field/features/upload/validate.js +37 -10
  571. package/dist/field/features/upload/validate.js.map +1 -1
  572. package/dist/field/index.d.ts +3 -1
  573. package/dist/field/index.d.ts.map +1 -1
  574. package/dist/field/index.js +35 -86
  575. package/dist/field/index.js.map +1 -1
  576. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  577. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  578. package/dist/field/lexical/EditorPlugin.js +8 -4
  579. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  580. package/dist/field/lexical/LexicalEditor.d.ts +3 -1
  581. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  582. package/dist/field/lexical/LexicalEditor.js +157 -77
  583. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  584. package/dist/field/lexical/LexicalProvider.d.ts +1 -2
  585. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  586. package/dist/field/lexical/LexicalProvider.js +52 -41
  587. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  588. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +15 -4
  589. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  590. package/dist/field/lexical/config/client/EditorConfigProvider.js +61 -11
  591. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  592. package/dist/field/lexical/config/client/default.d.ts +1 -1
  593. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  594. package/dist/field/lexical/config/client/default.js.map +1 -1
  595. package/dist/field/lexical/config/client/sanitize.d.ts +3 -2
  596. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  597. package/dist/field/lexical/config/client/sanitize.js +83 -33
  598. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  599. package/dist/field/lexical/config/server/default.d.ts +2 -3
  600. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  601. package/dist/field/lexical/config/server/default.js +11 -11
  602. package/dist/field/lexical/config/server/default.js.map +1 -1
  603. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  604. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  605. package/dist/field/lexical/config/server/loader.js +4 -2
  606. package/dist/field/lexical/config/server/loader.js.map +1 -1
  607. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  608. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  609. package/dist/field/lexical/config/server/sanitize.js +39 -9
  610. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  611. package/dist/field/lexical/config/types.d.ts +3 -1
  612. package/dist/field/lexical/config/types.d.ts.map +1 -1
  613. package/dist/field/lexical/config/types.js.map +1 -1
  614. package/dist/field/lexical/nodes/index.d.ts +1 -2
  615. package/dist/field/lexical/nodes/index.d.ts.map +1 -1
  616. package/dist/field/lexical/nodes/index.js.map +1 -1
  617. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  618. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +3 -3
  619. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  620. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +10 -10
  621. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  622. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  623. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  624. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +5 -5
  625. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  626. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +8 -10
  627. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  628. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  629. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  630. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  631. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  632. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  633. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  634. package/dist/field/lexical/plugins/SlashMenu/index.js +108 -93
  635. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  636. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +2 -2
  637. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  638. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +39 -123
  639. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  640. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +1 -1
  641. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  642. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  643. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +2 -2
  644. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  645. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +109 -65
  646. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  647. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +8 -1
  648. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  649. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +83 -16
  650. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  651. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
  652. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
  653. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +21 -0
  654. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
  655. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.d.ts +5 -1
  656. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
  657. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.js +5 -18
  658. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
  659. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  660. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  661. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  662. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  663. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +4 -2
  664. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  665. package/dist/field/lexical/theme/EditorTheme.d.ts.map +1 -1
  666. package/dist/field/lexical/theme/EditorTheme.js +1 -1
  667. package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
  668. package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
  669. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  670. package/dist/field/lexical/ui/ContentEditable.js +3 -4
  671. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  672. package/dist/field/lexical/ui/icons/AI/index.js +26 -17
  673. package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
  674. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  675. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  676. package/dist/field/lexical/ui/icons/Add/index.js +21 -0
  677. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  678. package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
  679. package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
  680. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  681. package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
  682. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  683. package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
  684. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  685. package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
  686. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
  687. package/dist/field/lexical/ui/icons/Block/index.js +30 -24
  688. package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
  689. package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
  690. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
  691. package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
  692. package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
  693. package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
  694. package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
  695. package/dist/field/lexical/ui/icons/Code/index.js +14 -9
  696. package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
  697. package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
  698. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  699. package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
  700. package/dist/field/lexical/ui/icons/H1/index.js +8 -6
  701. package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
  702. package/dist/field/lexical/ui/icons/H2/index.js +8 -6
  703. package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
  704. package/dist/field/lexical/ui/icons/H3/index.js +8 -6
  705. package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
  706. package/dist/field/lexical/ui/icons/H4/index.js +8 -6
  707. package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
  708. package/dist/field/lexical/ui/icons/H5/index.js +8 -6
  709. package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
  710. package/dist/field/lexical/ui/icons/H6/index.js +8 -6
  711. package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
  712. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +11 -9
  713. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  714. package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
  715. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  716. package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
  717. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  718. package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
  719. package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
  720. package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
  721. package/dist/field/lexical/ui/icons/Link/index.js +10 -18
  722. package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
  723. package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
  724. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
  725. package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
  726. package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
  727. package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
  728. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  729. package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
  730. package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
  731. package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
  732. package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
  733. package/dist/field/lexical/ui/icons/Text/index.js +8 -6
  734. package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
  735. package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
  736. package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
  737. package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
  738. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  739. package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
  740. package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
  741. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  742. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  743. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  744. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -2
  745. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  746. package/dist/field/lexical/utils/nodeFormat.js +1 -1
  747. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  748. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  749. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  750. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  751. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  752. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  753. package/dist/field/lexical/utils/url.js +13 -2
  754. package/dist/field/lexical/utils/url.js.map +1 -1
  755. package/dist/forEachNodeRecursively.d.ts +10 -0
  756. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  757. package/dist/forEachNodeRecursively.js +24 -0
  758. package/dist/forEachNodeRecursively.js.map +1 -0
  759. package/dist/generateComponentMap.d.ts +1 -1
  760. package/dist/generateComponentMap.d.ts.map +1 -1
  761. package/dist/generateComponentMap.js +21 -29
  762. package/dist/generateComponentMap.js.map +1 -1
  763. package/dist/generateSchemaMap.d.ts +1 -1
  764. package/dist/generateSchemaMap.d.ts.map +1 -1
  765. package/dist/generateSchemaMap.js +4 -12
  766. package/dist/generateSchemaMap.js.map +1 -1
  767. package/dist/i18n.d.ts +3 -0
  768. package/dist/i18n.d.ts.map +1 -0
  769. package/dist/i18n.js +164 -0
  770. package/dist/i18n.js.map +1 -0
  771. package/dist/index.d.ts +21 -36
  772. package/dist/index.d.ts.map +1 -1
  773. package/dist/index.js +619 -200
  774. package/dist/index.js.map +1 -1
  775. package/dist/{populate → populateGraphQL}/defaultValue.d.ts +0 -1
  776. package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
  777. package/dist/{populate → populateGraphQL}/defaultValue.js +1 -19
  778. package/dist/populateGraphQL/defaultValue.js.map +1 -0
  779. package/dist/populateGraphQL/populate.d.ts +17 -0
  780. package/dist/populateGraphQL/populate.d.ts.map +1 -0
  781. package/dist/populateGraphQL/populate.js +28 -0
  782. package/dist/populateGraphQL/populate.js.map +1 -0
  783. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +12 -0
  784. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
  785. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +37 -0
  786. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
  787. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +28 -0
  788. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
  789. package/dist/{populate/recurseNestedFields.js → populateGraphQL/recursivelyPopulateFieldsForGraphQL.js} +7 -5
  790. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
  791. package/dist/recurseNodeTree.d.ts +9 -0
  792. package/dist/recurseNodeTree.d.ts.map +1 -0
  793. package/dist/recurseNodeTree.js +27 -0
  794. package/dist/recurseNodeTree.js.map +1 -0
  795. package/dist/types.d.ts +45 -8
  796. package/dist/types.d.ts.map +1 -1
  797. package/dist/types.js.map +1 -1
  798. package/dist/useLexicalFeature.d.ts.map +1 -1
  799. package/dist/useLexicalFeature.js +6 -3
  800. package/dist/useLexicalFeature.js.map +1 -1
  801. package/dist/validate/index.d.ts +2 -2
  802. package/dist/validate/index.d.ts.map +1 -1
  803. package/dist/validate/index.js +3 -2
  804. package/dist/validate/index.js.map +1 -1
  805. package/dist/validate/validateNodes.d.ts +1 -1
  806. package/dist/validate/validateNodes.d.ts.map +1 -1
  807. package/dist/validate/validateNodes.js +1 -1
  808. package/dist/validate/validateNodes.js.map +1 -1
  809. package/package.json +71 -53
  810. package/dist/exports/components.d.ts +0 -6
  811. package/dist/exports/components.d.ts.map +0 -1
  812. package/dist/exports/components.js +0 -7
  813. package/dist/exports/components.js.map +0 -1
  814. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  815. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  816. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  817. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  818. package/dist/field/features/blocks/component/index.scss +0 -153
  819. package/dist/field/features/blocks/populationPromise.d.ts.map +0 -1
  820. package/dist/field/features/blocks/populationPromise.js +0 -46
  821. package/dist/field/features/blocks/populationPromise.js.map +0 -1
  822. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  823. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  824. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  825. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  826. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  827. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  828. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  829. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  830. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  831. package/dist/field/features/debug/testrecorder/feature.server.d.ts.map +0 -1
  832. package/dist/field/features/debug/testrecorder/feature.server.js.map +0 -1
  833. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  834. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  835. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  836. package/dist/field/features/debug/testrecorder/plugin/index.scss +0 -49
  837. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  838. package/dist/field/features/debug/treeview/feature.server.d.ts.map +0 -1
  839. package/dist/field/features/debug/treeview/feature.server.js.map +0 -1
  840. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  841. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  842. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  843. package/dist/field/features/debug/treeview/plugin/index.scss +0 -78
  844. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  845. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  846. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  847. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  848. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  849. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  850. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  851. package/dist/field/features/format/inlinecode/feature.server.d.ts.map +0 -1
  852. package/dist/field/features/format/inlinecode/feature.server.js.map +0 -1
  853. package/dist/field/features/horizontalrule/component/index.d.ts.map +0 -1
  854. package/dist/field/features/horizontalrule/component/index.js.map +0 -1
  855. package/dist/field/features/horizontalrule/feature.client.d.ts.map +0 -1
  856. package/dist/field/features/horizontalrule/feature.client.js +0 -53
  857. package/dist/field/features/horizontalrule/feature.client.js.map +0 -1
  858. package/dist/field/features/horizontalrule/feature.server.d.ts.map +0 -1
  859. package/dist/field/features/horizontalrule/feature.server.js.map +0 -1
  860. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +0 -1
  861. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +0 -1
  862. package/dist/field/features/horizontalrule/plugin/index.d.ts +0 -6
  863. package/dist/field/features/horizontalrule/plugin/index.d.ts.map +0 -1
  864. package/dist/field/features/horizontalrule/plugin/index.js.map +0 -1
  865. package/dist/field/features/horizontalrule/plugin/index.scss +0 -20
  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 -208
  945. package/dist/scss/colors.scss +0 -269
  946. package/dist/scss/queries.scss +0 -27
  947. package/dist/scss/resets.scss +0 -17
  948. package/dist/scss/styles.scss +0 -11
  949. package/dist/scss/svg.scss +0 -10
  950. package/dist/scss/toastify.scss +0 -58
  951. package/dist/scss/type.scss +0 -117
  952. package/dist/scss/vars.scss +0 -213
  953. package/dist/scss/z-index.scss +0 -9
  954. package/src/index.ts +0 -423
  955. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  956. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  957. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  958. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  959. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  960. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  961. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  962. /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts +0 -0
  963. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts +0 -0
  964. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts +0 -0
  965. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js +0 -0
  966. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  967. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  968. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  969. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  970. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  971. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
package/dist/index.js CHANGED
@@ -1,202 +1,635 @@
1
1
  import { withMergedProps } from '@payloadcms/ui/elements/withMergedProps';
2
- import { withNullableJSONSchemaType } from 'payload/utilities';
3
- import { RichTextCell } from './cell/index.js';
4
- import { RichTextField } from './field/index.js';
5
- import { defaultEditorConfig, defaultEditorFeatures, defaultSanitizedServerEditorConfig } from './field/lexical/config/server/default.js';
2
+ import { fileURLToPath } from 'node:url';
3
+ import path from 'path';
4
+ import { afterChangeTraverseFields, afterReadTraverseFields, beforeChangeTraverseFields, beforeValidateTraverseFields, getDependencies, withNullableJSONSchemaType } from 'payload';
5
+ // eslint-disable-next-line payload/no-imports-from-exports-dir
6
+ import { RichTextCell, RichTextField } from './exports/client/index.js';
7
+ import { defaultEditorConfig, defaultEditorFeatures } from './field/lexical/config/server/default.js';
6
8
  import { loadFeatures } from './field/lexical/config/server/loader.js';
7
- import { sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js';
9
+ import { sanitizeServerEditorConfig, sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js';
8
10
  import { cloneDeep } from './field/lexical/utils/cloneDeep.js';
9
11
  import { getGenerateComponentMap } from './generateComponentMap.js';
10
12
  import { getGenerateSchemaMap } from './generateSchemaMap.js';
11
- import { richTextRelationshipPromise } from './populate/richTextRelationshipPromise.js';
13
+ import { i18n } from './i18n.js';
14
+ import { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js';
15
+ import { recurseNodeTree } from './recurseNodeTree.js';
12
16
  import { richTextValidateHOC } from './validate/index.js';
17
+ let defaultSanitizedServerEditorConfig = null;
18
+ const filename = fileURLToPath(import.meta.url);
19
+ const dirname = path.dirname(filename);
13
20
  export function lexicalEditor(props) {
14
- let resolvedFeatureMap = null;
15
- let finalSanitizedEditorConfig// For server only
16
- ;
17
- if (!props || !props.features && !props.lexical) {
18
- finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig);
19
- resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap;
20
- } else {
21
- let features = props.features && typeof props.features === 'function' ? props.features({
22
- defaultFeatures: cloneDeep(defaultEditorFeatures)
23
- }) : props.features;
24
- if (!features) {
25
- features = cloneDeep(defaultEditorFeatures);
21
+ return async ({ config, isRoot })=>{
22
+ if (process.env.NODE_ENV !== 'production') {
23
+ const resolvedDependencies = await getDependencies(dirname, [
24
+ 'lexical',
25
+ '@lexical/headless',
26
+ '@lexical/link',
27
+ '@lexical/list',
28
+ '@lexical/mark',
29
+ '@lexical/markdown',
30
+ '@lexical/react',
31
+ '@lexical/rich-text',
32
+ '@lexical/selection',
33
+ '@lexical/utils'
34
+ ]);
35
+ // Go through each resolved dependency. If any dependency has a mismatching version, throw an error
36
+ const foundVersions = [];
37
+ for (const [_pkg, { version }] of resolvedDependencies.resolved){
38
+ if (!foundVersions.includes(version)) {
39
+ foundVersions.push(version);
40
+ }
41
+ }
42
+ if (foundVersions.length !== 1) {
43
+ throw new Error(`Mismatching dependency versions found: ${foundVersions.join(', ')}. All payload and @payloadcms/* packages must have the same version.`);
44
+ }
26
45
  }
27
- const lexical = props.lexical;
28
- resolvedFeatureMap = loadFeatures({
29
- unSanitizedEditorConfig: {
30
- features,
31
- lexical: lexical ? lexical : defaultEditorConfig.lexical
46
+ let features = [];
47
+ let resolvedFeatureMap;
48
+ let finalSanitizedEditorConfig// For server only
49
+ ;
50
+ if (!props || !props.features && !props.lexical) {
51
+ if (!defaultSanitizedServerEditorConfig) {
52
+ defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(defaultEditorConfig, config);
53
+ features = cloneDeep(defaultEditorFeatures);
32
54
  }
33
- });
34
- finalSanitizedEditorConfig = {
35
- features: sanitizeServerFeatures(resolvedFeatureMap),
36
- lexical: lexical ? lexical : defaultEditorConfig.lexical,
37
- resolvedFeatureMap
38
- };
39
- }
40
- return {
41
- CellComponent: withMergedProps({
42
- Component: RichTextCell,
43
- toMergeIntoProps: {
44
- lexicalEditorConfig: finalSanitizedEditorConfig.lexical
55
+ finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig);
56
+ resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap;
57
+ } else {
58
+ const rootEditor = config.editor;
59
+ let rootEditorFeatures = [];
60
+ if (typeof rootEditor === 'object' && 'features' in rootEditor) {
61
+ rootEditorFeatures = rootEditor.features;
45
62
  }
46
- }),
47
- FieldComponent: withMergedProps({
48
- Component: RichTextField,
49
- toMergeIntoProps: {
50
- lexicalEditorConfig: finalSanitizedEditorConfig.lexical
63
+ features = props.features && typeof props.features === 'function' ? props.features({
64
+ defaultFeatures: cloneDeep(defaultEditorFeatures),
65
+ rootFeatures: rootEditorFeatures
66
+ }) : props.features;
67
+ if (!features) {
68
+ features = cloneDeep(defaultEditorFeatures);
51
69
  }
52
- }),
53
- afterReadPromise: ({ field, incomingEditorState, siblingDoc })=>{
54
- return new Promise((resolve, reject)=>{
55
- const promises = [];
56
- if (finalSanitizedEditorConfig?.features?.hooks?.afterReadPromises?.length) {
57
- for (const afterReadPromise of finalSanitizedEditorConfig.features.hooks.afterReadPromises){
58
- const promise = afterReadPromise({
59
- field,
60
- incomingEditorState,
61
- siblingDoc
62
- });
63
- if (promise) {
64
- promises.push(promise);
65
- }
66
- }
70
+ const lexical = props.lexical;
71
+ resolvedFeatureMap = await loadFeatures({
72
+ config,
73
+ isRoot,
74
+ unSanitizedEditorConfig: {
75
+ features,
76
+ lexical: lexical ? lexical : defaultEditorConfig.lexical
67
77
  }
68
- Promise.all(promises).then(()=>resolve()).catch((error)=>reject(error));
69
78
  });
70
- },
71
- editorConfig: finalSanitizedEditorConfig,
72
- generateComponentMap: getGenerateComponentMap({
73
- resolvedFeatureMap
74
- }),
75
- generateSchemaMap: getGenerateSchemaMap({
76
- resolvedFeatureMap
77
- }),
78
- outputSchema: ({ collectionIDFieldTypes, config, field, interfaceNameDefinitions, isRequired })=>{
79
- let outputSchema = {
80
- // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.
81
- // In the future, we should
82
- // 1) allow recursive children
83
- // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.
84
- type: withNullableJSONSchemaType('object', isRequired),
85
- properties: {
86
- root: {
87
- type: 'object',
88
- additionalProperties: false,
89
- properties: {
90
- type: {
91
- type: 'string'
92
- },
93
- children: {
94
- type: 'array',
95
- items: {
96
- type: 'object',
97
- additionalProperties: true,
98
- properties: {
99
- type: {
100
- type: 'string'
79
+ finalSanitizedEditorConfig = {
80
+ features: sanitizeServerFeatures(resolvedFeatureMap),
81
+ lexical: lexical ? lexical : defaultEditorConfig.lexical,
82
+ resolvedFeatureMap
83
+ };
84
+ }
85
+ const featureI18n = finalSanitizedEditorConfig.features.i18n;
86
+ for(const lang in i18n){
87
+ if (!featureI18n[lang]) {
88
+ featureI18n[lang] = {
89
+ lexical: {}
90
+ };
91
+ }
92
+ featureI18n[lang].lexical.general = i18n[lang];
93
+ }
94
+ return {
95
+ CellComponent: withMergedProps({
96
+ Component: RichTextCell,
97
+ toMergeIntoProps: {
98
+ admin: props?.admin,
99
+ lexicalEditorConfig: finalSanitizedEditorConfig.lexical
100
+ }
101
+ }),
102
+ FieldComponent: withMergedProps({
103
+ Component: RichTextField,
104
+ toMergeIntoProps: {
105
+ admin: props?.admin,
106
+ lexicalEditorConfig: finalSanitizedEditorConfig.lexical
107
+ }
108
+ }),
109
+ editorConfig: finalSanitizedEditorConfig,
110
+ features,
111
+ generateComponentMap: getGenerateComponentMap({
112
+ resolvedFeatureMap
113
+ }),
114
+ generateSchemaMap: getGenerateSchemaMap({
115
+ resolvedFeatureMap
116
+ }),
117
+ graphQLPopulationPromises ({ context, currentDepth, depth, draft, field, fieldPromises, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc }) {
118
+ // check if there are any features with nodes which have populationPromises for this field
119
+ if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {
120
+ populateLexicalPopulationPromises({
121
+ context,
122
+ currentDepth: currentDepth ?? 0,
123
+ depth,
124
+ draft,
125
+ editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,
126
+ field,
127
+ fieldPromises,
128
+ findMany,
129
+ flattenLocales,
130
+ overrideAccess,
131
+ populationPromises,
132
+ req,
133
+ showHiddenFields,
134
+ siblingDoc
135
+ });
136
+ }
137
+ },
138
+ hooks: {
139
+ afterChange: [
140
+ async ({ collection, context: _context, global, operation, path, req, schemaPath, value })=>{
141
+ if (!finalSanitizedEditorConfig.features.hooks.afterChange.size && !finalSanitizedEditorConfig.features.getSubFields.size) {
142
+ return value;
143
+ }
144
+ const context = _context;
145
+ const nodeIDMap = {};
146
+ /**
147
+ * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.
148
+ */ const originalNodeIDMap = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap;
149
+ if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {
150
+ return value;
151
+ }
152
+ recurseNodeTree({
153
+ nodeIDMap,
154
+ nodes: value?.root?.children ?? []
155
+ });
156
+ // eslint-disable-next-line prefer-const
157
+ for (let [id, node] of Object.entries(nodeIDMap)){
158
+ const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange;
159
+ if (afterChangeHooks?.has(node.type)) {
160
+ for (const hook of afterChangeHooks.get(node.type)){
161
+ if (!originalNodeIDMap[id]) {
162
+ console.warn('(afterChange) No original node found for node with id', id, 'node:', node, 'path', path.join('.'));
163
+ continue;
164
+ }
165
+ node = await hook({
166
+ context,
167
+ node,
168
+ operation,
169
+ originalNode: originalNodeIDMap[id],
170
+ parentRichTextFieldPath: path,
171
+ parentRichTextFieldSchemaPath: schemaPath,
172
+ req
173
+ });
174
+ }
175
+ }
176
+ const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type);
177
+ const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(node.type);
178
+ if (subFieldFn) {
179
+ const subFields = subFieldFn({
180
+ node,
181
+ req
182
+ });
183
+ const data = subFieldDataFn({
184
+ node,
185
+ req
186
+ });
187
+ const originalData = subFieldDataFn({
188
+ node: originalNodeIDMap[id],
189
+ req
190
+ });
191
+ if (subFields?.length) {
192
+ await afterChangeTraverseFields({
193
+ collection,
194
+ context,
195
+ data: originalData,
196
+ doc: data,
197
+ fields: subFields,
198
+ global,
199
+ operation,
200
+ path,
201
+ previousDoc: data,
202
+ previousSiblingDoc: {
203
+ ...data
101
204
  },
102
- version: {
103
- type: 'integer'
205
+ req,
206
+ schemaPath,
207
+ siblingData: originalData || {},
208
+ siblingDoc: {
209
+ ...data
104
210
  }
105
- },
106
- required: [
107
- 'type',
108
- 'version'
109
- ]
211
+ });
110
212
  }
111
- },
112
- direction: {
113
- oneOf: [
114
- {
115
- enum: [
116
- 'ltr',
117
- 'rtl'
118
- ]
119
- },
120
- {
121
- type: 'null'
213
+ }
214
+ }
215
+ return value;
216
+ }
217
+ ],
218
+ afterRead: [
219
+ /**
220
+ * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.
221
+ */ async ({ collection, context: context, currentDepth, depth, draft, fallbackLocale, fieldPromises, findMany, flattenLocales, global, locale, overrideAccess, path, populationPromises, req, schemaPath, showHiddenFields, triggerAccessControl, triggerHooks, value })=>{
222
+ if (!finalSanitizedEditorConfig.features.hooks.afterRead.size && !finalSanitizedEditorConfig.features.getSubFields.size) {
223
+ return value;
224
+ }
225
+ const flattenedNodes = [];
226
+ recurseNodeTree({
227
+ flattenedNodes,
228
+ nodes: value?.root?.children ?? []
229
+ });
230
+ for (let node of flattenedNodes){
231
+ const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead;
232
+ if (afterReadHooks?.has(node.type)) {
233
+ for (const hook of afterReadHooks.get(node.type)){
234
+ node = await hook({
235
+ context,
236
+ currentDepth,
237
+ depth,
238
+ draft,
239
+ fallbackLocale,
240
+ fieldPromises,
241
+ findMany,
242
+ flattenLocales,
243
+ locale,
244
+ node,
245
+ overrideAccess,
246
+ parentRichTextFieldPath: path,
247
+ parentRichTextFieldSchemaPath: schemaPath,
248
+ populationPromises,
249
+ req,
250
+ showHiddenFields,
251
+ triggerAccessControl,
252
+ triggerHooks
253
+ });
254
+ }
255
+ }
256
+ const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type);
257
+ const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(node.type);
258
+ if (subFieldFn) {
259
+ const subFields = subFieldFn({
260
+ node,
261
+ req
262
+ });
263
+ const data = subFieldDataFn({
264
+ node,
265
+ req
266
+ });
267
+ if (subFields?.length) {
268
+ afterReadTraverseFields({
269
+ collection,
270
+ context,
271
+ currentDepth,
272
+ depth,
273
+ doc: data,
274
+ draft,
275
+ fallbackLocale,
276
+ fieldPromises,
277
+ fields: subFields,
278
+ findMany,
279
+ flattenLocales,
280
+ global,
281
+ locale,
282
+ overrideAccess,
283
+ path,
284
+ populationPromises,
285
+ req,
286
+ schemaPath,
287
+ showHiddenFields,
288
+ siblingDoc: data,
289
+ triggerAccessControl,
290
+ triggerHooks
291
+ });
292
+ }
293
+ }
294
+ }
295
+ return value;
296
+ }
297
+ ],
298
+ beforeChange: [
299
+ async ({ collection, context: _context, duplicate, errors, field, global, mergeLocaleActions, operation, path, req, schemaPath, siblingData, siblingDocWithLocales, skipValidation, value })=>{
300
+ if (!finalSanitizedEditorConfig.features.hooks.beforeChange.size && !finalSanitizedEditorConfig.features.getSubFields.size) {
301
+ return value;
302
+ }
303
+ const context = _context;
304
+ const nodeIDMap = {};
305
+ /**
306
+ * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.
307
+ */ const originalNodeIDMap = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap;
308
+ if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {
309
+ return value;
310
+ }
311
+ const originalNodeWithLocalesIDMap = {};
312
+ recurseNodeTree({
313
+ nodeIDMap,
314
+ nodes: value?.root?.children ?? []
315
+ });
316
+ if (siblingDocWithLocales?.[field.name]) {
317
+ recurseNodeTree({
318
+ nodeIDMap: originalNodeWithLocalesIDMap,
319
+ nodes: siblingDocWithLocales[field.name]?.root?.children ?? []
320
+ });
321
+ }
322
+ // eslint-disable-next-line prefer-const
323
+ for (let [id, node] of Object.entries(nodeIDMap)){
324
+ const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange;
325
+ if (beforeChangeHooks?.has(node.type)) {
326
+ for (const hook of beforeChangeHooks.get(node.type)){
327
+ if (!originalNodeIDMap[id]) {
328
+ console.warn('(beforeChange) No original node found for node with id', id, 'node:', node, 'path', path.join('.'));
329
+ continue;
122
330
  }
123
- ]
124
- },
125
- format: {
126
- type: 'string',
127
- enum: [
128
- 'left',
129
- 'start',
130
- 'center',
131
- 'right',
132
- 'end',
133
- 'justify',
134
- ''
135
- ]
136
- },
137
- indent: {
138
- type: 'integer'
139
- },
140
- version: {
141
- type: 'integer'
331
+ node = await hook({
332
+ context,
333
+ duplicate,
334
+ errors,
335
+ mergeLocaleActions,
336
+ node,
337
+ operation,
338
+ originalNode: originalNodeIDMap[id],
339
+ originalNodeWithLocales: originalNodeWithLocalesIDMap[id],
340
+ parentRichTextFieldPath: path,
341
+ parentRichTextFieldSchemaPath: schemaPath,
342
+ req,
343
+ skipValidation
344
+ });
345
+ }
346
+ }
347
+ const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type);
348
+ const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(node.type);
349
+ if (subFieldFn) {
350
+ const subFields = subFieldFn({
351
+ node,
352
+ req
353
+ });
354
+ const data = subFieldDataFn({
355
+ node,
356
+ req
357
+ });
358
+ const originalData = subFieldDataFn({
359
+ node: originalNodeIDMap[id],
360
+ req
361
+ });
362
+ const originalDataWithLocales = subFieldDataFn({
363
+ node: originalNodeWithLocalesIDMap[id],
364
+ req
365
+ });
366
+ if (subFields?.length) {
367
+ await beforeChangeTraverseFields({
368
+ id,
369
+ collection,
370
+ context,
371
+ data,
372
+ doc: originalData,
373
+ docWithLocales: originalDataWithLocales ?? {},
374
+ duplicate,
375
+ errors,
376
+ fields: subFields,
377
+ global,
378
+ mergeLocaleActions,
379
+ operation,
380
+ path,
381
+ req,
382
+ schemaPath,
383
+ siblingData: data,
384
+ siblingDoc: originalData,
385
+ siblingDocWithLocales: originalDataWithLocales ?? {},
386
+ skipValidation
387
+ });
388
+ }
389
+ }
390
+ }
391
+ /**
392
+ * within the beforeChange hook, id's may be re-generated.
393
+ * Example:
394
+ * 1. Seed data contains IDs for block feature blocks.
395
+ * 2. Those are used in beforeValidate
396
+ * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning
397
+ * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.
398
+ * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,
399
+ * and in beforeChange, which is where modifications to the provided IDs can occur.
400
+ */ const newOriginalNodeIDMap = {};
401
+ const previousValue = siblingData[field.name];
402
+ recurseNodeTree({
403
+ nodeIDMap: newOriginalNodeIDMap,
404
+ nodes: previousValue?.root?.children ?? []
405
+ });
406
+ if (!context.internal) {
407
+ // Add to context, for other hooks to use
408
+ context.internal = {};
409
+ }
410
+ if (!context.internal.richText) {
411
+ context.internal.richText = {};
412
+ }
413
+ context.internal.richText[path.join('.')] = {
414
+ originalNodeIDMap: newOriginalNodeIDMap
415
+ };
416
+ return value;
417
+ }
418
+ ],
419
+ beforeValidate: [
420
+ async ({ collection, context, global, operation, overrideAccess, path, previousValue, req, schemaPath, value })=>{
421
+ // return value if there are NO hooks
422
+ if (!finalSanitizedEditorConfig.features.hooks.beforeValidate.size && !finalSanitizedEditorConfig.features.hooks.afterChange.size && !finalSanitizedEditorConfig.features.hooks.beforeChange.size && !finalSanitizedEditorConfig.features.getSubFields.size) {
423
+ return value;
424
+ }
425
+ /**
426
+ * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.
427
+ *
428
+ */ /**
429
+ * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:
430
+ * - afterRead
431
+ *
432
+ * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and
433
+ * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with
434
+ * an ID.
435
+ */ //const flattenedNodes: SerializedLexicalNode[] = []
436
+ /**
437
+ * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:
438
+ * - afterChange
439
+ * - beforeChange
440
+ * - beforeValidate
441
+ * - beforeDuplicate
442
+ *
443
+ * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.
444
+ */ const originalNodeIDMap = {};
445
+ recurseNodeTree({
446
+ nodeIDMap: originalNodeIDMap,
447
+ nodes: previousValue?.root?.children ?? []
448
+ });
449
+ if (!context.internal) {
450
+ // Add to context, for other hooks to use
451
+ context.internal = {};
452
+ }
453
+ if (!context.internal.richText) {
454
+ context.internal.richText = {};
455
+ }
456
+ context.internal.richText[path.join('.')] = {
457
+ originalNodeIDMap
458
+ };
459
+ /**
460
+ * Now that the maps for all hooks are set up, we can run the validate hook
461
+ */ if (!finalSanitizedEditorConfig.features.hooks.beforeValidate.size) {
462
+ return value;
463
+ }
464
+ const nodeIDMap = {};
465
+ recurseNodeTree({
466
+ //flattenedNodes,
467
+ nodeIDMap,
468
+ nodes: value?.root?.children ?? []
469
+ });
470
+ // eslint-disable-next-line prefer-const
471
+ for (let [id, node] of Object.entries(nodeIDMap)){
472
+ const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate;
473
+ if (beforeValidateHooks?.has(node.type)) {
474
+ for (const hook of beforeValidateHooks.get(node.type)){
475
+ if (!originalNodeIDMap[id]) {
476
+ console.warn('(beforeValidate) No original node found for node with id', id, 'node:', node, 'path', path.join('.'));
477
+ continue;
478
+ }
479
+ node = await hook({
480
+ context,
481
+ node,
482
+ operation,
483
+ originalNode: originalNodeIDMap[id],
484
+ overrideAccess,
485
+ parentRichTextFieldPath: path,
486
+ parentRichTextFieldSchemaPath: schemaPath,
487
+ req
488
+ });
489
+ }
490
+ }
491
+ const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type);
492
+ const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(node.type);
493
+ if (subFieldFn) {
494
+ const subFields = subFieldFn({
495
+ node,
496
+ req
497
+ });
498
+ const data = subFieldDataFn({
499
+ node,
500
+ req
501
+ });
502
+ const originalData = subFieldDataFn({
503
+ node: originalNodeIDMap[id],
504
+ req
505
+ });
506
+ if (subFields?.length) {
507
+ await beforeValidateTraverseFields({
508
+ id,
509
+ collection,
510
+ context,
511
+ data,
512
+ doc: originalData,
513
+ fields: subFields,
514
+ global,
515
+ operation,
516
+ overrideAccess,
517
+ path,
518
+ req,
519
+ schemaPath,
520
+ siblingData: data,
521
+ siblingDoc: originalData
522
+ });
523
+ }
142
524
  }
143
- },
144
- required: [
145
- 'children',
146
- 'direction',
147
- 'format',
148
- 'indent',
149
- 'type',
150
- 'version'
151
- ]
525
+ }
526
+ return value;
152
527
  }
153
- },
154
- required: [
155
- 'root'
156
528
  ]
157
- };
158
- for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes.modifyOutputSchemas){
159
- outputSchema = modifyOutputSchema({
160
- collectionIDFieldTypes,
161
- config,
162
- currentSchema: outputSchema,
163
- field,
164
- interfaceNameDefinitions,
165
- isRequired
166
- });
167
- }
168
- return outputSchema;
169
- },
170
- populationPromise ({ context, currentDepth, depth, field, findMany, flattenLocales, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc }) {
171
- // check if there are any features with nodes which have populationPromises for this field
172
- if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {
173
- return richTextRelationshipPromise({
174
- context,
175
- currentDepth,
176
- depth,
177
- editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,
178
- field,
179
- findMany,
180
- flattenLocales,
181
- overrideAccess,
182
- populationPromises,
183
- req,
184
- showHiddenFields,
185
- siblingDoc
186
- });
187
- }
188
- return null;
189
- },
190
- validate: richTextValidateHOC({
191
- editorConfig: finalSanitizedEditorConfig
192
- })
529
+ },
530
+ i18n: featureI18n,
531
+ outputSchema: ({ collectionIDFieldTypes, config, field, interfaceNameDefinitions, isRequired })=>{
532
+ let outputSchema = {
533
+ // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.
534
+ // In the future, we should
535
+ // 1) allow recursive children
536
+ // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.
537
+ type: withNullableJSONSchemaType('object', isRequired),
538
+ properties: {
539
+ root: {
540
+ type: 'object',
541
+ additionalProperties: false,
542
+ properties: {
543
+ type: {
544
+ type: 'string'
545
+ },
546
+ children: {
547
+ type: 'array',
548
+ items: {
549
+ type: 'object',
550
+ additionalProperties: true,
551
+ properties: {
552
+ type: {
553
+ type: 'string'
554
+ },
555
+ version: {
556
+ type: 'integer'
557
+ }
558
+ },
559
+ required: [
560
+ 'type',
561
+ 'version'
562
+ ]
563
+ }
564
+ },
565
+ direction: {
566
+ oneOf: [
567
+ {
568
+ enum: [
569
+ 'ltr',
570
+ 'rtl'
571
+ ]
572
+ },
573
+ {
574
+ type: 'null'
575
+ }
576
+ ]
577
+ },
578
+ format: {
579
+ type: 'string',
580
+ enum: [
581
+ 'left',
582
+ 'start',
583
+ 'center',
584
+ 'right',
585
+ 'end',
586
+ 'justify',
587
+ ''
588
+ ]
589
+ },
590
+ indent: {
591
+ type: 'integer'
592
+ },
593
+ version: {
594
+ type: 'integer'
595
+ }
596
+ },
597
+ required: [
598
+ 'children',
599
+ 'direction',
600
+ 'format',
601
+ 'indent',
602
+ 'type',
603
+ 'version'
604
+ ]
605
+ }
606
+ },
607
+ required: [
608
+ 'root'
609
+ ]
610
+ };
611
+ for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes.modifyOutputSchemas){
612
+ outputSchema = modifyOutputSchema({
613
+ collectionIDFieldTypes,
614
+ config,
615
+ currentSchema: outputSchema,
616
+ field,
617
+ interfaceNameDefinitions,
618
+ isRequired
619
+ });
620
+ }
621
+ return outputSchema;
622
+ },
623
+ validate: richTextValidateHOC({
624
+ editorConfig: finalSanitizedEditorConfig
625
+ })
626
+ };
193
627
  };
194
628
  }
195
629
  export { AlignFeature } from './field/features/align/feature.server.js';
196
- export { BlockQuoteFeature } from './field/features/blockquote/feature.server.js';
630
+ export { BlockquoteFeature } from './field/features/blockquote/feature.server.js';
197
631
  export { BlocksFeature } from './field/features/blocks/feature.server.js';
198
632
  export { $createBlockNode, $isBlockNode, BlockNode } from './field/features/blocks/nodes/BlocksNode.js';
199
- export { TextDropdownSectionWithEntries } from './field/features/common/floatingSelectToolbarTextDropdownSection/index.js';
200
633
  export { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js';
201
634
  export { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js';
202
635
  export { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js';
@@ -204,25 +637,24 @@ export { defaultHTMLConverters } from './field/features/converters/html/converte
204
637
  export { convertLexicalNodesToHTML, convertLexicalToHTML } from './field/features/converters/html/converter/index.js';
205
638
  export { HTMLConverterFeature } from './field/features/converters/html/feature.server.js';
206
639
  export { consolidateHTMLConverters, lexicalHTML } from './field/features/converters/html/field/index.js';
207
- export { createClientComponent } from './field/features/createClientComponent.js';
208
- export { TestRecorderFeature } from './field/features/debug/testrecorder/feature.server.js';
209
- export { TreeViewFeature } from './field/features/debug/treeview/feature.server.js';
640
+ export { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js';
641
+ export { TreeViewFeature } from './field/features/debug/treeView/feature.server.js';
210
642
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
211
- export { SectionWithEntries as FormatSectionWithEntries } from './field/features/format/common/floatingSelectToolbarSection.js';
212
- export { InlineCodeFeature } from './field/features/format/inlinecode/feature.server.js';
643
+ export { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js';
213
644
  export { ItalicFeature } from './field/features/format/italic/feature.server.js';
214
645
  export { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js';
215
646
  export { SubscriptFeature } from './field/features/format/subscript/feature.server.js';
216
647
  export { SuperscriptFeature } from './field/features/format/superscript/feature.server.js';
217
648
  export { UnderlineFeature } from './field/features/format/underline/feature.server.js';
218
649
  export { HeadingFeature } from './field/features/heading/feature.server.js';
650
+ export { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js';
219
651
  export { IndentFeature } from './field/features/indent/feature.server.js';
220
652
  export { LinkFeature } from './field/features/link/feature.server.js';
221
653
  export { $createAutoLinkNode, $isAutoLinkNode, AutoLinkNode } from './field/features/link/nodes/AutoLinkNode.js';
222
654
  export { $createLinkNode, $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './field/features/link/nodes/LinkNode.js';
223
- export { CheckListFeature } from './field/features/lists/checklist/feature.server.js';
224
- export { OrderedListFeature } from './field/features/lists/orderedlist/feature.server.js';
225
- export { UnorderedListFeature } from './field/features/lists/unorderedlist/feature.server.js';
655
+ export { ChecklistFeature } from './field/features/lists/checklist/feature.server.js';
656
+ export { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js';
657
+ export { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js';
226
658
  export { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js';
227
659
  export { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js';
228
660
  export { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js';
@@ -240,31 +672,18 @@ export { SlateToLexicalFeature } from './field/features/migrations/slateToLexica
240
672
  export { ParagraphFeature } from './field/features/paragraph/feature.server.js';
241
673
  export { RelationshipFeature } from './field/features/relationship/feature.server.js';
242
674
  export { $createRelationshipNode, $isRelationshipNode, RelationshipNode } from './field/features/relationship/nodes/RelationshipNode.js';
675
+ export { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js';
676
+ export { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js';
677
+ export { createNode } from './field/features/typeUtilities.js';
243
678
  export { UploadFeature } from './field/features/upload/feature.server.js';
244
679
  export { $createUploadNode, $isUploadNode, UploadNode } from './field/features/upload/nodes/UploadNode.js';
245
- export { EditorConfigProvider, useEditorConfigContext } from './field/lexical/config/client/EditorConfigProvider.js';
246
- export { sanitizeClientEditorConfig, sanitizeClientFeatures } from './field/lexical/config/client/sanitize.js';
247
- export { defaultEditorConfig, defaultEditorFeatures, defaultEditorLexicalConfig, defaultSanitizedServerEditorConfig } from './field/lexical/config/server/default.js';
680
+ export { defaultEditorConfig, defaultEditorFeatures, defaultEditorLexicalConfig } from './field/lexical/config/server/default.js';
248
681
  export { loadFeatures, sortFeaturesForOptimalLoading } from './field/lexical/config/server/loader.js';
249
682
  export { sanitizeServerEditorConfig, sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js';
250
683
  export { getEnabledNodes } from './field/lexical/nodes/index.js';
251
684
  export { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js';
252
- export { SlashMenuGroup, SlashMenuOption } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
253
- export { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js';
254
- export { cloneDeep } from './field/lexical/utils/cloneDeep.js';
255
- export { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js';
256
- export { getSelectedNode } from './field/lexical/utils/getSelectedNode.js';
257
- export { isHTMLElement } from './field/lexical/utils/guard.js';
258
- export { invariant } from './field/lexical/utils/invariant.js';
259
- export { joinClasses } from './field/lexical/utils/joinClasses.js';
260
- export { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js';
261
685
  export { DETAIL_TYPE_TO_DETAIL, DOUBLE_LINE_BREAK, ELEMENT_FORMAT_TO_TYPE, ELEMENT_TYPE_TO_FORMAT, IS_ALL_FORMATTING, LTR_REGEX, NON_BREAKING_SPACE, NodeFormat, RTL_REGEX, TEXT_MODE_TO_TYPE, TEXT_TYPE_TO_FORMAT, TEXT_TYPE_TO_MODE } from './field/lexical/utils/nodeFormat.js';
262
- export { Point, isPoint } from './field/lexical/utils/point.js';
263
- export { Rect } from './field/lexical/utils/rect.js';
264
- export { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js';
265
- export { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js';
266
- export { addSwipeDownListener, addSwipeLeftListener, addSwipeRightListener, addSwipeUpListener } from './field/lexical/utils/swipe.js';
267
686
  export { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js';
268
- export { defaultRichTextValue } from './populate/defaultValue.js';
687
+ export { defaultRichTextValue } from './populateGraphQL/defaultValue.js';
269
688
 
270
689
  //# sourceMappingURL=index.js.map