@payloadcms/richtext-lexical 3.0.0-beta.9 → 3.0.0-canary.f6e77b8

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 (640) hide show
  1. package/dist/cell/index.d.ts +1 -1
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -4
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/components.d.ts +8 -2
  6. package/dist/exports/components.d.ts.map +1 -1
  7. package/dist/exports/components.js +8 -2
  8. package/dist/exports/components.js.map +1 -1
  9. package/dist/field/Field.d.ts +0 -2
  10. package/dist/field/Field.d.ts.map +1 -1
  11. package/dist/field/Field.js.map +1 -1
  12. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  13. package/dist/field/features/align/feature.client.js +127 -54
  14. package/dist/field/features/align/feature.client.js.map +1 -1
  15. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  16. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  17. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  18. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  19. package/dist/field/features/blockquote/feature.client.d.ts +1 -1
  20. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  21. package/dist/field/features/blockquote/feature.client.js +53 -40
  22. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  23. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  24. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  25. package/dist/field/features/blockquote/feature.server.js +7 -7
  26. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  27. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  28. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  29. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  30. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  31. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  32. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  33. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  34. package/dist/field/features/blocks/component/index.js +37 -4
  35. package/dist/field/features/blocks/component/index.js.map +1 -1
  36. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  37. package/dist/field/features/blocks/drawer/index.js +2 -4
  38. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  39. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  40. package/dist/field/features/blocks/feature.client.js +56 -27
  41. package/dist/field/features/blocks/feature.client.js.map +1 -1
  42. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  43. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  44. package/dist/field/features/blocks/feature.server.js +109 -77
  45. package/dist/field/features/blocks/feature.server.js.map +1 -1
  46. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  47. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  49. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  50. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  51. package/dist/field/features/blocks/plugin/commands.js +1 -2
  52. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  53. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  54. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  55. package/dist/field/features/blocks/plugin/index.js +5 -8
  56. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  57. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  58. package/dist/field/features/blocks/populationPromise.js +4 -18
  59. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  60. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  61. package/dist/field/features/blocks/validate.js +22 -36
  62. package/dist/field/features/blocks/validate.js.map +1 -1
  63. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  64. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  65. package/dist/field/features/converters/html/field/index.js +6 -3
  66. package/dist/field/features/converters/html/field/index.js.map +1 -1
  67. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts.map +1 -1
  68. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  69. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  70. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  71. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  72. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  73. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  74. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +2 -4
  75. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  76. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts.map +1 -1
  77. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  78. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  79. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  80. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  81. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  82. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  83. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +4 -6
  84. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  85. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  86. package/dist/field/features/format/bold/feature.client.js +26 -23
  87. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  88. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  89. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  90. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  91. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  92. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  93. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  94. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  95. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  96. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  97. package/dist/field/features/format/italic/feature.client.js +27 -24
  98. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  99. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  100. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  101. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  102. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  103. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  104. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  105. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  106. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  107. package/dist/field/features/format/subscript/feature.client.js +25 -22
  108. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  109. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  110. package/dist/field/features/format/superscript/feature.client.js +25 -22
  111. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  112. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  113. package/dist/field/features/format/underline/feature.client.js +25 -22
  114. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  115. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  116. package/dist/field/features/heading/feature.client.js +71 -54
  117. package/dist/field/features/heading/feature.client.js.map +1 -1
  118. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  119. package/dist/field/features/heading/feature.server.js +5 -5
  120. package/dist/field/features/heading/feature.server.js.map +1 -1
  121. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  122. package/dist/field/features/heading/markdownTransformer.js +1 -2
  123. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  124. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  125. package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js +2 -4
  126. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  127. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  128. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  129. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  130. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  131. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js +4 -3
  132. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  133. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts.map +1 -1
  134. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js.map +1 -1
  135. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts +1 -3
  136. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  137. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js +1 -2
  138. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  139. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  140. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  141. package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js +5 -8
  142. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  143. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  144. package/dist/field/features/indent/feature.client.js +43 -42
  145. package/dist/field/features/indent/feature.client.js.map +1 -1
  146. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  147. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  148. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  149. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  150. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  151. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  152. package/dist/field/features/link/drawer/baseFields.js +30 -43
  153. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  154. package/dist/field/features/link/drawer/index.js +3 -2
  155. package/dist/field/features/link/drawer/index.js.map +1 -1
  156. package/dist/field/features/link/drawer/types.d.ts +4 -2
  157. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  158. package/dist/field/features/link/drawer/types.js.map +1 -1
  159. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  160. package/dist/field/features/link/feature.client.js +59 -47
  161. package/dist/field/features/link/feature.client.js.map +1 -1
  162. package/dist/field/features/link/feature.server.d.ts +10 -5
  163. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  164. package/dist/field/features/link/feature.server.js +48 -9
  165. package/dist/field/features/link/feature.server.js.map +1 -1
  166. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  167. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  168. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  169. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  170. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  171. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  172. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  173. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  174. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  175. package/dist/field/features/link/plugins/autoLink/index.js +5 -8
  176. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  177. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  178. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  179. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  180. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  181. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  182. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  183. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  184. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  185. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +93 -69
  186. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  187. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  188. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  189. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  190. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  191. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  192. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  193. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  194. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  195. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  196. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  197. package/dist/field/features/link/plugins/link/index.js +5 -14
  198. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  199. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  200. package/dist/field/features/link/populationPromise.js +10 -25
  201. package/dist/field/features/link/populationPromise.js.map +1 -1
  202. package/dist/field/features/link/validate.d.ts +5 -0
  203. package/dist/field/features/link/validate.d.ts.map +1 -0
  204. package/dist/field/features/link/validate.js +32 -0
  205. package/dist/field/features/link/validate.js.map +1 -0
  206. package/dist/field/features/lists/checklist/feature.client.d.ts +1 -1
  207. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  208. package/dist/field/features/lists/checklist/feature.client.js +56 -32
  209. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  210. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  211. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  212. package/dist/field/features/lists/checklist/feature.server.js +10 -10
  213. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  214. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  215. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  216. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  217. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  218. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  219. package/dist/field/features/lists/checklist/plugin/index.js +3 -4
  220. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  221. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  222. package/dist/field/features/lists/htmlConverter.js +13 -6
  223. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  224. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  225. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  226. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  227. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  228. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +7 -7
  229. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  230. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  231. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  232. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  233. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  234. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  235. package/dist/field/features/lists/plugin/index.js +3 -4
  236. package/dist/field/features/lists/plugin/index.js.map +1 -1
  237. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  238. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  239. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  240. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  241. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  242. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  243. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  244. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +7 -7
  245. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  246. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  247. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  248. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  249. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  250. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  251. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  252. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  253. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  254. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  255. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  256. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  257. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  258. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  259. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  260. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  261. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  262. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  263. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  264. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  265. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  266. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  267. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  268. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  269. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  270. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  271. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  272. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  273. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  274. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  275. package/dist/field/features/paragraph/feature.client.js +45 -33
  276. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  277. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  278. package/dist/field/features/relationship/drawer/commands.js +1 -2
  279. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  280. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  281. package/dist/field/features/relationship/drawer/index.js +7 -13
  282. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  283. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  284. package/dist/field/features/relationship/feature.client.js +37 -15
  285. package/dist/field/features/relationship/feature.client.js.map +1 -1
  286. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  287. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  288. package/dist/field/features/relationship/feature.server.js +5 -4
  289. package/dist/field/features/relationship/feature.server.js.map +1 -1
  290. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  291. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  292. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  293. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  294. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  295. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +56 -7
  296. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  297. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  298. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  299. package/dist/field/features/relationship/plugins/index.js +9 -12
  300. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  301. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  302. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  303. package/dist/field/features/relationship/populationPromise.js +25 -19
  304. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  305. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  306. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  307. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  308. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  309. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  310. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  311. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  312. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  313. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  314. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  315. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  316. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  317. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
  318. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  319. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  320. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  321. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +81 -0
  322. package/dist/field/features/toolbars/fixed/feature.client.d.ts +3 -0
  323. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  324. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  325. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  326. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  327. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  328. package/dist/field/features/toolbars/fixed/feature.server.js +16 -0
  329. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  330. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  331. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  332. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +112 -70
  333. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  334. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  335. package/dist/field/features/toolbars/inline/feature.client.d.ts +3 -0
  336. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  337. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  338. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  339. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  340. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  341. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  342. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  343. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  344. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  345. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +29 -19
  346. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  347. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  348. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  349. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  350. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +27 -72
  351. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  352. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  353. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  354. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  355. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  356. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  357. package/dist/field/features/toolbars/types.d.ts +48 -0
  358. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  359. package/dist/field/features/toolbars/types.js.map +1 -0
  360. package/dist/field/features/typeUtilities.d.ts +8 -0
  361. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  362. package/dist/field/features/typeUtilities.js +8 -0
  363. package/dist/field/features/typeUtilities.js.map +1 -0
  364. package/dist/field/features/types.d.ts +128 -57
  365. package/dist/field/features/types.d.ts.map +1 -1
  366. package/dist/field/features/types.js.map +1 -1
  367. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  368. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  369. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  370. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  371. package/dist/field/features/upload/component/index.js +59 -9
  372. package/dist/field/features/upload/component/index.js.map +1 -1
  373. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  374. package/dist/field/features/upload/drawer/commands.js +1 -2
  375. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  376. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  377. package/dist/field/features/upload/drawer/index.js +8 -12
  378. package/dist/field/features/upload/drawer/index.js.map +1 -1
  379. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  380. package/dist/field/features/upload/feature.client.js +35 -10
  381. package/dist/field/features/upload/feature.client.js.map +1 -1
  382. package/dist/field/features/upload/feature.server.d.ts +10 -3
  383. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  384. package/dist/field/features/upload/feature.server.js +39 -11
  385. package/dist/field/features/upload/feature.server.js.map +1 -1
  386. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  387. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  388. package/dist/field/features/upload/nodes/UploadNode.js +24 -11
  389. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  390. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  391. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  392. package/dist/field/features/upload/plugin/index.js +6 -11
  393. package/dist/field/features/upload/plugin/index.js.map +1 -1
  394. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  395. package/dist/field/features/upload/populationPromise.js +15 -9
  396. package/dist/field/features/upload/populationPromise.js.map +1 -1
  397. package/dist/field/features/upload/validate.d.ts +2 -1
  398. package/dist/field/features/upload/validate.d.ts.map +1 -1
  399. package/dist/field/features/upload/validate.js +36 -9
  400. package/dist/field/features/upload/validate.js.map +1 -1
  401. package/dist/field/index.d.ts +1 -1
  402. package/dist/field/index.d.ts.map +1 -1
  403. package/dist/field/index.js.map +1 -1
  404. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  405. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  406. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  407. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  408. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  409. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  410. package/dist/field/lexical/EditorPlugin.js +6 -3
  411. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  412. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  413. package/dist/field/lexical/LexicalEditor.js +31 -15
  414. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  415. package/dist/field/lexical/LexicalEditor.scss +3 -19
  416. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  417. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  418. package/dist/field/lexical/LexicalProvider.js +4 -4
  419. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  420. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  421. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  422. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  423. package/dist/field/lexical/config/client/default.d.ts +1 -1
  424. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  425. package/dist/field/lexical/config/client/default.js.map +1 -1
  426. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  427. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  428. package/dist/field/lexical/config/client/sanitize.js +81 -32
  429. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  430. package/dist/field/lexical/config/server/default.d.ts +2 -3
  431. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  432. package/dist/field/lexical/config/server/default.js +11 -11
  433. package/dist/field/lexical/config/server/default.js.map +1 -1
  434. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  435. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  436. package/dist/field/lexical/config/server/loader.js +4 -2
  437. package/dist/field/lexical/config/server/loader.js.map +1 -1
  438. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  439. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  440. package/dist/field/lexical/config/server/sanitize.js +23 -8
  441. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  442. package/dist/field/lexical/config/types.d.ts +1 -1
  443. package/dist/field/lexical/config/types.d.ts.map +1 -1
  444. package/dist/field/lexical/config/types.js.map +1 -1
  445. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  446. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  447. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  448. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  449. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  450. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  451. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  452. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  453. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  454. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +6 -9
  455. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  456. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +17 -25
  457. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  458. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  459. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  460. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  461. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  462. package/dist/field/lexical/plugins/SlashMenu/index.js +72 -67
  463. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  464. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  465. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -4
  466. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  467. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  468. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  469. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +3 -4
  470. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  471. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  472. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +8 -7
  473. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  474. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  475. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  476. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  477. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  478. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  479. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  480. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  481. package/dist/field/lexical/theme/EditorTheme.scss +13 -14
  482. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  483. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  484. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  485. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  486. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  487. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  488. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  489. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  490. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  491. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  492. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  493. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  494. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  495. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  496. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  497. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  498. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  499. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  500. package/dist/field/lexical/utils/url.js +3 -0
  501. package/dist/field/lexical/utils/url.js.map +1 -1
  502. package/dist/forEachNodeRecursively.d.ts +10 -0
  503. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  504. package/dist/forEachNodeRecursively.js +24 -0
  505. package/dist/forEachNodeRecursively.js.map +1 -0
  506. package/dist/generateComponentMap.d.ts.map +1 -1
  507. package/dist/generateComponentMap.js +13 -21
  508. package/dist/generateComponentMap.js.map +1 -1
  509. package/dist/generateSchemaMap.d.ts.map +1 -1
  510. package/dist/generateSchemaMap.js +4 -12
  511. package/dist/generateSchemaMap.js.map +1 -1
  512. package/dist/index.d.ts +24 -20
  513. package/dist/index.d.ts.map +1 -1
  514. package/dist/index.js +275 -184
  515. package/dist/index.js.map +1 -1
  516. package/dist/populate/defaultValue.d.ts.map +1 -1
  517. package/dist/populate/defaultValue.js +1 -0
  518. package/dist/populate/defaultValue.js.map +1 -1
  519. package/dist/populate/populate.d.ts +5 -4
  520. package/dist/populate/populate.d.ts.map +1 -1
  521. package/dist/populate/populate.js +13 -11
  522. package/dist/populate/populate.js.map +1 -1
  523. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  524. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  525. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  526. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  527. package/dist/populate/recurseNestedFields.d.ts +8 -4
  528. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  529. package/dist/populate/recurseNestedFields.js +4 -5
  530. package/dist/populate/recurseNestedFields.js.map +1 -1
  531. package/dist/types.d.ts +12 -5
  532. package/dist/types.d.ts.map +1 -1
  533. package/dist/types.js.map +1 -1
  534. package/dist/validate/index.d.ts +1 -1
  535. package/dist/validate/index.d.ts.map +1 -1
  536. package/package.json +47 -46
  537. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  538. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  539. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  540. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  541. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  542. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  543. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  544. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  545. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  546. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  547. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  548. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  549. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  550. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  551. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  552. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  553. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  554. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  555. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  556. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  557. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  558. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  559. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  560. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  561. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  562. package/dist/field/features/horizontalrule/component/index.d.ts.map +0 -1
  563. package/dist/field/features/horizontalrule/component/index.js.map +0 -1
  564. package/dist/field/features/horizontalrule/feature.client.d.ts.map +0 -1
  565. package/dist/field/features/horizontalrule/feature.client.js +0 -53
  566. package/dist/field/features/horizontalrule/feature.client.js.map +0 -1
  567. package/dist/field/features/horizontalrule/feature.server.d.ts.map +0 -1
  568. package/dist/field/features/horizontalrule/feature.server.js.map +0 -1
  569. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +0 -1
  570. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +0 -1
  571. package/dist/field/features/horizontalrule/plugin/index.d.ts +0 -6
  572. package/dist/field/features/horizontalrule/plugin/index.d.ts.map +0 -1
  573. package/dist/field/features/horizontalrule/plugin/index.js.map +0 -1
  574. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  575. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  576. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  577. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  578. package/dist/field/features/indent/index.scss +0 -4
  579. package/dist/field/features/lists/common/markdown.js.map +0 -1
  580. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  581. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  582. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  583. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  584. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  585. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  586. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  587. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  588. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  589. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  590. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  591. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  592. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  593. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  594. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  595. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  596. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  597. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  598. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  599. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  600. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  601. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  602. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  603. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  604. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  605. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  606. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  607. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  608. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  609. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  610. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  611. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  612. package/dist/populate/richTextRelationshipPromise.js +0 -68
  613. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  614. package/src/index.ts +0 -423
  615. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +0 -0
  616. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  617. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  618. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  619. /package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +0 -0
  620. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  621. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  622. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  623. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +0 -0
  624. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  625. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  626. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  627. /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts +0 -0
  628. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.d.ts +0 -0
  629. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts +0 -0
  630. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts +0 -0
  631. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js +0 -0
  632. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.scss +0 -0
  633. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +0 -0
  634. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  635. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  636. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  637. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +0 -0
  638. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  639. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  640. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -0,0 +1,139 @@
1
+ 'use client';
2
+ import React, { useCallback, useEffect } from 'react';
3
+ const baseClass = 'toolbar-popup__dropdown';
4
+ import { mergeRegister } from '@lexical/utils';
5
+ import { useTranslation } from '@payloadcms/ui/providers/Translation';
6
+ import { $getSelection } from 'lexical';
7
+ import { useEditorFocus } from '../../../../lexical/EditorFocusProvider.js';
8
+ import { DropDown, DropDownItem } from './DropDown.js';
9
+ import './index.scss';
10
+ const ToolbarItem = ({ active, anchorElem, editor, enabled, item })=>{
11
+ const { i18n } = useTranslation();
12
+ if (item.Component) {
13
+ return item?.Component && /*#__PURE__*/ React.createElement(item.Component, {
14
+ active: active,
15
+ anchorElem: anchorElem,
16
+ editor: editor,
17
+ enabled: enabled,
18
+ item: item,
19
+ key: item.key
20
+ });
21
+ }
22
+ let title = item.key;
23
+ if (item.label) {
24
+ title = typeof item.label === 'function' ? item.label({
25
+ i18n
26
+ }) : item.label;
27
+ }
28
+ // Crop title to max. 25 characters
29
+ if (title.length > 25) {
30
+ title = title.substring(0, 25) + '...';
31
+ }
32
+ return /*#__PURE__*/ React.createElement(DropDownItem, {
33
+ active: active,
34
+ editor: editor,
35
+ enabled: enabled,
36
+ item: item,
37
+ key: item.key
38
+ }, item?.ChildComponent && /*#__PURE__*/ React.createElement(item.ChildComponent, null), /*#__PURE__*/ React.createElement("span", {
39
+ className: "text"
40
+ }, title));
41
+ };
42
+ export const ToolbarDropdown = ({ Icon, anchorElem, classNames, editor, groupKey, items, itemsContainerClassNames, label, maxActiveItems, onActiveChange })=>{
43
+ const [activeItemKeys, setActiveItemKeys] = React.useState([]);
44
+ const [enabledItemKeys, setEnabledItemKeys] = React.useState([]);
45
+ const editorFocusContext = useEditorFocus();
46
+ const updateStates = useCallback(()=>{
47
+ editor.getEditorState().read(()=>{
48
+ const selection = $getSelection();
49
+ const _activeItemKeys = [];
50
+ const _activeItems = [];
51
+ const _enabledItemKeys = [];
52
+ for (const item of items){
53
+ if (item.isActive && (!maxActiveItems || _activeItemKeys.length < maxActiveItems)) {
54
+ const isActive = item.isActive({
55
+ editor,
56
+ editorFocusContext,
57
+ selection
58
+ });
59
+ if (isActive) {
60
+ _activeItemKeys.push(item.key);
61
+ _activeItems.push(item);
62
+ }
63
+ }
64
+ if (item.isEnabled) {
65
+ const isEnabled = item.isEnabled({
66
+ editor,
67
+ editorFocusContext,
68
+ selection
69
+ });
70
+ if (isEnabled) {
71
+ _enabledItemKeys.push(item.key);
72
+ }
73
+ } else {
74
+ _enabledItemKeys.push(item.key);
75
+ }
76
+ }
77
+ setActiveItemKeys(_activeItemKeys);
78
+ setEnabledItemKeys(_enabledItemKeys);
79
+ if (onActiveChange) {
80
+ onActiveChange({
81
+ activeItems: _activeItems
82
+ });
83
+ }
84
+ });
85
+ }, [
86
+ editor,
87
+ editorFocusContext,
88
+ items,
89
+ maxActiveItems,
90
+ onActiveChange
91
+ ]);
92
+ useEffect(()=>{
93
+ updateStates();
94
+ }, [
95
+ updateStates
96
+ ]);
97
+ useEffect(()=>{
98
+ document.addEventListener('mouseup', updateStates);
99
+ return ()=>{
100
+ document.removeEventListener('mouseup', updateStates);
101
+ };
102
+ }, [
103
+ updateStates
104
+ ]);
105
+ useEffect(()=>{
106
+ return mergeRegister(editor.registerUpdateListener(()=>{
107
+ updateStates();
108
+ }));
109
+ }, [
110
+ editor,
111
+ updateStates
112
+ ]);
113
+ return /*#__PURE__*/ React.createElement(DropDown, {
114
+ Icon: Icon,
115
+ buttonAriaLabel: `${groupKey} dropdown`,
116
+ buttonClassName: [
117
+ baseClass,
118
+ `${baseClass}-${groupKey}`,
119
+ ...classNames || []
120
+ ].filter(Boolean).join(' '),
121
+ itemsContainerClassNames: [
122
+ `${baseClass}-items`,
123
+ ...itemsContainerClassNames || []
124
+ ],
125
+ key: groupKey,
126
+ label: label
127
+ }, items.length && items.map((item)=>{
128
+ return /*#__PURE__*/ React.createElement(ToolbarItem, {
129
+ active: activeItemKeys.includes(item.key),
130
+ anchorElem: anchorElem,
131
+ editor: editor,
132
+ enabled: enabledItemKeys.includes(item.key),
133
+ item: item,
134
+ key: item.key
135
+ });
136
+ }));
137
+ };
138
+
139
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/field/features/toolbars/shared/ToolbarDropdown/index.tsx"],"sourcesContent":["'use client'\nimport React, { useCallback, useEffect } from 'react'\n\nconst baseClass = 'toolbar-popup__dropdown'\n\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport { $getSelection } from 'lexical'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorFocus } from '../../../../lexical/EditorFocusProvider.js'\nimport { DropDown, DropDownItem } from './DropDown.js'\nimport './index.scss'\n\nconst ToolbarItem = ({\n active,\n anchorElem,\n editor,\n enabled,\n item,\n}: {\n active?: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n}) => {\n const { i18n } = useTranslation()\n\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component\n active={active}\n anchorElem={anchorElem}\n editor={editor}\n enabled={enabled}\n item={item}\n key={item.key}\n />\n )\n )\n }\n\n let title = item.key\n if (item.label) {\n title = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n // Crop title to max. 25 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <DropDownItem active={active} editor={editor} enabled={enabled} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n <span className=\"text\">{title}</span>\n </DropDownItem>\n )\n}\n\nexport const ToolbarDropdown = ({\n Icon,\n anchorElem,\n classNames,\n editor,\n groupKey,\n items,\n itemsContainerClassNames,\n label,\n maxActiveItems,\n onActiveChange,\n}: {\n Icon?: React.FC\n anchorElem: HTMLElement\n classNames?: string[]\n editor: LexicalEditor\n groupKey: string\n items: ToolbarGroupItem[]\n itemsContainerClassNames?: string[]\n label?: string\n /**\n * Maximum number of active items allowed. This is a performance optimization to prevent\n * unnecessary item active checks when the maximum number of active items is reached.\n */\n maxActiveItems?: number\n onActiveChange?: ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => void\n}) => {\n const [activeItemKeys, setActiveItemKeys] = React.useState<string[]>([])\n const [enabledItemKeys, setEnabledItemKeys] = React.useState<string[]>([])\n const editorFocusContext = useEditorFocus()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n\n const _activeItemKeys: string[] = []\n const _activeItems: ToolbarGroupItem[] = []\n const _enabledItemKeys: string[] = []\n\n for (const item of items) {\n if (item.isActive && (!maxActiveItems || _activeItemKeys.length < maxActiveItems)) {\n const isActive = item.isActive({ editor, editorFocusContext, selection })\n if (isActive) {\n _activeItemKeys.push(item.key)\n _activeItems.push(item)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, editorFocusContext, selection })\n if (isEnabled) {\n _enabledItemKeys.push(item.key)\n }\n } else {\n _enabledItemKeys.push(item.key)\n }\n }\n setActiveItemKeys(_activeItemKeys)\n setEnabledItemKeys(_enabledItemKeys)\n\n if (onActiveChange) {\n onActiveChange({ activeItems: _activeItems })\n }\n })\n }, [editor, editorFocusContext, items, maxActiveItems, onActiveChange])\n\n useEffect(() => {\n updateStates()\n }, [updateStates])\n\n useEffect(() => {\n document.addEventListener('mouseup', updateStates)\n return () => {\n document.removeEventListener('mouseup', updateStates)\n }\n }, [updateStates])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updateStates()\n }),\n )\n }, [editor, updateStates])\n\n return (\n <DropDown\n Icon={Icon}\n buttonAriaLabel={`${groupKey} dropdown`}\n buttonClassName={[baseClass, `${baseClass}-${groupKey}`, ...(classNames || [])]\n .filter(Boolean)\n .join(' ')}\n itemsContainerClassNames={[`${baseClass}-items`, ...(itemsContainerClassNames || [])]}\n key={groupKey}\n label={label}\n >\n {items.length &&\n items.map((item) => {\n return (\n <ToolbarItem\n active={activeItemKeys.includes(item.key)}\n anchorElem={anchorElem}\n editor={editor}\n enabled={enabledItemKeys.includes(item.key)}\n item={item}\n key={item.key}\n />\n )\n })}\n </DropDown>\n )\n}\n"],"names":["React","useCallback","useEffect","baseClass","mergeRegister","useTranslation","$getSelection","useEditorFocus","DropDown","DropDownItem","ToolbarItem","active","anchorElem","editor","enabled","item","i18n","Component","key","title","label","length","substring","ChildComponent","span","className","ToolbarDropdown","Icon","classNames","groupKey","items","itemsContainerClassNames","maxActiveItems","onActiveChange","activeItemKeys","setActiveItemKeys","useState","enabledItemKeys","setEnabledItemKeys","editorFocusContext","updateStates","getEditorState","read","selection","_activeItemKeys","_activeItems","_enabledItemKeys","isActive","push","isEnabled","activeItems","document","addEventListener","removeEventListener","registerUpdateListener","buttonAriaLabel","buttonClassName","filter","Boolean","join","map","includes"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,OAAOA,SAASC,WAAW,EAAEC,SAAS,QAAQ,QAAO;AAErD,MAAMC,YAAY;AAIlB,SAASC,aAAa,QAAQ,iBAAgB;AAC9C,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,aAAa,QAAQ,UAAS;AAIvC,SAASC,cAAc,QAAQ,6CAA4C;AAC3E,SAASC,QAAQ,EAAEC,YAAY,QAAQ,gBAAe;AACtD,OAAO,eAAc;AAErB,MAAMC,cAAc,CAAC,EACnBC,MAAM,EACNC,UAAU,EACVC,MAAM,EACNC,OAAO,EACPC,IAAI,EAOL;IACC,MAAM,EAAEC,IAAI,EAAE,GAAGX;IAEjB,IAAIU,KAAKE,SAAS,EAAE;QAClB,OACEF,MAAME,2BACJ,oBAACF,KAAKE,SAAS;YACbN,QAAQA;YACRC,YAAYA;YACZC,QAAQA;YACRC,SAASA;YACTC,MAAMA;YACNG,KAAKH,KAAKG,GAAG;;IAIrB;IAEA,IAAIC,QAAQJ,KAAKG,GAAG;IACpB,IAAIH,KAAKK,KAAK,EAAE;QACdD,QAAQ,OAAOJ,KAAKK,KAAK,KAAK,aAAaL,KAAKK,KAAK,CAAC;YAAEJ;QAAK,KAAKD,KAAKK,KAAK;IAC9E;IACA,mCAAmC;IACnC,IAAID,MAAME,MAAM,GAAG,IAAI;QACrBF,QAAQA,MAAMG,SAAS,CAAC,GAAG,MAAM;IACnC;IAEA,qBACE,oBAACb;QAAaE,QAAQA;QAAQE,QAAQA;QAAQC,SAASA;QAASC,MAAMA;QAAMG,KAAKH,KAAKG,GAAG;OACtFH,MAAMQ,gCAAkB,oBAACR,KAAKQ,cAAc,uBAC7C,oBAACC;QAAKC,WAAU;OAAQN;AAG9B;AAEA,OAAO,MAAMO,kBAAkB,CAAC,EAC9BC,IAAI,EACJf,UAAU,EACVgB,UAAU,EACVf,MAAM,EACNgB,QAAQ,EACRC,KAAK,EACLC,wBAAwB,EACxBX,KAAK,EACLY,cAAc,EACdC,cAAc,EAgBf;IACC,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGnC,MAAMoC,QAAQ,CAAW,EAAE;IACvE,MAAM,CAACC,iBAAiBC,mBAAmB,GAAGtC,MAAMoC,QAAQ,CAAW,EAAE;IACzE,MAAMG,qBAAqBhC;IAE3B,MAAMiC,eAAevC,YAAY;QAC/BY,OAAO4B,cAAc,GAAGC,IAAI,CAAC;YAC3B,MAAMC,YAAYrC;YAElB,MAAMsC,kBAA4B,EAAE;YACpC,MAAMC,eAAmC,EAAE;YAC3C,MAAMC,mBAA6B,EAAE;YAErC,KAAK,MAAM/B,QAAQe,MAAO;gBACxB,IAAIf,KAAKgC,QAAQ,IAAK,CAAA,CAACf,kBAAkBY,gBAAgBvB,MAAM,GAAGW,cAAa,GAAI;oBACjF,MAAMe,WAAWhC,KAAKgC,QAAQ,CAAC;wBAAElC;wBAAQ0B;wBAAoBI;oBAAU;oBACvE,IAAII,UAAU;wBACZH,gBAAgBI,IAAI,CAACjC,KAAKG,GAAG;wBAC7B2B,aAAaG,IAAI,CAACjC;oBACpB;gBACF;gBACA,IAAIA,KAAKkC,SAAS,EAAE;oBAClB,MAAMA,YAAYlC,KAAKkC,SAAS,CAAC;wBAAEpC;wBAAQ0B;wBAAoBI;oBAAU;oBACzE,IAAIM,WAAW;wBACbH,iBAAiBE,IAAI,CAACjC,KAAKG,GAAG;oBAChC;gBACF,OAAO;oBACL4B,iBAAiBE,IAAI,CAACjC,KAAKG,GAAG;gBAChC;YACF;YACAiB,kBAAkBS;YAClBN,mBAAmBQ;YAEnB,IAAIb,gBAAgB;gBAClBA,eAAe;oBAAEiB,aAAaL;gBAAa;YAC7C;QACF;IACF,GAAG;QAAChC;QAAQ0B;QAAoBT;QAAOE;QAAgBC;KAAe;IAEtE/B,UAAU;QACRsC;IACF,GAAG;QAACA;KAAa;IAEjBtC,UAAU;QACRiD,SAASC,gBAAgB,CAAC,WAAWZ;QACrC,OAAO;YACLW,SAASE,mBAAmB,CAAC,WAAWb;QAC1C;IACF,GAAG;QAACA;KAAa;IAEjBtC,UAAU;QACR,OAAOE,cACLS,OAAOyC,sBAAsB,CAAC;YAC5Bd;QACF;IAEJ,GAAG;QAAC3B;QAAQ2B;KAAa;IAEzB,qBACE,oBAAChC;QACCmB,MAAMA;QACN4B,iBAAiB,CAAC,EAAE1B,SAAS,SAAS,CAAC;QACvC2B,iBAAiB;YAACrD;YAAW,CAAC,EAAEA,UAAU,CAAC,EAAE0B,SAAS,CAAC;eAAMD,cAAc,EAAE;SAAE,CAC5E6B,MAAM,CAACC,SACPC,IAAI,CAAC;QACR5B,0BAA0B;YAAC,CAAC,EAAE5B,UAAU,MAAM,CAAC;eAAM4B,4BAA4B,EAAE;SAAE;QACrFb,KAAKW;QACLT,OAAOA;OAENU,MAAMT,MAAM,IACXS,MAAM8B,GAAG,CAAC,CAAC7C;QACT,qBACE,oBAACL;YACCC,QAAQuB,eAAe2B,QAAQ,CAAC9C,KAAKG,GAAG;YACxCN,YAAYA;YACZC,QAAQA;YACRC,SAASuB,gBAAgBwB,QAAQ,CAAC9C,KAAKG,GAAG;YAC1CH,MAAMA;YACNG,KAAKH,KAAKG,GAAG;;IAGnB;AAGR,EAAC"}
@@ -1,18 +1,22 @@
1
- @import '../../../../../scss/styles.scss';
1
+ @import '../../../../../scss/styles';
2
2
 
3
- .floating-select-toolbar-popup__dropdown {
3
+ .toolbar-popup__dropdown {
4
4
  display: flex;
5
5
  align-items: center;
6
6
  vertical-align: middle;
7
7
  justify-content: center;
8
8
  height: 30px;
9
- width: 40px;
10
9
  border: 0;
11
10
  background: none;
12
11
  border-radius: 4px;
13
12
  cursor: pointer;
14
13
  position: relative;
15
- padding: 0;
14
+ padding: 0 10px;
15
+
16
+ &-label {
17
+ color: var(--color-base-600);
18
+ padding: 0 10px;
19
+ }
16
20
 
17
21
  &:disabled {
18
22
  cursor: not-allowed;
@@ -26,10 +30,10 @@
26
30
  background-color: var(--color-base-100);
27
31
  }
28
32
 
29
- &.active {
33
+ .active {
30
34
  background-color: var(--color-base-100);
31
35
 
32
- .floating-select-toolbar-popup__dropdown-caret {
36
+ .toolbar-popup__dropdown-caret {
33
37
  &:after {
34
38
  transform: rotate(0deg);
35
39
  }
@@ -50,9 +54,9 @@
50
54
  height: 4px;
51
55
 
52
56
  opacity: 0.3;
53
- background-image: url(../../../ui/icons/Caret/index.svg);
54
- background-position-y: 0px;
55
- background-position-x: 0px;
57
+ background-image: url(../../../../lexical/ui/icons/Caret/index.svg);
58
+ background-position-y: 0;
59
+ background-position-x: 0;
56
60
  }
57
61
  }
58
62
 
@@ -60,17 +64,25 @@
60
64
  position: absolute;
61
65
  background: var(--color-base-0);
62
66
  border-radius: 4px;
63
- width: 132.5px;
67
+ min-width: 132.5px;
68
+ max-width: 200px;
64
69
  z-index: 100;
65
70
 
66
- .floating-select-toolbar-popup__dropdown-item {
71
+ .toolbar-popup__dropdown-item {
67
72
  all: unset; // reset all default button styles
68
73
  cursor: pointer;
69
74
  color: var(--color-base-900);
70
75
 
71
- &:hover:not([disabled]) {
76
+ .text {
77
+ overflow: hidden;
78
+ white-space: nowrap;
79
+ text-overflow: ellipsis;
80
+ }
81
+
82
+ &:hover:not([disabled]), &.active {
72
83
  background-color: var(--color-base-100);
73
84
  }
85
+
74
86
  padding-left: 6.25px;
75
87
  padding-right: 6.25px;
76
88
  width: 100%;
@@ -91,7 +103,7 @@
91
103
  }
92
104
 
93
105
  html[data-theme='light'] {
94
- .floating-select-toolbar-popup__dropdown {
106
+ .toolbar-popup__dropdown {
95
107
  &-items {
96
108
  position: absolute;
97
109
  @include shadow-m;
@@ -0,0 +1,48 @@
1
+ import type { I18n } from '@payloadcms/translations';
2
+ import type { BaseSelection, LexicalEditor } from 'lexical';
3
+ import type React from 'react';
4
+ import type { EditorFocusContextType } from '../../lexical/EditorFocusProvider.js';
5
+ export type ToolbarGroup = {
6
+ ChildComponent?: React.FC;
7
+ items: Array<ToolbarGroupItem>;
8
+ key: string;
9
+ order?: number;
10
+ type: 'dropdown';
11
+ } | {
12
+ items: Array<ToolbarGroupItem>;
13
+ key: string;
14
+ order?: number;
15
+ type: 'buttons';
16
+ };
17
+ export type ToolbarGroupItem = {
18
+ ChildComponent?: React.FC;
19
+ /** Use component to ignore the children and onClick properties. It does not use the default, pre-defined format Button component */
20
+ Component?: React.FC<{
21
+ active?: boolean;
22
+ anchorElem: HTMLElement;
23
+ editor: LexicalEditor;
24
+ enabled?: boolean;
25
+ item: ToolbarGroupItem;
26
+ }>;
27
+ isActive?: ({ editor, editorFocusContext, selection, }: {
28
+ editor: LexicalEditor;
29
+ editorFocusContext: EditorFocusContextType;
30
+ selection: BaseSelection;
31
+ }) => boolean;
32
+ isEnabled?: ({ editor, editorFocusContext, selection, }: {
33
+ editor: LexicalEditor;
34
+ editorFocusContext: EditorFocusContextType;
35
+ selection: BaseSelection;
36
+ }) => boolean;
37
+ key: string;
38
+ /** The label is displayed as text if the item is part of a dropdown group */
39
+ label?: (({ i18n }: {
40
+ i18n: I18n;
41
+ }) => string) | string;
42
+ onSelect?: ({ editor, isActive }: {
43
+ editor: LexicalEditor;
44
+ isActive: boolean;
45
+ }) => void;
46
+ order?: number;
47
+ };
48
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/field/features/toolbars/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAElF,MAAM,MAAM,YAAY,GACpB;IACE,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACzB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,UAAU,CAAA;CACjB,GACD;IACE,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAEL,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACzB,oIAAoI;IACpI,SAAS,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,UAAU,EAAE,WAAW,CAAA;QACvB,MAAM,EAAE,aAAa,CAAA;QACrB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,IAAI,EAAE,gBAAgB,CAAA;KACvB,CAAC,CAAA;IACF,QAAQ,CAAC,EAAE,CAAC,EACV,MAAM,EACN,kBAAkB,EAClB,SAAS,GACV,EAAE;QACD,MAAM,EAAE,aAAa,CAAA;QACrB,kBAAkB,EAAE,sBAAsB,CAAA;QAC1C,SAAS,EAAE,aAAa,CAAA;KACzB,KAAK,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,CAAC,EACX,MAAM,EACN,kBAAkB,EAClB,SAAS,GACV,EAAE;QACD,MAAM,EAAE,aAAa,CAAA;QACrB,kBAAkB,EAAE,sBAAsB,CAAA;QAC1C,SAAS,EAAE,aAAa,CAAA;KACzB,KAAK,OAAO,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,6EAA6E;IAC7E,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,MAAM,CAAA;IACvD,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACvF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/field/features/toolbars/types.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\nimport type React from 'react'\n\nimport type { EditorFocusContextType } from '../../lexical/EditorFocusProvider.js'\n\nexport type ToolbarGroup =\n | {\n ChildComponent?: React.FC\n items: Array<ToolbarGroupItem>\n key: string\n order?: number\n type: 'dropdown'\n }\n | {\n items: Array<ToolbarGroupItem>\n key: string\n order?: number\n type: 'buttons'\n }\n\nexport type ToolbarGroupItem = {\n ChildComponent?: React.FC\n /** Use component to ignore the children and onClick properties. It does not use the default, pre-defined format Button component */\n Component?: React.FC<{\n active?: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n }>\n isActive?: ({\n editor,\n editorFocusContext,\n selection,\n }: {\n editor: LexicalEditor\n editorFocusContext: EditorFocusContextType\n selection: BaseSelection\n }) => boolean\n isEnabled?: ({\n editor,\n editorFocusContext,\n selection,\n }: {\n editor: LexicalEditor\n editorFocusContext: EditorFocusContextType\n selection: BaseSelection\n }) => boolean\n key: string\n /** The label is displayed as text if the item is part of a dropdown group */\n label?: (({ i18n }: { i18n: I18n }) => string) | string\n onSelect?: ({ editor, isActive }: { editor: LexicalEditor; isActive: boolean }) => void\n order?: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAqBA,WAiCC"}
@@ -0,0 +1,8 @@
1
+ import type { LexicalNode } from 'lexical';
2
+ import type { NodeWithHooks } from './types.js';
3
+ /**
4
+ * Utility function to create a node with hooks. You don't have to use this utility, but it improves type inference
5
+ * @param node the node
6
+ */
7
+ export declare function createNode<Node extends LexicalNode>(node: NodeWithHooks<Node>): NodeWithHooks<Node>;
8
+ //# sourceMappingURL=typeUtilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeUtilities.d.ts","sourceRoot":"","sources":["../../../src/field/features/typeUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,SAAS,WAAW,EACjD,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,GACxB,aAAa,CAAC,IAAI,CAAC,CAErB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility function to create a node with hooks. You don't have to use this utility, but it improves type inference
3
+ * @param node the node
4
+ */ export function createNode(node) {
5
+ return node;
6
+ }
7
+
8
+ //# sourceMappingURL=typeUtilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/field/features/typeUtilities.ts"],"sourcesContent":["import type { LexicalNode } from 'lexical'\n\nimport type { NodeWithHooks } from './types.js'\n\n/**\n * Utility function to create a node with hooks. You don't have to use this utility, but it improves type inference\n * @param node the node\n */\nexport function createNode<Node extends LexicalNode>(\n node: NodeWithHooks<Node>,\n): NodeWithHooks<Node> {\n return node\n}\n"],"names":["createNode","node"],"rangeMappings":";;;;;","mappings":"AAIA;;;CAGC,GACD,OAAO,SAASA,WACdC,IAAyB;IAEzB,OAAOA;AACT"}
@@ -6,31 +6,36 @@ import type { SerializedLexicalNode } from 'lexical';
6
6
  import type { LexicalNodeReplacement } from 'lexical';
7
7
  import type { RequestContext } from 'payload';
8
8
  import type { SanitizedConfig } from 'payload/config';
9
- import type { Field, PayloadRequest, RichTextField, ValidateOptions } from 'payload/types';
9
+ import type { Field, PayloadRequestWithData, ReplaceAny, RichTextField, ValidateOptions } from 'payload/types';
10
10
  import type React from 'react';
11
11
  import type { AdapterProps } from '../../types.js';
12
12
  import type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js';
13
- import type { FloatingToolbarSection } from '../lexical/plugins/FloatingSelectToolbar/types.js';
14
13
  import type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
15
14
  import type { HTMLConverter } from './converters/html/converter/types.js';
16
- export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ context, currentDepth, depth, editorPopulationPromises, field, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: {
15
+ import type { ToolbarGroup } from './toolbars/types.js';
16
+ export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ context, currentDepth, depth, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: {
17
17
  context: RequestContext;
18
18
  currentDepth: number;
19
19
  depth: number;
20
+ draft: boolean;
20
21
  /**
21
22
  * This maps all population promises to the node type
22
23
  */
23
24
  editorPopulationPromises: Map<string, Array<PopulationPromise>>;
24
25
  field: RichTextField<SerializedEditorState, AdapterProps>;
26
+ /**
27
+ * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises
28
+ */
29
+ fieldPromises: Promise<void>[];
25
30
  findMany: boolean;
26
31
  flattenLocales: boolean;
27
32
  node: T;
28
33
  overrideAccess: boolean;
29
34
  populationPromises: Promise<void>[];
30
- req: PayloadRequest;
35
+ req: PayloadRequestWithData;
31
36
  showHiddenFields: boolean;
32
37
  siblingDoc: Record<string, unknown>;
33
- }) => Promise<void>[];
38
+ }) => void;
34
39
  export type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ node, nodeValidations, validation, }: {
35
40
  node: T;
36
41
  nodeValidations: Map<string, Array<NodeValidation>>;
@@ -47,12 +52,17 @@ export type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {
47
52
  dependenciesPriority?: string[];
48
53
  /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */
49
54
  dependenciesSoft?: string[];
55
+ /**
56
+ * This is being called during the payload sanitization process
57
+ */
50
58
  feature: (props: {
59
+ config: SanitizedConfig;
51
60
  /** unSanitizedEditorConfig.features, but mapped */
52
61
  featureProviderMap: ServerFeatureProviderMap;
62
+ isRoot?: boolean;
53
63
  resolvedFeatures: ResolvedServerFeatureMap;
54
64
  unSanitizedEditorConfig: ServerEditorConfig;
55
- }) => ServerFeature<ServerFeatureProps, ClientFeatureProps>;
65
+ }) => Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>> | ServerFeature<ServerFeatureProps, ClientFeatureProps>;
56
66
  key: string;
57
67
  /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */
58
68
  serverFeatureProps: ServerFeatureProps;
@@ -74,14 +84,18 @@ export type FeatureProviderClient<ClientFeatureProps> = {
74
84
  unSanitizedEditorConfig: ClientEditorConfig;
75
85
  }) => ClientFeature<ClientFeatureProps>;
76
86
  };
87
+ export type PluginComponent<ClientFeatureProps = any> = React.FC<{
88
+ clientProps: ClientFeatureProps;
89
+ }>;
90
+ export type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{
91
+ anchorElem: HTMLElement;
92
+ clientProps: ClientFeatureProps;
93
+ }>;
77
94
  export type ClientFeature<ClientFeatureProps> = {
78
95
  /**
79
96
  * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to
80
97
  */
81
98
  clientFeatureProps: ClientComponentProps<ClientFeatureProps>;
82
- floatingSelectToolbar?: {
83
- sections: FloatingToolbarSection[];
84
- };
85
99
  hooks?: {
86
100
  load?: ({ incomingEditorState, }: {
87
101
  incomingEditorState: SerializedEditorState;
@@ -92,33 +106,90 @@ export type ClientFeature<ClientFeatureProps> = {
92
106
  };
93
107
  markdownTransformers?: Transformer[];
94
108
  nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>;
109
+ /**
110
+ * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more "outside" functionality
111
+ */
95
112
  plugins?: Array<{
96
- Component: React.FC;
113
+ Component: PluginComponent<ClientFeatureProps>;
97
114
  position: 'bottom';
98
115
  } | {
99
- Component: React.FC;
116
+ Component: PluginComponent<ClientFeatureProps>;
100
117
  position: 'normal';
101
118
  } | {
102
- Component: React.FC;
119
+ Component: PluginComponent<ClientFeatureProps>;
103
120
  position: 'top';
104
121
  } | {
105
- Component: React.FC<{
106
- anchorElem: HTMLElement;
107
- }>;
122
+ Component: PluginComponentWithAnchor<ClientFeatureProps>;
108
123
  position: 'floatingAnchorElem';
109
124
  }>;
110
125
  slashMenu?: {
111
- dynamicOptions?: ({ editor, queryString, }: {
126
+ /**
127
+ * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).
128
+ * Thus, to re-calculate the available groups, this function will be called every time you type after the /.
129
+ *
130
+ * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.
131
+ */
132
+ dynamicGroups?: ({ editor, queryString, }: {
112
133
  editor: LexicalEditor;
113
134
  queryString: string;
114
135
  }) => SlashMenuGroup[];
115
- options?: SlashMenuGroup[];
136
+ /**
137
+ * Static array of groups together with the items in them. These will always be present.
138
+ * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.
139
+ */
140
+ groups?: SlashMenuGroup[];
141
+ };
142
+ /**
143
+ * An opt-in, classic fixed toolbar which stays at the top of the editor
144
+ */
145
+ toolbarFixed?: {
146
+ groups: ToolbarGroup[];
147
+ };
148
+ /**
149
+ * The default, floating toolbar which appears when you select text.
150
+ */
151
+ toolbarInline?: {
152
+ /**
153
+ * Array of toolbar groups / sections. Each section can contain multiple toolbar items.
154
+ */
155
+ groups: ToolbarGroup[];
116
156
  };
117
157
  };
118
158
  export type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {
119
159
  featureKey: string;
120
160
  order: number;
121
161
  };
162
+ export type FieldNodeHookArgs<T extends SerializedLexicalNode> = {
163
+ context: RequestContext;
164
+ /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */
165
+ findMany?: boolean;
166
+ /** The value of the field. */
167
+ node?: T;
168
+ /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */
169
+ operation?: 'create' | 'delete' | 'read' | 'update';
170
+ overrideAccess?: boolean;
171
+ /** The Express request object. It is mocked for Local API operations. */
172
+ req: PayloadRequestWithData;
173
+ };
174
+ export type FieldNodeHook<T extends SerializedLexicalNode> = (args: FieldNodeHookArgs<T>) => Promise<T> | T;
175
+ export type NodeWithHooks<T extends LexicalNode = any> = {
176
+ converters?: {
177
+ html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>;
178
+ };
179
+ hooks?: {
180
+ afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
181
+ afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
182
+ beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
183
+ /**
184
+ * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.
185
+ */
186
+ beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
187
+ beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
188
+ };
189
+ node: Klass<T> | LexicalNodeReplacement;
190
+ populationPromises?: Array<PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
191
+ validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
192
+ };
122
193
  export type ServerFeature<ServerProps, ClientFeatureProps> = {
123
194
  ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>;
124
195
  /**
@@ -142,11 +213,7 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
142
213
  props: ServerProps;
143
214
  schemaMap: Map<string, Field[]>;
144
215
  schemaPath: string;
145
- }) => {
146
- [key: string]: Field[];
147
- } | Promise<{
148
- [key: string]: Field[];
149
- }>;
216
+ }) => Map<string, Field[]> | null;
150
217
  generatedTypes?: {
151
218
  modifyOutputSchema: ({ collectionIDFieldTypes, config, currentSchema, field, interfaceNameDefinitions, isRequired, }: {
152
219
  collectionIDFieldTypes: {
@@ -165,22 +232,8 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
165
232
  isRequired: boolean;
166
233
  }) => JSONSchema4;
167
234
  };
168
- hooks?: {
169
- afterReadPromise?: ({ field, incomingEditorState, siblingDoc, }: {
170
- field: RichTextField<SerializedEditorState, AdapterProps>;
171
- incomingEditorState: SerializedEditorState;
172
- siblingDoc: Record<string, unknown>;
173
- }) => Promise<void> | null;
174
- };
175
235
  markdownTransformers?: Transformer[];
176
- nodes?: Array<{
177
- converters?: {
178
- html?: HTMLConverter;
179
- };
180
- node: Klass<LexicalNode> | LexicalNodeReplacement;
181
- populationPromises?: Array<PopulationPromise>;
182
- validations?: Array<NodeValidation>;
183
- }>;
236
+ nodes?: Array<NodeWithHooks>;
184
237
  /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */
185
238
  serverFeatureProps: ServerProps;
186
239
  };
@@ -195,22 +248,27 @@ export type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown
195
248
  export type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>;
196
249
  export type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>;
197
250
  export type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>;
251
+ /**
252
+ * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more "outside" functionality
253
+ */
198
254
  export type SanitizedPlugin = {
199
- Component: React.FC;
255
+ Component: PluginComponent;
256
+ clientProps: any;
200
257
  key: string;
201
258
  position: 'bottom';
202
259
  } | {
203
- Component: React.FC;
260
+ Component: PluginComponent;
261
+ clientProps: any;
204
262
  key: string;
205
263
  position: 'normal';
206
264
  } | {
207
- Component: React.FC;
265
+ Component: PluginComponent;
266
+ clientProps: any;
208
267
  key: string;
209
268
  position: 'top';
210
269
  } | {
211
- Component: React.FC<{
212
- anchorElem: HTMLElement;
213
- }>;
270
+ Component: PluginComponentWithAnchor;
271
+ clientProps: any;
214
272
  desktopOnly?: boolean;
215
273
  key: string;
216
274
  position: 'floatingAnchorElem';
@@ -240,24 +298,24 @@ export type SanitizedServerFeatures = Required<Pick<ResolvedServerFeature<unknow
240
298
  isRequired: boolean;
241
299
  }) => JSONSchema4>;
242
300
  };
243
- hooks: {
244
- afterReadPromises: Array<({ field, incomingEditorState, siblingDoc, }: {
245
- field: RichTextField<SerializedEditorState, AdapterProps>;
246
- incomingEditorState: SerializedEditorState;
247
- siblingDoc: Record<string, unknown>;
248
- }) => Promise<void> | null>;
249
- };
250
- /** The node types mapped to their populationPromises */
301
+ /** The node types mapped to their hooks */
302
+ hooks?: {
303
+ afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
304
+ afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
305
+ beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
306
+ /**
307
+ * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.
308
+ */
309
+ beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
310
+ beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
311
+ }; /** The node types mapped to their populationPromises */
251
312
  populationPromises: Map<string, Array<PopulationPromise>>;
252
313
  /** The node types mapped to their validations */
253
314
  validations: Map<string, Array<NodeValidation>>;
254
315
  };
255
- export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes'>> & {
316
+ export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'>> & {
256
317
  /** The keys of all enabled features */
257
318
  enabledFeatures: string[];
258
- floatingSelectToolbar: {
259
- sections: FloatingToolbarSection[];
260
- };
261
319
  hooks: {
262
320
  load: Array<({ incomingEditorState, }: {
263
321
  incomingEditorState: SerializedEditorState;
@@ -266,13 +324,26 @@ export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknow
266
324
  incomingEditorState: SerializedEditorState;
267
325
  }) => SerializedEditorState>;
268
326
  };
327
+ /**
328
+ * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more "outside" functionality
329
+ */
269
330
  plugins?: Array<SanitizedPlugin>;
270
331
  slashMenu: {
271
- dynamicOptions: Array<({ editor, queryString }: {
332
+ /**
333
+ * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).
334
+ * Thus, to re-calculate the available groups, this function will be called every time you type after the /.
335
+ *
336
+ * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.
337
+ */
338
+ dynamicGroups: Array<({ editor, queryString }: {
272
339
  editor: LexicalEditor;
273
340
  queryString: string;
274
341
  }) => SlashMenuGroup[]>;
275
- groupsWithOptions: SlashMenuGroup[];
342
+ /**
343
+ * Static array of groups together with the items in them. These will always be present.
344
+ * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.
345
+ */
346
+ groups: SlashMenuGroup[];
276
347
  };
277
348
  };
278
349
  //# sourceMappingURL=types.d.ts.map