@payloadcms/richtext-lexical 3.0.0-alpha.66 → 3.0.0-alpha.68

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 +14 -13
  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
@@ -4,8 +4,8 @@ import { mergeRegister } from '@lexical/utils';
4
4
  import { $getSelection } from 'lexical';
5
5
  import React, { useCallback, useEffect, useState } from 'react';
6
6
  import './index.scss';
7
- const baseClass = 'floating-select-toolbar-popup__button';
8
- export const ToolbarButton = ({ children, entry })=>{
7
+ const baseClass = 'inline-toolbar-popup__button';
8
+ export const ToolbarButton = ({ children, item })=>{
9
9
  const [editor] = useLexicalComposerContext();
10
10
  const [enabled, setEnabled] = useState(true);
11
11
  const [active, setActive] = useState(false);
@@ -13,8 +13,8 @@ export const ToolbarButton = ({ children, entry })=>{
13
13
  const updateStates = useCallback(()=>{
14
14
  editor.getEditorState().read(()=>{
15
15
  const selection = $getSelection();
16
- if (entry.isActive) {
17
- const isActive = entry.isActive({
16
+ if (item.isActive) {
17
+ const isActive = item.isActive({
18
18
  editor,
19
19
  selection
20
20
  });
@@ -22,8 +22,8 @@ export const ToolbarButton = ({ children, entry })=>{
22
22
  setActive(isActive);
23
23
  }
24
24
  }
25
- if (entry.isEnabled) {
26
- const isEnabled = entry.isEnabled({
25
+ if (item.isEnabled) {
26
+ const isEnabled = item.isEnabled({
27
27
  editor,
28
28
  selection
29
29
  });
@@ -36,7 +36,7 @@ export const ToolbarButton = ({ children, entry })=>{
36
36
  active,
37
37
  editor,
38
38
  enabled,
39
- entry
39
+ item
40
40
  ]);
41
41
  useEffect(()=>{
42
42
  updateStates();
@@ -64,7 +64,7 @@ export const ToolbarButton = ({ children, entry })=>{
64
64
  baseClass,
65
65
  enabled === false ? 'disabled' : '',
66
66
  active ? 'active' : '',
67
- entry?.key ? `${baseClass}-` + entry.key : ''
67
+ item?.key ? `${baseClass}-` + item.key : ''
68
68
  ].filter(Boolean).join(' '));
69
69
  }, [
70
70
  enabled,
@@ -75,7 +75,7 @@ export const ToolbarButton = ({ children, entry })=>{
75
75
  className: className,
76
76
  onClick: ()=>{
77
77
  if (enabled !== false) {
78
- entry.onClick({
78
+ item.onSelect({
79
79
  editor,
80
80
  isActive: active
81
81
  });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/field/lexical/plugins/toolbars/inline/ToolbarButton/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { InlineToolbarGroupItem } from '../types.js'\n\nimport './index.scss'\n\nconst baseClass = 'inline-toolbar-popup__button'\n\nexport const ToolbarButton = ({\n children,\n item,\n}: {\n children: React.JSX.Element\n item: InlineToolbarGroupItem\n}) => {\n const [editor] = useLexicalComposerContext()\n const [enabled, setEnabled] = useState<boolean>(true)\n const [active, setActive] = useState<boolean>(false)\n const [className, setClassName] = useState<string>(baseClass)\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (item.isActive) {\n const isActive = item.isActive({ editor, selection })\n if (active !== isActive) {\n setActive(isActive)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, selection })\n if (enabled !== isEnabled) {\n setEnabled(isEnabled)\n }\n }\n })\n }, [active, editor, enabled, item])\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 useEffect(() => {\n setClassName(\n [\n baseClass,\n enabled === false ? 'disabled' : '',\n active ? 'active' : '',\n item?.key ? `${baseClass}-` + item.key : '',\n ]\n .filter(Boolean)\n .join(' '),\n )\n }, [enabled, active, className])\n\n return (\n <button\n className={className}\n onClick={() => {\n if (enabled !== false) {\n item.onSelect({\n editor,\n isActive: active,\n })\n }\n }}\n onMouseDown={(e) => {\n // This fixes a bug where you are unable to click the button if you are in a NESTED editor (editor in blocks field in editor).\n // Thus only happens if you click on the SVG of the button. Clicking on the outside works. Related issue: https://github.com/payloadcms/payload/issues/4025\n // TODO: Find out why exactly it happens and why e.preventDefault() on the mouseDown fixes it. Write that down here, or potentially fix a root cause, if there is any.\n e.preventDefault()\n }}\n type=\"button\"\n >\n {children}\n </button>\n )\n}\n"],"names":["useLexicalComposerContext","mergeRegister","$getSelection","React","useCallback","useEffect","useState","baseClass","ToolbarButton","children","item","editor","enabled","setEnabled","active","setActive","className","setClassName","updateStates","getEditorState","read","selection","isActive","isEnabled","document","addEventListener","removeEventListener","registerUpdateListener","key","filter","Boolean","join","button","onClick","onSelect","onMouseDown","e","preventDefault","type"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,aAAa,QAAQ,iBAAgB;AAC9C,SAASC,aAAa,QAAQ,UAAS;AACvC,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAI/D,OAAO,eAAc;AAErB,MAAMC,YAAY;AAElB,OAAO,MAAMC,gBAAgB,CAAC,EAC5BC,QAAQ,EACRC,IAAI,EAIL;IACC,MAAM,CAACC,OAAO,GAAGX;IACjB,MAAM,CAACY,SAASC,WAAW,GAAGP,SA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AA8H;YAC9H,2JAA2J;YAC3J,sKAAsK;YACtKA,EAAEC,cAAc;QAClB;QACAC,MAAK;OAEJ7B;AAGP,EAAC"}
@@ -1,4 +1,4 @@
1
- .floating-select-toolbar-popup__button {
1
+ .inline-toolbar-popup__button {
2
2
  display: flex;
3
3
  align-items: center;
4
4
  vertical-align: middle;
@@ -1,9 +1,9 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import React from 'react';
3
- import type { FloatingToolbarSectionEntry } from '../types.js';
4
- export declare function DropDownItem({ children, entry, title, }: {
3
+ import type { InlineToolbarGroupItem } from '../types.js';
4
+ export declare function DropDownItem({ children, item, title, }: {
5
5
  children: React.ReactNode;
6
- entry: FloatingToolbarSectionEntry;
6
+ item: InlineToolbarGroupItem;
7
7
  title?: string;
8
8
  }): React.ReactNode;
9
9
  export declare function DropDown({ Icon, buttonAriaLabel, buttonClassName, children, disabled, stopCloseOnClickSelf, }: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../../../../../../src/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAA;AACzF,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAUzD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAI,EACJ,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,IAAI,EAAE,sBAAsB,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,KAAK,CAAC,SAAS,CA+FlB;AA4ED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,eAAe,EACf,eAAe,EACf,QAAQ,EACR,QAAgB,EAChB,oBAAoB,GACrB,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,GAAG,KAAK,CAAC,SAAS,CAgFlB"}
@@ -5,9 +5,9 @@ import { $getSelection } from 'lexical';
5
5
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
6
6
  import React from 'react';
7
7
  import { createPortal } from 'react-dom';
8
- const baseClass = 'floating-select-toolbar-popup__dropdown-item';
8
+ const baseClass = 'inline-toolbar-popup__dropdown-item';
9
9
  const DropDownContext = /*#__PURE__*/ React.createContext(null);
10
- export function DropDownItem({ children, entry, title }) {
10
+ export function DropDownItem({ children, item, title }) {
11
11
  const [editor] = useLexicalComposerContext();
12
12
  const [enabled, setEnabled] = useState(true);
13
13
  const [active, setActive] = useState(false);
@@ -15,8 +15,8 @@ export function DropDownItem({ children, entry, title }) {
15
15
  const updateStates = useCallback(()=>{
16
16
  editor.getEditorState().read(()=>{
17
17
  const selection = $getSelection();
18
- if (entry.isActive) {
19
- const isActive = entry.isActive({
18
+ if (item.isActive) {
19
+ const isActive = item.isActive({
20
20
  editor,
21
21
  selection
22
22
  });
@@ -24,8 +24,8 @@ export function DropDownItem({ children, entry, title }) {
24
24
  setActive(isActive);
25
25
  }
26
26
  }
27
- if (entry.isEnabled) {
28
- const isEnabled = entry.isEnabled({
27
+ if (item.isEnabled) {
28
+ const isEnabled = item.isEnabled({
29
29
  editor,
30
30
  selection
31
31
  });
@@ -38,7 +38,7 @@ export function DropDownItem({ children, entry, title }) {
38
38
  active,
39
39
  editor,
40
40
  enabled,
41
- entry
41
+ item
42
42
  ]);
43
43
  useEffect(()=>{
44
44
  updateStates();
@@ -66,13 +66,13 @@ export function DropDownItem({ children, entry, title }) {
66
66
  baseClass,
67
67
  enabled === false ? 'disabled' : '',
68
68
  active ? 'active' : '',
69
- entry?.key ? `${baseClass}-${entry.key}` : ''
69
+ item?.key ? `${baseClass}-${item.key}` : ''
70
70
  ].filter(Boolean).join(' '));
71
71
  }, [
72
72
  enabled,
73
73
  active,
74
74
  className,
75
- entry.key
75
+ item.key
76
76
  ]);
77
77
  const ref = useRef(null);
78
78
  const dropDownContext = React.useContext(DropDownContext);
@@ -92,7 +92,7 @@ export function DropDownItem({ children, entry, title }) {
92
92
  className: className,
93
93
  onClick: ()=>{
94
94
  if (enabled !== false) {
95
- entry.onClick({
95
+ item.onSelect({
96
96
  editor,
97
97
  isActive: active
98
98
  });
@@ -166,7 +166,7 @@ function DropDownItems({ children, dropDownRef, onClose }) {
166
166
  return /*#__PURE__*/ React.createElement(DropDownContext.Provider, {
167
167
  value: contextValue
168
168
  }, /*#__PURE__*/ React.createElement("div", {
169
- className: "floating-select-toolbar-popup__dropdown-items",
169
+ className: "inline-toolbar-popup__dropdown-items",
170
170
  onKeyDown: handleKeyDown,
171
171
  ref: dropDownRef
172
172
  }, children));
@@ -238,7 +238,7 @@ export function DropDown({ Icon, buttonAriaLabel, buttonClassName, children, dis
238
238
  ref: buttonRef,
239
239
  type: "button"
240
240
  }, /*#__PURE__*/ React.createElement(Icon, null), /*#__PURE__*/ React.createElement("i", {
241
- className: "floating-select-toolbar-popup__dropdown-caret"
241
+ className: "inline-toolbar-popup__dropdown-caret"
242
242
  })), showDropDown && /*#__PURE__*/ createPortal(/*#__PURE__*/ React.createElement(DropDownItems, {
243
243
  dropDownRef: dropDownRef,
244
244
  onClose: handleClose
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/field/lexical/plugins/toolbars/inline/ToolbarDropdown/DropDown.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { InlineToolbarGroupItem } from '../types.js'\n\nconst baseClass = 'inline-toolbar-popup__dropdown-item'\n\ninterface DropDownContextType {\n registerItem: (ref: React.RefObject<HTMLButtonElement>) => void\n}\n\nconst DropDownContext = React.createContext<DropDownContextType | null>(null)\n\nexport function DropDownItem({\n children,\n item,\n title,\n}: {\n children: React.ReactNode\n item: InlineToolbarGroupItem\n title?: string\n}): React.ReactNode {\n const [editor] = useLexicalComposerContext()\n const [enabled, setEnabled] = useState<boolean>(true)\n const [active, setActive] = useState<boolean>(false)\n const [className, setClassName] = useState<string>(baseClass)\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (item.isActive) {\n const isActive = item.isActive({ editor, selection })\n if (active !== isActive) {\n setActive(isActive)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, selection })\n if (enabled !== isEnabled) {\n setEnabled(isEnabled)\n }\n }\n })\n }, [active, editor, enabled, item])\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 useEffect(() => {\n setClassName(\n [\n baseClass,\n enabled === false ? 'disabled' : '',\n active ? 'active' : '',\n item?.key ? `${baseClass}-${item.key}` : '',\n ]\n .filter(Boolean)\n .join(' '),\n )\n }, [enabled, active, className, item.key])\n\n const ref = useRef<HTMLButtonElement>(null)\n\n const dropDownContext = React.useContext(DropDownContext)\n\n if (dropDownContext === null) {\n throw new Error('DropDownItem must be used within a DropDown')\n }\n\n const { registerItem } = dropDownContext\n\n useEffect(() => {\n if (ref?.current != null) {\n registerItem(ref)\n }\n }, [ref, registerItem])\n\n return (\n <button\n className={className}\n onClick={() => {\n if (enabled !== false) {\n item.onSelect({\n editor,\n isActive: active,\n })\n }\n }}\n onMouseDown={(e) => {\n // This is required for Firefox compatibility. Without it, the dropdown will disappear without the onClick being called.\n // This only happens in Firefox. Must be something about how Firefox handles focus events differently.\n e.preventDefault()\n }}\n ref={ref}\n title={title}\n type=\"button\"\n >\n {children}\n </button>\n )\n}\n\nfunction DropDownItems({\n children,\n dropDownRef,\n onClose,\n}: {\n children: React.ReactNode\n dropDownRef: React.Ref<HTMLDivElement>\n onClose: () => void\n}): JSX.Element {\n const [items, setItems] = useState<Array<React.RefObject<HTMLButtonElement>>>()\n const [highlightedItem, setHighlightedItem] = useState<React.RefObject<HTMLButtonElement>>()\n\n const registerItem = useCallback(\n (itemRef: React.RefObject<HTMLButtonElement>) => {\n setItems((prev) => (prev != null ? [...prev, itemRef] : [itemRef]))\n },\n [setItems],\n )\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n if (items == null) return\n\n const { key } = event\n\n if (['ArrowDown', 'ArrowUp', 'Escape', 'Tab'].includes(key)) {\n event.preventDefault()\n }\n\n if (key === 'Escape' || key === 'Tab') {\n onClose()\n } else if (key === 'ArrowUp') {\n setHighlightedItem((prev) => {\n if (prev == null) return items[0]\n const index = items.indexOf(prev) - 1\n return items[index === -1 ? items.length - 1 : index]\n })\n } else if (key === 'ArrowDown') {\n setHighlightedItem((prev) => {\n if (prev == null) return items[0]\n return items[items.indexOf(prev) + 1]\n })\n }\n }\n\n const contextValue = useMemo(\n () => ({\n registerItem,\n }),\n [registerItem],\n )\n\n useEffect(() => {\n if (items != null && highlightedItem == null) {\n setHighlightedItem(items[0])\n }\n\n if (highlightedItem?.current != null) {\n highlightedItem.current.focus()\n }\n }, [items, highlightedItem])\n\n return (\n <DropDownContext.Provider value={contextValue}>\n <div\n className=\"inline-toolbar-popup__dropdown-items\"\n onKeyDown={handleKeyDown}\n ref={dropDownRef}\n >\n {children}\n </div>\n </DropDownContext.Provider>\n )\n}\n\nexport function DropDown({\n Icon,\n buttonAriaLabel,\n buttonClassName,\n children,\n disabled = false,\n stopCloseOnClickSelf,\n}: {\n Icon?: React.FC\n buttonAriaLabel?: string\n buttonClassName: string\n children: ReactNode\n disabled?: boolean\n stopCloseOnClickSelf?: boolean\n}): React.ReactNode {\n const dropDownRef = useRef<HTMLDivElement>(null)\n const buttonRef = useRef<HTMLButtonElement>(null)\n const [showDropDown, setShowDropDown] = useState(false)\n\n const handleClose = (): void => {\n setShowDropDown(false)\n if (buttonRef?.current != null) {\n buttonRef.current.focus()\n }\n }\n\n useEffect(() => {\n const button = buttonRef.current\n const dropDown = dropDownRef.current\n\n if (showDropDown && button !== null && dropDown !== null) {\n const { left, top } = button.getBoundingClientRect()\n const scrollTopOffset = window.pageYOffset || document.documentElement.scrollTop\n dropDown.style.top = `${top + scrollTopOffset + button.offsetHeight + 5}px`\n dropDown.style.left = `${Math.min(left - 5, window.innerWidth - dropDown.offsetWidth - 20)}px`\n }\n }, [dropDownRef, buttonRef, showDropDown])\n\n useEffect(() => {\n const button = buttonRef.current\n\n if (button !== null && showDropDown) {\n const handle = (event: MouseEvent): void => {\n const { target } = event\n if (stopCloseOnClickSelf != null) {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (dropDownRef.current != null && dropDownRef.current.contains(target as Node)) {\n return\n }\n }\n if (!button.contains(target as Node)) {\n setShowDropDown(false)\n }\n }\n document.addEventListener('click', handle)\n\n return () => {\n document.removeEventListener('click', handle)\n }\n }\n }, [dropDownRef, buttonRef, showDropDown, stopCloseOnClickSelf])\n\n return (\n <React.Fragment>\n <button\n aria-label={buttonAriaLabel}\n className={buttonClassName + (showDropDown ? ' active' : '')}\n disabled={disabled}\n onClick={(event) => {\n event.preventDefault()\n setShowDropDown(!showDropDown)\n }}\n onMouseDown={(e) => {\n // This fixes a bug where you are unable to click the button if you are in a NESTED editor (editor in blocks field in editor).\n // Thus only happens if you click on the SVG of the button. Clicking on the outside works. Related issue: https://github.com/payloadcms/payload/issues/4025\n // TODO: Find out why exactly it happens and why e.preventDefault() on the mouseDown fixes it. Write that down here, or potentially fix a root cause, if there is any.\n e.preventDefault()\n }}\n ref={buttonRef}\n type=\"button\"\n >\n <Icon />\n <i className=\"inline-toolbar-popup__dropdown-caret\" />\n </button>\n\n {showDropDown &&\n createPortal(\n <DropDownItems dropDownRef={dropDownRef} onClose={handleClose}>\n {children}\n </DropDownItems>,\n document.body,\n )}\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","mergeRegister","$getSelection","useCallback","useEffect","useMemo","useRef","useState","React","createPortal","baseClass","DropDownContext","createContext","DropDownItem","children","item","title","editor","enabled","setEnabled","active","setActive","className","setClassName","updateStates","getEditorState","read","selection","isActive","isEnabled","document","addEventListener","removeEventListener","registerUpdateListener","key","filter","Boolean","join","ref","dropDownContext","useContext","Error","registerItem","current","button","onClick","onSelect","onMouseDown","e","preventDefault","type","DropDownItems","dropDownRef","onClose","items","setItems","highlightedItem","setHighlightedItem","itemRef","prev","handleKeyDown","event","includes","index","indexOf","length","contextValue","focus","Provider","value","div","onKeyDown","DropDown","Icon","buttonAriaLabel","buttonClassName","disabled","stopCloseOnClickSelf","buttonRef","showDropDown","setShowDropDown","handleClose","dropDown","left","top","getBoundingClientRect","scrollTopOffset","window","pageYOffset","documentElement","scrollTop","style","offsetHeight","Math","min","innerWidth","offsetWidth","handle","target","contains","Fragment","aria-label","i","body"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,aAAa,QAAQ,iBAAgB;AAC9C,SAAS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AmBI,CAAAA,eAAe,YAAY,EAAC;QAC1DH,UAAUA;QACV/B,SAAS,CAACgB;YACRA,MAAMZ,cAAc;YACpB+B,gBAAgB,CAACD;QACnB;QACAhC,aAAa,CAACC;YACZ,8HAA8H;YAC9H,2JAA2J;YAC3J,sKAAsK;YACtKA,EAAEC,cAAc;QAClB;QACAX,KAAKwC;QACL5B,MAAK;qBAEL,oBAACuB,2BACD,oBAAC6B;QAAEhF,WAAU;SAGdyD,8BACCtE,2BACE,oBAAC0C;QAAcC,aAAaA;QAAaC,SAAS4B;OAC/CnE,WAEHgB,SAASyE,IAAI;AAIvB"}
@@ -1,18 +1,18 @@
1
1
  import React from 'react';
2
2
  import type { LexicalEditor } from 'lexical';
3
- import type { FloatingToolbarSectionEntry } from '../types.js';
3
+ import type { InlineToolbarGroupItem } from '../types.js';
4
4
  import './index.scss';
5
- export declare const ToolbarEntry: ({ anchorElem, editor, entry, }: {
5
+ export declare const ToolbarItem: ({ anchorElem, editor, item, }: {
6
6
  anchorElem: HTMLElement;
7
7
  editor: LexicalEditor;
8
- entry: FloatingToolbarSectionEntry;
8
+ item: InlineToolbarGroupItem;
9
9
  }) => React.JSX.Element;
10
- export declare const ToolbarDropdown: ({ Icon, anchorElem, classNames, editor, entries, sectionKey, }: {
10
+ export declare const ToolbarDropdown: ({ Icon, anchorElem, classNames, editor, groupKey, items, }: {
11
11
  Icon?: React.FC;
12
12
  anchorElem: HTMLElement;
13
13
  classNames?: string[];
14
14
  editor: LexicalEditor;
15
- entries: FloatingToolbarSectionEntry[];
16
- sectionKey: string;
15
+ groupKey: string;
16
+ items: InlineToolbarGroupItem[];
17
17
  }) => React.JSX.Element;
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGzD,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,WAAW,kCAIrB;IACD,UAAU,EAAE,WAAW,CAAA;IACvB,MAAM,EAAE,aAAa,CAAA;IACrB,IAAI,EAAE,sBAAsB,CAAA;CAC7B,sBAeA,CAAA;AAED,eAAO,MAAM,eAAe,+DAOzB;IACD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,UAAU,EAAE,WAAW,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,sBAAsB,EAAE,CAAA;CAChC,sBAgBA,CAAA"}
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ const baseClass = 'inline-toolbar-popup__dropdown';
4
+ import { DropDown, DropDownItem } from './DropDown.js';
5
+ import './index.scss';
6
+ export const ToolbarItem = ({ anchorElem, editor, item })=>{
7
+ if (item.Component) {
8
+ return item?.Component && /*#__PURE__*/ React.createElement(item.Component, {
9
+ anchorElem: anchorElem,
10
+ editor: editor,
11
+ item: item,
12
+ key: item.key
13
+ });
14
+ }
15
+ return /*#__PURE__*/ React.createElement(DropDownItem, {
16
+ item: item,
17
+ key: item.key
18
+ }, item?.ChildComponent && /*#__PURE__*/ React.createElement(item.ChildComponent, null), /*#__PURE__*/ React.createElement("span", {
19
+ className: "text"
20
+ }, item.label));
21
+ };
22
+ export const ToolbarDropdown = ({ Icon, anchorElem, classNames, editor, groupKey, items })=>{
23
+ return /*#__PURE__*/ React.createElement(DropDown, {
24
+ Icon: Icon,
25
+ buttonAriaLabel: `${groupKey} dropdown`,
26
+ buttonClassName: [
27
+ baseClass,
28
+ `${baseClass}-${groupKey}`,
29
+ ...classNames || []
30
+ ].filter(Boolean).join(' '),
31
+ key: groupKey
32
+ }, items.length && items.map((item)=>{
33
+ return /*#__PURE__*/ React.createElement(ToolbarItem, {
34
+ anchorElem: anchorElem,
35
+ editor: editor,
36
+ item: item,
37
+ key: item.key
38
+ });
39
+ }));
40
+ };
41
+
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/field/lexical/plugins/toolbars/inline/ToolbarDropdown/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nconst baseClass = 'inline-toolbar-popup__dropdown'\n\nimport type { LexicalEditor } from 'lexical'\n\nimport type { InlineToolbarGroupItem } from '../types.js'\n\nimport { DropDown, DropDownItem } from './DropDown.js'\nimport './index.scss'\n\nexport const ToolbarItem = ({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: InlineToolbarGroupItem\n}) => {\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n )\n }\n\n return (\n <DropDownItem item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n <span className=\"text\">{item.label}</span>\n </DropDownItem>\n )\n}\n\nexport const ToolbarDropdown = ({\n Icon,\n anchorElem,\n classNames,\n editor,\n groupKey,\n items,\n}: {\n Icon?: React.FC\n anchorElem: HTMLElement\n classNames?: string[]\n editor: LexicalEditor\n groupKey: string\n items: InlineToolbarGroupItem[]\n}) => {\n return (\n <DropDown\n Icon={Icon}\n buttonAriaLabel={`${groupKey} dropdown`}\n buttonClassName={[baseClass, `${baseClass}-${groupKey}`, ...(classNames || [])]\n .filter(Boolean)\n .join(' ')}\n key={groupKey}\n >\n {items.length &&\n items.map((item) => {\n return <ToolbarItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n })}\n </DropDown>\n )\n}\n"],"names":["React","baseClass","DropDown","DropDownItem","ToolbarItem","anchorElem","editor","item","Component","key","ChildComponent","span","className","label","ToolbarDropdown","Icon","classNames","groupKey","items","buttonAriaLabel","buttonClassName","filter","Boolean","join","length","map"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,OAAOA,WAAW,QAAO;AAEzB,MAAMC,YAAY;AAMlB,SAASC,QAAQ,EAAEC,YAAY,QAAQ,gBAAe;AACtD,OAAO,eAAc;AAErB,OAAO,MAAMC,cAAc,CAAC,EAC1BC,UAAU,EACVC,MAAM,EACNC,IAAI,EAKL;IACC,IAAIA,KAAKC,SAAS,EAAE;QAClB,OACED,MAAMC,2BACJ,oBAACD,KAAKC,SAAS;YAACH,YAAYA;YAAYC,QAAQA;YAAQC,MAAMA;YAAME,KAAKF,KAAKE,GAAG;;IAGvF;IAEA,qBACE,oBAACN;QAAaI,MAAMA;QAAME,KAAKF,KAAKE,GAAG;OACpCF,MAAMG,gCAAkB,oBAACH,KAAKG,cAAc,uBAC7C,oBAACC;QAAKC,WAAU;OAAQL,KAAKM,KAAK;AAGxC,EAAC;AAED,OAAO,MAAMC,kBAAkB,CAAC,EAC9BC,IAAI,EACJV,UAAU,EACVW,UAAU,EACVV,MAAM,EACNW,QAAQ,EACRC,KAAK,EAQN;IACC,qBACE,oBAAChB;QACCa,MAAMA;QACNI,iBAAiB,CAAC,EAAEF,SAAS,SAAS,CAAC;QACvCG,iBAAiB;YAACnB;YAAW,CAAC,EAAEA,UAAU,CAAC,EAAEgB,SAAS,CAAC;eAAMD,cAAc,EAAE;SAAE,CAC5EK,MAAM,CAACC,SACPC,IAAI,CAAC;QACRd,KAAKQ;OAEJC,MAAMM,MAAM,IACXN,MAAMO,GAAG,CAAC,CAAClB;QACT,qBAAO,oBAACH;YAAYC,YAAYA;YAAYC,QAAQA;YAAQC,MAAMA;YAAME,KAAKF,KAAKE,GAAG;;IACvF;AAGR,EAAC"}
@@ -1,6 +1,6 @@
1
- @import '../../../../../scss/styles.scss';
1
+ @import '../../../../../../scss/styles';
2
2
 
3
- .floating-select-toolbar-popup__dropdown {
3
+ .inline-toolbar-popup__dropdown {
4
4
  display: flex;
5
5
  align-items: center;
6
6
  vertical-align: middle;
@@ -29,7 +29,7 @@
29
29
  &.active {
30
30
  background-color: var(--color-base-100);
31
31
 
32
- .floating-select-toolbar-popup__dropdown-caret {
32
+ .inline-toolbar-popup__dropdown-caret {
33
33
  &:after {
34
34
  transform: rotate(0deg);
35
35
  }
@@ -50,7 +50,7 @@
50
50
  height: 4px;
51
51
 
52
52
  opacity: 0.3;
53
- background-image: url(../../../ui/icons/Caret/index.svg);
53
+ background-image: url(../../../../ui/icons/Caret/index.svg);
54
54
  background-position-y: 0px;
55
55
  background-position-x: 0px;
56
56
  }
@@ -63,7 +63,7 @@
63
63
  width: 132.5px;
64
64
  z-index: 100;
65
65
 
66
- .floating-select-toolbar-popup__dropdown-item {
66
+ .inline-toolbar-popup__dropdown-item {
67
67
  all: unset; // reset all default button styles
68
68
  cursor: pointer;
69
69
  color: var(--color-base-900);
@@ -91,7 +91,7 @@
91
91
  }
92
92
 
93
93
  html[data-theme='light'] {
94
- .floating-select-toolbar-popup__dropdown {
94
+ .inline-toolbar-popup__dropdown {
95
95
  &-items {
96
96
  position: absolute;
97
97
  @include shadow-m;
@@ -0,0 +1,40 @@
1
+ import type { BaseSelection, LexicalEditor } from 'lexical';
2
+ import type React from 'react';
3
+ export type InlineToolbarGroup = {
4
+ ChildComponent?: React.FC;
5
+ items: Array<InlineToolbarGroupItem>;
6
+ key: string;
7
+ order?: number;
8
+ type: 'dropdown';
9
+ } | {
10
+ items: Array<InlineToolbarGroupItem>;
11
+ key: string;
12
+ order?: number;
13
+ type: 'buttons';
14
+ };
15
+ export type InlineToolbarGroupItem = {
16
+ ChildComponent?: React.FC;
17
+ /** Use component to ignore the children and onClick properties. It does not use the default, pre-defined format Button component */
18
+ Component?: React.FC<{
19
+ anchorElem: HTMLElement;
20
+ editor: LexicalEditor;
21
+ item: InlineToolbarGroupItem;
22
+ }>;
23
+ isActive?: ({ editor, selection }: {
24
+ editor: LexicalEditor;
25
+ selection: BaseSelection;
26
+ }) => boolean;
27
+ isEnabled?: ({ editor, selection, }: {
28
+ editor: LexicalEditor;
29
+ selection: BaseSelection;
30
+ }) => boolean;
31
+ key: string;
32
+ /** The label is displayed as text if the item is part of a dropdown group */
33
+ label?: string;
34
+ onSelect?: ({ editor, isActive }: {
35
+ editor: LexicalEditor;
36
+ isActive: boolean;
37
+ }) => void;
38
+ order?: number;
39
+ };
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/plugins/toolbars/inline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,kBAAkB,GAC1B;IACE,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACzB,KAAK,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,UAAU,CAAA;CACjB,GACD;IACE,KAAK,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAEL,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACzB,oIAAoI;IACpI,SAAS,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QACnB,UAAU,EAAE,WAAW,CAAA;QACvB,MAAM,EAAE,aAAa,CAAA;QACrB,IAAI,EAAE,sBAAsB,CAAA;KAC7B,CAAC,CAAA;IACF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE,KAAK,OAAO,CAAA;IAClG,SAAS,CAAC,EAAE,CAAC,EACX,MAAM,EACN,SAAS,GACV,EAAE;QACD,MAAM,EAAE,aAAa,CAAA;QACrB,SAAS,EAAE,aAAa,CAAA;KACzB,KAAK,OAAO,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,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,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/field/lexical/plugins/toolbars/inline/types.ts"],"sourcesContent":["import type { BaseSelection, LexicalEditor } from 'lexical'\nimport type React from 'react'\n\nexport type InlineToolbarGroup =\n | {\n ChildComponent?: React.FC\n items: Array<InlineToolbarGroupItem>\n key: string\n order?: number\n type: 'dropdown'\n }\n | {\n items: Array<InlineToolbarGroupItem>\n key: string\n order?: number\n type: 'buttons'\n }\n\nexport type InlineToolbarGroupItem = {\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 anchorElem: HTMLElement\n editor: LexicalEditor\n item: InlineToolbarGroupItem\n }>\n isActive?: ({ editor, selection }: { editor: LexicalEditor; selection: BaseSelection }) => boolean\n isEnabled?: ({\n editor,\n selection,\n }: {\n editor: LexicalEditor\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?: string\n onSelect?: ({ editor, isActive }: { editor: LexicalEditor; isActive: boolean }) => void\n order?: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAkBA,WAqBC"}
@@ -16,9 +16,7 @@
16
16
  }
17
17
 
18
18
  &__quote {
19
- margin: 0;
20
- margin-left: 20px;
21
- margin-bottom: 10px;
19
+ margin: 0 0 10px 20px;
22
20
  font-size: 15px;
23
21
  color: rgb(101, 103, 107);
24
22
  border-left-color: rgb(206, 208, 212);
@@ -115,9 +113,7 @@
115
113
  padding: 8px 8px 8px 52px;
116
114
  line-height: 1.53;
117
115
  font-size: 13px;
118
- margin: 0;
119
- margin-top: 8px;
120
- margin-bottom: 8px;
116
+ margin: 8px 0;
121
117
  tab-size: 2;
122
118
  /* white-space: pre; */
123
119
  overflow-x: auto;
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export { AlignFeature } from './field/features/align/feature.server.js';
4
4
  export { BlockQuoteFeature } from './field/features/blockquote/feature.server.js';
5
5
  export { BlocksFeature, type BlocksFeatureProps, type LexicalBlock, } from './field/features/blocks/feature.server.js';
6
6
  export { $createBlockNode, $isBlockNode, type BlockFields, BlockNode, type SerializedBlockNode, } from './field/features/blocks/nodes/BlocksNode.js';
7
- export { TextDropdownSectionWithEntries } from './field/features/common/floatingSelectToolbarTextDropdownSection/index.js';
8
7
  export { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js';
9
8
  export { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js';
10
9
  export { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js';
@@ -14,26 +13,26 @@ export type { HTMLConverter } from './field/features/converters/html/converter/t
14
13
  export { HTMLConverterFeature, type HTMLConverterFeatureProps, } from './field/features/converters/html/feature.server.js';
15
14
  export { consolidateHTMLConverters, lexicalHTML, } from './field/features/converters/html/field/index.js';
16
15
  export { createClientComponent } from './field/features/createClientComponent.js';
17
- export { TestRecorderFeature } from './field/features/debug/testrecorder/feature.server.js';
18
- export { TreeViewFeature } from './field/features/debug/treeview/feature.server.js';
16
+ export { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js';
17
+ export { TreeViewFeature } from './field/features/debug/treeView/feature.server.js';
19
18
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
20
- export { SectionWithEntries as FormatSectionWithEntries } from './field/features/format/common/floatingSelectToolbarSection.js';
21
- export { InlineCodeFeature } from './field/features/format/inlinecode/feature.server.js';
19
+ export { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js';
22
20
  export { ItalicFeature } from './field/features/format/italic/feature.server.js';
21
+ export { inlineToolbarFormatGroupWithItems } from './field/features/format/shared/inlineToolbarFormatGroup.js';
23
22
  export { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js';
24
23
  export { SubscriptFeature } from './field/features/format/subscript/feature.server.js';
25
24
  export { SuperscriptFeature } from './field/features/format/superscript/feature.server.js';
26
25
  export { UnderlineFeature } from './field/features/format/underline/feature.server.js';
27
- export { HeadingFeature } from './field/features/heading/feature.server.js';
28
- export { HorizontalRuleFeature } from './field/features/horizontalrule/feature.server.js';
26
+ export { HeadingFeature, type HeadingFeatureProps, } from './field/features/heading/feature.server.js';
27
+ export { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js';
29
28
  export { IndentFeature } from './field/features/indent/feature.server.js';
30
29
  export { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js';
31
30
  export { $createAutoLinkNode, $isAutoLinkNode, AutoLinkNode, } from './field/features/link/nodes/AutoLinkNode.js';
32
31
  export { $createLinkNode, $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND, } from './field/features/link/nodes/LinkNode.js';
33
32
  export type { LinkFields, SerializedAutoLinkNode, SerializedLinkNode, } from './field/features/link/nodes/types.js';
34
- export { CheckListFeature } from './field/features/lists/checklist/feature.server.js';
35
- export { OrderedListFeature } from './field/features/lists/orderedlist/feature.server.js';
36
- export { UnorderedListFeature } from './field/features/lists/unorderedlist/feature.server.js';
33
+ export { ChecklistFeature } from './field/features/lists/checklist/feature.server.js';
34
+ export { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js';
35
+ export { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js';
37
36
  export { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js';
38
37
  export { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js';
39
38
  export { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js';
@@ -50,8 +49,10 @@ export { convertSlateNodesToLexical, convertSlateToLexical, } from './field/feat
50
49
  export type { SlateNode, SlateNodeConverter, } from './field/features/migrations/slateToLexical/converter/types.js';
51
50
  export { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js';
52
51
  export { ParagraphFeature } from './field/features/paragraph/feature.server.js';
53
- export { RelationshipFeature } from './field/features/relationship/feature.server.js';
52
+ export { RelationshipFeature, type RelationshipFeatureProps, } from './field/features/relationship/feature.server.js';
54
53
  export { $createRelationshipNode, $isRelationshipNode, type RelationshipData, RelationshipNode, type SerializedRelationshipNode, } from './field/features/relationship/nodes/RelationshipNode.js';
54
+ export { inlineToolbarFeatureButtonsGroupWithItems } from './field/features/shared/inlineToolbar/featureButtonsGroup.js';
55
+ export { inlineToolbarTextDropdownGroupWithItems } from './field/features/shared/inlineToolbar/textDropdownGroup.js';
55
56
  export { createNode } from './field/features/typeUtilities.js';
56
57
  export type { ClientComponentProps, ClientFeature, ClientFeatureProviderMap, FeatureProviderClient, FeatureProviderProviderClient, FeatureProviderProviderServer, FeatureProviderServer, FieldNodeHook, FieldNodeHookArgs, NodeValidation, NodeWithHooks, PopulationPromise, ResolvedClientFeature, ResolvedClientFeatureMap, ResolvedServerFeature, ResolvedServerFeatureMap, SanitizedClientFeatures, SanitizedPlugin, SanitizedServerFeatures, ServerFeature, ServerFeatureProviderMap, } from './field/features/types.js';
57
58
  export { UploadFeature } from './field/features/upload/feature.server.js';
@@ -64,10 +65,10 @@ export { loadFeatures, sortFeaturesForOptimalLoading, } from './field/lexical/co
64
65
  export { sanitizeServerEditorConfig, sanitizeServerFeatures, } from './field/lexical/config/server/sanitize.js';
65
66
  export type { ClientEditorConfig, SanitizedClientEditorConfig, SanitizedServerEditorConfig, ServerEditorConfig, } from './field/lexical/config/types.js';
66
67
  export { getEnabledNodes } from './field/lexical/nodes/index.js';
67
- export { type FloatingToolbarSection, type FloatingToolbarSectionEntry, } from './field/lexical/plugins/FloatingSelectToolbar/types.js';
68
68
  export { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js';
69
+ export type { SlashMenuGroup, SlashMenuItem, } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
69
70
  export type { AdapterProps };
70
- export { SlashMenuGroup, SlashMenuOption, } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
71
+ export type { InlineToolbarGroup, InlineToolbarGroupItem, } from './field/lexical/plugins/toolbars/inline/types.js';
71
72
  export { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js';
72
73
  export { cloneDeep } from './field/lexical/utils/cloneDeep.js';
73
74
  export { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAA;AAqBlG,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,8BAA8B,CA+QxF;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAA;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAA;AACjF,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,GAClB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,KAAK,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,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { richTextValidateHOC } from './validate/index.js';
13
13
  let defaultSanitizedServerEditorConfig = null;
14
14
  export function lexicalEditor(props) {
15
15
  return async ({ config })=>{
16
- let resolvedFeatureMap = null;
16
+ let resolvedFeatureMap;
17
17
  let finalSanitizedEditorConfig// For server only
18
18
  ;
19
19
  if (!props || !props.features && !props.lexical) {
@@ -281,7 +281,6 @@ export { AlignFeature } from './field/features/align/feature.server.js';
281
281
  export { BlockQuoteFeature } from './field/features/blockquote/feature.server.js';
282
282
  export { BlocksFeature } from './field/features/blocks/feature.server.js';
283
283
  export { $createBlockNode, $isBlockNode, BlockNode } from './field/features/blocks/nodes/BlocksNode.js';
284
- export { TextDropdownSectionWithEntries } from './field/features/common/floatingSelectToolbarTextDropdownSection/index.js';
285
284
  export { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js';
286
285
  export { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js';
287
286
  export { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js';
@@ -290,25 +289,25 @@ export { convertLexicalNodesToHTML, convertLexicalToHTML } from './field/feature
290
289
  export { HTMLConverterFeature } from './field/features/converters/html/feature.server.js';
291
290
  export { consolidateHTMLConverters, lexicalHTML } from './field/features/converters/html/field/index.js';
292
291
  export { createClientComponent } from './field/features/createClientComponent.js';
293
- export { TestRecorderFeature } from './field/features/debug/testrecorder/feature.server.js';
294
- export { TreeViewFeature } from './field/features/debug/treeview/feature.server.js';
292
+ export { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js';
293
+ export { TreeViewFeature } from './field/features/debug/treeView/feature.server.js';
295
294
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
296
- export { SectionWithEntries as FormatSectionWithEntries } from './field/features/format/common/floatingSelectToolbarSection.js';
297
- export { InlineCodeFeature } from './field/features/format/inlinecode/feature.server.js';
295
+ export { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js';
298
296
  export { ItalicFeature } from './field/features/format/italic/feature.server.js';
297
+ export { inlineToolbarFormatGroupWithItems } from './field/features/format/shared/inlineToolbarFormatGroup.js';
299
298
  export { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js';
300
299
  export { SubscriptFeature } from './field/features/format/subscript/feature.server.js';
301
300
  export { SuperscriptFeature } from './field/features/format/superscript/feature.server.js';
302
301
  export { UnderlineFeature } from './field/features/format/underline/feature.server.js';
303
302
  export { HeadingFeature } from './field/features/heading/feature.server.js';
304
- export { HorizontalRuleFeature } from './field/features/horizontalrule/feature.server.js';
303
+ export { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js';
305
304
  export { IndentFeature } from './field/features/indent/feature.server.js';
306
305
  export { LinkFeature } from './field/features/link/feature.server.js';
307
306
  export { $createAutoLinkNode, $isAutoLinkNode, AutoLinkNode } from './field/features/link/nodes/AutoLinkNode.js';
308
307
  export { $createLinkNode, $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './field/features/link/nodes/LinkNode.js';
309
- export { CheckListFeature } from './field/features/lists/checklist/feature.server.js';
310
- export { OrderedListFeature } from './field/features/lists/orderedlist/feature.server.js';
311
- export { UnorderedListFeature } from './field/features/lists/unorderedlist/feature.server.js';
308
+ export { ChecklistFeature } from './field/features/lists/checklist/feature.server.js';
309
+ export { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js';
310
+ export { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js';
312
311
  export { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js';
313
312
  export { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js';
314
313
  export { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js';
@@ -326,6 +325,8 @@ export { SlateToLexicalFeature } from './field/features/migrations/slateToLexica
326
325
  export { ParagraphFeature } from './field/features/paragraph/feature.server.js';
327
326
  export { RelationshipFeature } from './field/features/relationship/feature.server.js';
328
327
  export { $createRelationshipNode, $isRelationshipNode, RelationshipNode } from './field/features/relationship/nodes/RelationshipNode.js';
328
+ export { inlineToolbarFeatureButtonsGroupWithItems } from './field/features/shared/inlineToolbar/featureButtonsGroup.js';
329
+ export { inlineToolbarTextDropdownGroupWithItems } from './field/features/shared/inlineToolbar/textDropdownGroup.js';
329
330
  export { createNode } from './field/features/typeUtilities.js';
330
331
  export { UploadFeature } from './field/features/upload/feature.server.js';
331
332
  export { $createUploadNode, $isUploadNode, UploadNode } from './field/features/upload/nodes/UploadNode.js';
@@ -336,7 +337,6 @@ export { loadFeatures, sortFeaturesForOptimalLoading } from './field/lexical/con
336
337
  export { sanitizeServerEditorConfig, sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js';
337
338
  export { getEnabledNodes } from './field/lexical/nodes/index.js';
338
339
  export { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js';
339
- export { SlashMenuGroup, SlashMenuOption } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
340
340
  export { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js';
341
341
  export { cloneDeep } from './field/lexical/utils/cloneDeep.js';
342
342
  export { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js';