@payloadcms/richtext-lexical 3.0.0-beta.23 → 3.0.0-beta.24

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 (256) hide show
  1. package/dist/exports/components.d.ts +2 -2
  2. package/dist/exports/components.d.ts.map +1 -1
  3. package/dist/exports/components.js +2 -2
  4. package/dist/exports/components.js.map +1 -1
  5. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  6. package/dist/field/features/align/feature.client.js +15 -21
  7. package/dist/field/features/align/feature.client.js.map +1 -1
  8. package/dist/field/features/align/inlineToolbarAlignGroup.d.ts +3 -0
  9. package/dist/field/features/align/inlineToolbarAlignGroup.d.ts.map +1 -0
  10. package/dist/field/features/align/{floatingSelectToolbarAlignDropdownSection.js → inlineToolbarAlignGroup.js} +4 -4
  11. package/dist/field/features/align/inlineToolbarAlignGroup.js.map +1 -0
  12. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  13. package/dist/field/features/blockquote/feature.client.js +33 -31
  14. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  15. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  16. package/dist/field/features/blocks/feature.client.js +25 -27
  17. package/dist/field/features/blocks/feature.client.js.map +1 -1
  18. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts.map +1 -1
  19. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  20. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  21. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  22. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  23. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.d.ts.map +1 -1
  24. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js.map +1 -1
  25. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts.map +1 -1
  26. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  27. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  28. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  29. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  30. package/dist/field/features/debug/{treeview → treeView}/plugin/index.d.ts.map +1 -1
  31. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js.map +1 -1
  32. package/dist/field/features/format/bold/feature.client.js +7 -7
  33. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  34. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts.map +1 -1
  35. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.js +10 -10
  36. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  37. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  38. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  39. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  40. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  41. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  42. package/dist/field/features/format/italic/feature.client.js +10 -10
  43. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  44. package/dist/field/features/format/shared/inlineToolbarFormatGroup.d.ts +3 -0
  45. package/dist/field/features/format/shared/inlineToolbarFormatGroup.d.ts.map +1 -0
  46. package/dist/field/features/format/shared/inlineToolbarFormatGroup.js +10 -0
  47. package/dist/field/features/format/shared/inlineToolbarFormatGroup.js.map +1 -0
  48. package/dist/field/features/format/strikethrough/feature.client.js +9 -9
  49. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  50. package/dist/field/features/format/subscript/feature.client.js +5 -5
  51. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  52. package/dist/field/features/format/superscript/feature.client.js +5 -5
  53. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  54. package/dist/field/features/format/underline/feature.client.js +5 -5
  55. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  56. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  57. package/dist/field/features/heading/feature.client.js +39 -39
  58. package/dist/field/features/heading/feature.client.js.map +1 -1
  59. package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts.map +1 -1
  60. package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js.map +1 -1
  61. package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.d.ts.map +1 -1
  62. package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.js +7 -7
  63. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  64. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts.map +1 -1
  65. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js +1 -1
  66. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js.map +1 -1
  67. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts.map +1 -1
  68. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js.map +1 -1
  69. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts.map +1 -1
  70. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js.map +1 -1
  71. package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.d.ts.map +1 -1
  72. package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js.map +1 -1
  73. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  74. package/dist/field/features/indent/feature.client.js +9 -11
  75. package/dist/field/features/indent/feature.client.js.map +1 -1
  76. package/dist/field/features/indent/inlineToolbarIndentGroup.d.ts +3 -0
  77. package/dist/field/features/indent/inlineToolbarIndentGroup.d.ts.map +1 -0
  78. package/dist/field/features/indent/inlineToolbarIndentGroup.js +10 -0
  79. package/dist/field/features/indent/inlineToolbarIndentGroup.js.map +1 -0
  80. package/dist/field/features/link/feature.client.js +28 -28
  81. package/dist/field/features/link/feature.client.js.map +1 -1
  82. package/dist/field/features/lists/checklist/feature.client.d.ts +1 -1
  83. package/dist/field/features/lists/checklist/feature.client.js +28 -28
  84. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  85. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  86. package/dist/field/features/lists/checklist/feature.server.js +4 -4
  87. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  88. package/dist/field/features/lists/checklist/markdownTransformers.js +1 -1
  89. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  90. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts.map +1 -1
  91. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.js +26 -26
  92. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  93. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts.map +1 -1
  94. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +1 -1
  95. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js.map +1 -1
  96. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts.map +1 -1
  97. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +1 -1
  98. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js.map +1 -1
  99. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  100. package/dist/field/features/lists/{common → shared}/markdown.js.map +1 -1
  101. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  102. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.js +24 -24
  103. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  104. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts.map +1 -1
  105. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +1 -1
  106. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js.map +1 -1
  107. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts.map +1 -1
  108. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +1 -1
  109. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js.map +1 -1
  110. package/dist/field/features/paragraph/feature.client.js +27 -27
  111. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  112. package/dist/field/features/relationship/feature.client.js +7 -7
  113. package/dist/field/features/relationship/feature.client.js.map +1 -1
  114. package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.d.ts +3 -0
  115. package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.d.ts.map +1 -0
  116. package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.js +10 -0
  117. package/dist/field/features/shared/inlineToolbar/featureButtonsGroup.js.map +1 -0
  118. package/dist/field/features/shared/inlineToolbar/textDropdownGroup.d.ts +3 -0
  119. package/dist/field/features/shared/inlineToolbar/textDropdownGroup.d.ts.map +1 -0
  120. package/dist/field/features/{common/floatingSelectToolbarTextDropdownSection/index.js → shared/inlineToolbar/textDropdownGroup.js} +4 -4
  121. package/dist/field/features/shared/inlineToolbar/textDropdownGroup.js.map +1 -0
  122. package/dist/field/features/types.d.ts +51 -12
  123. package/dist/field/features/types.d.ts.map +1 -1
  124. package/dist/field/features/types.js.map +1 -1
  125. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  126. package/dist/field/features/upload/feature.client.js +7 -7
  127. package/dist/field/features/upload/feature.client.js.map +1 -1
  128. package/dist/field/lexical/LexicalEditor.js +1 -1
  129. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  130. package/dist/field/lexical/LexicalEditor.scss +3 -19
  131. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  132. package/dist/field/lexical/config/client/sanitize.js +80 -32
  133. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  134. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  135. package/dist/field/lexical/config/server/default.js +6 -6
  136. package/dist/field/lexical/config/server/default.js.map +1 -1
  137. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  138. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  139. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +71 -71
  140. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  141. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  142. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  143. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +3 -3
  144. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  145. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +12 -20
  146. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  147. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  148. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  149. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  150. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  151. package/dist/field/lexical/plugins/SlashMenu/index.js +67 -61
  152. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  153. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/fixed}/types.d.ts +6 -6
  154. package/dist/field/lexical/plugins/toolbars/fixed/types.d.ts.map +1 -0
  155. package/dist/field/lexical/plugins/toolbars/fixed/types.js.map +1 -0
  156. package/dist/field/lexical/plugins/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  157. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline/Toolbar}/index.js +32 -32
  158. package/dist/field/lexical/plugins/toolbars/inline/Toolbar/index.js.map +1 -0
  159. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline/Toolbar}/index.scss +5 -4
  160. package/dist/field/lexical/plugins/toolbars/inline/ToolbarButton/index.d.ts +8 -0
  161. package/dist/field/lexical/plugins/toolbars/inline/ToolbarButton/index.d.ts.map +1 -0
  162. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline}/ToolbarButton/index.js +9 -9
  163. package/dist/field/lexical/plugins/toolbars/inline/ToolbarButton/index.js.map +1 -0
  164. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline}/ToolbarButton/index.scss +1 -1
  165. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline}/ToolbarDropdown/DropDown.d.ts +3 -3
  166. package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.d.ts.map +1 -0
  167. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline}/ToolbarDropdown/DropDown.js +12 -12
  168. package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.js.map +1 -0
  169. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline}/ToolbarDropdown/index.d.ts +6 -6
  170. package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.d.ts.map +1 -0
  171. package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.js +42 -0
  172. package/dist/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.js.map +1 -0
  173. package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline}/ToolbarDropdown/index.scss +6 -6
  174. package/dist/field/lexical/plugins/toolbars/inline/types.d.ts +40 -0
  175. package/dist/field/lexical/plugins/toolbars/inline/types.d.ts.map +1 -0
  176. package/dist/field/lexical/plugins/toolbars/inline/types.js +3 -0
  177. package/dist/field/lexical/plugins/toolbars/inline/types.js.map +1 -0
  178. package/dist/field/lexical/theme/EditorTheme.scss +2 -6
  179. package/dist/index.d.ts +12 -11
  180. package/dist/index.d.ts.map +1 -1
  181. package/dist/index.js +11 -11
  182. package/dist/index.js.map +1 -1
  183. package/package.json +9 -9
  184. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  185. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  186. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  187. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  188. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  189. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  190. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  191. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  192. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  193. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  194. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  195. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  196. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  197. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  198. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  199. package/dist/field/features/horizontalrule/feature.client.js.map +0 -1
  200. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  201. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  202. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  203. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  204. package/dist/field/features/indent/index.scss +0 -4
  205. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  206. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  207. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  208. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  209. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  210. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  211. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  212. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  213. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  214. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  215. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  216. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  217. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  218. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  219. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  220. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +0 -0
  221. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  222. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  223. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.d.ts +0 -0
  224. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +0 -0
  225. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  226. /package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +0 -0
  227. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  228. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  229. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.d.ts +0 -0
  230. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +0 -0
  231. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  232. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +0 -0
  233. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  234. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  235. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  236. /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts +0 -0
  237. /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js +0 -0
  238. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.d.ts +0 -0
  239. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts +0 -0
  240. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts +0 -0
  241. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js +0 -0
  242. /package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts +0 -0
  243. /package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js +0 -0
  244. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.d.ts +0 -0
  245. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js +0 -0
  246. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.scss +0 -0
  247. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +0 -0
  248. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  249. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  250. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  251. /package/dist/field/features/lists/{common → shared}/markdown.js +0 -0
  252. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +0 -0
  253. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  254. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  255. /package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/fixed}/types.js +0 -0
  256. /package/dist/field/lexical/plugins/{FloatingSelectToolbar → toolbars/inline/Toolbar}/index.d.ts +0 -0
@@ -1,43 +1,23 @@
1
1
  'use client';
2
2
  import { $setBlocksType } from '@lexical/selection';
3
3
  import { $createParagraphNode, $getSelection } from 'lexical';
4
- import { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
5
4
  import { TextIcon } from '../../lexical/ui/icons/Text/index.js';
6
- import { TextDropdownSectionWithEntries } from '../common/floatingSelectToolbarTextDropdownSection/index.js';
7
5
  import { createClientComponent } from '../createClientComponent.js';
6
+ import { inlineToolbarTextDropdownGroupWithItems } from '../shared/inlineToolbar/textDropdownGroup.js';
8
7
  const ParagraphFeatureClient = (props)=>{
9
8
  return {
10
9
  clientFeatureProps: props,
11
10
  feature: ()=>({
12
11
  clientFeatureProps: props,
13
- floatingSelectToolbar: {
14
- sections: [
15
- TextDropdownSectionWithEntries([
16
- {
17
- ChildComponent: TextIcon,
18
- isActive: ()=>false,
19
- key: 'normal-text',
20
- label: 'Normal Text',
21
- onClick: ({ editor })=>{
22
- editor.update(()=>{
23
- const selection = $getSelection();
24
- $setBlocksType(selection, ()=>$createParagraphNode());
25
- });
26
- },
27
- order: 1
28
- }
29
- ])
30
- ]
31
- },
32
12
  slashMenu: {
33
- options: [
13
+ groups: [
34
14
  {
35
15
  displayName: 'Basic',
36
- key: 'basic',
37
- options: [
38
- new SlashMenuOption('paragraph', {
16
+ items: [
17
+ {
39
18
  Icon: TextIcon,
40
19
  displayName: 'Paragraph',
20
+ key: 'paragraph',
41
21
  keywords: [
42
22
  'normal',
43
23
  'paragraph',
@@ -50,10 +30,30 @@ const ParagraphFeatureClient = (props)=>{
50
30
  $setBlocksType(selection, ()=>$createParagraphNode());
51
31
  });
52
32
  }
53
- })
54
- ]
33
+ }
34
+ ],
35
+ key: 'basic'
55
36
  }
56
37
  ]
38
+ },
39
+ toolbarInline: {
40
+ groups: [
41
+ inlineToolbarTextDropdownGroupWithItems([
42
+ {
43
+ ChildComponent: TextIcon,
44
+ isActive: ()=>false,
45
+ key: 'paragraph',
46
+ label: 'Normal Text',
47
+ onSelect: ({ editor })=>{
48
+ editor.update(()=>{
49
+ const selection = $getSelection();
50
+ $setBlocksType(selection, ()=>$createParagraphNode());
51
+ });
52
+ },
53
+ order: 1
54
+ }
55
+ ])
56
+ ]
57
57
  }
58
58
  })
59
59
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $setBlocksType } from '@lexical/selection'\nimport { $createParagraphNode, $getSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { TextIcon } from '../../lexical/ui/icons/Text/index.js'\nimport { TextDropdownSectionWithEntries } from '../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\n\nconst ParagraphFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: TextIcon,\n isActive: () => false,\n key: 'normal-text',\n label: 'Normal Text',\n onClick: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n order: 1,\n },\n ]),\n ],\n },\n slashMenu: {\n options: [\n {\n displayName: 'Basic',\n key: 'basic',\n options: [\n new SlashMenuOption('paragraph', {\n Icon: TextIcon,\n displayName: 'Paragraph',\n keywords: ['normal', 'paragraph', 'p', 'text'],\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n }),\n ],\n },\n ],\n },\n }),\n }\n}\n\nexport const ParagraphFeatureClientComponent = createClientComponent(ParagraphFeatureClient)\n"],"names":["$setBlocksType","$createParagraphNode","$getSelection","SlashMenuOption","TextIcon","TextDropdownSectionWithEntries","createClientComponent","ParagraphFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","update","selection","order","slashMenu","options","displayName","Icon","keywords","onSelect","ParagraphFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,cAAc,QAAQ,qBAAoB;AACnD,SAASC,oBAAoB,EAAEC,aAAa,QAAQ,UAAS;AAI7D,SAASC,eAAe,QAAQ,sEAAqE;AACrG,SAASC,QAAQ,QAAQ,uCAAsC;AAC/D,SAASC,8BAA8B,QAAQ,8DAA6D;AAC5G,SAASC,qBAAqB,QAAQ,8BAA6B;AAEnE,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRP,+BAA+B;4BAC7B;gCACEQ,gBAAgBT;gCAChBU,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO;gCACPC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,MAAM,CAAC;wCACZ,MAAMC,YAAYlB;wCAClBF,eAAeoB,WAAW,IAAMnB;oCAClC;gCACF;gCACAoB,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbT,KAAK;4BACLQ,SAAS;gCACP,IAAIpB,gBAAgB,aAAa;oCAC/BsB,MAAMrB;oCACNoB,aAAa;oCACbE,UAAU;wCAAC;wCAAU;wCAAa;wCAAK;qCAAO;oCAC9CC,UAAU,CAAC,EAAET,MAAM,EAAE;wCACnBA,OAAOC,MAAM,CAAC;4CACZ,MAAMC,YAAYlB;4CAClBF,eAAeoB,WAAW,IAAMnB;wCAClC;oCACF;gCACF;6BACD;wBACH;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAM2B,kCAAkCtB,sBAAsBC,wBAAuB"}
1
+ {"version":3,"sources":["../../../../src/field/features/paragraph/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $setBlocksType } from '@lexical/selection'\nimport { $createParagraphNode, $getSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { TextIcon } from '../../lexical/ui/icons/Text/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { inlineToolbarTextDropdownGroupWithItems } from '../shared/inlineToolbar/textDropdownGroup.js'\n\nconst ParagraphFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n slashMenu: {\n groups: [\n {\n displayName: 'Basic',\n items: [\n {\n Icon: TextIcon,\n displayName: 'Paragraph',\n key: 'paragraph',\n keywords: ['normal', 'paragraph', 'p', 'text'],\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n },\n ],\n key: 'basic',\n },\n ],\n },\n toolbarInline: {\n groups: [\n inlineToolbarTextDropdownGroupWithItems([\n {\n ChildComponent: TextIcon,\n isActive: () => false,\n key: 'paragraph',\n label: 'Normal Text',\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n order: 1,\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const ParagraphFeatureClientComponent = createClientComponent(ParagraphFeatureClient)\n"],"names":["$setBlocksType","$createParagraphNode","$getSelection","TextIcon","createClientComponent","inlineToolbarTextDropdownGroupWithItems","ParagraphFeatureClient","props","clientFeatureProps","feature","slashMenu","groups","displayName","items","Icon","key","keywords","onSelect","editor","update","selection","toolbarInline","ChildComponent","isActive","label","order","ParagraphFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,cAAc,QAAQ,qBAAoB;AACnD,SAASC,oBAAoB,EAAEC,aAAa,QAAQ,UAAS;AAI7D,SAASC,QAAQ,QAAQ,uCAAsC;AAC/D,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,uCAAuC,QAAQ,+CAA8C;AAEtG,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,WAAW;oBACTC,QAAQ;wBACN;4BACEC,aAAa;4BACbC,OAAO;gCACL;oCACEC,MAAMX;oCACNS,aAAa;oCACbG,KAAK;oCACLC,UAAU;wCAAC;wCAAU;wCAAa;wCAAK;qCAAO;oCAC9CC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,MAAM,CAAC;4CACZ,MAAMC,YAAYlB;4CAClBF,eAAeoB,WAAW,IAAMnB;wCAClC;oCACF;gCACF;6BACD;4BACDc,KAAK;wBACP;qBACD;gBACH;gBACAM,eAAe;oBACbV,QAAQ;wBACNN,wCAAwC;4BACtC;gCACEiB,gBAAgBnB;gCAChBoB,UAAU,IAAM;gCAChBR,KAAK;gCACLS,OAAO;gCACPP,UAAU,CAAC,EAAEC,MAAM,EAAE;oCACnBA,OAAOC,MAAM,CAAC;wCACZ,MAAMC,YAAYlB;wCAClBF,eAAeoB,WAAW,IAAMnB;oCAClC;gCACF;gCACAwB,OAAO;4BACT;yBACD;qBACF;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,kCAAkCtB,sBAAsBE,wBAAuB"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
  import { withMergedProps } from '@payloadcms/ui/elements/withMergedProps';
3
- import { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
4
3
  import { RelationshipIcon } from '../../lexical/ui/icons/Relationship/index.js';
5
4
  import { createClientComponent } from '../createClientComponent.js';
6
5
  import { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js';
@@ -24,14 +23,14 @@ const RelationshipFeatureClient = (props)=>{
24
23
  }
25
24
  ],
26
25
  slashMenu: {
27
- options: [
26
+ groups: [
28
27
  {
29
28
  displayName: 'Basic',
30
- key: 'basic',
31
- options: [
32
- new SlashMenuOption('relationship', {
29
+ items: [
30
+ {
33
31
  Icon: RelationshipIcon,
34
32
  displayName: 'Relationship',
33
+ key: 'relationship',
35
34
  keywords: [
36
35
  'relationship',
37
36
  'relation',
@@ -43,8 +42,9 @@ const RelationshipFeatureClient = (props)=>{
43
42
  replace: false
44
43
  });
45
44
  }
46
- })
47
- ]
45
+ }
46
+ ],
47
+ key: 'basic'
48
48
  }
49
49
  ]
50
50
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/relationship/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { RelationshipFeatureProps } from './feature.server.js'\n\nimport { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { RelationshipIcon } from '../../lexical/ui/icons/Relationship/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nconst RelationshipFeatureClient: FeatureProviderProviderClient<RelationshipFeatureProps> = (\n props,\n) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: withMergedProps({\n Component: RelationshipPlugin,\n toMergeIntoProps: props,\n }),\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Basic',\n key: 'basic',\n options: [\n new SlashMenuOption('relationship', {\n Icon: RelationshipIcon,\n displayName: 'Relationship',\n keywords: ['relationship', 'relation', 'rel'],\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n }),\n ],\n },\n ],\n },\n }),\n }\n}\n\nexport const RelationshipFeatureClientComponent = createClientComponent(RelationshipFeatureClient)\n"],"names":["withMergedProps","SlashMenuOption","RelationshipIcon","createClientComponent","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","RelationshipNode","RelationshipPlugin","RelationshipFeatureClient","props","clientFeatureProps","feature","nodes","plugins","Component","toMergeIntoProps","position","slashMenu","options","displayName","key","Icon","keywords","onSelect","editor","dispatchCommand","replace","RelationshipFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,eAAe,QAAQ,0CAAyC;AAKzE,SAASC,eAAe,QAAQ,sEAAqE;AACrG,SAASC,gBAAgB,QAAQ,+CAA8C;AAC/E,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,uCAAuC,QAAQ,uBAAsB;AAC9E,SAASC,gBAAgB,QAAQ,8BAA6B;AAC9D,SAASC,kBAAkB,QAAQ,qBAAoB;AAEvD,MAAMC,4BAAqF,CACzFC;IAEA,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,OAAO;oBAACN;iBAAiB;gBACzBO,SAAS;oBACP;wBACEC,WAAWb,gBAAgB;4BACzBa,WAAWP;4BACXQ,kBAAkBN;wBACpB;wBACAO,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbC,KAAK;4BACLF,SAAS;gCACP,IAAIhB,gBAAgB,gBAAgB;oCAClCmB,MAAMlB;oCACNgB,aAAa;oCACbG,UAAU;wCAAC;wCAAgB;wCAAY;qCAAM;oCAC7CC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnB,mDAAmD;wCACnDA,OAAOC,eAAe,CAACpB,yCAAyC;4CAC9DqB,SAAS;wCACX;oCACF;gCACF;6BACD;wBACH;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,qCAAqCvB,sBAAsBI,2BAA0B"}
1
+ {"version":3,"sources":["../../../../src/field/features/relationship/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { RelationshipFeatureProps } from './feature.server.js'\n\nimport { RelationshipIcon } from '../../lexical/ui/icons/Relationship/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nconst RelationshipFeatureClient: FeatureProviderProviderClient<RelationshipFeatureProps> = (\n props,\n) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: withMergedProps({\n Component: RelationshipPlugin,\n toMergeIntoProps: props,\n }),\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n {\n displayName: 'Basic',\n items: [\n {\n Icon: RelationshipIcon,\n displayName: 'Relationship',\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ],\n key: 'basic',\n },\n ],\n },\n }),\n }\n}\n\nexport const RelationshipFeatureClientComponent = createClientComponent(RelationshipFeatureClient)\n"],"names":["withMergedProps","RelationshipIcon","createClientComponent","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","RelationshipNode","RelationshipPlugin","RelationshipFeatureClient","props","clientFeatureProps","feature","nodes","plugins","Component","toMergeIntoProps","position","slashMenu","groups","displayName","items","Icon","key","keywords","onSelect","editor","dispatchCommand","replace","RelationshipFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,eAAe,QAAQ,0CAAyC;AAKzE,SAASC,gBAAgB,QAAQ,+CAA8C;AAC/E,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,uCAAuC,QAAQ,uBAAsB;AAC9E,SAASC,gBAAgB,QAAQ,8BAA6B;AAC9D,SAASC,kBAAkB,QAAQ,qBAAoB;AAEvD,MAAMC,4BAAqF,CACzFC;IAEA,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,OAAO;oBAACN;iBAAiB;gBACzBO,SAAS;oBACP;wBACEC,WAAWZ,gBAAgB;4BACzBY,WAAWP;4BACXQ,kBAAkBN;wBACpB;wBACAO,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,QAAQ;wBACN;4BACEC,aAAa;4BACbC,OAAO;gCACL;oCACEC,MAAMlB;oCACNgB,aAAa;oCACbG,KAAK;oCACLC,UAAU;wCAAC;wCAAgB;wCAAY;qCAAM;oCAC7CC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnB,mDAAmD;wCACnDA,OAAOC,eAAe,CAACrB,yCAAyC;4CAC9DsB,SAAS;wCACX;oCACF;gCACF;6BACD;4BACDL,KAAK;wBACP;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMM,qCAAqCxB,sBAAsBI,2BAA0B"}
@@ -0,0 +1,3 @@
1
+ import type { InlineToolbarGroup, InlineToolbarGroupItem } from '../../../lexical/plugins/toolbars/inline/types.js';
2
+ export declare const inlineToolbarFeatureButtonsGroupWithItems: (items: InlineToolbarGroupItem[]) => InlineToolbarGroup;
3
+ //# sourceMappingURL=featureButtonsGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"featureButtonsGroup.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/shared/inlineToolbar/featureButtonsGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,mDAAmD,CAAA;AAE1D,eAAO,MAAM,yCAAyC,UAC7C,sBAAsB,EAAE,KAC9B,kBAOF,CAAA"}
@@ -0,0 +1,10 @@
1
+ export const inlineToolbarFeatureButtonsGroupWithItems = (items)=>{
2
+ return {
3
+ type: 'buttons',
4
+ items,
5
+ key: 'features',
6
+ order: 5
7
+ };
8
+ };
9
+
10
+ //# sourceMappingURL=featureButtonsGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/shared/inlineToolbar/featureButtonsGroup.ts"],"sourcesContent":["import type {\n InlineToolbarGroup,\n InlineToolbarGroupItem,\n} from '../../../lexical/plugins/toolbars/inline/types.js'\n\nexport const inlineToolbarFeatureButtonsGroupWithItems = (\n items: InlineToolbarGroupItem[],\n): InlineToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'features',\n order: 5,\n }\n}\n"],"names":["inlineToolbarFeatureButtonsGroupWithItems","items","type","key","order"],"rangeMappings":";;;;;;;","mappings":"AAKA,OAAO,MAAMA,4CAA4C,CACvDC;IAEA,OAAO;QACLC,MAAM;QACND;QACAE,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
@@ -0,0 +1,3 @@
1
+ import type { InlineToolbarGroup, InlineToolbarGroupItem } from '../../../lexical/plugins/toolbars/inline/types.js';
2
+ export declare const inlineToolbarTextDropdownGroupWithItems: (items: InlineToolbarGroupItem[]) => InlineToolbarGroup;
3
+ //# sourceMappingURL=textDropdownGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/shared/inlineToolbar/textDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,mDAAmD,CAAA;AAI1D,eAAO,MAAM,uCAAuC,UAC3C,sBAAsB,EAAE,KAC9B,kBAQF,CAAA"}
@@ -1,12 +1,12 @@
1
1
  import { TextIcon } from '../../../lexical/ui/icons/Text/index.js';
2
- export const TextDropdownSectionWithEntries = (entries)=>{
2
+ export const inlineToolbarTextDropdownGroupWithItems = (items)=>{
3
3
  return {
4
4
  type: 'dropdown',
5
5
  ChildComponent: TextIcon,
6
- entries,
7
- key: 'dropdown-text',
6
+ items,
7
+ key: 'text',
8
8
  order: 1
9
9
  };
10
10
  };
11
11
 
12
- //# sourceMappingURL=index.js.map
12
+ //# sourceMappingURL=textDropdownGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/shared/inlineToolbar/textDropdownGroup.ts"],"sourcesContent":["import type {\n InlineToolbarGroup,\n InlineToolbarGroupItem,\n} from '../../../lexical/plugins/toolbars/inline/types.js'\n\nimport { TextIcon } from '../../../lexical/ui/icons/Text/index.js'\n\nexport const inlineToolbarTextDropdownGroupWithItems = (\n items: InlineToolbarGroupItem[],\n): InlineToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: TextIcon,\n items,\n key: 'text',\n order: 1,\n }\n}\n"],"names":["TextIcon","inlineToolbarTextDropdownGroupWithItems","items","type","ChildComponent","key","order"],"rangeMappings":";;;;;;;;;","mappings":"AAKA,SAASA,QAAQ,QAAQ,0CAAyC;AAElE,OAAO,MAAMC,0CAA0C,CACrDC;IAEA,OAAO;QACLC,MAAM;QACNC,gBAAgBJ;QAChBE;QACAG,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
@@ -10,8 +10,9 @@ import type { Field, PayloadRequestWithData, ReplaceAny, RichTextField, Validate
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';
14
+ import type { FixedToolbarGroup } from '../lexical/plugins/toolbars/fixed/types.js';
15
+ import type { InlineToolbarGroup } from '../lexical/plugins/toolbars/inline/types.js';
15
16
  import type { HTMLConverter } from './converters/html/converter/types.js';
16
17
  export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ context, currentDepth, depth, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: {
17
18
  context: RequestContext;
@@ -87,9 +88,6 @@ export type ClientFeature<ClientFeatureProps> = {
87
88
  * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to
88
89
  */
89
90
  clientFeatureProps: ClientComponentProps<ClientFeatureProps>;
90
- floatingSelectToolbar?: {
91
- sections: FloatingToolbarSection[];
92
- };
93
91
  hooks?: {
94
92
  load?: ({ incomingEditorState, }: {
95
93
  incomingEditorState: SerializedEditorState;
@@ -100,6 +98,9 @@ export type ClientFeature<ClientFeatureProps> = {
100
98
  };
101
99
  markdownTransformers?: Transformer[];
102
100
  nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>;
101
+ /**
102
+ * Plugins are react component 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
103
+ */
103
104
  plugins?: Array<{
104
105
  Component: React.FC;
105
106
  position: 'bottom';
@@ -116,11 +117,36 @@ export type ClientFeature<ClientFeatureProps> = {
116
117
  position: 'floatingAnchorElem';
117
118
  }>;
118
119
  slashMenu?: {
119
- dynamicOptions?: ({ editor, queryString, }: {
120
+ /**
121
+ * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).
122
+ * Thus, to re-calculate the available groups, this function will be called every time you type after the /.
123
+ *
124
+ * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.
125
+ */
126
+ dynamicGroups?: ({ editor, queryString, }: {
120
127
  editor: LexicalEditor;
121
128
  queryString: string;
122
129
  }) => SlashMenuGroup[];
123
- options?: SlashMenuGroup[];
130
+ /**
131
+ * Static array of groups together with the items in them. These will always be present.
132
+ * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.
133
+ */
134
+ groups?: SlashMenuGroup[];
135
+ };
136
+ /**
137
+ * An opt-in, classic fixed toolbar which stays at the top of the editor
138
+ */
139
+ toolbarFixed?: {
140
+ groups: FixedToolbarGroup[];
141
+ };
142
+ /**
143
+ * The default, floating toolbar which appears when you select text.
144
+ */
145
+ toolbarInline?: {
146
+ /**
147
+ * Array of toolbar groups / sections. Each section can contain multiple toolbar items.
148
+ */
149
+ groups: InlineToolbarGroup[];
124
150
  };
125
151
  };
126
152
  export type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {
@@ -216,6 +242,9 @@ export type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown
216
242
  export type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>;
217
243
  export type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>;
218
244
  export type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>;
245
+ /**
246
+ * Plugins are react component 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
247
+ */
219
248
  export type SanitizedPlugin = {
220
249
  Component: React.FC;
221
250
  key: string;
@@ -276,12 +305,9 @@ export type SanitizedServerFeatures = Required<Pick<ResolvedServerFeature<unknow
276
305
  /** The node types mapped to their validations */
277
306
  validations: Map<string, Array<NodeValidation>>;
278
307
  };
279
- export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes'>> & {
308
+ export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'>> & {
280
309
  /** The keys of all enabled features */
281
310
  enabledFeatures: string[];
282
- floatingSelectToolbar: {
283
- sections: FloatingToolbarSection[];
284
- };
285
311
  hooks: {
286
312
  load: Array<({ incomingEditorState, }: {
287
313
  incomingEditorState: SerializedEditorState;
@@ -290,13 +316,26 @@ export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknow
290
316
  incomingEditorState: SerializedEditorState;
291
317
  }) => SerializedEditorState>;
292
318
  };
319
+ /**
320
+ * Plugins are react component 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
321
+ */
293
322
  plugins?: Array<SanitizedPlugin>;
294
323
  slashMenu: {
295
- dynamicOptions: Array<({ editor, queryString }: {
324
+ /**
325
+ * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).
326
+ * Thus, to re-calculate the available groups, this function will be called every time you type after the /.
327
+ *
328
+ * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.
329
+ */
330
+ dynamicGroups: Array<({ editor, queryString }: {
296
331
  editor: LexicalEditor;
297
332
  queryString: string;
298
333
  }) => SlashMenuGroup[]>;
299
- groupsWithOptions: SlashMenuGroup[];
334
+ /**
335
+ * Static array of groups together with the items in them. These will always be present.
336
+ * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.
337
+ */
338
+ groups: SlashMenuGroup[];
300
339
  };
301
340
  };
302
341
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/field/features/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EACV,KAAK,EACL,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,eAAe,EAChB,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AAEzE,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI,CAAC,EACxF,OAAO,EACP,YAAY,EACZ,KAAK,EACL,wBAAwB,EACxB,KAAK,EACL,aAAa,EACb,QAAQ,EACR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C;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,KAAK,cAAc,EAAE,CAC9F,CAAA;QACD;;;WAGG;QACH,MAAM,EAAE,cAAc,EAAE,CAAA;KACzB,CAAA;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/features/types.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { I18n } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { LexicalNodeReplacement } from 'lexical'\nimport type { RequestContext } from 'payload'\nimport type { SanitizedConfig } from 'payload/config'\nimport type {\n Field,\n PayloadRequestWithData,\n ReplaceAny,\n RichTextField,\n ValidateOptions,\n} from 'payload/types'\nimport type React from 'react'\n\nimport type { AdapterProps } from '../../types.js'\nimport type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js'\nimport type { FloatingToolbarSection } from '../lexical/plugins/FloatingSelectToolbar/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { HTMLConverter } from './converters/html/converter/types.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: {\n context: RequestContext\n currentDepth: number\n depth: number\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<ServerFeatureProps, ClientFeatureProps> = (\n props?: ServerFeatureProps,\n) => FeatureProviderServer<ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first and are available in the `feature` property*/\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature: (props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>>\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerFeatureProps\n}\n\nexport type FeatureProviderProviderClient<ClientFeatureProps> = (\n props?: ClientComponentProps<ClientFeatureProps>,\n) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n feature: (props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>\n}\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n\n floatingSelectToolbar?: {\n sections: FloatingToolbarSection[]\n }\n hooks?: {\n load?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n save?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC<{ anchorElem: HTMLElement }>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n >\n slashMenu?: {\n dynamicOptions?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n options?: SlashMenuGroup[]\n }\n}\n\nexport type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {\n featureKey: string\n order: number\n}\n\nexport type FieldNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The value of the field. */\n node?: T\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n overrideAccess?: boolean\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequestWithData\n}\n\nexport type FieldNodeHook<T extends SerializedLexicalNode> = (\n args: FieldNodeHookArgs<T>,\n) => Promise<T> | T\n\n// Define the node with hooks that use the node's exportJSON return type\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n converters?: {\n html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n }\n hooks?: {\n afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n }\n node: Klass<T> | LexicalNodeReplacement\n populationPromises?: Array<\n PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n generateComponentMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaPath: string\n }) => {\n [key: string]: React.FC<{ componentKey: string; featureKey: string }>\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]> | null\n generatedTypes?: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = ServerFeature<\n ServerProps,\n ClientFeatureProps\n> &\n Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n > & {\n order: number\n }\n\nexport type ResolvedClientFeature<ClientFeatureProps> = ClientFeature<ClientFeatureProps> & {\n key: string\n order: number\n}\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown, unknown>>\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>\n\nexport type SanitizedPlugin =\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC<{ anchorElem: HTMLElement }>\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n\nexport type SanitizedServerFeatures = Required<\n Pick<ResolvedServerFeature<unknown, unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The node types mapped to their converters */\n converters: {\n html: HTMLConverter[]\n }\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n /** The node types mapped to their hooks */\n\n hooks?: {\n afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n populationPromises: Map<string, Array<PopulationPromise>>\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n}\n\nexport type SanitizedClientFeatures = Required<\n Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n floatingSelectToolbar: {\n sections: FloatingToolbarSection[]\n }\n hooks: {\n load: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n save: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n }\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n dynamicOptions: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n groupsWithOptions: SlashMenuGroup[]\n }\n}\n"],"names":[],"rangeMappings":"","mappings":"AA8XA,WA+BC"}
1
+ {"version":3,"sources":["../../../src/field/features/types.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { I18n } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { LexicalNodeReplacement } from 'lexical'\nimport type { RequestContext } from 'payload'\nimport type { SanitizedConfig } from 'payload/config'\nimport type {\n Field,\n PayloadRequestWithData,\n ReplaceAny,\n RichTextField,\n ValidateOptions,\n} from 'payload/types'\nimport type React from 'react'\n\nimport type { AdapterProps } from '../../types.js'\nimport type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { FixedToolbarGroup } from '../lexical/plugins/toolbars/fixed/types.js'\nimport type { InlineToolbarGroup } from '../lexical/plugins/toolbars/inline/types.js'\nimport type { HTMLConverter } from './converters/html/converter/types.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: {\n context: RequestContext\n currentDepth: number\n depth: number\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<ServerFeatureProps, ClientFeatureProps> = (\n props?: ServerFeatureProps,\n) => FeatureProviderServer<ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first and are available in the `feature` property*/\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature: (props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>>\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerFeatureProps\n}\n\nexport type FeatureProviderProviderClient<ClientFeatureProps> = (\n props?: ClientComponentProps<ClientFeatureProps>,\n) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n feature: (props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>\n}\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n hooks?: {\n load?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n save?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n /**\n * Plugins are react component which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC<{ anchorElem: HTMLElement }>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n >\n slashMenu?: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups?: SlashMenuGroup[]\n }\n /**\n * An opt-in, classic fixed toolbar which stays at the top of the editor\n */\n toolbarFixed?: {\n groups: FixedToolbarGroup[]\n }\n /**\n * The default, floating toolbar which appears when you select text.\n */\n toolbarInline?: {\n /**\n * Array of toolbar groups / sections. Each section can contain multiple toolbar items.\n */\n groups: InlineToolbarGroup[]\n }\n}\n\nexport type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {\n featureKey: string\n order: number\n}\n\nexport type FieldNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The value of the field. */\n node?: T\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n overrideAccess?: boolean\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequestWithData\n}\n\nexport type FieldNodeHook<T extends SerializedLexicalNode> = (\n args: FieldNodeHookArgs<T>,\n) => Promise<T> | T\n\n// Define the node with hooks that use the node's exportJSON return type\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n converters?: {\n html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n }\n hooks?: {\n afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n }\n node: Klass<T> | LexicalNodeReplacement\n populationPromises?: Array<\n PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n generateComponentMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaPath: string\n }) => {\n [key: string]: React.FC<{ componentKey: string; featureKey: string }>\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]> | null\n generatedTypes?: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = ServerFeature<\n ServerProps,\n ClientFeatureProps\n> &\n Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n > & {\n order: number\n }\n\nexport type ResolvedClientFeature<ClientFeatureProps> = ClientFeature<ClientFeatureProps> & {\n key: string\n order: number\n}\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown, unknown>>\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>\n\n/**\n * Plugins are react component which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\nexport type SanitizedPlugin =\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC<{ anchorElem: HTMLElement }>\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n\nexport type SanitizedServerFeatures = Required<\n Pick<ResolvedServerFeature<unknown, unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The node types mapped to their converters */\n converters: {\n html: HTMLConverter[]\n }\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n /** The node types mapped to their hooks */\n\n hooks?: {\n afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n populationPromises: Map<string, Array<PopulationPromise>>\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n}\n\nexport type SanitizedClientFeatures = Required<\n Pick<\n ResolvedClientFeature<unknown>,\n 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'\n >\n> & {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n hooks: {\n load: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n save: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n }\n /**\n * Plugins are react component which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups: SlashMenuGroup[]\n }\n}\n"],"names":[],"rangeMappings":"","mappings":"AA0ZA,WA4CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/feature.client.tsx"],"names":[],"mappings":";AAWA,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,cAAc,EAAE,OAAO,CAAA;SACxB,CAAA;KACF,CAAA;CACF,CAAA;AAsCD,eAAO,MAAM,4BAA4B,0FAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/feature.client.tsx"],"names":[],"mappings":";AAUA,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,cAAc,EAAE,OAAO,CAAA;SACxB,CAAA;KACF,CAAA;CACF,CAAA;AAuCD,eAAO,MAAM,4BAA4B,0FAA6C,CAAA"}
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
3
2
  import { UploadIcon } from '../../lexical/ui/icons/Upload/index.js';
4
3
  import { createClientComponent } from '../createClientComponent.js';
5
4
  import { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js';
@@ -20,14 +19,14 @@ const UploadFeatureClient = (props)=>{
20
19
  }
21
20
  ],
22
21
  slashMenu: {
23
- options: [
22
+ groups: [
24
23
  {
25
24
  displayName: 'Basic',
26
- key: 'basic',
27
- options: [
28
- new SlashMenuOption('upload', {
25
+ items: [
26
+ {
29
27
  Icon: UploadIcon,
30
28
  displayName: 'Upload',
29
+ key: 'upload',
31
30
  keywords: [
32
31
  'upload',
33
32
  'image',
@@ -42,8 +41,9 @@ const UploadFeatureClient = (props)=>{
42
41
  replace: false
43
42
  });
44
43
  }
45
- })
46
- ]
44
+ }
45
+ ],
46
+ key: 'basic'
47
47
  }
48
48
  ]
49
49
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/upload/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { UploadIcon } from '../../lexical/ui/icons/Upload/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { UploadNode } from './nodes/UploadNode.js'\nimport { UploadPlugin } from './plugin/index.js'\n\nexport type UploadFeaturePropsClient = {\n collections: {\n [collection: string]: {\n hasExtraFields: boolean\n }\n }\n}\n\nconst UploadFeatureClient: FeatureProviderProviderClient<UploadFeaturePropsClient> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [UploadNode],\n plugins: [\n {\n Component: UploadPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Basic',\n key: 'basic',\n options: [\n new SlashMenuOption('upload', {\n Icon: UploadIcon,\n displayName: 'Upload',\n keywords: ['upload', 'image', 'file', 'img', 'picture', 'photo', 'media'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n }),\n ],\n },\n ],\n },\n }),\n }\n}\n\nexport const UploadFeatureClientComponent = createClientComponent(UploadFeatureClient)\n"],"names":["SlashMenuOption","UploadIcon","createClientComponent","INSERT_UPLOAD_WITH_DRAWER_COMMAND","UploadNode","UploadPlugin","UploadFeatureClient","props","clientFeatureProps","feature","nodes","plugins","Component","position","slashMenu","options","displayName","key","Icon","keywords","onSelect","editor","dispatchCommand","replace","UploadFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,eAAe,QAAQ,sEAAqE;AACrG,SAASC,UAAU,QAAQ,yCAAwC;AACnE,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,iCAAiC,QAAQ,uBAAsB;AACxE,SAASC,UAAU,QAAQ,wBAAuB;AAClD,SAASC,YAAY,QAAQ,oBAAmB;AAUhD,MAAMC,sBAA+E,CAACC;IACpF,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,OAAO;oBAACN;iBAAW;gBACnBO,SAAS;oBACP;wBACEC,WAAWP;wBACXQ,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbC,KAAK;4BACLF,SAAS;gCACP,IAAIf,gBAAgB,UAAU;oCAC5BkB,MAAMjB;oCACNe,aAAa;oCACbG,UAAU;wCAAC;wCAAU;wCAAS;wCAAQ;wCAAO;wCAAW;wCAAS;qCAAQ;oCACzEC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACnB,mCAAmC;4CACxDoB,SAAS;wCACX;oCACF;gCACF;6BACD;wBACH;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+BtB,sBAAsBI,qBAAoB"}
1
+ {"version":3,"sources":["../../../../src/field/features/upload/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { UploadIcon } from '../../lexical/ui/icons/Upload/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { UploadNode } from './nodes/UploadNode.js'\nimport { UploadPlugin } from './plugin/index.js'\n\nexport type UploadFeaturePropsClient = {\n collections: {\n [collection: string]: {\n hasExtraFields: boolean\n }\n }\n}\n\nconst UploadFeatureClient: FeatureProviderProviderClient<UploadFeaturePropsClient> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [UploadNode],\n plugins: [\n {\n Component: UploadPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n {\n displayName: 'Basic',\n items: [\n {\n Icon: UploadIcon,\n displayName: 'Upload',\n key: 'upload',\n keywords: ['upload', 'image', 'file', 'img', 'picture', 'photo', 'media'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ],\n key: 'basic',\n },\n ],\n },\n }),\n }\n}\n\nexport const UploadFeatureClientComponent = createClientComponent(UploadFeatureClient)\n"],"names":["UploadIcon","createClientComponent","INSERT_UPLOAD_WITH_DRAWER_COMMAND","UploadNode","UploadPlugin","UploadFeatureClient","props","clientFeatureProps","feature","nodes","plugins","Component","position","slashMenu","groups","displayName","items","Icon","key","keywords","onSelect","editor","dispatchCommand","replace","UploadFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,UAAU,QAAQ,yCAAwC;AACnE,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,iCAAiC,QAAQ,uBAAsB;AACxE,SAASC,UAAU,QAAQ,wBAAuB;AAClD,SAASC,YAAY,QAAQ,oBAAmB;AAUhD,MAAMC,sBAA+E,CAACC;IACpF,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,OAAO;oBAACN;iBAAW;gBACnBO,SAAS;oBACP;wBACEC,WAAWP;wBACXQ,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,QAAQ;wBACN;4BACEC,aAAa;4BACbC,OAAO;gCACL;oCACEC,MAAMjB;oCACNe,aAAa;oCACbG,KAAK;oCACLC,UAAU;wCAAC;wCAAU;wCAAS;wCAAQ;wCAAO;wCAAW;wCAAS;qCAAQ;oCACzEC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACpB,mCAAmC;4CACxDqB,SAAS;wCACX;oCACF;gCACF;6BACD;4BACDL,KAAK;wBACP;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMM,+BAA+BvB,sBAAsBI,qBAAoB"}
@@ -9,11 +9,11 @@ import * as React from 'react';
9
9
  import { useEffect, useState } from 'react';
10
10
  import { EditorPlugin } from './EditorPlugin.js';
11
11
  import './LexicalEditor.scss';
12
- import { FloatingSelectToolbarPlugin } from './plugins/FloatingSelectToolbar/index.js';
13
12
  import { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js';
14
13
  import { SlashMenuPlugin } from './plugins/SlashMenu/index.js';
15
14
  import { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js';
16
15
  import { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js';
16
+ import { FloatingSelectToolbarPlugin } from './plugins/toolbars/inline/Toolbar/index.js';
17
17
  import { LexicalContentEditable } from './ui/ContentEditable.js';
18
18
  export const LexicalEditor = (props)=>{
19
19
  const { editorConfig, onChange } = props;