@payloadcms/richtext-lexical 3.0.0-alpha.67 → 3.0.0-alpha.69

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 (342) hide show
  1. package/dist/exports/components.d.ts +3 -2
  2. package/dist/exports/components.d.ts.map +1 -1
  3. package/dist/exports/components.js +3 -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 +127 -53
  7. package/dist/field/features/align/feature.client.js.map +1 -1
  8. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  9. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  10. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  11. package/dist/field/features/align/toolbarAlignGroup.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 +50 -34
  14. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  15. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  16. package/dist/field/features/blocks/component/index.js +1 -1
  17. package/dist/field/features/blocks/component/index.js.map +1 -1
  18. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  19. package/dist/field/features/blocks/feature.client.js +56 -27
  20. package/dist/field/features/blocks/feature.client.js.map +1 -1
  21. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  22. package/dist/field/features/blocks/populationPromise.js +2 -1
  23. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  24. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts.map +1 -1
  25. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  26. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  27. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  28. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  29. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.d.ts.map +1 -1
  30. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js.map +1 -1
  31. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts.map +1 -1
  32. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  33. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  34. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  35. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  36. package/dist/field/features/debug/{treeview → treeView}/plugin/index.d.ts.map +1 -1
  37. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js.map +1 -1
  38. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  39. package/dist/field/features/format/bold/feature.client.js +25 -21
  40. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  41. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  42. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  43. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  44. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  45. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  46. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  47. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  48. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  49. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  50. package/dist/field/features/format/italic/feature.client.js +26 -22
  51. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  52. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  53. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  54. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  55. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  56. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  57. package/dist/field/features/format/strikethrough/feature.client.js +26 -22
  58. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  59. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  60. package/dist/field/features/format/subscript/feature.client.js +24 -20
  61. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  62. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  63. package/dist/field/features/format/superscript/feature.client.js +24 -20
  64. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  65. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  66. package/dist/field/features/format/underline/feature.client.js +24 -20
  67. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  68. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  69. package/dist/field/features/heading/feature.client.js +69 -49
  70. package/dist/field/features/heading/feature.client.js.map +1 -1
  71. package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts.map +1 -1
  72. package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js.map +1 -1
  73. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  74. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  75. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  76. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts.map +1 -1
  77. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js +1 -1
  78. package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.js.map +1 -1
  79. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts.map +1 -1
  80. package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js.map +1 -1
  81. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts.map +1 -1
  82. package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js.map +1 -1
  83. package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.d.ts.map +1 -1
  84. package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js.map +1 -1
  85. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  86. package/dist/field/features/indent/feature.client.js +42 -40
  87. package/dist/field/features/indent/feature.client.js.map +1 -1
  88. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  89. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  90. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  91. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  92. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  93. package/dist/field/features/link/feature.client.js +47 -43
  94. package/dist/field/features/link/feature.client.js.map +1 -1
  95. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  96. package/dist/field/features/link/populationPromise.js +2 -1
  97. package/dist/field/features/link/populationPromise.js.map +1 -1
  98. package/dist/field/features/lists/checklist/feature.client.d.ts +1 -1
  99. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  100. package/dist/field/features/lists/checklist/feature.client.js +56 -31
  101. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  102. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  103. package/dist/field/features/lists/checklist/feature.server.js +4 -4
  104. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  105. package/dist/field/features/lists/checklist/markdownTransformers.js +1 -1
  106. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  107. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  108. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  109. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  110. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts.map +1 -1
  111. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +1 -1
  112. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js.map +1 -1
  113. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts.map +1 -1
  114. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +1 -1
  115. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js.map +1 -1
  116. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  117. package/dist/field/features/lists/{common → shared}/markdown.js.map +1 -1
  118. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  119. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  120. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  121. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts.map +1 -1
  122. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +1 -1
  123. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js.map +1 -1
  124. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts.map +1 -1
  125. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +1 -1
  126. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js.map +1 -1
  127. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  128. package/dist/field/features/paragraph/feature.client.js +44 -30
  129. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  130. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  131. package/dist/field/features/relationship/feature.client.js +36 -10
  132. package/dist/field/features/relationship/feature.client.js.map +1 -1
  133. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  134. package/dist/field/features/relationship/populationPromise.js +2 -1
  135. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  136. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  137. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  138. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  139. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  140. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  141. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  142. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  143. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  144. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  145. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  146. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  147. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  148. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +6 -0
  149. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  150. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  151. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  152. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +81 -0
  153. package/dist/field/features/toolbars/fixed/feature.client.d.ts +3 -0
  154. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  155. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  156. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  157. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  158. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  159. package/dist/field/features/toolbars/fixed/feature.server.js +16 -0
  160. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  161. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +6 -0
  162. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  163. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +64 -38
  164. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  165. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  166. package/dist/field/features/toolbars/inline/feature.client.d.ts +3 -0
  167. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  168. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  169. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  170. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  171. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  172. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  173. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  174. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  175. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  176. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +16 -12
  177. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  178. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  179. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  180. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  181. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +17 -67
  182. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  183. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  184. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  185. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  186. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  187. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  188. package/dist/field/features/toolbars/types.d.ts +48 -0
  189. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  190. package/dist/field/features/toolbars/types.js.map +1 -0
  191. package/dist/field/features/types.d.ts +51 -12
  192. package/dist/field/features/types.d.ts.map +1 -1
  193. package/dist/field/features/types.js.map +1 -1
  194. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  195. package/dist/field/features/upload/feature.client.js +35 -10
  196. package/dist/field/features/upload/feature.client.js.map +1 -1
  197. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  198. package/dist/field/features/upload/populationPromise.js +3 -1
  199. package/dist/field/features/upload/populationPromise.js.map +1 -1
  200. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  201. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  202. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  203. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  204. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  205. package/dist/field/lexical/LexicalEditor.js +20 -4
  206. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  207. package/dist/field/lexical/LexicalEditor.scss +3 -19
  208. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  209. package/dist/field/lexical/LexicalProvider.js +3 -2
  210. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  211. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  212. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  213. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  214. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  215. package/dist/field/lexical/config/client/sanitize.js +80 -32
  216. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  217. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  218. package/dist/field/lexical/config/server/default.js +9 -7
  219. package/dist/field/lexical/config/server/default.js.map +1 -1
  220. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  221. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  222. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +71 -71
  223. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  224. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  225. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  226. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +3 -3
  227. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  228. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +17 -25
  229. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  230. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  231. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  232. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  233. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  234. package/dist/field/lexical/plugins/SlashMenu/index.js +71 -65
  235. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  236. package/dist/field/lexical/theme/EditorTheme.scss +2 -6
  237. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  238. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  239. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  240. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  241. package/dist/index.d.ts +15 -11
  242. package/dist/index.d.ts.map +1 -1
  243. package/dist/index.js +16 -12
  244. package/dist/index.js.map +1 -1
  245. package/dist/populate/populate.d.ts +2 -1
  246. package/dist/populate/populate.d.ts.map +1 -1
  247. package/dist/populate/populate.js +13 -11
  248. package/dist/populate/populate.js.map +1 -1
  249. package/dist/populate/populateLexicalPopulationPromises.d.ts +1 -1
  250. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -1
  251. package/dist/populate/populateLexicalPopulationPromises.js +2 -1
  252. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -1
  253. package/dist/populate/recurseNestedFields.d.ts +2 -1
  254. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  255. package/dist/populate/recurseNestedFields.js +2 -1
  256. package/dist/populate/recurseNestedFields.js.map +1 -1
  257. package/package.json +10 -10
  258. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  259. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  260. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  261. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  262. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  263. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  264. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  265. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  266. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  267. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  268. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  269. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  270. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  271. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  272. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  273. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  274. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  275. package/dist/field/features/format/inlinecode/feature.client.js +0 -42
  276. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  277. package/dist/field/features/horizontalrule/feature.client.d.ts.map +0 -1
  278. package/dist/field/features/horizontalrule/feature.client.js +0 -53
  279. package/dist/field/features/horizontalrule/feature.client.js.map +0 -1
  280. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  281. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  282. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  283. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  284. package/dist/field/features/indent/index.scss +0 -4
  285. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  286. package/dist/field/features/lists/orderedlist/feature.client.js +0 -71
  287. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  288. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  289. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -71
  290. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  291. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  292. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  293. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  294. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  295. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  296. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  297. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  298. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  299. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  300. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  301. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  302. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  303. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  304. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  305. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  306. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  307. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +0 -0
  308. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  309. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  310. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.d.ts +0 -0
  311. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +0 -0
  312. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  313. /package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +0 -0
  314. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  315. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  316. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.d.ts +0 -0
  317. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +0 -0
  318. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  319. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +0 -0
  320. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  321. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  322. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  323. /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.d.ts +0 -0
  324. /package/dist/field/features/{horizontalrule → horizontalRule}/component/index.js +0 -0
  325. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.client.d.ts +0 -0
  326. /package/dist/field/features/{horizontalrule → horizontalRule}/feature.server.d.ts +0 -0
  327. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.d.ts +0 -0
  328. /package/dist/field/features/{horizontalrule → horizontalRule}/markdownTransformer.js +0 -0
  329. /package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.d.ts +0 -0
  330. /package/dist/field/features/{horizontalrule → horizontalRule}/nodes/HorizontalRuleNode.js +0 -0
  331. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.d.ts +0 -0
  332. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.js +0 -0
  333. /package/dist/field/features/{horizontalrule → horizontalRule}/plugin/index.scss +0 -0
  334. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +0 -0
  335. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  336. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  337. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  338. /package/dist/field/features/lists/{common → shared}/markdown.js +0 -0
  339. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +0 -0
  340. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  341. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  342. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/italic/feature.client.tsx"],"names":[],"mappings":";AA4CA,eAAO,MAAM,4BAA4B,+BAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/italic/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,4BAA4B,+BAA6C,CAAA"}
@@ -2,38 +2,42 @@
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js';
4
4
  import { createClientComponent } from '../../createClientComponent.js';
5
- import { SectionWithEntries } from '../common/floatingSelectToolbarSection.js';
5
+ import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
6
  import { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js';
7
+ const toolbarGroups = [
8
+ toolbarFormatGroupWithItems([
9
+ {
10
+ ChildComponent: ItalicIcon,
11
+ isActive: ({ selection })=>{
12
+ if ($isRangeSelection(selection)) {
13
+ return selection.hasFormat('italic');
14
+ }
15
+ return false;
16
+ },
17
+ key: 'italic',
18
+ onSelect: ({ editor })=>{
19
+ editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic');
20
+ },
21
+ order: 2
22
+ }
23
+ ])
24
+ ];
7
25
  const ItalicFeatureClient = (props)=>{
8
26
  return {
9
27
  clientFeatureProps: props,
10
28
  feature: ()=>{
11
29
  return {
12
30
  clientFeatureProps: props,
13
- floatingSelectToolbar: {
14
- sections: [
15
- SectionWithEntries([
16
- {
17
- ChildComponent: ItalicIcon,
18
- isActive: ({ selection })=>{
19
- if ($isRangeSelection(selection)) {
20
- return selection.hasFormat('italic');
21
- }
22
- return false;
23
- },
24
- key: 'italic',
25
- onClick: ({ editor })=>{
26
- editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic');
27
- },
28
- order: 2
29
- }
30
- ])
31
- ]
32
- },
33
31
  markdownTransformers: [
34
32
  ITALIC_STAR,
35
33
  ITALIC_UNDERSCORE
36
- ]
34
+ ],
35
+ toolbarFixed: {
36
+ groups: toolbarGroups
37
+ },
38
+ toolbarInline: {
39
+ groups: toolbarGroups
40
+ }
37
41
  };
38
42
  }
39
43
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/format/italic/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { SectionWithEntries } from '../common/floatingSelectToolbarSection.js'\nimport { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js'\n\nconst ItalicFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n\n floatingSelectToolbar: {\n sections: [\n SectionWithEntries([\n {\n ChildComponent: ItalicIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('italic')\n }\n return false\n },\n key: 'italic',\n onClick: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n },\n order: 2,\n },\n ]),\n ],\n },\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n }\n },\n }\n}\n\nexport const ItalicFeatureClientComponent = createClientComponent(ItalicFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","ItalicIcon","createClientComponent","SectionWithEntries","ITALIC_STAR","ITALIC_UNDERSCORE","ItalicFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","selection","hasFormat","key","onClick","editor","dispatchCommand","order","markdownTransformers","ItalicFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,UAAU,QAAQ,4CAA2C;AACtE,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,4BAA2B;AAE1E,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBAEpBG,uBAAuB;oBACrBC,UAAU;wBACRR,mBAAmB;4BACjB;gCACES,gBAAgBX;gCAChBY,UAAU,CAAC,EAAEC,SAAS,EAAE;oCACtB,IAAIf,kBAAkBe,YAAY;wCAChC,OAAOA,UAAUC,SAAS,CAAC;oCAC7B;oCACA,OAAO;gCACT;gCACAC,KAAK;gCACLC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACnB,qBAAqB;gCAC9C;gCACAoB,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAACjB;oBAAaC;iBAAkB;YACxD;QACF;IACF;AACF;AAEA,OAAO,MAAMiB,+BAA+BpB,sBAAsBI,qBAAoB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/format/italic/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: ItalicIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('italic')\n }\n return false\n },\n key: 'italic',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n },\n order: 2,\n },\n ]),\n]\n\nconst ItalicFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const ItalicFeatureClientComponent = createClientComponent(ItalicFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","ItalicIcon","createClientComponent","toolbarFormatGroupWithItems","ITALIC_STAR","ITALIC_UNDERSCORE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","ItalicFeatureClient","props","clientFeatureProps","feature","markdownTransformers","toolbarFixed","groups","toolbarInline","ItalicFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAKhE,SAASC,UAAU,QAAQ,4CAA2C;AACtE,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,4BAA2B;AAE1E,MAAMC,gBAAgC;IACpCH,4BAA4B;QAC1B;YACEI,gBAAgBN;YAChBO,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIV,kBAAkBU,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACd,qBAAqB;YAC9C;YACAe,OAAO;QACT;KACD;CACF;AAED,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBAEpBG,sBAAsB;oBAAChB;oBAAaC;iBAAkB;gBACtDgB,cAAc;oBACZC,QAAQhB;gBACV;gBACAiB,eAAe;oBACbD,QAAQhB;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMkB,+BAA+BtB,sBAAsBc,qBAAoB"}
@@ -0,0 +1,3 @@
1
+ import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js';
2
+ export declare const toolbarFormatGroupWithItems: (items: ToolbarGroupItem[]) => ToolbarGroup;
3
+ //# sourceMappingURL=toolbarFormatGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,UAAW,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
@@ -0,0 +1,10 @@
1
+ export const toolbarFormatGroupWithItems = (items)=>{
2
+ return {
3
+ type: 'buttons',
4
+ items,
5
+ key: 'format',
6
+ order: 40
7
+ };
8
+ };
9
+
10
+ //# sourceMappingURL=toolbarFormatGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/format/shared/toolbarFormatGroup.ts"],"sourcesContent":["import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nexport const toolbarFormatGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'format',\n order: 40,\n }\n}\n"],"names":["toolbarFormatGroupWithItems","items","type","key","order"],"rangeMappings":";;;;;;;","mappings":"AAEA,OAAO,MAAMA,8BAA8B,CAACC;IAC1C,OAAO;QACLC,MAAM;QACND;QACAE,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/strikethrough/feature.client.tsx"],"names":[],"mappings":";AA4CA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/strikethrough/feature.client.tsx"],"names":[],"mappings":";AAiDA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
@@ -2,37 +2,41 @@
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js';
4
4
  import { createClientComponent } from '../../createClientComponent.js';
5
- import { SectionWithEntries } from '../common/floatingSelectToolbarSection.js';
5
+ import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
6
  import { STRIKETHROUGH } from './markdownTransformers.js';
7
+ const toolbarGroups = [
8
+ toolbarFormatGroupWithItems([
9
+ {
10
+ ChildComponent: StrikethroughIcon,
11
+ isActive: ({ selection })=>{
12
+ if ($isRangeSelection(selection)) {
13
+ return selection.hasFormat('strikethrough');
14
+ }
15
+ return false;
16
+ },
17
+ key: 'strikethrough',
18
+ onSelect: ({ editor })=>{
19
+ editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough');
20
+ },
21
+ order: 4
22
+ }
23
+ ])
24
+ ];
7
25
  const StrikethroughFeatureClient = (props)=>{
8
26
  return {
9
27
  clientFeatureProps: props,
10
28
  feature: ()=>{
11
29
  return {
12
30
  clientFeatureProps: props,
13
- floatingSelectToolbar: {
14
- sections: [
15
- SectionWithEntries([
16
- {
17
- ChildComponent: StrikethroughIcon,
18
- isActive: ({ selection })=>{
19
- if ($isRangeSelection(selection)) {
20
- return selection.hasFormat('strikethrough');
21
- }
22
- return false;
23
- },
24
- key: 'strikethrough',
25
- onClick: ({ editor })=>{
26
- editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough');
27
- },
28
- order: 4
29
- }
30
- ])
31
- ]
32
- },
33
31
  markdownTransformers: [
34
32
  STRIKETHROUGH
35
- ]
33
+ ],
34
+ toolbarFixed: {
35
+ groups: toolbarGroups
36
+ },
37
+ toolbarInline: {
38
+ groups: toolbarGroups
39
+ }
36
40
  };
37
41
  }
38
42
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/format/strikethrough/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { SectionWithEntries } from '../common/floatingSelectToolbarSection.js'\nimport { STRIKETHROUGH } from './markdownTransformers.js'\n\nconst StrikethroughFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n\n floatingSelectToolbar: {\n sections: [\n SectionWithEntries([\n {\n ChildComponent: StrikethroughIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('strikethrough')\n }\n return false\n },\n key: 'strikethrough',\n onClick: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n },\n order: 4,\n },\n ]),\n ],\n },\n markdownTransformers: [STRIKETHROUGH],\n }\n },\n }\n}\n\nexport const StrikethroughFeatureClientComponent = createClientComponent(StrikethroughFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","StrikethroughIcon","createClientComponent","SectionWithEntries","STRIKETHROUGH","StrikethroughFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","selection","hasFormat","key","onClick","editor","dispatchCommand","order","markdownTransformers","StrikethroughFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,iBAAiB,QAAQ,mDAAkD;AACpF,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,4CAA2C;AAC9E,SAASC,aAAa,QAAQ,4BAA2B;AAEzD,MAAMC,6BAAuE,CAACC;IAC5E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBAEpBG,uBAAuB;oBACrBC,UAAU;wBACRP,mBAAmB;4BACjB;gCACEQ,gBAAgBV;gCAChBW,UAAU,CAAC,EAAEC,SAAS,EAAE;oCACtB,IAAId,kBAAkBc,YAAY;wCAChC,OAAOA,UAAUC,SAAS,CAAC;oCAC7B;oCACA,OAAO;gCACT;gCACAC,KAAK;gCACLC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAAClB,qBAAqB;gCAC9C;gCACAmB,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAAChB;iBAAc;YACvC;QACF;IACF;AACF;AAEA,OAAO,MAAMiB,sCAAsCnB,sBAAsBG,4BAA2B"}
1
+ {"version":3,"sources":["../../../../../src/field/features/format/strikethrough/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { STRIKETHROUGH } from './markdownTransformers.js'\n\nconst toolbarGroups = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: StrikethroughIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('strikethrough')\n }\n return false\n },\n key: 'strikethrough',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n },\n order: 4,\n },\n ]),\n]\n\nconst StrikethroughFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n\n markdownTransformers: [STRIKETHROUGH],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const StrikethroughFeatureClientComponent = createClientComponent(StrikethroughFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","StrikethroughIcon","createClientComponent","toolbarFormatGroupWithItems","STRIKETHROUGH","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","StrikethroughFeatureClient","props","clientFeatureProps","feature","markdownTransformers","toolbarFixed","groups","toolbarInline","StrikethroughFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,iBAAiB,QAAQ,mDAAkD;AACpF,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SAASC,aAAa,QAAQ,4BAA2B;AAEzD,MAAMC,gBAAgB;IACpBF,4BAA4B;QAC1B;YACEG,gBAAgBL;YAChBM,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIT,kBAAkBS,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACb,qBAAqB;YAC9C;YACAc,OAAO;QACT;KACD;CACF;AAED,MAAMC,6BAAuE,CAACC;IAC5E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBAEpBG,sBAAsB;oBAACf;iBAAc;gBACrCgB,cAAc;oBACZC,QAAQhB;gBACV;gBACAiB,eAAe;oBACbD,QAAQhB;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMkB,sCAAsCrB,sBAAsBa,4BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/subscript/feature.client.tsx"],"names":[],"mappings":";AAyCA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/subscript/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
@@ -2,32 +2,36 @@
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { SubscriptIcon } from '../../../lexical/ui/icons/Subscript/index.js';
4
4
  import { createClientComponent } from '../../createClientComponent.js';
5
- import { SectionWithEntries } from '../common/floatingSelectToolbarSection.js';
5
+ import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
+ const toolbarGroups = [
7
+ toolbarFormatGroupWithItems([
8
+ {
9
+ ChildComponent: SubscriptIcon,
10
+ isActive: ({ selection })=>{
11
+ if ($isRangeSelection(selection)) {
12
+ return selection.hasFormat('subscript');
13
+ }
14
+ return false;
15
+ },
16
+ key: 'subscript',
17
+ onSelect: ({ editor })=>{
18
+ editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'subscript');
19
+ },
20
+ order: 5
21
+ }
22
+ ])
23
+ ];
6
24
  const SubscriptFeatureClient = (props)=>{
7
25
  return {
8
26
  clientFeatureProps: props,
9
27
  feature: ()=>{
10
28
  return {
11
29
  clientFeatureProps: props,
12
- floatingSelectToolbar: {
13
- sections: [
14
- SectionWithEntries([
15
- {
16
- ChildComponent: SubscriptIcon,
17
- isActive: ({ selection })=>{
18
- if ($isRangeSelection(selection)) {
19
- return selection.hasFormat('subscript');
20
- }
21
- return false;
22
- },
23
- key: 'subscript',
24
- onClick: ({ editor })=>{
25
- editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'subscript');
26
- },
27
- order: 5
28
- }
29
- ])
30
- ]
30
+ toolbarFixed: {
31
+ groups: toolbarGroups
32
+ },
33
+ toolbarInline: {
34
+ groups: toolbarGroups
31
35
  }
32
36
  };
33
37
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/format/subscript/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SubscriptIcon } from '../../../lexical/ui/icons/Subscript/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { SectionWithEntries } from '../common/floatingSelectToolbarSection.js'\n\nconst SubscriptFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n SectionWithEntries([\n {\n ChildComponent: SubscriptIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('subscript')\n }\n return false\n },\n key: 'subscript',\n onClick: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'subscript')\n },\n order: 5,\n },\n ]),\n ],\n },\n }\n },\n }\n}\n\nexport const SubscriptFeatureClientComponent = createClientComponent(SubscriptFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","SubscriptIcon","createClientComponent","SectionWithEntries","SubscriptFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","selection","hasFormat","key","onClick","editor","dispatchCommand","order","SubscriptFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,4CAA2C;AAE9E,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRN,mBAAmB;4BACjB;gCACEO,gBAAgBT;gCAChBU,UAAU,CAAC,EAAEC,SAAS,EAAE;oCACtB,IAAIb,kBAAkBa,YAAY;wCAChC,OAAOA,UAAUC,SAAS,CAAC;oCAC7B;oCACA,OAAO;gCACT;gCACAC,KAAK;gCACLC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACjB,qBAAqB;gCAC9C;gCACAkB,OAAO;4BACT;yBACD;qBACF;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMC,kCAAkCjB,sBAAsBE,wBAAuB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/format/subscript/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SubscriptIcon } from '../../../lexical/ui/icons/Subscript/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: SubscriptIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('subscript')\n }\n return false\n },\n key: 'subscript',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'subscript')\n },\n order: 5,\n },\n ]),\n]\n\nconst SubscriptFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const SubscriptFeatureClientComponent = createClientComponent(SubscriptFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","SubscriptIcon","createClientComponent","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","SubscriptFeatureClient","props","clientFeatureProps","feature","toolbarFixed","groups","toolbarInline","SubscriptFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAKhE,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAE7E,MAAMC,gBAAgC;IACpCD,4BAA4B;QAC1B;YACEE,gBAAgBJ;YAChBK,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIR,kBAAkBQ,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACZ,qBAAqB;YAC9C;YACAa,OAAO;QACT;KACD;CACF;AAED,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,cAAc;oBACZC,QAAQf;gBACV;gBACAgB,eAAe;oBACbD,QAAQf;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMiB,kCAAkCnB,sBAAsBY,wBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/superscript/feature.client.tsx"],"names":[],"mappings":";AAyCA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/superscript/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
@@ -2,32 +2,36 @@
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { SuperscriptIcon } from '../../../lexical/ui/icons/Superscript/index.js';
4
4
  import { createClientComponent } from '../../createClientComponent.js';
5
- import { SectionWithEntries } from '../common/floatingSelectToolbarSection.js';
5
+ import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
+ const toolbarGroups = [
7
+ toolbarFormatGroupWithItems([
8
+ {
9
+ ChildComponent: SuperscriptIcon,
10
+ isActive: ({ selection })=>{
11
+ if ($isRangeSelection(selection)) {
12
+ return selection.hasFormat('superscript');
13
+ }
14
+ return false;
15
+ },
16
+ key: 'superscript',
17
+ onSelect: ({ editor })=>{
18
+ editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'superscript');
19
+ },
20
+ order: 6
21
+ }
22
+ ])
23
+ ];
6
24
  const SuperscriptFeatureClient = (props)=>{
7
25
  return {
8
26
  clientFeatureProps: props,
9
27
  feature: ()=>{
10
28
  return {
11
29
  clientFeatureProps: props,
12
- floatingSelectToolbar: {
13
- sections: [
14
- SectionWithEntries([
15
- {
16
- ChildComponent: SuperscriptIcon,
17
- isActive: ({ selection })=>{
18
- if ($isRangeSelection(selection)) {
19
- return selection.hasFormat('superscript');
20
- }
21
- return false;
22
- },
23
- key: 'superscript',
24
- onClick: ({ editor })=>{
25
- editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'superscript');
26
- },
27
- order: 6
28
- }
29
- ])
30
- ]
30
+ toolbarFixed: {
31
+ groups: toolbarGroups
32
+ },
33
+ toolbarInline: {
34
+ groups: toolbarGroups
31
35
  }
32
36
  };
33
37
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/format/superscript/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SuperscriptIcon } from '../../../lexical/ui/icons/Superscript/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { SectionWithEntries } from '../common/floatingSelectToolbarSection.js'\n\nconst SuperscriptFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n SectionWithEntries([\n {\n ChildComponent: SuperscriptIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('superscript')\n }\n return false\n },\n key: 'superscript',\n onClick: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'superscript')\n },\n order: 6,\n },\n ]),\n ],\n },\n }\n },\n }\n}\n\nexport const SuperscriptFeatureClientComponent = createClientComponent(SuperscriptFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","SuperscriptIcon","createClientComponent","SectionWithEntries","SuperscriptFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","selection","hasFormat","key","onClick","editor","dispatchCommand","order","SuperscriptFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,eAAe,QAAQ,iDAAgD;AAChF,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,4CAA2C;AAE9E,MAAMC,2BAAqE,CAACC;IAC1E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRN,mBAAmB;4BACjB;gCACEO,gBAAgBT;gCAChBU,UAAU,CAAC,EAAEC,SAAS,EAAE;oCACtB,IAAIb,kBAAkBa,YAAY;wCAChC,OAAOA,UAAUC,SAAS,CAAC;oCAC7B;oCACA,OAAO;gCACT;gCACAC,KAAK;gCACLC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACjB,qBAAqB;gCAC9C;gCACAkB,OAAO;4BACT;yBACD;qBACF;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMC,oCAAoCjB,sBAAsBE,0BAAyB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/format/superscript/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SuperscriptIcon } from '../../../lexical/ui/icons/Superscript/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: SuperscriptIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('superscript')\n }\n return false\n },\n key: 'superscript',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'superscript')\n },\n order: 6,\n },\n ]),\n]\n\nconst SuperscriptFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const SuperscriptFeatureClientComponent = createClientComponent(SuperscriptFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","SuperscriptIcon","createClientComponent","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","SuperscriptFeatureClient","props","clientFeatureProps","feature","toolbarFixed","groups","toolbarInline","SuperscriptFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAKhE,SAASC,eAAe,QAAQ,iDAAgD;AAChF,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAE7E,MAAMC,gBAAgC;IACpCD,4BAA4B;QAC1B;YACEE,gBAAgBJ;YAChBK,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIR,kBAAkBQ,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACZ,qBAAqB;YAC9C;YACAa,OAAO;QACT;KACD;CACF;AAED,MAAMC,2BAAqE,CAACC;IAC1E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,cAAc;oBACZC,QAAQf;gBACV;gBACAgB,eAAe;oBACbD,QAAQf;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMiB,oCAAoCnB,sBAAsBY,0BAAyB"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/underline/feature.client.tsx"],"names":[],"mappings":";AAyCA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/format/underline/feature.client.tsx"],"names":[],"mappings":";AA+CA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
@@ -2,32 +2,36 @@
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { UnderlineIcon } from '../../../lexical/ui/icons/Underline/index.js';
4
4
  import { createClientComponent } from '../../createClientComponent.js';
5
- import { SectionWithEntries } from '../common/floatingSelectToolbarSection.js';
5
+ import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
+ const toolbarGroups = [
7
+ toolbarFormatGroupWithItems([
8
+ {
9
+ ChildComponent: UnderlineIcon,
10
+ isActive: ({ selection })=>{
11
+ if ($isRangeSelection(selection)) {
12
+ return selection.hasFormat('underline');
13
+ }
14
+ return false;
15
+ },
16
+ key: 'underline',
17
+ onSelect: ({ editor })=>{
18
+ editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline');
19
+ },
20
+ order: 3
21
+ }
22
+ ])
23
+ ];
6
24
  const UnderlineFeatureClient = (props)=>{
7
25
  return {
8
26
  clientFeatureProps: props,
9
27
  feature: ()=>{
10
28
  return {
11
29
  clientFeatureProps: props,
12
- floatingSelectToolbar: {
13
- sections: [
14
- SectionWithEntries([
15
- {
16
- ChildComponent: UnderlineIcon,
17
- isActive: ({ selection })=>{
18
- if ($isRangeSelection(selection)) {
19
- return selection.hasFormat('underline');
20
- }
21
- return false;
22
- },
23
- key: 'underline',
24
- onClick: ({ editor })=>{
25
- editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline');
26
- },
27
- order: 3
28
- }
29
- ])
30
- ]
30
+ toolbarFixed: {
31
+ groups: toolbarGroups
32
+ },
33
+ toolbarInline: {
34
+ groups: toolbarGroups
31
35
  }
32
36
  };
33
37
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/format/underline/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { UnderlineIcon } from '../../../lexical/ui/icons/Underline/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { SectionWithEntries } from '../common/floatingSelectToolbarSection.js'\n\nconst UnderlineFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n SectionWithEntries([\n {\n ChildComponent: UnderlineIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('underline')\n }\n return false\n },\n key: 'underline',\n onClick: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline')\n },\n order: 3,\n },\n ]),\n ],\n },\n }\n },\n }\n}\n\nexport const UnderlineFeatureClientComponent = createClientComponent(UnderlineFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","UnderlineIcon","createClientComponent","SectionWithEntries","UnderlineFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","selection","hasFormat","key","onClick","editor","dispatchCommand","order","UnderlineFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,4CAA2C;AAE9E,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRN,mBAAmB;4BACjB;gCACEO,gBAAgBT;gCAChBU,UAAU,CAAC,EAAEC,SAAS,EAAE;oCACtB,IAAIb,kBAAkBa,YAAY;wCAChC,OAAOA,UAAUC,SAAS,CAAC;oCAC7B;oCACA,OAAO;gCACT;gCACAC,KAAK;gCACLC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACjB,qBAAqB;gCAC9C;gCACAkB,OAAO;4BACT;yBACD;qBACF;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMC,kCAAkCjB,sBAAsBE,wBAAuB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/format/underline/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { UnderlineIcon } from '../../../lexical/ui/icons/Underline/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: UnderlineIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('underline')\n }\n return false\n },\n key: 'underline',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline')\n },\n order: 3,\n },\n ]),\n]\n\nconst UnderlineFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const UnderlineFeatureClientComponent = createClientComponent(UnderlineFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","UnderlineIcon","createClientComponent","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","UnderlineFeatureClient","props","clientFeatureProps","feature","toolbarFixed","groups","toolbarInline","UnderlineFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAKhE,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAE7E,MAAMC,gBAAgC;IACpCD,4BAA4B;QAC1B;YACEE,gBAAgBJ;YAChBK,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIR,kBAAkBQ,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACZ,qBAAqB;YAC9C;YACAa,OAAO;QACT;KACD;CACF;AAED,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,cAAc;oBACZC,QAAQf;gBACV;gBACAgB,eAAe;oBACbD,QAAQf;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMiB,kCAAkCnB,sBAAsBY,wBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/heading/feature.client.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAkF9D,eAAO,MAAM,6BAA6B,qFAA8C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/heading/feature.client.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AA0G9D,eAAO,MAAM,6BAA6B,qFAA8C,CAAA"}
@@ -1,16 +1,16 @@
1
1
  'use client';
2
+ import { $isHeadingNode } from '@lexical/rich-text';
2
3
  import { $createHeadingNode, HeadingNode } from '@lexical/rich-text';
3
4
  import { $setBlocksType } from '@lexical/selection';
4
- import { $getSelection } from 'lexical';
5
- import { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
5
+ import { $getSelection, $isRangeSelection } from 'lexical';
6
6
  import { H1Icon } from '../../lexical/ui/icons/H1/index.js';
7
7
  import { H2Icon } from '../../lexical/ui/icons/H2/index.js';
8
8
  import { H3Icon } from '../../lexical/ui/icons/H3/index.js';
9
9
  import { H4Icon } from '../../lexical/ui/icons/H4/index.js';
10
10
  import { H5Icon } from '../../lexical/ui/icons/H5/index.js';
11
11
  import { H6Icon } from '../../lexical/ui/icons/H6/index.js';
12
- import { TextDropdownSectionWithEntries } from '../common/floatingSelectToolbarTextDropdownSection/index.js';
13
12
  import { createClientComponent } from '../createClientComponent.js';
13
+ import { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js';
14
14
  import { MarkdownTransformer } from './markdownTransformer.js';
15
15
  const setHeading = (headingSize)=>{
16
16
  const selection = $getSelection();
@@ -25,37 +25,50 @@ const iconImports = {
25
25
  h6: H6Icon
26
26
  };
27
27
  const HeadingFeatureClient = (props)=>{
28
- const { enabledHeadingSizes = [
29
- 'h1',
30
- 'h2',
31
- 'h3',
32
- 'h4',
33
- 'h5',
34
- 'h6'
35
- ] } = props;
36
28
  return {
37
29
  clientFeatureProps: props,
38
30
  feature: ()=>{
31
+ const { enabledHeadingSizes = [
32
+ 'h1',
33
+ 'h2',
34
+ 'h3',
35
+ 'h4',
36
+ 'h5',
37
+ 'h6'
38
+ ] } = props;
39
+ const toolbarGroups = [
40
+ toolbarTextDropdownGroupWithItems(enabledHeadingSizes.map((headingSize, i)=>{
41
+ return {
42
+ ChildComponent: iconImports[headingSize],
43
+ isActive: ({ selection })=>{
44
+ if (!$isRangeSelection(selection)) {
45
+ return false;
46
+ }
47
+ for (const node of selection.getNodes()){
48
+ if ($isHeadingNode(node) && node.getTag() === headingSize) {
49
+ continue;
50
+ }
51
+ const parent = node.getParent();
52
+ if ($isHeadingNode(parent) && parent.getTag() === headingSize) {
53
+ continue;
54
+ }
55
+ return false;
56
+ }
57
+ return true;
58
+ },
59
+ key: headingSize,
60
+ label: `Heading ${headingSize.charAt(1)}`,
61
+ onSelect: ({ editor })=>{
62
+ editor.update(()=>{
63
+ setHeading(headingSize);
64
+ });
65
+ },
66
+ order: i + 2
67
+ };
68
+ }))
69
+ ];
39
70
  return {
40
71
  clientFeatureProps: props,
41
- floatingSelectToolbar: {
42
- sections: [
43
- ...enabledHeadingSizes.map((headingSize, i)=>TextDropdownSectionWithEntries([
44
- {
45
- ChildComponent: iconImports[headingSize],
46
- isActive: ()=>false,
47
- key: headingSize,
48
- label: `Heading ${headingSize.charAt(1)}`,
49
- onClick: ({ editor })=>{
50
- editor.update(()=>{
51
- setHeading(headingSize);
52
- });
53
- },
54
- order: i + 2
55
- }
56
- ]))
57
- ]
58
- },
59
72
  markdownTransformers: [
60
73
  MarkdownTransformer(enabledHeadingSizes)
61
74
  ],
@@ -63,27 +76,34 @@ const HeadingFeatureClient = (props)=>{
63
76
  HeadingNode
64
77
  ],
65
78
  slashMenu: {
66
- options: [
67
- ...enabledHeadingSizes.map((headingSize)=>{
68
- return {
69
- displayName: 'Basic',
70
- key: 'basic',
71
- options: [
72
- new SlashMenuOption(`heading-${headingSize.charAt(1)}`, {
73
- Icon: iconImports[headingSize],
74
- displayName: `Heading ${headingSize.charAt(1)}`,
75
- keywords: [
76
- 'heading',
77
- headingSize
78
- ],
79
- onSelect: ()=>{
79
+ groups: enabledHeadingSizes?.length ? [
80
+ {
81
+ items: enabledHeadingSizes.map((headingSize)=>{
82
+ return {
83
+ Icon: iconImports[headingSize],
84
+ key: `heading-${headingSize.charAt(1)}`,
85
+ keywords: [
86
+ 'heading',
87
+ headingSize
88
+ ],
89
+ label: `Heading ${headingSize.charAt(1)}`,
90
+ onSelect: ({ editor })=>{
91
+ editor.update(()=>{
80
92
  setHeading(headingSize);
81
- }
82
- })
83
- ]
84
- };
85
- })
86
- ]
93
+ });
94
+ }
95
+ };
96
+ }),
97
+ key: 'basic',
98
+ label: 'Basic'
99
+ }
100
+ ] : []
101
+ },
102
+ toolbarFixed: {
103
+ groups: enabledHeadingSizes?.length ? toolbarGroups : []
104
+ },
105
+ toolbarInline: {
106
+ groups: enabledHeadingSizes?.length ? toolbarGroups : []
87
107
  }
88
108
  };
89
109
  }