@payloadcms/richtext-lexical 3.0.0-beta.52 → 3.0.0-beta.54

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 (2126) hide show
  1. package/dist/cell/index.d.ts.map +1 -1
  2. package/dist/cell/index.js +6 -6
  3. package/dist/cell/index.js.map +1 -1
  4. package/dist/exports/client/Component-7HS6FEJS.js +2 -0
  5. package/dist/exports/client/Component-7HS6FEJS.js.map +7 -0
  6. package/dist/exports/client/Component-LAKSCIDX.js +2 -0
  7. package/dist/exports/client/Component-LAKSCIDX.js.map +7 -0
  8. package/dist/exports/client/Field-XBUN6QOM.js +2 -0
  9. package/dist/exports/client/Field-XBUN6QOM.js.map +7 -0
  10. package/dist/exports/client/RelationshipComponent-5OU5HATX.js +2 -0
  11. package/dist/exports/client/RelationshipComponent-5OU5HATX.js.map +7 -0
  12. package/dist/exports/client/bundled.css +1 -1
  13. package/dist/exports/client/chunk-3K3B6PJM.js +2 -0
  14. package/dist/exports/client/chunk-3K3B6PJM.js.map +7 -0
  15. package/dist/exports/client/chunk-JIP5PWU3.js +2 -0
  16. package/dist/exports/client/chunk-JIP5PWU3.js.map +7 -0
  17. package/dist/exports/client/chunk-MLIITFAS.js +3 -0
  18. package/dist/exports/client/chunk-MLIITFAS.js.map +7 -0
  19. package/dist/exports/client/chunk-OSR74ZNW.js +2 -0
  20. package/dist/exports/client/chunk-OSR74ZNW.js.map +7 -0
  21. package/dist/exports/client/chunk-TZLHAUCW.js +2 -0
  22. package/dist/exports/client/chunk-TZLHAUCW.js.map +7 -0
  23. package/dist/exports/client/component-CEUVAHRO.js +2 -0
  24. package/dist/exports/client/component-CEUVAHRO.js.map +7 -0
  25. package/dist/exports/client/component-PEFMKIXI.js +2 -0
  26. package/dist/exports/client/component-PEFMKIXI.js.map +7 -0
  27. package/dist/exports/client/component-QWIGEOVD.js +2 -0
  28. package/dist/exports/client/component-QWIGEOVD.js.map +7 -0
  29. package/dist/exports/client/index.d.ts +58 -49
  30. package/dist/exports/client/index.d.ts.map +1 -1
  31. package/dist/exports/client/index.js +7 -5
  32. package/dist/exports/client/index.js.map +4 -4
  33. package/dist/features/align/feature.client.d.ts +5 -0
  34. package/dist/features/align/feature.client.d.ts.map +1 -0
  35. package/dist/features/align/feature.client.js +146 -0
  36. package/dist/features/align/feature.client.js.map +1 -0
  37. package/dist/features/align/feature.server.d.ts +2 -0
  38. package/dist/features/align/feature.server.d.ts.map +1 -0
  39. package/dist/features/align/feature.server.js +13 -0
  40. package/dist/features/align/feature.server.js.map +1 -0
  41. package/dist/features/align/i18n.d.ts.map +1 -0
  42. package/dist/features/align/i18n.js.map +1 -0
  43. package/dist/features/align/toolbarAlignGroup.d.ts.map +1 -0
  44. package/dist/features/align/toolbarAlignGroup.js.map +1 -0
  45. package/dist/features/blockquote/feature.client.d.ts +5 -0
  46. package/dist/features/blockquote/feature.client.d.ts.map +1 -0
  47. package/dist/features/blockquote/feature.client.js +77 -0
  48. package/dist/features/blockquote/feature.client.js.map +1 -0
  49. package/dist/features/blockquote/feature.server.d.ts +2 -0
  50. package/dist/features/blockquote/feature.server.d.ts.map +1 -0
  51. package/dist/features/blockquote/feature.server.js +45 -0
  52. package/dist/features/blockquote/feature.server.js.map +1 -0
  53. package/dist/features/blockquote/i18n.d.ts.map +1 -0
  54. package/dist/features/blockquote/i18n.js.map +1 -0
  55. package/dist/features/blockquote/markdownTransformer.d.ts.map +1 -0
  56. package/dist/features/blockquote/markdownTransformer.js.map +1 -0
  57. package/dist/features/blocks/component/BlockContent.d.ts +27 -0
  58. package/dist/features/blocks/component/BlockContent.d.ts.map +1 -0
  59. package/dist/features/blocks/component/BlockContent.js +193 -0
  60. package/dist/features/blocks/component/BlockContent.js.map +1 -0
  61. package/dist/features/blocks/component/FormSavePlugin.d.ts.map +1 -0
  62. package/dist/features/blocks/component/FormSavePlugin.js +29 -0
  63. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -0
  64. package/dist/features/blocks/component/index.d.ts.map +1 -0
  65. package/dist/features/blocks/component/index.js +158 -0
  66. package/dist/features/blocks/component/index.js.map +1 -0
  67. package/dist/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -0
  68. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -0
  69. package/dist/features/blocks/drawer/index.d.ts.map +1 -0
  70. package/dist/features/blocks/drawer/index.js +78 -0
  71. package/dist/features/blocks/drawer/index.js.map +1 -0
  72. package/dist/features/blocks/feature.client.d.ts +9 -0
  73. package/dist/features/blocks/feature.client.d.ts.map +1 -0
  74. package/dist/features/blocks/feature.client.js +86 -0
  75. package/dist/features/blocks/feature.client.js.map +1 -0
  76. package/dist/features/blocks/feature.server.d.ts +7 -0
  77. package/dist/features/blocks/feature.server.d.ts.map +1 -0
  78. package/dist/features/blocks/feature.server.js +105 -0
  79. package/dist/features/blocks/feature.server.js.map +1 -0
  80. package/dist/features/blocks/graphQLPopulationPromise.d.ts +5 -0
  81. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -0
  82. package/dist/features/blocks/graphQLPopulationPromise.js +31 -0
  83. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -0
  84. package/dist/features/blocks/i18n.d.ts.map +1 -0
  85. package/dist/features/blocks/i18n.js.map +1 -0
  86. package/dist/features/blocks/nodes/BlocksNode.d.ts.map +1 -0
  87. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -0
  88. package/dist/features/blocks/plugin/commands.d.ts.map +1 -0
  89. package/dist/features/blocks/plugin/commands.js.map +1 -0
  90. package/dist/features/blocks/plugin/index.d.ts +6 -0
  91. package/dist/features/blocks/plugin/index.d.ts.map +1 -0
  92. package/dist/features/blocks/plugin/index.js.map +1 -0
  93. package/dist/features/blocks/validate.d.ts +5 -0
  94. package/dist/features/blocks/validate.d.ts.map +1 -0
  95. package/dist/features/blocks/validate.js.map +1 -0
  96. package/dist/features/converters/html/converter/converters/linebreak.d.ts.map +1 -0
  97. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -0
  98. package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -0
  99. package/dist/features/converters/html/converter/converters/paragraph.js +20 -0
  100. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -0
  101. package/dist/features/converters/html/converter/converters/text.d.ts.map +1 -0
  102. package/dist/features/converters/html/converter/converters/text.js.map +1 -0
  103. package/dist/features/converters/html/converter/defaultConverters.d.ts.map +1 -0
  104. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -0
  105. package/dist/features/converters/html/converter/index.d.ts +42 -0
  106. package/dist/features/converters/html/converter/index.d.ts.map +1 -0
  107. package/dist/features/converters/html/converter/index.js +48 -0
  108. package/dist/features/converters/html/converter/index.js.map +1 -0
  109. package/dist/features/converters/html/converter/types.d.ts +19 -0
  110. package/dist/features/converters/html/converter/types.d.ts.map +1 -0
  111. package/dist/features/converters/html/converter/types.js.map +1 -0
  112. package/dist/features/converters/html/feature.server.d.ts +8 -0
  113. package/dist/features/converters/html/feature.server.d.ts.map +1 -0
  114. package/dist/features/converters/html/feature.server.js +8 -0
  115. package/dist/features/converters/html/feature.server.js.map +1 -0
  116. package/dist/features/converters/html/field/index.d.ts.map +1 -0
  117. package/dist/features/converters/html/field/index.js +154 -0
  118. package/dist/features/converters/html/field/index.js.map +1 -0
  119. package/dist/features/createClientComponent.d.ts +7 -0
  120. package/dist/features/createClientComponent.d.ts.map +1 -0
  121. package/dist/features/createClientComponent.js +12 -0
  122. package/dist/features/createClientComponent.js.map +1 -0
  123. package/dist/features/createFeaturePropComponent.d.ts.map +1 -0
  124. package/dist/features/createFeaturePropComponent.js +18 -0
  125. package/dist/features/createFeaturePropComponent.js.map +1 -0
  126. package/dist/features/debug/testRecorder/feature.client.d.ts +5 -0
  127. package/dist/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  128. package/dist/features/debug/testRecorder/feature.client.js +13 -0
  129. package/dist/features/debug/testRecorder/feature.client.js.map +1 -0
  130. package/dist/features/debug/testRecorder/feature.server.d.ts +2 -0
  131. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -0
  132. package/dist/features/debug/testRecorder/feature.server.js +11 -0
  133. package/dist/features/debug/testRecorder/feature.server.js.map +1 -0
  134. package/dist/features/debug/testRecorder/plugin/index.d.ts +5 -0
  135. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  136. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -0
  137. package/dist/features/debug/treeView/feature.client.d.ts +5 -0
  138. package/dist/features/debug/treeView/feature.client.d.ts.map +1 -0
  139. package/dist/features/debug/treeView/feature.client.js +13 -0
  140. package/dist/features/debug/treeView/feature.client.js.map +1 -0
  141. package/dist/features/debug/treeView/feature.server.d.ts +2 -0
  142. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -0
  143. package/dist/features/debug/treeView/feature.server.js +11 -0
  144. package/dist/features/debug/treeView/feature.server.js.map +1 -0
  145. package/dist/features/debug/treeView/plugin/index.d.ts +4 -0
  146. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -0
  147. package/dist/features/debug/treeView/plugin/index.js.map +1 -0
  148. package/dist/features/format/bold/feature.client.d.ts +5 -0
  149. package/dist/features/format/bold/feature.client.d.ts.map +1 -0
  150. package/dist/features/format/bold/feature.client.js +44 -0
  151. package/dist/features/format/bold/feature.client.js.map +1 -0
  152. package/dist/features/format/bold/feature.server.d.ts +2 -0
  153. package/dist/features/format/bold/feature.server.d.ts.map +1 -0
  154. package/dist/features/format/bold/feature.server.js +25 -0
  155. package/dist/features/format/bold/feature.server.js.map +1 -0
  156. package/dist/features/format/bold/markdownTransformers.d.ts.map +1 -0
  157. package/dist/features/format/bold/markdownTransformers.js.map +1 -0
  158. package/dist/features/format/inlineCode/feature.client.d.ts +5 -0
  159. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -0
  160. package/dist/features/format/inlineCode/feature.client.js +37 -0
  161. package/dist/features/format/inlineCode/feature.client.js.map +1 -0
  162. package/dist/features/format/inlineCode/feature.server.d.ts +2 -0
  163. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -0
  164. package/dist/features/format/inlineCode/feature.server.js +15 -0
  165. package/dist/features/format/inlineCode/feature.server.js.map +1 -0
  166. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +1 -0
  167. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -0
  168. package/dist/features/format/italic/feature.client.d.ts +5 -0
  169. package/dist/features/format/italic/feature.client.d.ts.map +1 -0
  170. package/dist/features/format/italic/feature.client.js +38 -0
  171. package/dist/features/format/italic/feature.client.js.map +1 -0
  172. package/dist/features/format/italic/feature.server.d.ts +2 -0
  173. package/dist/features/format/italic/feature.server.d.ts.map +1 -0
  174. package/dist/features/format/italic/feature.server.js +16 -0
  175. package/dist/features/format/italic/feature.server.js.map +1 -0
  176. package/dist/features/format/italic/markdownTransformers.d.ts.map +1 -0
  177. package/dist/features/format/italic/markdownTransformers.js.map +1 -0
  178. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  179. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -0
  180. package/dist/features/format/strikethrough/feature.client.d.ts +5 -0
  181. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -0
  182. package/dist/features/format/strikethrough/feature.client.js +37 -0
  183. package/dist/features/format/strikethrough/feature.client.js.map +1 -0
  184. package/dist/features/format/strikethrough/feature.server.d.ts +2 -0
  185. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -0
  186. package/dist/features/format/strikethrough/feature.server.js +15 -0
  187. package/dist/features/format/strikethrough/feature.server.js.map +1 -0
  188. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +1 -0
  189. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -0
  190. package/dist/features/format/subscript/feature.client.d.ts +5 -0
  191. package/dist/features/format/subscript/feature.client.d.ts.map +1 -0
  192. package/dist/features/format/subscript/feature.client.js +33 -0
  193. package/dist/features/format/subscript/feature.client.js.map +1 -0
  194. package/dist/features/format/subscript/feature.server.d.ts +2 -0
  195. package/dist/features/format/subscript/feature.server.d.ts.map +1 -0
  196. package/dist/features/format/subscript/feature.server.js +11 -0
  197. package/dist/features/format/subscript/feature.server.js.map +1 -0
  198. package/dist/features/format/superscript/feature.client.d.ts +5 -0
  199. package/dist/features/format/superscript/feature.client.d.ts.map +1 -0
  200. package/dist/features/format/superscript/feature.client.js +33 -0
  201. package/dist/features/format/superscript/feature.client.js.map +1 -0
  202. package/dist/features/format/superscript/feature.server.d.ts +2 -0
  203. package/dist/features/format/superscript/feature.server.d.ts.map +1 -0
  204. package/dist/features/format/superscript/feature.server.js +11 -0
  205. package/dist/features/format/superscript/feature.server.js.map +1 -0
  206. package/dist/features/format/underline/feature.client.d.ts +5 -0
  207. package/dist/features/format/underline/feature.client.d.ts.map +1 -0
  208. package/dist/features/format/underline/feature.client.js +33 -0
  209. package/dist/features/format/underline/feature.client.js.map +1 -0
  210. package/dist/features/format/underline/feature.server.d.ts +2 -0
  211. package/dist/features/format/underline/feature.server.d.ts.map +1 -0
  212. package/dist/features/format/underline/feature.server.js +11 -0
  213. package/dist/features/format/underline/feature.server.js.map +1 -0
  214. package/dist/features/heading/feature.client.d.ts +6 -0
  215. package/dist/features/heading/feature.client.d.ts.map +1 -0
  216. package/dist/features/heading/feature.client.js +112 -0
  217. package/dist/features/heading/feature.client.js.map +1 -0
  218. package/dist/features/heading/feature.server.d.ts +6 -0
  219. package/dist/features/heading/feature.server.d.ts.map +1 -0
  220. package/dist/features/heading/feature.server.js +59 -0
  221. package/dist/features/heading/feature.server.js.map +1 -0
  222. package/dist/features/heading/i18n.d.ts.map +1 -0
  223. package/dist/features/heading/i18n.js.map +1 -0
  224. package/dist/features/heading/markdownTransformer.d.ts.map +1 -0
  225. package/dist/features/heading/markdownTransformer.js.map +1 -0
  226. package/dist/features/horizontalRule/component/index.d.ts.map +1 -0
  227. package/dist/features/horizontalRule/component/index.js.map +1 -0
  228. package/dist/features/horizontalRule/feature.client.d.ts +5 -0
  229. package/dist/features/horizontalRule/feature.client.d.ts.map +1 -0
  230. package/dist/features/horizontalRule/feature.client.js +70 -0
  231. package/dist/features/horizontalRule/feature.client.js.map +1 -0
  232. package/dist/features/horizontalRule/feature.server.d.ts +2 -0
  233. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -0
  234. package/dist/features/horizontalRule/feature.server.js +34 -0
  235. package/dist/features/horizontalRule/feature.server.js.map +1 -0
  236. package/dist/features/horizontalRule/i18n.d.ts.map +1 -0
  237. package/dist/features/horizontalRule/i18n.js.map +1 -0
  238. package/dist/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  239. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -0
  240. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  241. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  242. package/dist/features/horizontalRule/plugin/index.d.ts +7 -0
  243. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -0
  244. package/dist/features/horizontalRule/plugin/index.js.map +1 -0
  245. package/dist/features/indent/feature.client.d.ts +5 -0
  246. package/dist/features/indent/feature.client.d.ts.map +1 -0
  247. package/dist/features/indent/feature.client.js +56 -0
  248. package/dist/features/indent/feature.client.js.map +1 -0
  249. package/dist/features/indent/feature.server.d.ts +2 -0
  250. package/dist/features/indent/feature.server.d.ts.map +1 -0
  251. package/dist/features/indent/feature.server.js +13 -0
  252. package/dist/features/indent/feature.server.js.map +1 -0
  253. package/dist/features/indent/i18n.d.ts.map +1 -0
  254. package/dist/features/indent/i18n.js.map +1 -0
  255. package/dist/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  256. package/dist/features/indent/toolbarIndentGroup.js.map +1 -0
  257. package/dist/features/link/drawer/baseFields.d.ts +3 -0
  258. package/dist/features/link/drawer/baseFields.d.ts.map +1 -0
  259. package/dist/features/link/drawer/baseFields.js.map +1 -0
  260. package/dist/features/link/drawer/index.d.ts.map +1 -0
  261. package/dist/features/link/drawer/index.js +94 -0
  262. package/dist/features/link/drawer/index.js.map +1 -0
  263. package/dist/features/link/drawer/types.d.ts.map +1 -0
  264. package/dist/features/link/drawer/types.js.map +1 -0
  265. package/dist/features/link/feature.client.d.ts +16 -0
  266. package/dist/features/link/feature.client.d.ts.map +1 -0
  267. package/dist/features/link/feature.client.js +101 -0
  268. package/dist/features/link/feature.client.js.map +1 -0
  269. package/dist/features/link/feature.server.d.ts +35 -0
  270. package/dist/features/link/feature.server.d.ts.map +1 -0
  271. package/dist/features/link/feature.server.js +138 -0
  272. package/dist/features/link/feature.server.js.map +1 -0
  273. package/dist/features/link/graphQLPopulationPromise.d.ts +5 -0
  274. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -0
  275. package/dist/features/link/graphQLPopulationPromise.js +31 -0
  276. package/dist/features/link/graphQLPopulationPromise.js.map +1 -0
  277. package/dist/features/link/i18n.d.ts.map +1 -0
  278. package/dist/features/link/i18n.js.map +1 -0
  279. package/dist/features/link/markdownTransformer.d.ts.map +1 -0
  280. package/dist/features/link/markdownTransformer.js.map +1 -0
  281. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -0
  282. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -0
  283. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -0
  284. package/dist/features/link/nodes/LinkNode.js.map +1 -0
  285. package/dist/features/link/nodes/types.d.ts.map +1 -0
  286. package/dist/features/link/nodes/types.js.map +1 -0
  287. package/dist/features/link/plugins/autoLink/index.d.ts +20 -0
  288. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -0
  289. package/dist/features/link/plugins/autoLink/index.js.map +1 -0
  290. package/dist/features/link/plugins/clickableLink/index.d.ts +4 -0
  291. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -0
  292. package/dist/features/link/plugins/clickableLink/index.js.map +1 -0
  293. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
  294. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -0
  295. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
  296. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +295 -0
  297. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -0
  298. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +5 -0
  299. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -0
  300. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -0
  301. package/dist/features/link/plugins/floatingLinkEditor/types.d.ts.map +1 -0
  302. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -0
  303. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +9 -0
  304. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -0
  305. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -0
  306. package/dist/features/link/plugins/link/index.d.ts +4 -0
  307. package/dist/features/link/plugins/link/index.d.ts.map +1 -0
  308. package/dist/features/link/plugins/link/index.js.map +1 -0
  309. package/dist/features/link/validate.d.ts +6 -0
  310. package/dist/features/link/validate.d.ts.map +1 -0
  311. package/dist/features/link/validate.js.map +1 -0
  312. package/dist/features/lists/checklist/feature.client.d.ts +5 -0
  313. package/dist/features/lists/checklist/feature.client.d.ts.map +1 -0
  314. package/dist/features/lists/checklist/feature.client.js +100 -0
  315. package/dist/features/lists/checklist/feature.client.js.map +1 -0
  316. package/dist/features/lists/checklist/feature.server.d.ts +2 -0
  317. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -0
  318. package/dist/features/lists/checklist/feature.server.js +36 -0
  319. package/dist/features/lists/checklist/feature.server.js.map +1 -0
  320. package/dist/features/lists/checklist/i18n.d.ts.map +1 -0
  321. package/dist/features/lists/checklist/i18n.js.map +1 -0
  322. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +1 -0
  323. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -0
  324. package/dist/features/lists/checklist/plugin/index.d.ts +3 -0
  325. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -0
  326. package/dist/features/lists/checklist/plugin/index.js.map +1 -0
  327. package/dist/features/lists/htmlConverter.d.ts.map +1 -0
  328. package/dist/features/lists/htmlConverter.js +56 -0
  329. package/dist/features/lists/htmlConverter.js.map +1 -0
  330. package/dist/features/lists/orderedList/feature.client.d.ts +5 -0
  331. package/dist/features/lists/orderedList/feature.client.d.ts.map +1 -0
  332. package/dist/features/lists/orderedList/feature.client.js +90 -0
  333. package/dist/features/lists/orderedList/feature.client.js.map +1 -0
  334. package/dist/features/lists/orderedList/feature.server.d.ts +2 -0
  335. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -0
  336. package/dist/features/lists/orderedList/feature.server.js +36 -0
  337. package/dist/features/lists/orderedList/feature.server.js.map +1 -0
  338. package/dist/features/lists/orderedList/i18n.d.ts.map +1 -0
  339. package/dist/features/lists/orderedList/i18n.js.map +1 -0
  340. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  341. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -0
  342. package/dist/features/lists/plugin/index.d.ts +3 -0
  343. package/dist/features/lists/plugin/index.d.ts.map +1 -0
  344. package/dist/features/lists/plugin/index.js.map +1 -0
  345. package/dist/features/lists/shared/markdown.d.ts +6 -0
  346. package/dist/features/lists/shared/markdown.d.ts.map +1 -0
  347. package/dist/features/lists/shared/markdown.js.map +1 -0
  348. package/dist/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
  349. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -0
  350. package/dist/features/lists/unorderedList/feature.client.d.ts +5 -0
  351. package/dist/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  352. package/dist/features/lists/unorderedList/feature.client.js +88 -0
  353. package/dist/features/lists/unorderedList/feature.client.js.map +1 -0
  354. package/dist/features/lists/unorderedList/feature.server.d.ts +2 -0
  355. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  356. package/dist/features/lists/unorderedList/feature.server.js +34 -0
  357. package/dist/features/lists/unorderedList/feature.server.js.map +1 -0
  358. package/dist/features/lists/unorderedList/i18n.d.ts.map +1 -0
  359. package/dist/features/lists/unorderedList/i18n.js.map +1 -0
  360. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  361. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  362. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +5 -0
  363. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -0
  364. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -0
  365. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -0
  366. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -0
  367. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +1 -0
  368. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +8 -0
  369. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -0
  370. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +5 -0
  371. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -0
  372. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -0
  373. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -0
  374. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -0
  375. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +1 -0
  376. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +8 -0
  377. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -0
  378. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +5 -0
  379. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -0
  380. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -0
  381. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -0
  382. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -0
  383. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +1 -0
  384. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +8 -0
  385. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -0
  386. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +5 -0
  387. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -0
  388. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -0
  389. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
  390. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -0
  391. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +1 -0
  392. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +8 -0
  393. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -0
  394. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +5 -0
  395. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -0
  396. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -0
  397. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -0
  398. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -0
  399. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +1 -0
  400. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +8 -0
  401. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -0
  402. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +5 -0
  403. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -0
  404. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -0
  405. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
  406. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -0
  407. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +1 -0
  408. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +8 -0
  409. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -0
  410. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +5 -0
  411. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -0
  412. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -0
  413. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -0
  414. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -0
  415. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +1 -0
  416. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +8 -0
  417. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -0
  418. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -0
  419. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -0
  420. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -0
  421. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -0
  422. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +31 -0
  423. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -0
  424. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -0
  425. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +5 -0
  426. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -0
  427. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +27 -0
  428. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -0
  429. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +8 -0
  430. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -0
  431. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +45 -0
  432. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -0
  433. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
  434. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -0
  435. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
  436. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -0
  437. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +5 -0
  438. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -0
  439. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -0
  440. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -0
  441. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -0
  442. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +1 -0
  443. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +8 -0
  444. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -0
  445. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +5 -0
  446. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -0
  447. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -0
  448. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -0
  449. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -0
  450. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +1 -0
  451. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +8 -0
  452. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -0
  453. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +5 -0
  454. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -0
  455. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -0
  456. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -0
  457. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -0
  458. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +1 -0
  459. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +8 -0
  460. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -0
  461. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +5 -0
  462. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -0
  463. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -0
  464. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -0
  465. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -0
  466. package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +1 -0
  467. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +8 -0
  468. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -0
  469. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +5 -0
  470. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -0
  471. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -0
  472. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
  473. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -0
  474. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +1 -0
  475. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +8 -0
  476. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -0
  477. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +5 -0
  478. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -0
  479. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -0
  480. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -0
  481. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -0
  482. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +1 -0
  483. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +8 -0
  484. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -0
  485. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +5 -0
  486. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -0
  487. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -0
  488. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -0
  489. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -0
  490. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +1 -0
  491. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +8 -0
  492. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -0
  493. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +5 -0
  494. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -0
  495. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -0
  496. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
  497. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -0
  498. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +1 -0
  499. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +8 -0
  500. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -0
  501. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +5 -0
  502. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -0
  503. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -0
  504. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -0
  505. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -0
  506. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +1 -0
  507. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +8 -0
  508. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -0
  509. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +5 -0
  510. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -0
  511. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -0
  512. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -0
  513. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -0
  514. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +1 -0
  515. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +8 -0
  516. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -0
  517. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -0
  518. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -0
  519. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -0
  520. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -0
  521. package/dist/features/migrations/slateToLexical/converter/types.d.ts +25 -0
  522. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +1 -0
  523. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -0
  524. package/dist/features/migrations/slateToLexical/feature.client.d.ts +5 -0
  525. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -0
  526. package/dist/features/migrations/slateToLexical/feature.client.js +27 -0
  527. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -0
  528. package/dist/features/migrations/slateToLexical/feature.server.d.ts +8 -0
  529. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -0
  530. package/dist/features/migrations/slateToLexical/feature.server.js +45 -0
  531. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -0
  532. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
  533. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -0
  534. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
  535. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -0
  536. package/dist/features/paragraph/feature.client.d.ts +5 -0
  537. package/dist/features/paragraph/feature.client.d.ts.map +1 -0
  538. package/dist/features/paragraph/feature.client.js +71 -0
  539. package/dist/features/paragraph/feature.client.js.map +1 -0
  540. package/dist/features/paragraph/feature.server.d.ts +2 -0
  541. package/dist/features/paragraph/feature.server.d.ts.map +1 -0
  542. package/dist/features/paragraph/feature.server.js +14 -0
  543. package/dist/features/paragraph/feature.server.js.map +1 -0
  544. package/dist/features/paragraph/i18n.d.ts.map +1 -0
  545. package/dist/features/paragraph/i18n.js.map +1 -0
  546. package/dist/features/relationship/drawer/commands.d.ts.map +1 -0
  547. package/dist/features/relationship/drawer/commands.js.map +1 -0
  548. package/dist/features/relationship/drawer/index.d.ts.map +1 -0
  549. package/dist/features/relationship/drawer/index.js +83 -0
  550. package/dist/features/relationship/drawer/index.js.map +1 -0
  551. package/dist/features/relationship/feature.client.d.ts +18 -0
  552. package/dist/features/relationship/feature.client.d.ts.map +1 -0
  553. package/dist/features/relationship/feature.client.js +72 -0
  554. package/dist/features/relationship/feature.client.js.map +1 -0
  555. package/dist/features/relationship/feature.server.d.ts +27 -0
  556. package/dist/features/relationship/feature.server.d.ts.map +1 -0
  557. package/dist/features/relationship/feature.server.js +55 -0
  558. package/dist/features/relationship/feature.server.js.map +1 -0
  559. package/dist/features/relationship/graphQLPopulationPromise.d.ts +5 -0
  560. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
  561. package/dist/features/relationship/graphQLPopulationPromise.js +29 -0
  562. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -0
  563. package/dist/features/relationship/i18n.d.ts.map +1 -0
  564. package/dist/features/relationship/i18n.js.map +1 -0
  565. package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +1 -0
  566. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -0
  567. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -0
  568. package/dist/features/relationship/nodes/components/RelationshipComponent.js +172 -0
  569. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -0
  570. package/dist/features/relationship/plugins/index.d.ts +7 -0
  571. package/dist/features/relationship/plugins/index.d.ts.map +1 -0
  572. package/dist/features/relationship/plugins/index.js +50 -0
  573. package/dist/features/relationship/plugins/index.js.map +1 -0
  574. package/dist/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
  575. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js +33 -0
  576. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -0
  577. package/dist/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
  578. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -0
  579. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  580. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  581. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  582. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  583. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  584. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  585. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
  586. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  587. package/dist/features/toolbars/fixed/Toolbar/index.js +207 -0
  588. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  589. package/dist/features/toolbars/fixed/feature.client.d.ts +6 -0
  590. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  591. package/dist/features/toolbars/fixed/feature.client.js +13 -0
  592. package/dist/features/toolbars/fixed/feature.client.js.map +1 -0
  593. package/dist/features/toolbars/fixed/feature.server.d.ts +18 -0
  594. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  595. package/dist/features/toolbars/fixed/feature.server.js +19 -0
  596. package/dist/features/toolbars/fixed/feature.server.js.map +1 -0
  597. package/dist/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  598. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  599. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -0
  600. package/dist/features/toolbars/inline/feature.client.d.ts +5 -0
  601. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -0
  602. package/dist/features/toolbars/inline/feature.client.js +13 -0
  603. package/dist/features/toolbars/inline/feature.client.js.map +1 -0
  604. package/dist/features/toolbars/inline/feature.server.d.ts +2 -0
  605. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -0
  606. package/dist/features/toolbars/inline/feature.server.js +11 -0
  607. package/dist/features/toolbars/inline/feature.server.js.map +1 -0
  608. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  609. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  610. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  611. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  612. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  613. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +141 -0
  614. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  615. package/dist/features/toolbars/types.d.ts +53 -0
  616. package/dist/features/toolbars/types.d.ts.map +1 -0
  617. package/dist/features/toolbars/types.js.map +1 -0
  618. package/dist/features/typeUtilities.d.ts +8 -0
  619. package/dist/features/typeUtilities.d.ts.map +1 -0
  620. package/dist/features/typeUtilities.js.map +1 -0
  621. package/dist/features/typesClient.d.ts +182 -0
  622. package/dist/features/typesClient.d.ts.map +1 -0
  623. package/dist/features/typesClient.js +3 -0
  624. package/dist/features/typesClient.js.map +1 -0
  625. package/dist/features/typesServer.d.ts +292 -0
  626. package/dist/features/typesServer.d.ts.map +1 -0
  627. package/dist/features/typesServer.js +3 -0
  628. package/dist/features/typesServer.js.map +1 -0
  629. package/dist/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -0
  630. package/dist/features/upload/component/ExtraFieldsDrawer/index.js +123 -0
  631. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -0
  632. package/dist/features/upload/component/index.d.ts.map +1 -0
  633. package/dist/features/upload/component/index.js +219 -0
  634. package/dist/features/upload/component/index.js.map +1 -0
  635. package/dist/features/upload/drawer/commands.d.ts.map +1 -0
  636. package/dist/features/upload/drawer/commands.js.map +1 -0
  637. package/dist/features/upload/drawer/index.d.ts.map +1 -0
  638. package/dist/features/upload/drawer/index.js +77 -0
  639. package/dist/features/upload/drawer/index.js.map +1 -0
  640. package/dist/features/upload/feature.client.d.ts +12 -0
  641. package/dist/features/upload/feature.client.d.ts.map +1 -0
  642. package/dist/features/upload/feature.client.js +74 -0
  643. package/dist/features/upload/feature.client.js.map +1 -0
  644. package/dist/features/upload/feature.server.d.ts +18 -0
  645. package/dist/features/upload/feature.server.d.ts.map +1 -0
  646. package/dist/features/upload/feature.server.js +194 -0
  647. package/dist/features/upload/feature.server.js.map +1 -0
  648. package/dist/features/upload/graphQLPopulationPromise.d.ts +5 -0
  649. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
  650. package/dist/features/upload/graphQLPopulationPromise.js +52 -0
  651. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -0
  652. package/dist/features/upload/i18n.d.ts.map +1 -0
  653. package/dist/features/upload/i18n.js.map +1 -0
  654. package/dist/features/upload/nodes/UploadNode.d.ts.map +1 -0
  655. package/dist/features/upload/nodes/UploadNode.js.map +1 -0
  656. package/dist/features/upload/plugin/index.d.ts +8 -0
  657. package/dist/features/upload/plugin/index.d.ts.map +1 -0
  658. package/dist/features/upload/plugin/index.js +53 -0
  659. package/dist/features/upload/plugin/index.js.map +1 -0
  660. package/dist/features/upload/validate.d.ts +5 -0
  661. package/dist/features/upload/validate.d.ts.map +1 -0
  662. package/dist/features/upload/validate.js.map +1 -0
  663. package/dist/field/Field.d.ts +3 -3
  664. package/dist/field/Field.d.ts.map +1 -1
  665. package/dist/field/Field.js +2 -2
  666. package/dist/field/Field.js.map +1 -1
  667. package/dist/field/index.d.ts +1 -1
  668. package/dist/field/index.d.ts.map +1 -1
  669. package/dist/field/index.js +9 -7
  670. package/dist/field/index.js.map +1 -1
  671. package/dist/i18n.js.map +1 -1
  672. package/dist/index.d.ts +68 -66
  673. package/dist/index.d.ts.map +1 -1
  674. package/dist/index.js +76 -76
  675. package/dist/index.js.map +1 -1
  676. package/dist/lexical/EditorPlugin.d.ts +8 -0
  677. package/dist/lexical/EditorPlugin.d.ts.map +1 -0
  678. package/dist/lexical/EditorPlugin.js +15 -0
  679. package/dist/lexical/EditorPlugin.js.map +1 -0
  680. package/dist/lexical/LexicalEditor.d.ts.map +1 -0
  681. package/dist/lexical/LexicalEditor.js +192 -0
  682. package/dist/lexical/LexicalEditor.js.map +1 -0
  683. package/dist/lexical/LexicalProvider.d.ts +18 -0
  684. package/dist/lexical/LexicalProvider.d.ts.map +1 -0
  685. package/dist/lexical/LexicalProvider.js.map +1 -0
  686. package/dist/lexical/config/client/EditorConfigProvider.d.ts +35 -0
  687. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -0
  688. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -0
  689. package/dist/lexical/config/client/default.d.ts.map +1 -0
  690. package/dist/lexical/config/client/default.js.map +1 -0
  691. package/dist/lexical/config/client/loader.d.ts +12 -0
  692. package/dist/lexical/config/client/loader.d.ts.map +1 -0
  693. package/dist/lexical/config/client/loader.js +46 -0
  694. package/dist/lexical/config/client/loader.js.map +1 -0
  695. package/dist/lexical/config/client/sanitize.d.ts +7 -0
  696. package/dist/lexical/config/client/sanitize.d.ts.map +1 -0
  697. package/dist/lexical/config/client/sanitize.js +176 -0
  698. package/dist/lexical/config/client/sanitize.js.map +1 -0
  699. package/dist/lexical/config/server/default.d.ts +7 -0
  700. package/dist/lexical/config/server/default.d.ts.map +1 -0
  701. package/dist/lexical/config/server/default.js.map +1 -0
  702. package/dist/lexical/config/server/loader.d.ts +10 -0
  703. package/dist/lexical/config/server/loader.d.ts.map +1 -0
  704. package/dist/lexical/config/server/loader.js +120 -0
  705. package/dist/lexical/config/server/loader.js.map +1 -0
  706. package/dist/lexical/config/server/sanitize.d.ts +6 -0
  707. package/dist/lexical/config/server/sanitize.d.ts.map +1 -0
  708. package/dist/lexical/config/server/sanitize.js.map +1 -0
  709. package/dist/lexical/config/types.d.ts +24 -0
  710. package/dist/lexical/config/types.d.ts.map +1 -0
  711. package/dist/lexical/config/types.js.map +1 -0
  712. package/dist/lexical/nodes/index.d.ts.map +1 -0
  713. package/dist/lexical/nodes/index.js.map +1 -0
  714. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -0
  715. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -0
  716. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -0
  717. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -0
  718. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -0
  719. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -0
  720. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +39 -0
  721. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -0
  722. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -0
  723. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -0
  724. package/dist/lexical/plugins/SlashMenu/index.js +187 -0
  725. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -0
  726. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -0
  727. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -0
  728. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -0
  729. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -0
  730. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -0
  731. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -0
  732. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -0
  733. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -0
  734. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -0
  735. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -0
  736. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -0
  737. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -0
  738. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +9 -0
  739. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -0
  740. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -0
  741. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
  742. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
  743. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  744. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  745. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -0
  746. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -0
  747. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
  748. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
  749. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -0
  750. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -0
  751. package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -0
  752. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -0
  753. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -0
  754. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -0
  755. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -0
  756. package/dist/lexical/theme/EditorTheme.js.map +1 -0
  757. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -0
  758. package/dist/lexical/ui/ContentEditable.js.map +1 -0
  759. package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -0
  760. package/dist/lexical/ui/icons/AI/index.js.map +1 -0
  761. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -0
  762. package/dist/lexical/ui/icons/Add/index.js.map +1 -0
  763. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -0
  764. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -0
  765. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -0
  766. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -0
  767. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -0
  768. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -0
  769. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -0
  770. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -0
  771. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -0
  772. package/dist/lexical/ui/icons/Block/index.js.map +1 -0
  773. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -0
  774. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -0
  775. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -0
  776. package/dist/lexical/ui/icons/Bold/index.js.map +1 -0
  777. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -0
  778. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -0
  779. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -0
  780. package/dist/lexical/ui/icons/Code/index.js.map +1 -0
  781. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -0
  782. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -0
  783. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -0
  784. package/dist/lexical/ui/icons/H1/index.js.map +1 -0
  785. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -0
  786. package/dist/lexical/ui/icons/H2/index.js.map +1 -0
  787. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -0
  788. package/dist/lexical/ui/icons/H3/index.js.map +1 -0
  789. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -0
  790. package/dist/lexical/ui/icons/H4/index.js.map +1 -0
  791. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -0
  792. package/dist/lexical/ui/icons/H5/index.js.map +1 -0
  793. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -0
  794. package/dist/lexical/ui/icons/H6/index.js.map +1 -0
  795. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  796. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  797. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -0
  798. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -0
  799. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -0
  800. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -0
  801. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -0
  802. package/dist/lexical/ui/icons/Italic/index.js.map +1 -0
  803. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -0
  804. package/dist/lexical/ui/icons/Link/index.js.map +1 -0
  805. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -0
  806. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -0
  807. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -0
  808. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -0
  809. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -0
  810. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -0
  811. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -0
  812. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -0
  813. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -0
  814. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -0
  815. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -0
  816. package/dist/lexical/ui/icons/Text/index.js.map +1 -0
  817. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -0
  818. package/dist/lexical/ui/icons/Underline/index.js.map +1 -0
  819. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -0
  820. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -0
  821. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -0
  822. package/dist/lexical/ui/icons/Upload/index.js.map +1 -0
  823. package/dist/lexical/utils/canUseDOM.d.ts.map +1 -0
  824. package/dist/lexical/utils/canUseDOM.js.map +1 -0
  825. package/dist/lexical/utils/cloneDeep.d.ts.map +1 -0
  826. package/dist/lexical/utils/cloneDeep.js +50 -0
  827. package/dist/lexical/utils/cloneDeep.js.map +1 -0
  828. package/dist/lexical/utils/environment.d.ts.map +1 -0
  829. package/dist/lexical/utils/environment.js.map +1 -0
  830. package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -0
  831. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -0
  832. package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -0
  833. package/dist/lexical/utils/getSelectedNode.js.map +1 -0
  834. package/dist/lexical/utils/guard.d.ts.map +1 -0
  835. package/dist/lexical/utils/guard.js.map +1 -0
  836. package/dist/lexical/utils/invariant.d.ts.map +1 -0
  837. package/dist/lexical/utils/invariant.js.map +1 -0
  838. package/dist/lexical/utils/joinClasses.d.ts.map +1 -0
  839. package/dist/lexical/utils/joinClasses.js.map +1 -0
  840. package/dist/lexical/utils/markdown/createBlockNode.d.ts +4 -0
  841. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -0
  842. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -0
  843. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -0
  844. package/dist/lexical/utils/nodeFormat.js.map +1 -0
  845. package/dist/lexical/utils/point.d.ts.map +1 -0
  846. package/dist/lexical/utils/point.js.map +1 -0
  847. package/dist/lexical/utils/rect.d.ts.map +1 -0
  848. package/dist/lexical/utils/rect.js.map +1 -0
  849. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -0
  850. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -0
  851. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
  852. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  853. package/dist/lexical/utils/swipe.d.ts.map +1 -0
  854. package/dist/lexical/utils/swipe.js.map +1 -0
  855. package/dist/lexical/utils/url.d.ts.map +1 -0
  856. package/dist/lexical/utils/url.js.map +1 -0
  857. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  858. package/dist/populateGraphQL/populate.d.ts +3 -3
  859. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  860. package/dist/populateGraphQL/populate.js +2 -2
  861. package/dist/populateGraphQL/populate.js.map +1 -1
  862. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  863. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +1 -1
  864. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  865. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -1
  866. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  867. package/dist/types.d.ts +7 -7
  868. package/dist/types.d.ts.map +1 -1
  869. package/dist/types.js.map +1 -1
  870. package/dist/utilities/createClientFeature.d.ts +13 -0
  871. package/dist/utilities/createClientFeature.d.ts.map +1 -0
  872. package/dist/utilities/createClientFeature.js +30 -0
  873. package/dist/utilities/createClientFeature.js.map +1 -0
  874. package/dist/utilities/createServerFeature.d.ts +16 -0
  875. package/dist/utilities/createServerFeature.d.ts.map +1 -0
  876. package/dist/utilities/createServerFeature.js +34 -0
  877. package/dist/utilities/createServerFeature.js.map +1 -0
  878. package/dist/utilities/forEachNodeRecursively.d.ts.map +1 -0
  879. package/dist/utilities/forEachNodeRecursively.js.map +1 -0
  880. package/dist/utilities/generateComponentMap.d.ts +6 -0
  881. package/dist/utilities/generateComponentMap.d.ts.map +1 -0
  882. package/dist/utilities/generateComponentMap.js +77 -0
  883. package/dist/utilities/generateComponentMap.js.map +1 -0
  884. package/dist/utilities/generateSchemaMap.d.ts +6 -0
  885. package/dist/utilities/generateSchemaMap.d.ts.map +1 -0
  886. package/dist/utilities/generateSchemaMap.js +22 -0
  887. package/dist/utilities/generateSchemaMap.js.map +1 -0
  888. package/dist/utilities/recurseNodeTree.d.ts.map +1 -0
  889. package/dist/utilities/recurseNodeTree.js.map +1 -0
  890. package/dist/utilities/useLexicalFeature.d.ts +3 -0
  891. package/dist/utilities/useLexicalFeature.d.ts.map +1 -0
  892. package/dist/utilities/useLexicalFeature.js +12 -0
  893. package/dist/utilities/useLexicalFeature.js.map +1 -0
  894. package/dist/validate/index.d.ts +1 -1
  895. package/dist/validate/index.d.ts.map +1 -1
  896. package/dist/validate/index.js.map +1 -1
  897. package/dist/validate/validateNodes.d.ts +1 -1
  898. package/dist/validate/validateNodes.js.map +1 -1
  899. package/package.json +14 -14
  900. package/dist/exports/client/Component-6AVANNNR.js +0 -2
  901. package/dist/exports/client/Component-6AVANNNR.js.map +0 -7
  902. package/dist/exports/client/Component-SZVAYRJX.js +0 -2
  903. package/dist/exports/client/Component-SZVAYRJX.js.map +0 -7
  904. package/dist/exports/client/Field-U5PHZTST.js +0 -2
  905. package/dist/exports/client/Field-U5PHZTST.js.map +0 -7
  906. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js +0 -2
  907. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js.map +0 -7
  908. package/dist/exports/client/chunk-35NZOHAF.js +0 -2
  909. package/dist/exports/client/chunk-35NZOHAF.js.map +0 -7
  910. package/dist/exports/client/chunk-3PZ2ZFQG.js +0 -3
  911. package/dist/exports/client/chunk-3PZ2ZFQG.js.map +0 -7
  912. package/dist/exports/client/chunk-FSTRW2TI.js +0 -2
  913. package/dist/exports/client/chunk-FSTRW2TI.js.map +0 -7
  914. package/dist/exports/client/chunk-M6MN4CA5.js +0 -2
  915. package/dist/exports/client/chunk-M6MN4CA5.js.map +0 -7
  916. package/dist/exports/client/chunk-Y5455JF3.js +0 -2
  917. package/dist/exports/client/chunk-Y5455JF3.js.map +0 -7
  918. package/dist/exports/client/component-FFLILIUZ.js +0 -2
  919. package/dist/exports/client/component-FFLILIUZ.js.map +0 -7
  920. package/dist/exports/client/component-RAVN56DE.js +0 -2
  921. package/dist/exports/client/component-RAVN56DE.js.map +0 -7
  922. package/dist/exports/client/component-Z34HXRX3.js +0 -2
  923. package/dist/exports/client/component-Z34HXRX3.js.map +0 -7
  924. package/dist/field/features/align/feature.client.d.ts +0 -6
  925. package/dist/field/features/align/feature.client.d.ts.map +0 -1
  926. package/dist/field/features/align/feature.client.js +0 -153
  927. package/dist/field/features/align/feature.client.js.map +0 -1
  928. package/dist/field/features/align/feature.server.d.ts +0 -3
  929. package/dist/field/features/align/feature.server.d.ts.map +0 -1
  930. package/dist/field/features/align/feature.server.js +0 -19
  931. package/dist/field/features/align/feature.server.js.map +0 -1
  932. package/dist/field/features/align/i18n.d.ts.map +0 -1
  933. package/dist/field/features/align/i18n.js.map +0 -1
  934. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +0 -1
  935. package/dist/field/features/align/toolbarAlignGroup.js.map +0 -1
  936. package/dist/field/features/blockquote/feature.client.d.ts +0 -6
  937. package/dist/field/features/blockquote/feature.client.d.ts.map +0 -1
  938. package/dist/field/features/blockquote/feature.client.js +0 -84
  939. package/dist/field/features/blockquote/feature.client.js.map +0 -1
  940. package/dist/field/features/blockquote/feature.server.d.ts +0 -3
  941. package/dist/field/features/blockquote/feature.server.d.ts.map +0 -1
  942. package/dist/field/features/blockquote/feature.server.js +0 -50
  943. package/dist/field/features/blockquote/feature.server.js.map +0 -1
  944. package/dist/field/features/blockquote/i18n.d.ts.map +0 -1
  945. package/dist/field/features/blockquote/i18n.js.map +0 -1
  946. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +0 -1
  947. package/dist/field/features/blockquote/markdownTransformer.js.map +0 -1
  948. package/dist/field/features/blocks/component/BlockContent.d.ts +0 -27
  949. package/dist/field/features/blocks/component/BlockContent.d.ts.map +0 -1
  950. package/dist/field/features/blocks/component/BlockContent.js +0 -193
  951. package/dist/field/features/blocks/component/BlockContent.js.map +0 -1
  952. package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +0 -1
  953. package/dist/field/features/blocks/component/FormSavePlugin.js +0 -29
  954. package/dist/field/features/blocks/component/FormSavePlugin.js.map +0 -1
  955. package/dist/field/features/blocks/component/index.d.ts.map +0 -1
  956. package/dist/field/features/blocks/component/index.js +0 -158
  957. package/dist/field/features/blocks/component/index.js.map +0 -1
  958. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +0 -1
  959. package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +0 -1
  960. package/dist/field/features/blocks/drawer/index.d.ts.map +0 -1
  961. package/dist/field/features/blocks/drawer/index.js +0 -78
  962. package/dist/field/features/blocks/drawer/index.js.map +0 -1
  963. package/dist/field/features/blocks/feature.client.d.ts +0 -10
  964. package/dist/field/features/blocks/feature.client.d.ts.map +0 -1
  965. package/dist/field/features/blocks/feature.client.js +0 -92
  966. package/dist/field/features/blocks/feature.client.js.map +0 -1
  967. package/dist/field/features/blocks/feature.server.d.ts +0 -8
  968. package/dist/field/features/blocks/feature.server.d.ts.map +0 -1
  969. package/dist/field/features/blocks/feature.server.js +0 -107
  970. package/dist/field/features/blocks/feature.server.js.map +0 -1
  971. package/dist/field/features/blocks/graphQLPopulationPromise.d.ts +0 -5
  972. package/dist/field/features/blocks/graphQLPopulationPromise.d.ts.map +0 -1
  973. package/dist/field/features/blocks/graphQLPopulationPromise.js +0 -31
  974. package/dist/field/features/blocks/graphQLPopulationPromise.js.map +0 -1
  975. package/dist/field/features/blocks/i18n.d.ts.map +0 -1
  976. package/dist/field/features/blocks/i18n.js.map +0 -1
  977. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +0 -1
  978. package/dist/field/features/blocks/nodes/BlocksNode.js.map +0 -1
  979. package/dist/field/features/blocks/plugin/commands.d.ts.map +0 -1
  980. package/dist/field/features/blocks/plugin/commands.js.map +0 -1
  981. package/dist/field/features/blocks/plugin/index.d.ts +0 -6
  982. package/dist/field/features/blocks/plugin/index.d.ts.map +0 -1
  983. package/dist/field/features/blocks/plugin/index.js.map +0 -1
  984. package/dist/field/features/blocks/validate.d.ts +0 -5
  985. package/dist/field/features/blocks/validate.d.ts.map +0 -1
  986. package/dist/field/features/blocks/validate.js.map +0 -1
  987. package/dist/field/features/converters/html/converter/converters/linebreak.d.ts.map +0 -1
  988. package/dist/field/features/converters/html/converter/converters/linebreak.js.map +0 -1
  989. package/dist/field/features/converters/html/converter/converters/paragraph.d.ts.map +0 -1
  990. package/dist/field/features/converters/html/converter/converters/paragraph.js +0 -20
  991. package/dist/field/features/converters/html/converter/converters/paragraph.js.map +0 -1
  992. package/dist/field/features/converters/html/converter/converters/text.d.ts.map +0 -1
  993. package/dist/field/features/converters/html/converter/converters/text.js.map +0 -1
  994. package/dist/field/features/converters/html/converter/defaultConverters.d.ts.map +0 -1
  995. package/dist/field/features/converters/html/converter/defaultConverters.js.map +0 -1
  996. package/dist/field/features/converters/html/converter/index.d.ts +0 -21
  997. package/dist/field/features/converters/html/converter/index.d.ts.map +0 -1
  998. package/dist/field/features/converters/html/converter/index.js +0 -44
  999. package/dist/field/features/converters/html/converter/index.js.map +0 -1
  1000. package/dist/field/features/converters/html/converter/types.d.ts +0 -19
  1001. package/dist/field/features/converters/html/converter/types.d.ts.map +0 -1
  1002. package/dist/field/features/converters/html/converter/types.js.map +0 -1
  1003. package/dist/field/features/converters/html/feature.server.d.ts +0 -9
  1004. package/dist/field/features/converters/html/feature.server.d.ts.map +0 -1
  1005. package/dist/field/features/converters/html/feature.server.js +0 -14
  1006. package/dist/field/features/converters/html/feature.server.js.map +0 -1
  1007. package/dist/field/features/converters/html/field/index.d.ts.map +0 -1
  1008. package/dist/field/features/converters/html/field/index.js +0 -154
  1009. package/dist/field/features/converters/html/field/index.js.map +0 -1
  1010. package/dist/field/features/createClientComponent.d.ts +0 -6
  1011. package/dist/field/features/createClientComponent.d.ts.map +0 -1
  1012. package/dist/field/features/createClientComponent.js +0 -12
  1013. package/dist/field/features/createClientComponent.js.map +0 -1
  1014. package/dist/field/features/createFeaturePropComponent.d.ts.map +0 -1
  1015. package/dist/field/features/createFeaturePropComponent.js +0 -18
  1016. package/dist/field/features/createFeaturePropComponent.js.map +0 -1
  1017. package/dist/field/features/debug/testRecorder/feature.client.d.ts +0 -6
  1018. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +0 -1
  1019. package/dist/field/features/debug/testRecorder/feature.client.js +0 -20
  1020. package/dist/field/features/debug/testRecorder/feature.client.js.map +0 -1
  1021. package/dist/field/features/debug/testRecorder/feature.server.d.ts +0 -3
  1022. package/dist/field/features/debug/testRecorder/feature.server.d.ts.map +0 -1
  1023. package/dist/field/features/debug/testRecorder/feature.server.js +0 -16
  1024. package/dist/field/features/debug/testRecorder/feature.server.js.map +0 -1
  1025. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +0 -5
  1026. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +0 -1
  1027. package/dist/field/features/debug/testRecorder/plugin/index.js.map +0 -1
  1028. package/dist/field/features/debug/treeView/feature.client.d.ts +0 -6
  1029. package/dist/field/features/debug/treeView/feature.client.d.ts.map +0 -1
  1030. package/dist/field/features/debug/treeView/feature.client.js +0 -20
  1031. package/dist/field/features/debug/treeView/feature.client.js.map +0 -1
  1032. package/dist/field/features/debug/treeView/feature.server.d.ts +0 -3
  1033. package/dist/field/features/debug/treeView/feature.server.d.ts.map +0 -1
  1034. package/dist/field/features/debug/treeView/feature.server.js +0 -16
  1035. package/dist/field/features/debug/treeView/feature.server.js.map +0 -1
  1036. package/dist/field/features/debug/treeView/plugin/index.d.ts +0 -4
  1037. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +0 -1
  1038. package/dist/field/features/debug/treeView/plugin/index.js.map +0 -1
  1039. package/dist/field/features/format/bold/feature.client.d.ts +0 -6
  1040. package/dist/field/features/format/bold/feature.client.d.ts.map +0 -1
  1041. package/dist/field/features/format/bold/feature.client.js +0 -51
  1042. package/dist/field/features/format/bold/feature.client.js.map +0 -1
  1043. package/dist/field/features/format/bold/feature.server.d.ts +0 -3
  1044. package/dist/field/features/format/bold/feature.server.d.ts.map +0 -1
  1045. package/dist/field/features/format/bold/feature.server.js +0 -28
  1046. package/dist/field/features/format/bold/feature.server.js.map +0 -1
  1047. package/dist/field/features/format/bold/markdownTransformers.d.ts.map +0 -1
  1048. package/dist/field/features/format/bold/markdownTransformers.js.map +0 -1
  1049. package/dist/field/features/format/inlineCode/feature.client.d.ts +0 -6
  1050. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +0 -1
  1051. package/dist/field/features/format/inlineCode/feature.client.js +0 -46
  1052. package/dist/field/features/format/inlineCode/feature.client.js.map +0 -1
  1053. package/dist/field/features/format/inlineCode/feature.server.d.ts +0 -3
  1054. package/dist/field/features/format/inlineCode/feature.server.d.ts.map +0 -1
  1055. package/dist/field/features/format/inlineCode/feature.server.js +0 -20
  1056. package/dist/field/features/format/inlineCode/feature.server.js.map +0 -1
  1057. package/dist/field/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  1058. package/dist/field/features/format/inlineCode/markdownTransformers.js.map +0 -1
  1059. package/dist/field/features/format/italic/feature.client.d.ts +0 -6
  1060. package/dist/field/features/format/italic/feature.client.d.ts.map +0 -1
  1061. package/dist/field/features/format/italic/feature.client.js +0 -47
  1062. package/dist/field/features/format/italic/feature.client.js.map +0 -1
  1063. package/dist/field/features/format/italic/feature.server.d.ts +0 -3
  1064. package/dist/field/features/format/italic/feature.server.d.ts.map +0 -1
  1065. package/dist/field/features/format/italic/feature.server.js +0 -21
  1066. package/dist/field/features/format/italic/feature.server.js.map +0 -1
  1067. package/dist/field/features/format/italic/markdownTransformers.d.ts.map +0 -1
  1068. package/dist/field/features/format/italic/markdownTransformers.js.map +0 -1
  1069. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +0 -1
  1070. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +0 -1
  1071. package/dist/field/features/format/strikethrough/feature.client.d.ts +0 -6
  1072. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +0 -1
  1073. package/dist/field/features/format/strikethrough/feature.client.js +0 -46
  1074. package/dist/field/features/format/strikethrough/feature.client.js.map +0 -1
  1075. package/dist/field/features/format/strikethrough/feature.server.d.ts +0 -3
  1076. package/dist/field/features/format/strikethrough/feature.server.d.ts.map +0 -1
  1077. package/dist/field/features/format/strikethrough/feature.server.js +0 -20
  1078. package/dist/field/features/format/strikethrough/feature.server.js.map +0 -1
  1079. package/dist/field/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  1080. package/dist/field/features/format/strikethrough/markdownTransformers.js.map +0 -1
  1081. package/dist/field/features/format/subscript/feature.client.d.ts +0 -6
  1082. package/dist/field/features/format/subscript/feature.client.d.ts.map +0 -1
  1083. package/dist/field/features/format/subscript/feature.client.js +0 -42
  1084. package/dist/field/features/format/subscript/feature.client.js.map +0 -1
  1085. package/dist/field/features/format/subscript/feature.server.d.ts +0 -3
  1086. package/dist/field/features/format/subscript/feature.server.d.ts.map +0 -1
  1087. package/dist/field/features/format/subscript/feature.server.js +0 -16
  1088. package/dist/field/features/format/subscript/feature.server.js.map +0 -1
  1089. package/dist/field/features/format/superscript/feature.client.d.ts +0 -6
  1090. package/dist/field/features/format/superscript/feature.client.d.ts.map +0 -1
  1091. package/dist/field/features/format/superscript/feature.client.js +0 -42
  1092. package/dist/field/features/format/superscript/feature.client.js.map +0 -1
  1093. package/dist/field/features/format/superscript/feature.server.d.ts +0 -3
  1094. package/dist/field/features/format/superscript/feature.server.d.ts.map +0 -1
  1095. package/dist/field/features/format/superscript/feature.server.js +0 -16
  1096. package/dist/field/features/format/superscript/feature.server.js.map +0 -1
  1097. package/dist/field/features/format/underline/feature.client.d.ts +0 -6
  1098. package/dist/field/features/format/underline/feature.client.d.ts.map +0 -1
  1099. package/dist/field/features/format/underline/feature.client.js +0 -42
  1100. package/dist/field/features/format/underline/feature.client.js.map +0 -1
  1101. package/dist/field/features/format/underline/feature.server.d.ts +0 -3
  1102. package/dist/field/features/format/underline/feature.server.d.ts.map +0 -1
  1103. package/dist/field/features/format/underline/feature.server.js +0 -16
  1104. package/dist/field/features/format/underline/feature.server.js.map +0 -1
  1105. package/dist/field/features/heading/feature.client.d.ts +0 -7
  1106. package/dist/field/features/heading/feature.client.d.ts.map +0 -1
  1107. package/dist/field/features/heading/feature.client.js +0 -118
  1108. package/dist/field/features/heading/feature.client.js.map +0 -1
  1109. package/dist/field/features/heading/feature.server.d.ts +0 -7
  1110. package/dist/field/features/heading/feature.server.d.ts.map +0 -1
  1111. package/dist/field/features/heading/feature.server.js +0 -61
  1112. package/dist/field/features/heading/feature.server.js.map +0 -1
  1113. package/dist/field/features/heading/i18n.d.ts.map +0 -1
  1114. package/dist/field/features/heading/i18n.js.map +0 -1
  1115. package/dist/field/features/heading/markdownTransformer.d.ts.map +0 -1
  1116. package/dist/field/features/heading/markdownTransformer.js.map +0 -1
  1117. package/dist/field/features/horizontalRule/component/index.d.ts.map +0 -1
  1118. package/dist/field/features/horizontalRule/component/index.js.map +0 -1
  1119. package/dist/field/features/horizontalRule/feature.client.d.ts +0 -6
  1120. package/dist/field/features/horizontalRule/feature.client.d.ts.map +0 -1
  1121. package/dist/field/features/horizontalRule/feature.client.js +0 -77
  1122. package/dist/field/features/horizontalRule/feature.client.js.map +0 -1
  1123. package/dist/field/features/horizontalRule/feature.server.d.ts +0 -3
  1124. package/dist/field/features/horizontalRule/feature.server.d.ts.map +0 -1
  1125. package/dist/field/features/horizontalRule/feature.server.js +0 -39
  1126. package/dist/field/features/horizontalRule/feature.server.js.map +0 -1
  1127. package/dist/field/features/horizontalRule/i18n.d.ts.map +0 -1
  1128. package/dist/field/features/horizontalRule/i18n.js.map +0 -1
  1129. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +0 -1
  1130. package/dist/field/features/horizontalRule/markdownTransformer.js.map +0 -1
  1131. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +0 -1
  1132. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +0 -1
  1133. package/dist/field/features/horizontalRule/plugin/index.d.ts +0 -7
  1134. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +0 -1
  1135. package/dist/field/features/horizontalRule/plugin/index.js.map +0 -1
  1136. package/dist/field/features/indent/feature.client.d.ts +0 -6
  1137. package/dist/field/features/indent/feature.client.d.ts.map +0 -1
  1138. package/dist/field/features/indent/feature.client.js +0 -63
  1139. package/dist/field/features/indent/feature.client.js.map +0 -1
  1140. package/dist/field/features/indent/feature.server.d.ts +0 -3
  1141. package/dist/field/features/indent/feature.server.d.ts.map +0 -1
  1142. package/dist/field/features/indent/feature.server.js +0 -19
  1143. package/dist/field/features/indent/feature.server.js.map +0 -1
  1144. package/dist/field/features/indent/i18n.d.ts.map +0 -1
  1145. package/dist/field/features/indent/i18n.js.map +0 -1
  1146. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +0 -1
  1147. package/dist/field/features/indent/toolbarIndentGroup.js.map +0 -1
  1148. package/dist/field/features/link/drawer/baseFields.d.ts +0 -3
  1149. package/dist/field/features/link/drawer/baseFields.d.ts.map +0 -1
  1150. package/dist/field/features/link/drawer/baseFields.js.map +0 -1
  1151. package/dist/field/features/link/drawer/index.d.ts.map +0 -1
  1152. package/dist/field/features/link/drawer/index.js +0 -94
  1153. package/dist/field/features/link/drawer/index.js.map +0 -1
  1154. package/dist/field/features/link/drawer/types.d.ts.map +0 -1
  1155. package/dist/field/features/link/drawer/types.js.map +0 -1
  1156. package/dist/field/features/link/feature.client.d.ts +0 -17
  1157. package/dist/field/features/link/feature.client.d.ts.map +0 -1
  1158. package/dist/field/features/link/feature.client.js +0 -108
  1159. package/dist/field/features/link/feature.client.js.map +0 -1
  1160. package/dist/field/features/link/feature.server.d.ts +0 -37
  1161. package/dist/field/features/link/feature.server.d.ts.map +0 -1
  1162. package/dist/field/features/link/feature.server.js +0 -140
  1163. package/dist/field/features/link/feature.server.js.map +0 -1
  1164. package/dist/field/features/link/graphQLPopulationPromise.d.ts +0 -5
  1165. package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +0 -1
  1166. package/dist/field/features/link/graphQLPopulationPromise.js +0 -31
  1167. package/dist/field/features/link/graphQLPopulationPromise.js.map +0 -1
  1168. package/dist/field/features/link/i18n.d.ts.map +0 -1
  1169. package/dist/field/features/link/i18n.js.map +0 -1
  1170. package/dist/field/features/link/markdownTransformer.d.ts.map +0 -1
  1171. package/dist/field/features/link/markdownTransformer.js.map +0 -1
  1172. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +0 -1
  1173. package/dist/field/features/link/nodes/AutoLinkNode.js.map +0 -1
  1174. package/dist/field/features/link/nodes/LinkNode.d.ts.map +0 -1
  1175. package/dist/field/features/link/nodes/LinkNode.js.map +0 -1
  1176. package/dist/field/features/link/nodes/types.d.ts.map +0 -1
  1177. package/dist/field/features/link/nodes/types.js.map +0 -1
  1178. package/dist/field/features/link/plugins/autoLink/index.d.ts +0 -20
  1179. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +0 -1
  1180. package/dist/field/features/link/plugins/autoLink/index.js.map +0 -1
  1181. package/dist/field/features/link/plugins/clickableLink/index.d.ts +0 -4
  1182. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +0 -1
  1183. package/dist/field/features/link/plugins/clickableLink/index.js.map +0 -1
  1184. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +0 -1
  1185. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +0 -1
  1186. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +0 -1
  1187. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +0 -295
  1188. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +0 -1
  1189. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +0 -5
  1190. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +0 -1
  1191. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +0 -1
  1192. package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts.map +0 -1
  1193. package/dist/field/features/link/plugins/floatingLinkEditor/types.js.map +0 -1
  1194. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +0 -9
  1195. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +0 -1
  1196. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +0 -1
  1197. package/dist/field/features/link/plugins/link/index.d.ts +0 -4
  1198. package/dist/field/features/link/plugins/link/index.d.ts.map +0 -1
  1199. package/dist/field/features/link/plugins/link/index.js.map +0 -1
  1200. package/dist/field/features/link/validate.d.ts +0 -6
  1201. package/dist/field/features/link/validate.d.ts.map +0 -1
  1202. package/dist/field/features/link/validate.js.map +0 -1
  1203. package/dist/field/features/lists/checklist/feature.client.d.ts +0 -6
  1204. package/dist/field/features/lists/checklist/feature.client.d.ts.map +0 -1
  1205. package/dist/field/features/lists/checklist/feature.client.js +0 -107
  1206. package/dist/field/features/lists/checklist/feature.client.js.map +0 -1
  1207. package/dist/field/features/lists/checklist/feature.server.d.ts +0 -3
  1208. package/dist/field/features/lists/checklist/feature.server.d.ts.map +0 -1
  1209. package/dist/field/features/lists/checklist/feature.server.js +0 -39
  1210. package/dist/field/features/lists/checklist/feature.server.js.map +0 -1
  1211. package/dist/field/features/lists/checklist/i18n.d.ts.map +0 -1
  1212. package/dist/field/features/lists/checklist/i18n.js.map +0 -1
  1213. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  1214. package/dist/field/features/lists/checklist/markdownTransformers.js.map +0 -1
  1215. package/dist/field/features/lists/checklist/plugin/index.d.ts +0 -3
  1216. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +0 -1
  1217. package/dist/field/features/lists/checklist/plugin/index.js.map +0 -1
  1218. package/dist/field/features/lists/htmlConverter.d.ts.map +0 -1
  1219. package/dist/field/features/lists/htmlConverter.js +0 -56
  1220. package/dist/field/features/lists/htmlConverter.js.map +0 -1
  1221. package/dist/field/features/lists/orderedList/feature.client.d.ts +0 -6
  1222. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +0 -1
  1223. package/dist/field/features/lists/orderedList/feature.client.js +0 -97
  1224. package/dist/field/features/lists/orderedList/feature.client.js.map +0 -1
  1225. package/dist/field/features/lists/orderedList/feature.server.d.ts +0 -3
  1226. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +0 -1
  1227. package/dist/field/features/lists/orderedList/feature.server.js +0 -39
  1228. package/dist/field/features/lists/orderedList/feature.server.js.map +0 -1
  1229. package/dist/field/features/lists/orderedList/i18n.d.ts.map +0 -1
  1230. package/dist/field/features/lists/orderedList/i18n.js.map +0 -1
  1231. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  1232. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +0 -1
  1233. package/dist/field/features/lists/plugin/index.d.ts +0 -3
  1234. package/dist/field/features/lists/plugin/index.d.ts.map +0 -1
  1235. package/dist/field/features/lists/plugin/index.js.map +0 -1
  1236. package/dist/field/features/lists/shared/markdown.d.ts +0 -6
  1237. package/dist/field/features/lists/shared/markdown.d.ts.map +0 -1
  1238. package/dist/field/features/lists/shared/markdown.js.map +0 -1
  1239. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +0 -1
  1240. package/dist/field/features/lists/shared/slashMenuListGroup.js.map +0 -1
  1241. package/dist/field/features/lists/unorderedList/feature.client.d.ts +0 -6
  1242. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +0 -1
  1243. package/dist/field/features/lists/unorderedList/feature.client.js +0 -97
  1244. package/dist/field/features/lists/unorderedList/feature.client.js.map +0 -1
  1245. package/dist/field/features/lists/unorderedList/feature.server.d.ts +0 -3
  1246. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +0 -1
  1247. package/dist/field/features/lists/unorderedList/feature.server.js +0 -39
  1248. package/dist/field/features/lists/unorderedList/feature.server.js.map +0 -1
  1249. package/dist/field/features/lists/unorderedList/i18n.d.ts.map +0 -1
  1250. package/dist/field/features/lists/unorderedList/i18n.js.map +0 -1
  1251. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  1252. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  1253. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -6
  1254. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +0 -1
  1255. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +0 -1
  1256. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  1257. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  1258. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +0 -1
  1259. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +0 -8
  1260. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +0 -1
  1261. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -6
  1262. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +0 -1
  1263. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +0 -1
  1264. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  1265. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  1266. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +0 -1
  1267. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +0 -8
  1268. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +0 -1
  1269. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -6
  1270. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +0 -1
  1271. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +0 -1
  1272. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  1273. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  1274. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +0 -1
  1275. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +0 -8
  1276. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +0 -1
  1277. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -6
  1278. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +0 -1
  1279. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +0 -1
  1280. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  1281. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  1282. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +0 -1
  1283. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +0 -8
  1284. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +0 -1
  1285. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -6
  1286. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +0 -1
  1287. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +0 -1
  1288. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  1289. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  1290. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +0 -1
  1291. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +0 -8
  1292. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +0 -1
  1293. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -6
  1294. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +0 -1
  1295. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +0 -1
  1296. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  1297. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  1298. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +0 -1
  1299. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +0 -8
  1300. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +0 -1
  1301. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -6
  1302. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +0 -1
  1303. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +0 -1
  1304. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  1305. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  1306. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +0 -1
  1307. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +0 -8
  1308. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +0 -1
  1309. package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  1310. package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  1311. package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  1312. package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  1313. package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -31
  1314. package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  1315. package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  1316. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -6
  1317. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  1318. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.js +0 -34
  1319. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  1320. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -9
  1321. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  1322. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +0 -48
  1323. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  1324. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  1325. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  1326. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  1327. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  1328. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -6
  1329. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +0 -1
  1330. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +0 -1
  1331. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  1332. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  1333. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +0 -1
  1334. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +0 -8
  1335. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +0 -1
  1336. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -6
  1337. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +0 -1
  1338. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.js.map +0 -1
  1339. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  1340. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  1341. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +0 -1
  1342. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.js +0 -8
  1343. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.js.map +0 -1
  1344. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -6
  1345. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +0 -1
  1346. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.js.map +0 -1
  1347. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  1348. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  1349. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +0 -1
  1350. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.js +0 -8
  1351. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.js.map +0 -1
  1352. package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -6
  1353. package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +0 -1
  1354. package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.js.map +0 -1
  1355. package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  1356. package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  1357. package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +0 -1
  1358. package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.js +0 -8
  1359. package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.js.map +0 -1
  1360. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -6
  1361. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +0 -1
  1362. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +0 -1
  1363. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  1364. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  1365. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +0 -1
  1366. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.js +0 -8
  1367. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +0 -1
  1368. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -6
  1369. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +0 -1
  1370. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +0 -1
  1371. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  1372. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  1373. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +0 -1
  1374. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.js +0 -8
  1375. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +0 -1
  1376. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -6
  1377. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +0 -1
  1378. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +0 -1
  1379. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  1380. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  1381. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +0 -1
  1382. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.js +0 -8
  1383. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +0 -1
  1384. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -6
  1385. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +0 -1
  1386. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +0 -1
  1387. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  1388. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  1389. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +0 -1
  1390. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.js +0 -8
  1391. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +0 -1
  1392. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -6
  1393. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +0 -1
  1394. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +0 -1
  1395. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  1396. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  1397. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +0 -1
  1398. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +0 -8
  1399. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +0 -1
  1400. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -6
  1401. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +0 -1
  1402. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.js.map +0 -1
  1403. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  1404. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  1405. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +0 -1
  1406. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.js +0 -8
  1407. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.js.map +0 -1
  1408. package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  1409. package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  1410. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  1411. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +0 -1
  1412. package/dist/field/features/migrations/slateToLexical/converter/types.d.ts +0 -25
  1413. package/dist/field/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  1414. package/dist/field/features/migrations/slateToLexical/converter/types.js.map +0 -1
  1415. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +0 -6
  1416. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  1417. package/dist/field/features/migrations/slateToLexical/feature.client.js +0 -34
  1418. package/dist/field/features/migrations/slateToLexical/feature.client.js.map +0 -1
  1419. package/dist/field/features/migrations/slateToLexical/feature.server.d.ts +0 -9
  1420. package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  1421. package/dist/field/features/migrations/slateToLexical/feature.server.js +0 -48
  1422. package/dist/field/features/migrations/slateToLexical/feature.server.js.map +0 -1
  1423. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  1424. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  1425. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  1426. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  1427. package/dist/field/features/paragraph/feature.client.d.ts +0 -6
  1428. package/dist/field/features/paragraph/feature.client.d.ts.map +0 -1
  1429. package/dist/field/features/paragraph/feature.client.js +0 -78
  1430. package/dist/field/features/paragraph/feature.client.js.map +0 -1
  1431. package/dist/field/features/paragraph/feature.server.d.ts +0 -3
  1432. package/dist/field/features/paragraph/feature.server.d.ts.map +0 -1
  1433. package/dist/field/features/paragraph/feature.server.js +0 -19
  1434. package/dist/field/features/paragraph/feature.server.js.map +0 -1
  1435. package/dist/field/features/paragraph/i18n.d.ts.map +0 -1
  1436. package/dist/field/features/paragraph/i18n.js.map +0 -1
  1437. package/dist/field/features/relationship/drawer/commands.d.ts.map +0 -1
  1438. package/dist/field/features/relationship/drawer/commands.js.map +0 -1
  1439. package/dist/field/features/relationship/drawer/index.d.ts.map +0 -1
  1440. package/dist/field/features/relationship/drawer/index.js +0 -83
  1441. package/dist/field/features/relationship/drawer/index.js.map +0 -1
  1442. package/dist/field/features/relationship/feature.client.d.ts +0 -19
  1443. package/dist/field/features/relationship/feature.client.d.ts.map +0 -1
  1444. package/dist/field/features/relationship/feature.client.js +0 -79
  1445. package/dist/field/features/relationship/feature.client.js.map +0 -1
  1446. package/dist/field/features/relationship/feature.server.d.ts +0 -27
  1447. package/dist/field/features/relationship/feature.server.d.ts.map +0 -1
  1448. package/dist/field/features/relationship/feature.server.js +0 -61
  1449. package/dist/field/features/relationship/feature.server.js.map +0 -1
  1450. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts +0 -5
  1451. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +0 -1
  1452. package/dist/field/features/relationship/graphQLPopulationPromise.js +0 -29
  1453. package/dist/field/features/relationship/graphQLPopulationPromise.js.map +0 -1
  1454. package/dist/field/features/relationship/i18n.d.ts.map +0 -1
  1455. package/dist/field/features/relationship/i18n.js.map +0 -1
  1456. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +0 -1
  1457. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +0 -1
  1458. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +0 -1
  1459. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +0 -172
  1460. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +0 -1
  1461. package/dist/field/features/relationship/plugins/index.d.ts +0 -7
  1462. package/dist/field/features/relationship/plugins/index.d.ts.map +0 -1
  1463. package/dist/field/features/relationship/plugins/index.js +0 -50
  1464. package/dist/field/features/relationship/plugins/index.js.map +0 -1
  1465. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +0 -1
  1466. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +0 -33
  1467. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +0 -1
  1468. package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +0 -1
  1469. package/dist/field/features/shared/slashMenu/basicGroup.js.map +0 -1
  1470. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +0 -1
  1471. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +0 -1
  1472. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +0 -1
  1473. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +0 -1
  1474. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +0 -1
  1475. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +0 -1
  1476. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +0 -5
  1477. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +0 -1
  1478. package/dist/field/features/toolbars/fixed/Toolbar/index.js +0 -207
  1479. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +0 -1
  1480. package/dist/field/features/toolbars/fixed/feature.client.d.ts +0 -7
  1481. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +0 -1
  1482. package/dist/field/features/toolbars/fixed/feature.client.js +0 -20
  1483. package/dist/field/features/toolbars/fixed/feature.client.js.map +0 -1
  1484. package/dist/field/features/toolbars/fixed/feature.server.d.ts +0 -19
  1485. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +0 -1
  1486. package/dist/field/features/toolbars/fixed/feature.server.js +0 -21
  1487. package/dist/field/features/toolbars/fixed/feature.server.js.map +0 -1
  1488. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +0 -4
  1489. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +0 -1
  1490. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +0 -1
  1491. package/dist/field/features/toolbars/inline/feature.client.d.ts +0 -6
  1492. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +0 -1
  1493. package/dist/field/features/toolbars/inline/feature.client.js +0 -20
  1494. package/dist/field/features/toolbars/inline/feature.client.js.map +0 -1
  1495. package/dist/field/features/toolbars/inline/feature.server.d.ts +0 -3
  1496. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +0 -1
  1497. package/dist/field/features/toolbars/inline/feature.server.js +0 -16
  1498. package/dist/field/features/toolbars/inline/feature.server.js.map +0 -1
  1499. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +0 -1
  1500. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +0 -1
  1501. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +0 -1
  1502. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +0 -1
  1503. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +0 -1
  1504. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +0 -141
  1505. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +0 -1
  1506. package/dist/field/features/toolbars/types.d.ts +0 -48
  1507. package/dist/field/features/toolbars/types.d.ts.map +0 -1
  1508. package/dist/field/features/toolbars/types.js.map +0 -1
  1509. package/dist/field/features/typeUtilities.d.ts +0 -8
  1510. package/dist/field/features/typeUtilities.d.ts.map +0 -1
  1511. package/dist/field/features/typeUtilities.js.map +0 -1
  1512. package/dist/field/features/types.d.ts +0 -468
  1513. package/dist/field/features/types.d.ts.map +0 -1
  1514. package/dist/field/features/types.js.map +0 -1
  1515. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +0 -1
  1516. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +0 -123
  1517. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +0 -1
  1518. package/dist/field/features/upload/component/index.d.ts.map +0 -1
  1519. package/dist/field/features/upload/component/index.js +0 -219
  1520. package/dist/field/features/upload/component/index.js.map +0 -1
  1521. package/dist/field/features/upload/drawer/commands.d.ts.map +0 -1
  1522. package/dist/field/features/upload/drawer/commands.js.map +0 -1
  1523. package/dist/field/features/upload/drawer/index.d.ts.map +0 -1
  1524. package/dist/field/features/upload/drawer/index.js +0 -77
  1525. package/dist/field/features/upload/drawer/index.js.map +0 -1
  1526. package/dist/field/features/upload/feature.client.d.ts +0 -13
  1527. package/dist/field/features/upload/feature.client.d.ts.map +0 -1
  1528. package/dist/field/features/upload/feature.client.js +0 -81
  1529. package/dist/field/features/upload/feature.client.js.map +0 -1
  1530. package/dist/field/features/upload/feature.server.d.ts +0 -19
  1531. package/dist/field/features/upload/feature.server.d.ts.map +0 -1
  1532. package/dist/field/features/upload/feature.server.js +0 -188
  1533. package/dist/field/features/upload/feature.server.js.map +0 -1
  1534. package/dist/field/features/upload/graphQLPopulationPromise.d.ts +0 -5
  1535. package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +0 -1
  1536. package/dist/field/features/upload/graphQLPopulationPromise.js +0 -52
  1537. package/dist/field/features/upload/graphQLPopulationPromise.js.map +0 -1
  1538. package/dist/field/features/upload/i18n.d.ts.map +0 -1
  1539. package/dist/field/features/upload/i18n.js.map +0 -1
  1540. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +0 -1
  1541. package/dist/field/features/upload/nodes/UploadNode.js.map +0 -1
  1542. package/dist/field/features/upload/plugin/index.d.ts +0 -8
  1543. package/dist/field/features/upload/plugin/index.d.ts.map +0 -1
  1544. package/dist/field/features/upload/plugin/index.js +0 -53
  1545. package/dist/field/features/upload/plugin/index.js.map +0 -1
  1546. package/dist/field/features/upload/validate.d.ts +0 -5
  1547. package/dist/field/features/upload/validate.d.ts.map +0 -1
  1548. package/dist/field/features/upload/validate.js.map +0 -1
  1549. package/dist/field/lexical/EditorPlugin.d.ts +0 -8
  1550. package/dist/field/lexical/EditorPlugin.d.ts.map +0 -1
  1551. package/dist/field/lexical/EditorPlugin.js +0 -15
  1552. package/dist/field/lexical/EditorPlugin.js.map +0 -1
  1553. package/dist/field/lexical/LexicalEditor.d.ts.map +0 -1
  1554. package/dist/field/lexical/LexicalEditor.js +0 -192
  1555. package/dist/field/lexical/LexicalEditor.js.map +0 -1
  1556. package/dist/field/lexical/LexicalProvider.d.ts +0 -18
  1557. package/dist/field/lexical/LexicalProvider.d.ts.map +0 -1
  1558. package/dist/field/lexical/LexicalProvider.js.map +0 -1
  1559. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +0 -35
  1560. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +0 -1
  1561. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +0 -1
  1562. package/dist/field/lexical/config/client/default.d.ts.map +0 -1
  1563. package/dist/field/lexical/config/client/default.js.map +0 -1
  1564. package/dist/field/lexical/config/client/loader.d.ts +0 -12
  1565. package/dist/field/lexical/config/client/loader.d.ts.map +0 -1
  1566. package/dist/field/lexical/config/client/loader.js +0 -46
  1567. package/dist/field/lexical/config/client/loader.js.map +0 -1
  1568. package/dist/field/lexical/config/client/sanitize.d.ts +0 -7
  1569. package/dist/field/lexical/config/client/sanitize.d.ts.map +0 -1
  1570. package/dist/field/lexical/config/client/sanitize.js +0 -176
  1571. package/dist/field/lexical/config/client/sanitize.js.map +0 -1
  1572. package/dist/field/lexical/config/server/default.d.ts +0 -7
  1573. package/dist/field/lexical/config/server/default.d.ts.map +0 -1
  1574. package/dist/field/lexical/config/server/default.js.map +0 -1
  1575. package/dist/field/lexical/config/server/loader.d.ts +0 -10
  1576. package/dist/field/lexical/config/server/loader.d.ts.map +0 -1
  1577. package/dist/field/lexical/config/server/loader.js +0 -120
  1578. package/dist/field/lexical/config/server/loader.js.map +0 -1
  1579. package/dist/field/lexical/config/server/sanitize.d.ts +0 -6
  1580. package/dist/field/lexical/config/server/sanitize.d.ts.map +0 -1
  1581. package/dist/field/lexical/config/server/sanitize.js.map +0 -1
  1582. package/dist/field/lexical/config/types.d.ts +0 -23
  1583. package/dist/field/lexical/config/types.d.ts.map +0 -1
  1584. package/dist/field/lexical/config/types.js.map +0 -1
  1585. package/dist/field/lexical/nodes/index.d.ts.map +0 -1
  1586. package/dist/field/lexical/nodes/index.js.map +0 -1
  1587. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +0 -1
  1588. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +0 -1
  1589. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +0 -1
  1590. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +0 -1
  1591. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +0 -1
  1592. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +0 -1
  1593. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +0 -31
  1594. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +0 -1
  1595. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +0 -3
  1596. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +0 -1
  1597. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +0 -1
  1598. package/dist/field/lexical/plugins/SlashMenu/index.js +0 -187
  1599. package/dist/field/lexical/plugins/SlashMenu/index.js.map +0 -1
  1600. package/dist/field/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +0 -1
  1601. package/dist/field/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +0 -1
  1602. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +0 -1
  1603. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +0 -1
  1604. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +0 -1
  1605. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +0 -1
  1606. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +0 -1
  1607. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +0 -1
  1608. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +0 -1
  1609. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +0 -1
  1610. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +0 -1
  1611. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +0 -1
  1612. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +0 -10
  1613. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +0 -1
  1614. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +0 -1
  1615. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +0 -1
  1616. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +0 -1
  1617. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +0 -1
  1618. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +0 -1
  1619. package/dist/field/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +0 -1
  1620. package/dist/field/lexical/plugins/handles/utils/getCollapsedMargins.js.map +0 -1
  1621. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +0 -1
  1622. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +0 -1
  1623. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +0 -1
  1624. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +0 -1
  1625. package/dist/field/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +0 -1
  1626. package/dist/field/lexical/plugins/handles/utils/isOnHandleElement.js.map +0 -1
  1627. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +0 -1
  1628. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +0 -1
  1629. package/dist/field/lexical/theme/EditorTheme.d.ts.map +0 -1
  1630. package/dist/field/lexical/theme/EditorTheme.js.map +0 -1
  1631. package/dist/field/lexical/ui/ContentEditable.d.ts.map +0 -1
  1632. package/dist/field/lexical/ui/ContentEditable.js.map +0 -1
  1633. package/dist/field/lexical/ui/icons/AI/index.d.ts.map +0 -1
  1634. package/dist/field/lexical/ui/icons/AI/index.js.map +0 -1
  1635. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +0 -1
  1636. package/dist/field/lexical/ui/icons/Add/index.js.map +0 -1
  1637. package/dist/field/lexical/ui/icons/AlignCenter/index.d.ts.map +0 -1
  1638. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +0 -1
  1639. package/dist/field/lexical/ui/icons/AlignJustify/index.d.ts.map +0 -1
  1640. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +0 -1
  1641. package/dist/field/lexical/ui/icons/AlignLeft/index.d.ts.map +0 -1
  1642. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +0 -1
  1643. package/dist/field/lexical/ui/icons/AlignRight/index.d.ts.map +0 -1
  1644. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +0 -1
  1645. package/dist/field/lexical/ui/icons/Block/index.d.ts.map +0 -1
  1646. package/dist/field/lexical/ui/icons/Block/index.js.map +0 -1
  1647. package/dist/field/lexical/ui/icons/Blockquote/index.d.ts.map +0 -1
  1648. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +0 -1
  1649. package/dist/field/lexical/ui/icons/Bold/index.d.ts.map +0 -1
  1650. package/dist/field/lexical/ui/icons/Bold/index.js.map +0 -1
  1651. package/dist/field/lexical/ui/icons/Checklist/index.d.ts.map +0 -1
  1652. package/dist/field/lexical/ui/icons/Checklist/index.js.map +0 -1
  1653. package/dist/field/lexical/ui/icons/Code/index.d.ts.map +0 -1
  1654. package/dist/field/lexical/ui/icons/Code/index.js.map +0 -1
  1655. package/dist/field/lexical/ui/icons/CodeBlock/index.d.ts.map +0 -1
  1656. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +0 -1
  1657. package/dist/field/lexical/ui/icons/H1/index.d.ts.map +0 -1
  1658. package/dist/field/lexical/ui/icons/H1/index.js.map +0 -1
  1659. package/dist/field/lexical/ui/icons/H2/index.d.ts.map +0 -1
  1660. package/dist/field/lexical/ui/icons/H2/index.js.map +0 -1
  1661. package/dist/field/lexical/ui/icons/H3/index.d.ts.map +0 -1
  1662. package/dist/field/lexical/ui/icons/H3/index.js.map +0 -1
  1663. package/dist/field/lexical/ui/icons/H4/index.d.ts.map +0 -1
  1664. package/dist/field/lexical/ui/icons/H4/index.js.map +0 -1
  1665. package/dist/field/lexical/ui/icons/H5/index.d.ts.map +0 -1
  1666. package/dist/field/lexical/ui/icons/H5/index.js.map +0 -1
  1667. package/dist/field/lexical/ui/icons/H6/index.d.ts.map +0 -1
  1668. package/dist/field/lexical/ui/icons/H6/index.js.map +0 -1
  1669. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +0 -1
  1670. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +0 -1
  1671. package/dist/field/lexical/ui/icons/IndentDecrease/index.d.ts.map +0 -1
  1672. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +0 -1
  1673. package/dist/field/lexical/ui/icons/IndentIncrease/index.d.ts.map +0 -1
  1674. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +0 -1
  1675. package/dist/field/lexical/ui/icons/Italic/index.d.ts.map +0 -1
  1676. package/dist/field/lexical/ui/icons/Italic/index.js.map +0 -1
  1677. package/dist/field/lexical/ui/icons/Link/index.d.ts.map +0 -1
  1678. package/dist/field/lexical/ui/icons/Link/index.js.map +0 -1
  1679. package/dist/field/lexical/ui/icons/OrderedList/index.d.ts.map +0 -1
  1680. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +0 -1
  1681. package/dist/field/lexical/ui/icons/Relationship/index.d.ts.map +0 -1
  1682. package/dist/field/lexical/ui/icons/Relationship/index.js.map +0 -1
  1683. package/dist/field/lexical/ui/icons/Strikethrough/index.d.ts.map +0 -1
  1684. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +0 -1
  1685. package/dist/field/lexical/ui/icons/Subscript/index.d.ts.map +0 -1
  1686. package/dist/field/lexical/ui/icons/Subscript/index.js.map +0 -1
  1687. package/dist/field/lexical/ui/icons/Superscript/index.d.ts.map +0 -1
  1688. package/dist/field/lexical/ui/icons/Superscript/index.js.map +0 -1
  1689. package/dist/field/lexical/ui/icons/Text/index.d.ts.map +0 -1
  1690. package/dist/field/lexical/ui/icons/Text/index.js.map +0 -1
  1691. package/dist/field/lexical/ui/icons/Underline/index.d.ts.map +0 -1
  1692. package/dist/field/lexical/ui/icons/Underline/index.js.map +0 -1
  1693. package/dist/field/lexical/ui/icons/UnorderedList/index.d.ts.map +0 -1
  1694. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +0 -1
  1695. package/dist/field/lexical/ui/icons/Upload/index.d.ts.map +0 -1
  1696. package/dist/field/lexical/ui/icons/Upload/index.js.map +0 -1
  1697. package/dist/field/lexical/utils/canUseDOM.d.ts.map +0 -1
  1698. package/dist/field/lexical/utils/canUseDOM.js.map +0 -1
  1699. package/dist/field/lexical/utils/cloneDeep.d.ts.map +0 -1
  1700. package/dist/field/lexical/utils/cloneDeep.js +0 -50
  1701. package/dist/field/lexical/utils/cloneDeep.js.map +0 -1
  1702. package/dist/field/lexical/utils/environment.d.ts.map +0 -1
  1703. package/dist/field/lexical/utils/environment.js.map +0 -1
  1704. package/dist/field/lexical/utils/getDOMRangeRect.d.ts.map +0 -1
  1705. package/dist/field/lexical/utils/getDOMRangeRect.js.map +0 -1
  1706. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +0 -1
  1707. package/dist/field/lexical/utils/getSelectedNode.js.map +0 -1
  1708. package/dist/field/lexical/utils/guard.d.ts.map +0 -1
  1709. package/dist/field/lexical/utils/guard.js.map +0 -1
  1710. package/dist/field/lexical/utils/invariant.d.ts.map +0 -1
  1711. package/dist/field/lexical/utils/invariant.js.map +0 -1
  1712. package/dist/field/lexical/utils/joinClasses.d.ts.map +0 -1
  1713. package/dist/field/lexical/utils/joinClasses.js.map +0 -1
  1714. package/dist/field/lexical/utils/markdown/createBlockNode.d.ts +0 -4
  1715. package/dist/field/lexical/utils/markdown/createBlockNode.d.ts.map +0 -1
  1716. package/dist/field/lexical/utils/markdown/createBlockNode.js.map +0 -1
  1717. package/dist/field/lexical/utils/nodeFormat.d.ts.map +0 -1
  1718. package/dist/field/lexical/utils/nodeFormat.js.map +0 -1
  1719. package/dist/field/lexical/utils/point.d.ts.map +0 -1
  1720. package/dist/field/lexical/utils/point.js.map +0 -1
  1721. package/dist/field/lexical/utils/rect.d.ts.map +0 -1
  1722. package/dist/field/lexical/utils/rect.js.map +0 -1
  1723. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +0 -1
  1724. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +0 -1
  1725. package/dist/field/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +0 -1
  1726. package/dist/field/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +0 -1
  1727. package/dist/field/lexical/utils/swipe.d.ts.map +0 -1
  1728. package/dist/field/lexical/utils/swipe.js.map +0 -1
  1729. package/dist/field/lexical/utils/url.d.ts.map +0 -1
  1730. package/dist/field/lexical/utils/url.js.map +0 -1
  1731. package/dist/forEachNodeRecursively.d.ts.map +0 -1
  1732. package/dist/forEachNodeRecursively.js.map +0 -1
  1733. package/dist/generateComponentMap.d.ts +0 -6
  1734. package/dist/generateComponentMap.d.ts.map +0 -1
  1735. package/dist/generateComponentMap.js +0 -77
  1736. package/dist/generateComponentMap.js.map +0 -1
  1737. package/dist/generateSchemaMap.d.ts +0 -6
  1738. package/dist/generateSchemaMap.d.ts.map +0 -1
  1739. package/dist/generateSchemaMap.js +0 -22
  1740. package/dist/generateSchemaMap.js.map +0 -1
  1741. package/dist/recurseNodeTree.d.ts.map +0 -1
  1742. package/dist/recurseNodeTree.js.map +0 -1
  1743. package/dist/useLexicalFeature.d.ts +0 -3
  1744. package/dist/useLexicalFeature.d.ts.map +0 -1
  1745. package/dist/useLexicalFeature.js +0 -12
  1746. package/dist/useLexicalFeature.js.map +0 -1
  1747. /package/dist/{field/features → features}/align/i18n.d.ts +0 -0
  1748. /package/dist/{field/features → features}/align/i18n.js +0 -0
  1749. /package/dist/{field/features → features}/align/toolbarAlignGroup.d.ts +0 -0
  1750. /package/dist/{field/features → features}/align/toolbarAlignGroup.js +0 -0
  1751. /package/dist/{field/features → features}/blockquote/i18n.d.ts +0 -0
  1752. /package/dist/{field/features → features}/blockquote/i18n.js +0 -0
  1753. /package/dist/{field/features → features}/blockquote/markdownTransformer.d.ts +0 -0
  1754. /package/dist/{field/features → features}/blockquote/markdownTransformer.js +0 -0
  1755. /package/dist/{field/features → features}/blocks/component/FormSavePlugin.d.ts +0 -0
  1756. /package/dist/{field/features → features}/blocks/component/index.d.ts +0 -0
  1757. /package/dist/{field/features → features}/blocks/component/removeEmptyArrayValues.d.ts +0 -0
  1758. /package/dist/{field/features → features}/blocks/component/removeEmptyArrayValues.js +0 -0
  1759. /package/dist/{field/features → features}/blocks/drawer/index.d.ts +0 -0
  1760. /package/dist/{field/features → features}/blocks/i18n.d.ts +0 -0
  1761. /package/dist/{field/features → features}/blocks/i18n.js +0 -0
  1762. /package/dist/{field/features → features}/blocks/nodes/BlocksNode.d.ts +0 -0
  1763. /package/dist/{field/features → features}/blocks/nodes/BlocksNode.js +0 -0
  1764. /package/dist/{field/features → features}/blocks/plugin/commands.d.ts +0 -0
  1765. /package/dist/{field/features → features}/blocks/plugin/commands.js +0 -0
  1766. /package/dist/{field/features → features}/blocks/plugin/index.js +0 -0
  1767. /package/dist/{field/features → features}/blocks/validate.js +0 -0
  1768. /package/dist/{field/features → features}/converters/html/converter/converters/linebreak.d.ts +0 -0
  1769. /package/dist/{field/features → features}/converters/html/converter/converters/linebreak.js +0 -0
  1770. /package/dist/{field/features → features}/converters/html/converter/converters/paragraph.d.ts +0 -0
  1771. /package/dist/{field/features → features}/converters/html/converter/converters/text.d.ts +0 -0
  1772. /package/dist/{field/features → features}/converters/html/converter/converters/text.js +0 -0
  1773. /package/dist/{field/features → features}/converters/html/converter/defaultConverters.d.ts +0 -0
  1774. /package/dist/{field/features → features}/converters/html/converter/defaultConverters.js +0 -0
  1775. /package/dist/{field/features → features}/converters/html/converter/types.js +0 -0
  1776. /package/dist/{field/features → features}/converters/html/field/index.d.ts +0 -0
  1777. /package/dist/{field/features → features}/createFeaturePropComponent.d.ts +0 -0
  1778. /package/dist/{field/features → features}/debug/testRecorder/plugin/index.js +0 -0
  1779. /package/dist/{field/features → features}/debug/treeView/plugin/index.js +0 -0
  1780. /package/dist/{field/features → features}/format/bold/markdownTransformers.d.ts +0 -0
  1781. /package/dist/{field/features → features}/format/bold/markdownTransformers.js +0 -0
  1782. /package/dist/{field/features → features}/format/inlineCode/markdownTransformers.d.ts +0 -0
  1783. /package/dist/{field/features → features}/format/inlineCode/markdownTransformers.js +0 -0
  1784. /package/dist/{field/features → features}/format/italic/markdownTransformers.d.ts +0 -0
  1785. /package/dist/{field/features → features}/format/italic/markdownTransformers.js +0 -0
  1786. /package/dist/{field/features → features}/format/shared/toolbarFormatGroup.d.ts +0 -0
  1787. /package/dist/{field/features → features}/format/shared/toolbarFormatGroup.js +0 -0
  1788. /package/dist/{field/features → features}/format/strikethrough/markdownTransformers.d.ts +0 -0
  1789. /package/dist/{field/features → features}/format/strikethrough/markdownTransformers.js +0 -0
  1790. /package/dist/{field/features → features}/heading/i18n.d.ts +0 -0
  1791. /package/dist/{field/features → features}/heading/i18n.js +0 -0
  1792. /package/dist/{field/features → features}/heading/markdownTransformer.d.ts +0 -0
  1793. /package/dist/{field/features → features}/heading/markdownTransformer.js +0 -0
  1794. /package/dist/{field/features → features}/horizontalRule/component/index.d.ts +0 -0
  1795. /package/dist/{field/features → features}/horizontalRule/component/index.js +0 -0
  1796. /package/dist/{field/features → features}/horizontalRule/i18n.d.ts +0 -0
  1797. /package/dist/{field/features → features}/horizontalRule/i18n.js +0 -0
  1798. /package/dist/{field/features → features}/horizontalRule/markdownTransformer.d.ts +0 -0
  1799. /package/dist/{field/features → features}/horizontalRule/markdownTransformer.js +0 -0
  1800. /package/dist/{field/features → features}/horizontalRule/nodes/HorizontalRuleNode.d.ts +0 -0
  1801. /package/dist/{field/features → features}/horizontalRule/nodes/HorizontalRuleNode.js +0 -0
  1802. /package/dist/{field/features → features}/horizontalRule/plugin/index.js +0 -0
  1803. /package/dist/{field/features → features}/indent/i18n.d.ts +0 -0
  1804. /package/dist/{field/features → features}/indent/i18n.js +0 -0
  1805. /package/dist/{field/features → features}/indent/toolbarIndentGroup.d.ts +0 -0
  1806. /package/dist/{field/features → features}/indent/toolbarIndentGroup.js +0 -0
  1807. /package/dist/{field/features → features}/link/drawer/baseFields.js +0 -0
  1808. /package/dist/{field/features → features}/link/drawer/index.d.ts +0 -0
  1809. /package/dist/{field/features → features}/link/drawer/types.d.ts +0 -0
  1810. /package/dist/{field/features → features}/link/drawer/types.js +0 -0
  1811. /package/dist/{field/features → features}/link/i18n.d.ts +0 -0
  1812. /package/dist/{field/features → features}/link/i18n.js +0 -0
  1813. /package/dist/{field/features → features}/link/markdownTransformer.d.ts +0 -0
  1814. /package/dist/{field/features → features}/link/markdownTransformer.js +0 -0
  1815. /package/dist/{field/features → features}/link/nodes/AutoLinkNode.d.ts +0 -0
  1816. /package/dist/{field/features → features}/link/nodes/AutoLinkNode.js +0 -0
  1817. /package/dist/{field/features → features}/link/nodes/LinkNode.d.ts +0 -0
  1818. /package/dist/{field/features → features}/link/nodes/LinkNode.js +0 -0
  1819. /package/dist/{field/features → features}/link/nodes/types.d.ts +0 -0
  1820. /package/dist/{field/features → features}/link/nodes/types.js +0 -0
  1821. /package/dist/{field/features → features}/link/plugins/autoLink/index.js +0 -0
  1822. /package/dist/{field/features → features}/link/plugins/clickableLink/index.js +0 -0
  1823. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts +0 -0
  1824. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/LinkEditor/commands.js +0 -0
  1825. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts +0 -0
  1826. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/index.js +0 -0
  1827. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/types.d.ts +0 -0
  1828. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/types.js +0 -0
  1829. /package/dist/{field/features → features}/link/plugins/floatingLinkEditor/utilities.js +0 -0
  1830. /package/dist/{field/features → features}/link/plugins/link/index.js +0 -0
  1831. /package/dist/{field/features → features}/link/validate.js +0 -0
  1832. /package/dist/{field/features → features}/lists/checklist/i18n.d.ts +0 -0
  1833. /package/dist/{field/features → features}/lists/checklist/i18n.js +0 -0
  1834. /package/dist/{field/features → features}/lists/checklist/markdownTransformers.d.ts +0 -0
  1835. /package/dist/{field/features → features}/lists/checklist/markdownTransformers.js +0 -0
  1836. /package/dist/{field/features → features}/lists/checklist/plugin/index.js +0 -0
  1837. /package/dist/{field/features → features}/lists/htmlConverter.d.ts +0 -0
  1838. /package/dist/{field/features → features}/lists/orderedList/i18n.d.ts +0 -0
  1839. /package/dist/{field/features → features}/lists/orderedList/i18n.js +0 -0
  1840. /package/dist/{field/features → features}/lists/orderedList/markdownTransformer.d.ts +0 -0
  1841. /package/dist/{field/features → features}/lists/orderedList/markdownTransformer.js +0 -0
  1842. /package/dist/{field/features → features}/lists/plugin/index.js +0 -0
  1843. /package/dist/{field/features → features}/lists/shared/markdown.js +0 -0
  1844. /package/dist/{field/features → features}/lists/shared/slashMenuListGroup.d.ts +0 -0
  1845. /package/dist/{field/features → features}/lists/shared/slashMenuListGroup.js +0 -0
  1846. /package/dist/{field/features → features}/lists/unorderedList/i18n.d.ts +0 -0
  1847. /package/dist/{field/features → features}/lists/unorderedList/i18n.js +0 -0
  1848. /package/dist/{field/features → features}/lists/unorderedList/markdownTransformer.d.ts +0 -0
  1849. /package/dist/{field/features → features}/lists/unorderedList/markdownTransformer.js +0 -0
  1850. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/heading/client.js +0 -0
  1851. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -0
  1852. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -0
  1853. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts +0 -0
  1854. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/link/client.js +0 -0
  1855. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -0
  1856. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -0
  1857. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts +0 -0
  1858. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/list/client.js +0 -0
  1859. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -0
  1860. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -0
  1861. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts +0 -0
  1862. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js +0 -0
  1863. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -0
  1864. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -0
  1865. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts +0 -0
  1866. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/quote/client.js +0 -0
  1867. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -0
  1868. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -0
  1869. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts +0 -0
  1870. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js +0 -0
  1871. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -0
  1872. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -0
  1873. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts +0 -0
  1874. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/upload/client.js +0 -0
  1875. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -0
  1876. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -0
  1877. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts +0 -0
  1878. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -0
  1879. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -0
  1880. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -0
  1881. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/index.js +0 -0
  1882. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/converter/types.js +0 -0
  1883. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -0
  1884. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -0
  1885. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -0
  1886. /package/dist/{field/features → features}/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -0
  1887. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/blockquote/client.js +0 -0
  1888. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -0
  1889. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -0
  1890. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/blockquote/index.d.ts +0 -0
  1891. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/heading/client.js +0 -0
  1892. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -0
  1893. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/heading/converter.js +0 -0
  1894. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/heading/index.d.ts +0 -0
  1895. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/indent/client.js +0 -0
  1896. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -0
  1897. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/indent/converter.js +0 -0
  1898. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/indent/index.d.ts +0 -0
  1899. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/link/client.js +0 -0
  1900. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -0
  1901. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/link/converter.js +0 -0
  1902. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/link/index.d.ts +0 -0
  1903. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/listItem/client.js +0 -0
  1904. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -0
  1905. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -0
  1906. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/listItem/index.d.ts +0 -0
  1907. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/orderedList/client.js +0 -0
  1908. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -0
  1909. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -0
  1910. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/orderedList/index.d.ts +0 -0
  1911. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/relationship/client.js +0 -0
  1912. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -0
  1913. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -0
  1914. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/relationship/index.d.ts +0 -0
  1915. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unknown/client.js +0 -0
  1916. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -0
  1917. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -0
  1918. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unknown/index.d.ts +0 -0
  1919. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unorderedList/client.js +0 -0
  1920. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -0
  1921. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -0
  1922. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts +0 -0
  1923. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/upload/client.js +0 -0
  1924. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -0
  1925. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/upload/converter.js +0 -0
  1926. /package/dist/{field/features → features}/migrations/slateToLexical/converter/converters/upload/index.d.ts +0 -0
  1927. /package/dist/{field/features → features}/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -0
  1928. /package/dist/{field/features → features}/migrations/slateToLexical/converter/defaultConverters.js +0 -0
  1929. /package/dist/{field/features → features}/migrations/slateToLexical/converter/index.d.ts +0 -0
  1930. /package/dist/{field/features → features}/migrations/slateToLexical/converter/index.js +0 -0
  1931. /package/dist/{field/features → features}/migrations/slateToLexical/converter/types.js +0 -0
  1932. /package/dist/{field/features → features}/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -0
  1933. /package/dist/{field/features → features}/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -0
  1934. /package/dist/{field/features → features}/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -0
  1935. /package/dist/{field/features → features}/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -0
  1936. /package/dist/{field/features → features}/paragraph/i18n.d.ts +0 -0
  1937. /package/dist/{field/features → features}/paragraph/i18n.js +0 -0
  1938. /package/dist/{field/features → features}/relationship/drawer/commands.d.ts +0 -0
  1939. /package/dist/{field/features → features}/relationship/drawer/commands.js +0 -0
  1940. /package/dist/{field/features → features}/relationship/drawer/index.d.ts +0 -0
  1941. /package/dist/{field/features → features}/relationship/i18n.d.ts +0 -0
  1942. /package/dist/{field/features → features}/relationship/i18n.js +0 -0
  1943. /package/dist/{field/features → features}/relationship/nodes/RelationshipNode.d.ts +0 -0
  1944. /package/dist/{field/features → features}/relationship/nodes/RelationshipNode.js +0 -0
  1945. /package/dist/{field/features → features}/relationship/nodes/components/RelationshipComponent.d.ts +0 -0
  1946. /package/dist/{field/features → features}/relationship/utils/EnabledRelationshipsCondition.d.ts +0 -0
  1947. /package/dist/{field/features → features}/shared/slashMenu/basicGroup.d.ts +0 -0
  1948. /package/dist/{field/features → features}/shared/slashMenu/basicGroup.js +0 -0
  1949. /package/dist/{field/features → features}/shared/toolbar/addDropdownGroup.d.ts +0 -0
  1950. /package/dist/{field/features → features}/shared/toolbar/addDropdownGroup.js +0 -0
  1951. /package/dist/{field/features → features}/shared/toolbar/featureButtonsGroup.d.ts +0 -0
  1952. /package/dist/{field/features → features}/shared/toolbar/featureButtonsGroup.js +0 -0
  1953. /package/dist/{field/features → features}/shared/toolbar/textDropdownGroup.d.ts +0 -0
  1954. /package/dist/{field/features → features}/shared/toolbar/textDropdownGroup.js +0 -0
  1955. /package/dist/{field/features → features}/toolbars/inline/Toolbar/index.js +0 -0
  1956. /package/dist/{field/features → features}/toolbars/shared/ToolbarButton/index.d.ts +0 -0
  1957. /package/dist/{field/features → features}/toolbars/shared/ToolbarButton/index.js +0 -0
  1958. /package/dist/{field/features → features}/toolbars/shared/ToolbarDropdown/DropDown.d.ts +0 -0
  1959. /package/dist/{field/features → features}/toolbars/shared/ToolbarDropdown/DropDown.js +0 -0
  1960. /package/dist/{field/features → features}/toolbars/shared/ToolbarDropdown/index.d.ts +0 -0
  1961. /package/dist/{field/features → features}/toolbars/types.js +0 -0
  1962. /package/dist/{field/features → features}/typeUtilities.js +0 -0
  1963. /package/dist/{field/features → features}/upload/component/ExtraFieldsDrawer/index.d.ts +0 -0
  1964. /package/dist/{field/features → features}/upload/component/index.d.ts +0 -0
  1965. /package/dist/{field/features → features}/upload/drawer/commands.d.ts +0 -0
  1966. /package/dist/{field/features → features}/upload/drawer/commands.js +0 -0
  1967. /package/dist/{field/features → features}/upload/drawer/index.d.ts +0 -0
  1968. /package/dist/{field/features → features}/upload/i18n.d.ts +0 -0
  1969. /package/dist/{field/features → features}/upload/i18n.js +0 -0
  1970. /package/dist/{field/features → features}/upload/nodes/UploadNode.d.ts +0 -0
  1971. /package/dist/{field/features → features}/upload/nodes/UploadNode.js +0 -0
  1972. /package/dist/{field/features → features}/upload/validate.js +0 -0
  1973. /package/dist/{field/lexical → lexical}/LexicalEditor.d.ts +0 -0
  1974. /package/dist/{field/lexical → lexical}/LexicalProvider.js +0 -0
  1975. /package/dist/{field/lexical → lexical}/config/client/EditorConfigProvider.js +0 -0
  1976. /package/dist/{field/lexical → lexical}/config/client/default.d.ts +0 -0
  1977. /package/dist/{field/lexical → lexical}/config/client/default.js +0 -0
  1978. /package/dist/{field/lexical → lexical}/config/server/default.js +0 -0
  1979. /package/dist/{field/lexical → lexical}/config/server/sanitize.js +0 -0
  1980. /package/dist/{field/features → lexical/config}/types.js +0 -0
  1981. /package/dist/{field/lexical → lexical}/nodes/index.d.ts +0 -0
  1982. /package/dist/{field/lexical → lexical}/nodes/index.js +0 -0
  1983. /package/dist/{field/lexical → lexical}/plugins/MarkdownShortcut/index.d.ts +0 -0
  1984. /package/dist/{field/lexical → lexical}/plugins/MarkdownShortcut/index.js +0 -0
  1985. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -0
  1986. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +0 -0
  1987. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +0 -0
  1988. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +0 -0
  1989. /package/dist/{field/lexical/config → lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin}/types.js +0 -0
  1990. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/index.d.ts +0 -0
  1991. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/useMenuTriggerMatch.d.ts +0 -0
  1992. /package/dist/{field/lexical → lexical}/plugins/SlashMenu/useMenuTriggerMatch.js +0 -0
  1993. /package/dist/{field/lexical → lexical}/plugins/handles/AddBlockHandlePlugin/index.d.ts +0 -0
  1994. /package/dist/{field/lexical → lexical}/plugins/handles/AddBlockHandlePlugin/index.js +0 -0
  1995. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/debounce.d.ts +0 -0
  1996. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/debounce.js +0 -0
  1997. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts +0 -0
  1998. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +0 -0
  1999. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +0 -0
  2000. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +0 -0
  2001. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/index.d.ts +0 -0
  2002. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/index.js +0 -0
  2003. /package/dist/{field/lexical → lexical}/plugins/handles/DraggableBlockPlugin/setTargetLine.js +0 -0
  2004. /package/dist/{field/lexical → lexical}/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +0 -0
  2005. /package/dist/{field/lexical → lexical}/plugins/handles/utils/calculateDistanceFromScrollerElem.js +0 -0
  2006. /package/dist/{field/lexical → lexical}/plugins/handles/utils/doesLineHeightAffectElement.d.ts +0 -0
  2007. /package/dist/{field/lexical → lexical}/plugins/handles/utils/doesLineHeightAffectElement.js +0 -0
  2008. /package/dist/{field/lexical → lexical}/plugins/handles/utils/getCollapsedMargins.d.ts +0 -0
  2009. /package/dist/{field/lexical → lexical}/plugins/handles/utils/getCollapsedMargins.js +0 -0
  2010. /package/dist/{field/lexical → lexical}/plugins/handles/utils/getNodeCloseToPoint.d.ts +0 -0
  2011. /package/dist/{field/lexical → lexical}/plugins/handles/utils/getNodeCloseToPoint.js +0 -0
  2012. /package/dist/{field/lexical → lexical}/plugins/handles/utils/getTopLevelNodeKeys.d.ts +0 -0
  2013. /package/dist/{field/lexical → lexical}/plugins/handles/utils/getTopLevelNodeKeys.js +0 -0
  2014. /package/dist/{field/lexical → lexical}/plugins/handles/utils/isOnHandleElement.d.ts +0 -0
  2015. /package/dist/{field/lexical → lexical}/plugins/handles/utils/isOnHandleElement.js +0 -0
  2016. /package/dist/{field/lexical → lexical}/plugins/handles/utils/setHandlePosition.d.ts +0 -0
  2017. /package/dist/{field/lexical → lexical}/plugins/handles/utils/setHandlePosition.js +0 -0
  2018. /package/dist/{field/lexical → lexical}/theme/EditorTheme.d.ts +0 -0
  2019. /package/dist/{field/lexical → lexical}/theme/EditorTheme.js +0 -0
  2020. /package/dist/{field/lexical → lexical}/ui/ContentEditable.d.ts +0 -0
  2021. /package/dist/{field/lexical → lexical}/ui/ContentEditable.js +0 -0
  2022. /package/dist/{field/lexical → lexical}/ui/icons/AI/index.d.ts +0 -0
  2023. /package/dist/{field/lexical → lexical}/ui/icons/AI/index.js +0 -0
  2024. /package/dist/{field/lexical → lexical}/ui/icons/Add/index.d.ts +0 -0
  2025. /package/dist/{field/lexical → lexical}/ui/icons/Add/index.js +0 -0
  2026. /package/dist/{field/lexical → lexical}/ui/icons/Add/index.svg +0 -0
  2027. /package/dist/{field/lexical → lexical}/ui/icons/Add/light.svg +0 -0
  2028. /package/dist/{field/lexical → lexical}/ui/icons/AlignCenter/index.d.ts +0 -0
  2029. /package/dist/{field/lexical → lexical}/ui/icons/AlignCenter/index.js +0 -0
  2030. /package/dist/{field/lexical → lexical}/ui/icons/AlignJustify/index.d.ts +0 -0
  2031. /package/dist/{field/lexical → lexical}/ui/icons/AlignJustify/index.js +0 -0
  2032. /package/dist/{field/lexical → lexical}/ui/icons/AlignLeft/index.d.ts +0 -0
  2033. /package/dist/{field/lexical → lexical}/ui/icons/AlignLeft/index.js +0 -0
  2034. /package/dist/{field/lexical → lexical}/ui/icons/AlignRight/index.d.ts +0 -0
  2035. /package/dist/{field/lexical → lexical}/ui/icons/AlignRight/index.js +0 -0
  2036. /package/dist/{field/lexical → lexical}/ui/icons/Block/index.d.ts +0 -0
  2037. /package/dist/{field/lexical → lexical}/ui/icons/Block/index.js +0 -0
  2038. /package/dist/{field/lexical → lexical}/ui/icons/Blockquote/index.d.ts +0 -0
  2039. /package/dist/{field/lexical → lexical}/ui/icons/Blockquote/index.js +0 -0
  2040. /package/dist/{field/lexical → lexical}/ui/icons/Bold/index.d.ts +0 -0
  2041. /package/dist/{field/lexical → lexical}/ui/icons/Bold/index.js +0 -0
  2042. /package/dist/{field/lexical → lexical}/ui/icons/Caret/index.svg +0 -0
  2043. /package/dist/{field/lexical → lexical}/ui/icons/Checklist/index.d.ts +0 -0
  2044. /package/dist/{field/lexical → lexical}/ui/icons/Checklist/index.js +0 -0
  2045. /package/dist/{field/lexical → lexical}/ui/icons/Code/index.d.ts +0 -0
  2046. /package/dist/{field/lexical → lexical}/ui/icons/Code/index.js +0 -0
  2047. /package/dist/{field/lexical → lexical}/ui/icons/CodeBlock/index.d.ts +0 -0
  2048. /package/dist/{field/lexical → lexical}/ui/icons/CodeBlock/index.js +0 -0
  2049. /package/dist/{field/lexical → lexical}/ui/icons/DraggableBlock/index.svg +0 -0
  2050. /package/dist/{field/lexical → lexical}/ui/icons/DraggableBlock/light.svg +0 -0
  2051. /package/dist/{field/lexical → lexical}/ui/icons/Edit/index.svg +0 -0
  2052. /package/dist/{field/lexical → lexical}/ui/icons/H1/index.d.ts +0 -0
  2053. /package/dist/{field/lexical → lexical}/ui/icons/H1/index.js +0 -0
  2054. /package/dist/{field/lexical → lexical}/ui/icons/H2/index.d.ts +0 -0
  2055. /package/dist/{field/lexical → lexical}/ui/icons/H2/index.js +0 -0
  2056. /package/dist/{field/lexical → lexical}/ui/icons/H3/index.d.ts +0 -0
  2057. /package/dist/{field/lexical → lexical}/ui/icons/H3/index.js +0 -0
  2058. /package/dist/{field/lexical → lexical}/ui/icons/H4/index.d.ts +0 -0
  2059. /package/dist/{field/lexical → lexical}/ui/icons/H4/index.js +0 -0
  2060. /package/dist/{field/lexical → lexical}/ui/icons/H5/index.d.ts +0 -0
  2061. /package/dist/{field/lexical → lexical}/ui/icons/H5/index.js +0 -0
  2062. /package/dist/{field/lexical → lexical}/ui/icons/H6/index.d.ts +0 -0
  2063. /package/dist/{field/lexical → lexical}/ui/icons/H6/index.js +0 -0
  2064. /package/dist/{field/lexical → lexical}/ui/icons/HorizontalRule/index.d.ts +0 -0
  2065. /package/dist/{field/lexical → lexical}/ui/icons/HorizontalRule/index.js +0 -0
  2066. /package/dist/{field/lexical → lexical}/ui/icons/IndentDecrease/index.d.ts +0 -0
  2067. /package/dist/{field/lexical → lexical}/ui/icons/IndentDecrease/index.js +0 -0
  2068. /package/dist/{field/lexical → lexical}/ui/icons/IndentIncrease/index.d.ts +0 -0
  2069. /package/dist/{field/lexical → lexical}/ui/icons/IndentIncrease/index.js +0 -0
  2070. /package/dist/{field/lexical → lexical}/ui/icons/Italic/index.d.ts +0 -0
  2071. /package/dist/{field/lexical → lexical}/ui/icons/Italic/index.js +0 -0
  2072. /package/dist/{field/lexical → lexical}/ui/icons/Link/index.d.ts +0 -0
  2073. /package/dist/{field/lexical → lexical}/ui/icons/Link/index.js +0 -0
  2074. /package/dist/{field/lexical → lexical}/ui/icons/OrderedList/index.d.ts +0 -0
  2075. /package/dist/{field/lexical → lexical}/ui/icons/OrderedList/index.js +0 -0
  2076. /package/dist/{field/lexical → lexical}/ui/icons/Relationship/index.d.ts +0 -0
  2077. /package/dist/{field/lexical → lexical}/ui/icons/Relationship/index.js +0 -0
  2078. /package/dist/{field/lexical → lexical}/ui/icons/Remove/index.svg +0 -0
  2079. /package/dist/{field/lexical → lexical}/ui/icons/Strikethrough/index.d.ts +0 -0
  2080. /package/dist/{field/lexical → lexical}/ui/icons/Strikethrough/index.js +0 -0
  2081. /package/dist/{field/lexical → lexical}/ui/icons/Subscript/index.d.ts +0 -0
  2082. /package/dist/{field/lexical → lexical}/ui/icons/Subscript/index.js +0 -0
  2083. /package/dist/{field/lexical → lexical}/ui/icons/Superscript/index.d.ts +0 -0
  2084. /package/dist/{field/lexical → lexical}/ui/icons/Superscript/index.js +0 -0
  2085. /package/dist/{field/lexical → lexical}/ui/icons/Text/index.d.ts +0 -0
  2086. /package/dist/{field/lexical → lexical}/ui/icons/Text/index.js +0 -0
  2087. /package/dist/{field/lexical → lexical}/ui/icons/Underline/index.d.ts +0 -0
  2088. /package/dist/{field/lexical → lexical}/ui/icons/Underline/index.js +0 -0
  2089. /package/dist/{field/lexical → lexical}/ui/icons/UnorderedList/index.d.ts +0 -0
  2090. /package/dist/{field/lexical → lexical}/ui/icons/UnorderedList/index.js +0 -0
  2091. /package/dist/{field/lexical → lexical}/ui/icons/Upload/index.d.ts +0 -0
  2092. /package/dist/{field/lexical → lexical}/ui/icons/Upload/index.js +0 -0
  2093. /package/dist/{field/lexical → lexical}/utils/canUseDOM.d.ts +0 -0
  2094. /package/dist/{field/lexical → lexical}/utils/canUseDOM.js +0 -0
  2095. /package/dist/{field/lexical → lexical}/utils/cloneDeep.d.ts +0 -0
  2096. /package/dist/{field/lexical → lexical}/utils/environment.d.ts +0 -0
  2097. /package/dist/{field/lexical → lexical}/utils/environment.js +0 -0
  2098. /package/dist/{field/lexical → lexical}/utils/getDOMRangeRect.d.ts +0 -0
  2099. /package/dist/{field/lexical → lexical}/utils/getDOMRangeRect.js +0 -0
  2100. /package/dist/{field/lexical → lexical}/utils/getSelectedNode.d.ts +0 -0
  2101. /package/dist/{field/lexical → lexical}/utils/getSelectedNode.js +0 -0
  2102. /package/dist/{field/lexical → lexical}/utils/guard.d.ts +0 -0
  2103. /package/dist/{field/lexical → lexical}/utils/guard.js +0 -0
  2104. /package/dist/{field/lexical → lexical}/utils/invariant.d.ts +0 -0
  2105. /package/dist/{field/lexical → lexical}/utils/invariant.js +0 -0
  2106. /package/dist/{field/lexical → lexical}/utils/joinClasses.d.ts +0 -0
  2107. /package/dist/{field/lexical → lexical}/utils/joinClasses.js +0 -0
  2108. /package/dist/{field/lexical → lexical}/utils/markdown/createBlockNode.js +0 -0
  2109. /package/dist/{field/lexical → lexical}/utils/nodeFormat.d.ts +0 -0
  2110. /package/dist/{field/lexical → lexical}/utils/nodeFormat.js +0 -0
  2111. /package/dist/{field/lexical → lexical}/utils/point.d.ts +0 -0
  2112. /package/dist/{field/lexical → lexical}/utils/point.js +0 -0
  2113. /package/dist/{field/lexical → lexical}/utils/rect.d.ts +0 -0
  2114. /package/dist/{field/lexical → lexical}/utils/rect.js +0 -0
  2115. /package/dist/{field/lexical → lexical}/utils/setFloatingElemPosition.d.ts +0 -0
  2116. /package/dist/{field/lexical → lexical}/utils/setFloatingElemPosition.js +0 -0
  2117. /package/dist/{field/lexical → lexical}/utils/setFloatingElemPositionForLinkEditor.d.ts +0 -0
  2118. /package/dist/{field/lexical → lexical}/utils/setFloatingElemPositionForLinkEditor.js +0 -0
  2119. /package/dist/{field/lexical → lexical}/utils/swipe.d.ts +0 -0
  2120. /package/dist/{field/lexical → lexical}/utils/swipe.js +0 -0
  2121. /package/dist/{field/lexical → lexical}/utils/url.d.ts +0 -0
  2122. /package/dist/{field/lexical → lexical}/utils/url.js +0 -0
  2123. /package/dist/{forEachNodeRecursively.d.ts → utilities/forEachNodeRecursively.d.ts} +0 -0
  2124. /package/dist/{forEachNodeRecursively.js → utilities/forEachNodeRecursively.js} +0 -0
  2125. /package/dist/{recurseNodeTree.d.ts → utilities/recurseNodeTree.d.ts} +0 -0
  2126. /package/dist/{recurseNodeTree.js → utilities/recurseNodeTree.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/cell/index.tsx", "../../../src/field/lexical/theme/EditorTheme.tsx", "../../../src/field/lexical/config/client/default.ts", "../../../src/field/lexical/config/client/loader.ts", "../../../src/field/lexical/config/client/sanitize.ts", "../../../src/field/features/align/feature.client.tsx", "../../../src/field/lexical/ui/icons/AlignCenter/index.tsx", "../../../src/field/lexical/ui/icons/AlignJustify/index.tsx", "../../../src/field/lexical/ui/icons/AlignLeft/index.tsx", "../../../src/field/lexical/ui/icons/AlignRight/index.tsx", "../../../src/useLexicalFeature.tsx", "../../../src/field/features/createClientComponent.tsx", "../../../src/field/features/align/toolbarAlignGroup.ts", "../../../src/field/features/blockquote/feature.client.tsx", "../../../src/field/lexical/ui/icons/Blockquote/index.tsx", "../../../src/field/features/shared/slashMenu/basicGroup.ts", "../../../src/field/lexical/ui/icons/Text/index.tsx", "../../../src/field/features/shared/toolbar/textDropdownGroup.ts", "../../../src/field/features/blockquote/markdownTransformer.ts", "../../../src/field/features/blocks/feature.client.tsx", "../../../src/field/lexical/ui/icons/Block/index.tsx", "../../../src/field/features/blocks/nodes/BlocksNode.tsx", "../../../src/field/features/blocks/plugin/commands.ts", "../../../src/field/features/blocks/plugin/index.tsx", "../../../src/field/features/blocks/drawer/index.tsx", "../../../src/field/features/debug/testRecorder/plugin/index.tsx", "../../../src/field/lexical/utils/canUseDOM.ts", "../../../src/field/lexical/utils/environment.ts", "../../../src/field/features/debug/testRecorder/feature.client.tsx", "../../../src/field/features/debug/treeView/plugin/index.tsx", "../../../src/field/features/debug/treeView/feature.client.tsx", "../../../src/field/features/format/bold/feature.client.tsx", "../../../src/field/lexical/ui/icons/Bold/index.tsx", "../../../src/field/features/format/shared/toolbarFormatGroup.ts", "../../../src/field/features/format/bold/markdownTransformers.ts", "../../../src/field/features/format/inlineCode/feature.client.tsx", "../../../src/field/lexical/ui/icons/Code/index.tsx", "../../../src/field/features/format/inlineCode/markdownTransformers.ts", "../../../src/field/features/format/italic/feature.client.tsx", "../../../src/field/lexical/ui/icons/Italic/index.tsx", "../../../src/field/features/format/italic/markdownTransformers.ts", "../../../src/field/features/format/strikethrough/feature.client.tsx", "../../../src/field/lexical/ui/icons/Strikethrough/index.tsx", "../../../src/field/features/format/strikethrough/markdownTransformers.ts", "../../../src/field/features/format/subscript/feature.client.tsx", "../../../src/field/lexical/ui/icons/Subscript/index.tsx", "../../../src/field/features/format/superscript/feature.client.tsx", "../../../src/field/lexical/ui/icons/Superscript/index.tsx", "../../../src/field/features/format/underline/feature.client.tsx", "../../../src/field/lexical/ui/icons/Underline/index.tsx", "../../../src/field/features/heading/feature.client.tsx", "../../../src/field/lexical/ui/icons/H1/index.tsx", "../../../src/field/lexical/ui/icons/H2/index.tsx", "../../../src/field/lexical/ui/icons/H3/index.tsx", "../../../src/field/lexical/ui/icons/H4/index.tsx", "../../../src/field/lexical/ui/icons/H5/index.tsx", "../../../src/field/lexical/ui/icons/H6/index.tsx", "../../../src/field/features/heading/markdownTransformer.ts", "../../../src/field/lexical/utils/markdown/createBlockNode.ts", "../../../src/field/features/horizontalRule/feature.client.tsx", "../../../src/field/lexical/ui/icons/HorizontalRule/index.tsx", "../../../src/field/lexical/ui/icons/Add/index.tsx", "../../../src/field/features/shared/toolbar/addDropdownGroup.ts", "../../../src/field/features/horizontalRule/markdownTransformer.ts", "../../../src/field/features/horizontalRule/plugin/index.tsx", "../../../src/field/features/indent/feature.client.tsx", "../../../src/field/lexical/ui/icons/IndentDecrease/index.tsx", "../../../src/field/lexical/ui/icons/IndentIncrease/index.tsx", "../../../src/field/features/indent/toolbarIndentGroup.ts", "../../../src/field/features/link/feature.client.tsx", "../../../src/field/lexical/ui/icons/Link/index.tsx", "../../../src/field/lexical/utils/getSelectedNode.ts", "../../../src/field/features/shared/toolbar/featureButtonsGroup.ts", "../../../src/field/features/link/markdownTransformer.ts", "../../../src/field/features/link/nodes/LinkNode.ts", "../../../src/field/features/link/nodes/AutoLinkNode.ts", "../../../src/field/features/link/plugins/autoLink/index.tsx", "../../../src/field/lexical/utils/invariant.ts", "../../../src/field/features/link/plugins/clickableLink/index.tsx", "../../../src/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.ts", "../../../src/field/features/link/plugins/floatingLinkEditor/index.tsx", "../../../src/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.tsx", "../../../src/field/lexical/utils/setFloatingElemPositionForLinkEditor.ts", "../../../src/field/features/link/drawer/index.tsx", "../../../src/field/features/link/plugins/link/index.tsx", "../../../src/field/lexical/utils/url.ts", "../../../src/field/features/lists/checklist/feature.client.tsx", "../../../src/field/lexical/ui/icons/Checklist/index.tsx", "../../../src/field/features/lists/plugin/index.tsx", "../../../src/field/features/lists/shared/slashMenuListGroup.ts", "../../../src/field/features/lists/checklist/markdownTransformers.ts", "../../../src/field/features/lists/shared/markdown.ts", "../../../src/field/features/lists/checklist/plugin/index.tsx", "../../../src/field/features/lists/orderedList/feature.client.tsx", "../../../src/field/lexical/ui/icons/OrderedList/index.tsx", "../../../src/field/features/lists/orderedList/markdownTransformer.ts", "../../../src/field/features/lists/unorderedList/feature.client.tsx", "../../../src/field/lexical/ui/icons/UnorderedList/index.tsx", "../../../src/field/features/lists/unorderedList/markdownTransformer.ts", "../../../src/field/features/migrations/lexicalPluginToLexical/converter/index.ts", "../../../src/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.tsx", "../../../src/field/features/migrations/lexicalPluginToLexical/feature.client.tsx", "../../../src/field/lexical/utils/nodeFormat.ts", "../../../src/field/features/migrations/slateToLexical/converter/index.ts", "../../../src/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.tsx", "../../../src/field/features/migrations/slateToLexical/feature.client.tsx", "../../../src/field/features/paragraph/feature.client.tsx", "../../../src/field/features/relationship/feature.client.tsx", "../../../src/field/lexical/ui/icons/Relationship/index.tsx", "../../../src/field/features/relationship/plugins/index.tsx", "../../../src/field/features/relationship/drawer/index.tsx", "../../../src/field/features/toolbars/fixed/Toolbar/index.tsx", "../../../src/field/features/toolbars/shared/ToolbarButton/index.tsx", "../../../src/field/features/toolbars/shared/ToolbarDropdown/index.tsx", "../../../src/field/features/toolbars/shared/ToolbarDropdown/DropDown.tsx", "../../../src/field/features/toolbars/fixed/feature.client.tsx", "../../../src/field/features/toolbars/inline/Toolbar/index.tsx", "../../../src/field/lexical/utils/getDOMRangeRect.ts", "../../../src/field/lexical/utils/setFloatingElemPosition.ts", "../../../src/field/features/toolbars/inline/feature.client.tsx", "../../../src/field/features/upload/feature.client.tsx", "../../../src/field/lexical/ui/icons/Upload/index.tsx", "../../../src/field/features/upload/plugin/index.tsx", "../../../src/field/features/upload/drawer/index.tsx", "../../../src/field/index.tsx", "../../../src/field/lexical/utils/cloneDeep.ts", "../../../src/field/lexical/utils/joinClasses.ts", "../../../src/field/lexical/utils/swipe.ts"],
4
- "sourcesContent": ["'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { CellComponentProps } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { useClientFunctions, useTableCell } from '@payloadcms/ui/client'\nimport { $getRoot } from 'lexical'\nimport React, { useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../field/features/types.js'\nimport type { SanitizedClientEditorConfig } from '../field/lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js'\nimport { loadClientFeatures } from '../field/lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js'\nimport { getEnabledNodes } from '../field/lexical/nodes/index.js'\n\nexport const RichTextCell: React.FC<\n CellComponentProps & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n\n const [preview, setPreview] = React.useState('Loading...')\n\n const {\n cellData,\n cellProps: { schemaPath },\n } = useTableCell()\n\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n const featureProviderComponents: GeneratedFeatureProviderComponent[] = (\n richTextComponentMap.get('features') as GeneratedFeatureProviderComponent[]\n ).sort((a, b) => a.order - b.order) // order by order\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0 // feature providers and components only\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n featureProviderComponents,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n richTextComponentMap,\n featureProvidersAndComponentsToLoad,\n ])\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n return\n }\n let dataToUse = cellData\n if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {\n setPreview('')\n return\n }\n\n // Transform data through load hooks\n if (finalSanitizedEditorConfig?.features?.hooks?.load?.length) {\n finalSanitizedEditorConfig.features.hooks.load.forEach((hook) => {\n dataToUse = hook({ incomingEditorState: dataToUse })\n })\n }\n\n if (!dataToUse || typeof dataToUse !== 'object') {\n setPreview('')\n return\n }\n\n // If data is from Slate and not Lexical\n if (Array.isArray(dataToUse) && !('root' in dataToUse)) {\n setPreview('')\n return\n }\n\n // If data is from payload-plugin-lexical\n if ('jsonContent' in dataToUse) {\n setPreview('')\n return\n }\n\n // initialize headless editor\n const headlessEditor = createHeadlessEditor({\n namespace: finalSanitizedEditorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig: finalSanitizedEditorConfig }),\n theme: finalSanitizedEditorConfig.lexical.theme,\n })\n headlessEditor.setEditorState(headlessEditor.parseEditorState(dataToUse))\n\n const textContent =\n headlessEditor.getEditorState().read(() => {\n return $getRoot().getTextContent()\n }) || ''\n\n // Limiting the number of characters shown is done in a CSS rule\n setPreview(textContent)\n }, [cellData, lexicalEditorConfig, hasLoadedFeatures, finalSanitizedEditorConfig])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n })\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return <span>{preview}</span>\n}\n", "import type { EditorThemeClasses } from 'lexical'\n\nexport const LexicalEditorTheme: EditorThemeClasses = {\n block: 'LexicalEditorTheme__block',\n blockCursor: 'LexicalEditorTheme__blockCursor',\n characterLimit: 'LexicalEditorTheme__characterLimit',\n code: 'LexicalEditorTheme__code',\n codeHighlight: {\n atrule: 'LexicalEditorTheme__tokenAttr',\n attr: 'LexicalEditorTheme__tokenAttr',\n boolean: 'LexicalEditorTheme__tokenProperty',\n builtin: 'LexicalEditorTheme__tokenSelector',\n cdata: 'LexicalEditorTheme__tokenComment',\n char: 'LexicalEditorTheme__tokenSelector',\n class: 'LexicalEditorTheme__tokenFunction',\n 'class-name': 'LexicalEditorTheme__tokenFunction',\n comment: 'LexicalEditorTheme__tokenComment',\n constant: 'LexicalEditorTheme__tokenProperty',\n deleted: 'LexicalEditorTheme__tokenProperty',\n doctype: 'LexicalEditorTheme__tokenComment',\n entity: 'LexicalEditorTheme__tokenOperator',\n function: 'LexicalEditorTheme__tokenFunction',\n important: 'LexicalEditorTheme__tokenVariable',\n inserted: 'LexicalEditorTheme__tokenSelector',\n keyword: 'LexicalEditorTheme__tokenAttr',\n namespace: 'LexicalEditorTheme__tokenVariable',\n number: 'LexicalEditorTheme__tokenProperty',\n operator: 'LexicalEditorTheme__tokenOperator',\n prolog: 'LexicalEditorTheme__tokenComment',\n property: 'LexicalEditorTheme__tokenProperty',\n punctuation: 'LexicalEditorTheme__tokenPunctuation',\n regex: 'LexicalEditorTheme__tokenVariable',\n selector: 'LexicalEditorTheme__tokenSelector',\n string: 'LexicalEditorTheme__tokenSelector',\n symbol: 'LexicalEditorTheme__tokenProperty',\n tag: 'LexicalEditorTheme__tokenProperty',\n url: 'LexicalEditorTheme__tokenOperator',\n variable: 'LexicalEditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'LexicalEditorTheme__embedBlock',\n focus: 'LexicalEditorTheme__embedBlockFocus',\n },\n hashtag: 'LexicalEditorTheme__hashtag',\n heading: {\n h1: 'LexicalEditorTheme__h1',\n h2: 'LexicalEditorTheme__h2',\n h3: 'LexicalEditorTheme__h3',\n h4: 'LexicalEditorTheme__h4',\n h5: 'LexicalEditorTheme__h5',\n h6: 'LexicalEditorTheme__h6',\n },\n hr: 'LexicalEditorTheme__hr',\n indent: 'LexicalEditorTheme__indent',\n inlineImage: 'LexicalEditor__inline-image',\n link: 'LexicalEditorTheme__link',\n list: {\n checklist: 'LexicalEditorTheme__checklist',\n listitem: 'LexicalEditorTheme__listItem',\n listitemChecked: 'LexicalEditorTheme__listItemChecked',\n listitemUnchecked: 'LexicalEditorTheme__listItemUnchecked',\n nested: {\n listitem: 'LexicalEditorTheme__nestedListItem',\n },\n olDepth: [\n 'LexicalEditorTheme__ol1',\n 'LexicalEditorTheme__ol2',\n 'LexicalEditorTheme__ol3',\n 'LexicalEditorTheme__ol4',\n 'LexicalEditorTheme__ol5',\n ],\n ul: 'LexicalEditorTheme__ul',\n },\n ltr: 'LexicalEditorTheme__ltr',\n mark: 'LexicalEditorTheme__mark',\n markOverlap: 'LexicalEditorTheme__markOverlap',\n paragraph: 'LexicalEditorTheme__paragraph',\n quote: 'LexicalEditorTheme__quote',\n relationship: 'LexicalEditorTheme__relationship',\n rtl: 'LexicalEditorTheme__rtl',\n table: 'LexicalEditorTheme__table',\n tableAddColumns: 'LexicalEditorTheme__tableAddColumns',\n tableAddRows: 'LexicalEditorTheme__tableAddRows',\n tableCell: 'LexicalEditorTheme__tableCell',\n tableCellActionButton: 'LexicalEditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'LexicalEditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'LexicalEditorTheme__tableCellEditing',\n tableCellHeader: 'LexicalEditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'LexicalEditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'LexicalEditorTheme__tableCellResizer',\n tableCellSelected: 'LexicalEditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'LexicalEditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'LexicalEditorTheme__tableCellResizeRuler',\n tableSelected: 'LexicalEditorTheme__tableSelected',\n text: {\n bold: 'LexicalEditorTheme__textBold',\n code: 'LexicalEditorTheme__textCode',\n italic: 'LexicalEditorTheme__textItalic',\n strikethrough: 'LexicalEditorTheme__textStrikethrough',\n subscript: 'LexicalEditorTheme__textSubscript',\n superscript: 'LexicalEditorTheme__textSuperscript',\n underline: 'LexicalEditorTheme__textUnderline',\n underlineStrikethrough: 'LexicalEditorTheme__textUnderlineStrikethrough',\n },\n upload: 'editor-upload',\n}\n", "'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { LexicalEditorTheme } from '../../theme/EditorTheme.js'\n\nexport const defaultEditorLexicalConfig: LexicalEditorConfig = {\n namespace: 'lexical',\n theme: LexicalEditorTheme,\n}\n", "'use client'\n\nimport type {\n ClientFeatureProviderMap,\n FeatureProviderClient,\n ResolvedClientFeatureMap,\n} from '../../../features/types.js'\nimport type { ClientEditorConfig } from '../types.js'\n\n/**\n * This function expects client functions to ALREADY be ordered & dependencies checked on the server\n * @param unSanitizedEditorConfig\n */\nexport function loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig,\n}: {\n clientFunctions?: Record<string, any>\n schemaPath: string\n unSanitizedEditorConfig: ClientEditorConfig\n}): ResolvedClientFeatureMap {\n for (const featureProvider of unSanitizedEditorConfig.features) {\n if (\n !featureProvider?.clientFeatureProps?.featureKey ||\n featureProvider?.clientFeatureProps?.order === undefined ||\n featureProvider?.clientFeatureProps?.order === null\n ) {\n throw new Error(\n 'A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected.',\n )\n }\n }\n\n // sort unSanitizedEditorConfig.features by order\n unSanitizedEditorConfig.features = unSanitizedEditorConfig.features.sort(\n (a, b) => a.clientFeatureProps.order - b.clientFeatureProps.order,\n )\n\n const featureProviderMap: ClientFeatureProviderMap = new Map(\n unSanitizedEditorConfig.features.map(\n (f) => [f.clientFeatureProps.featureKey, f] as [string, FeatureProviderClient<unknown>],\n ),\n )\n\n const resolvedFeatures: ResolvedClientFeatureMap = new Map()\n\n // Make sure all dependencies declared in the respective features exist\n let loaded = 0\n for (const featureProvider of unSanitizedEditorConfig.features) {\n /**\n * Load relevant clientFunctions scoped to this feature and then pass them to the client feature\n */\n const relevantClientFunctions: Record<string, any> = {}\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (\n key.startsWith(\n `lexicalFeature.${schemaPath}.${featureProvider.clientFeatureProps.featureKey}.components.`,\n )\n ) {\n const featureComponentKey = key.split(\n `${schemaPath}.${featureProvider.clientFeatureProps.featureKey}.components.`,\n )[1]\n relevantClientFunctions[featureComponentKey] = plugin\n }\n })\n\n const feature = featureProvider.feature({\n clientFunctions: relevantClientFunctions,\n featureProviderMap,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n resolvedFeatures.set(featureProvider.clientFeatureProps.featureKey, {\n ...feature,\n key: featureProvider.clientFeatureProps.featureKey,\n order: loaded,\n })\n\n loaded++\n }\n\n return resolvedFeatures\n}\n", "'use client'\n\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type { LexicalFieldAdminProps } from '../../../../types.js'\nimport type { ResolvedClientFeatureMap, SanitizedClientFeatures } from '../../../features/types.js'\nimport type { SanitizedClientEditorConfig } from '../types.js'\n\nexport const sanitizeClientFeatures = (\n features: ResolvedClientFeatureMap,\n): SanitizedClientFeatures => {\n const sanitized: SanitizedClientFeatures = {\n enabledFeatures: [],\n hooks: {\n load: [],\n save: [],\n },\n markdownTransformers: [],\n nodes: [],\n plugins: [],\n slashMenu: {\n dynamicGroups: [],\n groups: [],\n },\n toolbarFixed: {\n groups: [],\n },\n toolbarInline: {\n groups: [],\n },\n }\n\n if (!features?.size) {\n return sanitized\n }\n\n features.forEach((feature) => {\n if (feature.hooks) {\n if (feature.hooks?.load?.length) {\n sanitized.hooks.load = sanitized.hooks.load.concat(feature.hooks.load)\n }\n if (feature.hooks?.save?.length) {\n sanitized.hooks.save = sanitized.hooks.save.concat(feature.hooks.save)\n }\n }\n\n if (feature.nodes?.length) {\n sanitized.nodes = sanitized.nodes.concat(feature.nodes)\n }\n if (feature.plugins?.length) {\n feature.plugins.forEach((plugin, i) => {\n sanitized.plugins.push({\n Component: plugin.Component,\n clientProps: feature.clientFeatureProps,\n key: feature.key + i,\n position: plugin.position,\n })\n })\n }\n\n if (feature.toolbarInline?.groups?.length) {\n for (const group of feature.toolbarInline.groups) {\n // 1. find the group with the same key or create new one\n let foundGroup = sanitized.toolbarInline.groups.find(\n (sanitizedGroup) => sanitizedGroup.key === group.key,\n )\n if (!foundGroup) {\n foundGroup = {\n ...group,\n items: [],\n }\n } else {\n sanitized.toolbarInline.groups = sanitized.toolbarInline.groups.filter(\n (sanitizedGroup) => sanitizedGroup.key !== group.key,\n )\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (group?.items?.length) {\n foundGroup.items = foundGroup.items.concat(group.items)\n }\n sanitized.toolbarInline?.groups.push(foundGroup)\n }\n }\n\n if (feature.toolbarFixed?.groups?.length) {\n for (const group of feature.toolbarFixed.groups) {\n // 1. find the group with the same key or create new one\n let foundGroup = sanitized.toolbarFixed.groups.find(\n (sanitizedGroup) => sanitizedGroup.key === group.key,\n )\n if (!foundGroup) {\n foundGroup = {\n ...group,\n items: [],\n }\n } else {\n sanitized.toolbarFixed.groups = sanitized.toolbarFixed.groups.filter(\n (sanitizedGroup) => sanitizedGroup.key !== group.key,\n )\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (group?.items?.length) {\n foundGroup.items = foundGroup.items.concat(group.items)\n }\n sanitized.toolbarFixed?.groups.push(foundGroup)\n }\n }\n\n if (feature.slashMenu?.groups) {\n if (feature.slashMenu.dynamicGroups?.length) {\n sanitized.slashMenu.dynamicGroups = sanitized.slashMenu.dynamicGroups.concat(\n feature.slashMenu.dynamicGroups,\n )\n }\n\n for (const optionGroup of feature.slashMenu.groups) {\n // 1. find the group with the same name or create new one\n let group = sanitized.slashMenu.groups.find((group) => group.key === optionGroup.key)\n if (!group) {\n group = {\n ...optionGroup,\n items: [],\n }\n } else {\n sanitized.slashMenu.groups = sanitized.slashMenu.groups.filter(\n (group) => group.key !== optionGroup.key,\n )\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (optionGroup?.items?.length) {\n group.items = group.items.concat(optionGroup.items)\n }\n sanitized.slashMenu.groups.push(group)\n }\n }\n\n if (feature.markdownTransformers?.length) {\n sanitized.markdownTransformers = sanitized.markdownTransformers.concat(\n feature.markdownTransformers,\n )\n }\n sanitized.enabledFeatures.push(feature.key)\n })\n\n // Sort sanitized.toolbarInline.groups by order property\n sanitized.toolbarInline.groups.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n // Sort sanitized.toolbarFixed.groups by order property\n sanitized.toolbarFixed.groups.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n\n // Sort sanitized.toolbarInline.groups.[group].entries by order property\n for (const group of sanitized.toolbarInline.groups) {\n group.items.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n }\n\n // Sort sanitized.toolbarFixed.groups.[group].entries by order property\n for (const group of sanitized.toolbarFixed.groups) {\n group.items.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n }\n\n return sanitized\n}\n\nexport function sanitizeClientEditorConfig(\n lexical: LexicalEditorConfig,\n resolvedClientFeatureMap: ResolvedClientFeatureMap,\n admin?: LexicalFieldAdminProps,\n): SanitizedClientEditorConfig {\n return {\n admin,\n features: sanitizeClientFeatures(resolvedClientFeatureMap),\n lexical,\n resolvedFeatureMap: resolvedClientFeatureMap,\n }\n}\n", "'use client'\n\nimport { $isElementNode, $isRangeSelection, FORMAT_ELEMENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { AlignCenterIcon } from '../../lexical/ui/icons/AlignCenter/index.js'\nimport { AlignJustifyIcon } from '../../lexical/ui/icons/AlignJustify/index.js'\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\nimport { AlignRightIcon } from '../../lexical/ui/icons/AlignRight/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarAlignGroupWithItems } from './toolbarAlignGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarAlignGroupWithItems([\n {\n ChildComponent: AlignLeftIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'left') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'left') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignLeft',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignLeftLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'left')\n },\n order: 1,\n },\n {\n ChildComponent: AlignCenterIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'center') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'center') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignCenter',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignCenterLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'center')\n },\n order: 2,\n },\n {\n ChildComponent: AlignRightIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'right') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'right') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignRight',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignRightLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'right')\n },\n order: 3,\n },\n {\n ChildComponent: AlignJustifyIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'justify') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'justify') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignJustify',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignJustifyLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'justify')\n },\n order: 4,\n },\n ]),\n]\n\nconst AlignFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const AlignFeatureClientComponent = createClientComponent(AlignFeatureClient)\n", "import React from 'react'\n\nexport const AlignCenterIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5 15H15\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AlignJustifyIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AlignLeftIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H12.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AlignRightIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "'use client'\n\nimport { useAddClientFunction, useFieldProps, useTableCell } from '@payloadcms/ui/client'\n\nimport type { FeatureProviderClient } from './field/features/types.js'\n\nexport const useLexicalFeature = <ClientFeatureProps,>(\n featureKey: string,\n feature: FeatureProviderClient<ClientFeatureProps>,\n) => {\n const { schemaPath: schemaPathFromFieldProps } = useFieldProps()\n const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature)\n}\n", "'use client'\n\nimport type { FeatureProviderProviderClient, ServerFeature } from './types.js'\n\nimport { useLexicalFeature } from '../../useLexicalFeature.js'\n\n/**\n * Utility function to create a client component for the client feature\n */\nexport const createClientComponent = <ClientFeatureProps,>(\n clientFeature: FeatureProviderProviderClient<ClientFeatureProps>,\n): ServerFeature<unknown, ClientFeatureProps>['ClientComponent'] => {\n return (props) => {\n useLexicalFeature(props.featureKey, clientFeature(props))\n return null\n }\n}\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\n\nexport const toolbarAlignGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AlignLeftIcon,\n items,\n key: 'align',\n order: 30,\n }\n}\n", "'use client'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { BlockquoteIcon } from '../../lexical/ui/icons/Blockquote/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: BlockquoteIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isQuoteNode(node) && !$isQuoteNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'blockquote',\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n order: 20,\n },\n ]),\n]\n\nconst BlockquoteFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer],\n nodes: [QuoteNode],\n\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: BlockquoteIcon,\n key: 'blockquote',\n keywords: ['quote', 'blockquote'],\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const BlockquoteFeatureClientComponent = createClientComponent(BlockquoteFeatureClient)\n", "import React from 'react'\n\nexport const BlockquoteIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.5353 10.5725C13.5353 9.47709 11.0456 9.99991 11.0456 7.85883C11.0456 6.46464 12.1162 5.61816 13.361 5.61816C14.805 5.61816 16 6.86298 16 8.92937C16 11.2945 14.4564 13.7841 11.1203 14.3816L10.8216 13.1368C12.888 12.4895 13.5353 11.4937 13.5353 10.5725ZM6.71369 10.5725C6.71369 9.47709 4.22407 9.99991 4.22407 7.85883C4.22407 6.46464 5.29461 5.61816 6.53942 5.61816C7.9834 5.61816 9.17842 6.86298 9.17842 8.92937C9.17842 11.2945 7.63485 13.7841 4.29876 14.3816L4 13.1368C6.06639 12.4895 6.71369 11.4937 6.71369 10.5725Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type {\n SlashMenuGroup,\n SlashMenuItem,\n} from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport function slashMenuBasicGroupWithItems(items: SlashMenuItem[]): SlashMenuGroup {\n return {\n items,\n key: 'basic',\n label: ({ i18n }) => {\n return i18n.t('lexical:general:slashMenuBasicGroupLabel')\n },\n }\n}\n", "import React from 'react'\n\nexport const TextIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { TextIcon } from '../../../lexical/ui/icons/Text/index.js'\n\nexport const toolbarTextDropdownGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: TextIcon,\n items,\n key: 'text',\n order: 25,\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n", "'use client'\n\nimport type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { BlockIcon } from '../../lexical/ui/icons/Block/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\n\nexport type BlocksFeatureClientProps = {\n reducedBlocks: ReducedBlock[]\n}\n\nconst BlocksFeatureClient: FeatureProviderProviderClient<BlocksFeatureClientProps> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [BlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n {\n items: props.reducedBlocks.map((block) => {\n return {\n Icon: BlockIcon,\n key: 'block-' + block.slug,\n keywords: ['block', 'blocks', block.slug],\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n }\n }),\n key: 'blocks',\n label: ({ i18n }) => {\n return i18n.t('lexical:blocks:label')\n },\n },\n ],\n },\n toolbarFixed: {\n groups: [\n {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: props.reducedBlocks.map((block, index) => {\n return {\n ChildComponent: BlockIcon,\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + block.slug,\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n order: index,\n }\n }),\n key: 'blocks',\n order: 20,\n },\n ],\n },\n }),\n }\n}\n\nexport const BlocksFeatureClientComponent = createClientComponent(BlocksFeatureClient)\n", "import React from 'react'\n\nexport const BlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"8\" y=\"5\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"5\" y=\"11\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"11\" y=\"11\" />\n </svg>\n)\n", "import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n ElementFormatType,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n Spread,\n} from 'lexical'\n\nimport { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport ObjectID from 'bson-objectid'\nimport React, { type JSX } from 'react'\n\nexport type BlockFields = {\n /** Block form data */\n [key: string]: any\n blockName: string\n blockType: string\n id: string\n}\n\nconst BlockComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.BlockComponent,\n })),\n)\n\nexport type SerializedBlockNode = Spread<\n {\n fields: BlockFields\n },\n SerializedDecoratorBlockNode\n>\n\nexport class BlockNode extends DecoratorBlockNode {\n __fields: BlockFields\n\n constructor({\n fields,\n format,\n key,\n }: {\n fields: BlockFields\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__fields = fields\n }\n\n static clone(node: BlockNode): BlockNode {\n return new BlockNode({\n fields: node.__fields,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'block'\n }\n\n static importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static importJSON(serializedNode: SerializedBlockNode): BlockNode {\n if (serializedNode.version === 1) {\n // Convert (version 1 had the fields wrapped in another, unnecessary data property)\n serializedNode = {\n ...serializedNode,\n fields: {\n ...(serializedNode as any).fields.data,\n },\n version: 2,\n }\n }\n const node = $createBlockNode(serializedNode.fields)\n node.setFormat(serializedNode.format)\n return node\n }\n\n static isInline(): false {\n return false\n }\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n // @ts-expect-error\n return <BlockComponent formData={this.getFields()} nodeKey={this.getKey()} />\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('div')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n exportJSON(): SerializedBlockNode {\n return {\n ...super.exportJSON(),\n type: this.getType(),\n fields: this.getFields(),\n version: 2,\n }\n }\n\n getFields(): BlockFields {\n return this.getLatest().__fields\n }\n\n getTextContent(): string {\n return `Block Field`\n }\n\n setFields(fields: BlockFields): void {\n const fieldsCopy = JSON.parse(JSON.stringify(fields)) as BlockFields\n\n const writable = this.getWritable()\n writable.__fields = fieldsCopy\n }\n}\n\nexport function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode {\n return new BlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode {\n return node instanceof BlockNode\n}\n", "import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nimport type { InsertBlockPayload } from './index.js'\n\nexport const INSERT_BLOCK_COMMAND: LexicalCommand<InsertBlockPayload> =\n createCommand('INSERT_BLOCK_COMMAND')\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../types.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\nimport type { BlockFields } from '../nodes/BlocksNode.js'\n\nimport { BlocksDrawerComponent } from '../drawer/index.js'\nimport { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './commands.js'\n\nexport type InsertBlockPayload = Exclude<BlockFields, 'id'>\n\nexport const BlocksPlugin: PluginComponent<BlocksFeatureClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([BlockNode])) {\n throw new Error('BlocksPlugin: BlocksNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertBlockPayload>(\n INSERT_BLOCK_COMMAND,\n (payload: InsertBlockPayload) => {\n editor.update(() => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const blockNode = $createBlockNode(payload)\n // Insert blocks node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(blockNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor])\n\n return <BlocksDrawerComponent />\n}\n", "'use client'\nimport type { LexicalCommand, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport {\n BlocksDrawer,\n formatDrawerSlug,\n useEditDepth,\n useModal,\n useTranslation,\n} from '@payloadcms/ui/client'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ClientComponentProps } from '../../types.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { $createBlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from '../plugin/commands.js'\nconst baseClass = 'lexical-blocks-drawer'\n\nexport const INSERT_BLOCK_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_BLOCK_WITH_DRAWER_COMMAND')\n\nconst insertBlock = ({\n blockType,\n editor,\n replaceNodeKey,\n}: {\n blockType: string\n editor: LexicalEditor\n replaceNodeKey: null | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace(\n $createBlockNode({\n id: null,\n blockName: '',\n blockType,\n }),\n )\n }\n })\n }\n}\n\nexport const BlocksDrawerComponent: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig, uuid } = useEditorConfigContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n const editDepth = useEditDepth()\n const { t } = useTranslation()\n const { openModal } = useModal()\n\n const labels = {\n plural: t('fields:blocks') || 'Blocks',\n singular: t('fields:block') || 'Block',\n }\n\n const addRow = useCallback(\n (rowIndex: number, blockType: string) => {\n insertBlock({\n blockType,\n editor,\n replaceNodeKey,\n })\n },\n [editor, replaceNodeKey],\n )\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-blocks-` + uuid,\n depth: editDepth,\n })\n\n const reducedBlocks = (\n editorConfig?.resolvedFeatureMap?.get('blocks')\n ?.clientFeatureProps as ClientComponentProps<BlocksFeatureClientProps>\n )?.reducedBlocks\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_BLOCK_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openModal(drawerSlug)\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, drawerSlug, openModal])\n\n return (\n <BlocksDrawer\n addRow={addRow}\n addRowIndex={0}\n blocks={reducedBlocks}\n drawerSlug={drawerSlug}\n labels={labels}\n />\n )\n}\n", "'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\n\nimport { IS_APPLE } from '../../../../lexical/utils/environment.js'\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'Enter',\n 'Backspace',\n 'Delete',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = window.getSelection()\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = window.getSelection()\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = window.getSelection()\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n", "export const CAN_USE_DOM: boolean =\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n", "import { CAN_USE_DOM } from './canUseDOM.js'\n\ndeclare global {\n interface Document {\n documentMode?: unknown\n }\n\n interface Window {\n MSStream?: unknown\n }\n}\n\nconst documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null\n\nexport const IS_APPLE: boolean = CAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform)\n\nexport const IS_FIREFOX: boolean =\n CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent)\n\nexport const CAN_USE_BEFORE_INPUT: boolean =\n CAN_USE_DOM && 'InputEvent' in window && !documentMode\n ? 'getTargetRanges' in new window.InputEvent('input')\n : false\n\nexport const IS_SAFARI: boolean = CAN_USE_DOM && /Version\\/[\\d.].*Safari/.test(navigator.userAgent)\n\nexport const IS_IOS: boolean =\n CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream\n\nexport const IS_ANDROID: boolean = CAN_USE_DOM && /Android/.test(navigator.userAgent)\n\nexport const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform)\nexport const IS_CHROME: boolean = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent)\n// export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;\n\nexport const IS_APPLE_WEBKIT =\n CAN_USE_DOM && /AppleWebKit\\/[\\d.]+/.test(navigator.userAgent) && !IS_CHROME\n", "'use client'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { TestRecorderPlugin } from './plugin/index.js'\n\nconst TestRecorderFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: TestRecorderPlugin,\n position: 'bottom',\n },\n ],\n }),\n }\n}\n\nexport const TestRecorderFeatureClientComponent = createClientComponent(TestRecorderFeatureClient)\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n", "'use client'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { TreeViewPlugin } from './plugin/index.js'\n\nconst TreeViewFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: TreeViewPlugin,\n position: 'bottom',\n },\n ],\n }),\n }\n}\n\nexport const TreeViewFeatureClientComponent = createClientComponent(TreeViewFeatureClient)\n", "'use client'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nconst BoldFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n clientFeatureProps: props,\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const BoldFeatureClientComponent = createClientComponent(BoldFeatureClient)\n", "import React from 'react'\n\nexport const BoldIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "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", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const BOLD_ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n tag: '***',\n}\n\nexport const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n intraword: false,\n tag: '___',\n}\n\nexport const BOLD_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n tag: '**',\n}\n\nexport const BOLD_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n intraword: false,\n tag: '__',\n}\n", "'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 { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nconst InlineCodeFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n markdownTransformers: [INLINE_CODE],\n\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const InlineCodeFeatureClientComponent = createClientComponent(InlineCodeFeatureClient)\n", "import React from 'react'\n\nexport const CodeIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M7.76465 6L3.76465 10L7.76465 14\" stroke=\"currentColor\" />\n <path d=\"M12.2354 6L16.2354 10L12.2354 14\" stroke=\"currentColor\" />\n </svg>\n)\n", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const INLINE_CODE: TextFormatTransformer = {\n type: 'text-format',\n format: ['code'],\n tag: '`',\n}\n", "'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", "import React from 'react'\n\nexport const ItalicIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n tag: '*',\n}\n\nexport const ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n intraword: false,\n tag: '_',\n}\n", "'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", "import React from 'react'\n\nexport const StrikethroughIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z\"\n fill=\"currentColor\"\n />\n <path d=\"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z\" fill=\"currentColor\" />\n </svg>\n)\n", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const STRIKETHROUGH: TextFormatTransformer = {\n type: 'text-format',\n format: ['strikethrough'],\n tag: '~~',\n}\n", "'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", "import React from 'react'\n\nexport const SubscriptIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "'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", "import React from 'react'\n\nexport const SuperscriptIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "'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", "import React from 'react'\n\nexport const UnderlineIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z\"\n fill=\"currentColor\"\n />\n <path d=\"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z\" fill=\"currentColor\" />\n </svg>\n)\n", "'use client'\n\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { HeadingFeatureProps } from './feature.server.js'\n\nimport { H1Icon } from '../../lexical/ui/icons/H1/index.js'\nimport { H2Icon } from '../../lexical/ui/icons/H2/index.js'\nimport { H3Icon } from '../../lexical/ui/icons/H3/index.js'\nimport { H4Icon } from '../../lexical/ui/icons/H4/index.js'\nimport { H5Icon } from '../../lexical/ui/icons/H5/index.js'\nimport { H6Icon } from '../../lexical/ui/icons/H6/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nconst $setHeading = (headingSize: HeadingTagType) => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createHeadingNode(headingSize))\n}\n\nconst iconImports = {\n h1: H1Icon,\n h2: H2Icon,\n h3: H3Icon,\n h4: H4Icon,\n h5: H5Icon,\n h6: H6Icon,\n}\n\nconst HeadingFeatureClient: FeatureProviderProviderClient<HeadingFeatureProps> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = props\n\n const toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems(\n enabledHeadingSizes.map((headingSize, i) => {\n return {\n ChildComponent: iconImports[headingSize],\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isHeadingNode(node) && node.getTag() === headingSize) {\n continue\n }\n\n const parent = node.getParent()\n if ($isHeadingNode(parent) && parent.getTag() === headingSize) {\n continue\n }\n\n return false\n }\n return true\n },\n key: headingSize,\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', { headingLevel: headingSize.charAt(1) })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n order: i + 2,\n }\n }),\n ),\n ]\n\n return {\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer(enabledHeadingSizes)],\n nodes: [HeadingNode],\n slashMenu: {\n groups: enabledHeadingSizes?.length\n ? [\n slashMenuBasicGroupWithItems(\n enabledHeadingSizes.map((headingSize) => {\n return {\n Icon: iconImports[headingSize],\n key: `heading-${headingSize.charAt(1)}`,\n keywords: ['heading', headingSize],\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', {\n headingLevel: headingSize.charAt(1),\n })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n }\n }),\n ),\n ]\n : [],\n },\n toolbarFixed: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n toolbarInline: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n }\n },\n }\n}\n\nexport const HeadingFeatureClientComponent = createClientComponent(HeadingFeatureClient)\n", "import React from 'react'\n\nexport const H1Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H2Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H3Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H4Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H5Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.1576 10.269C12.6896 10.269 12.3746 10.494 12.2216 10.737H10.8176L11.1956 7.074H15.2546V8.28H12.3206L12.1856 9.549C12.4016 9.351 12.8516 9.126 13.4636 9.126C14.7866 9.126 15.6596 10.053 15.6596 11.358C15.6596 12.609 14.7326 13.608 13.1756 13.608C11.5826 13.608 10.6556 12.753 10.5566 11.511H12.1136C12.1586 12.06 12.5456 12.465 13.1576 12.465C13.8236 12.465 14.1746 11.97 14.1746 11.376C14.1746 10.764 13.8416 10.269 13.1576 10.269Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H6Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.3646 8.127C12.5456 8.127 12.0416 8.937 12.0416 9.999C12.3296 9.54 12.8246 9.207 13.5536 9.207C14.8586 9.207 15.8036 10.134 15.8036 11.376C15.8036 12.645 14.8226 13.608 13.3196 13.608C11.7266 13.608 10.6196 12.393 10.6196 10.395C10.6196 8.316 11.7716 6.966 13.4186 6.966C14.7056 6.966 15.5786 7.749 15.7316 8.829H14.3186C14.2016 8.415 13.9226 8.127 13.3646 8.127ZM13.3106 12.51C13.9586 12.51 14.3816 12.042 14.3816 11.385C14.3816 10.737 13.9586 10.278 13.3106 10.278C12.6536 10.278 12.2126 10.737 12.2126 11.385C12.2126 12.042 12.6536 12.51 13.3106 12.51Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type { ElementTransformer } from '@lexical/markdown'\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\n\nimport { createBlockNode } from '../../lexical/utils/markdown/createBlockNode.js'\n\nexport const MarkdownTransformer: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer = (\n enabledHeadingSizes,\n) => {\n // Convert enabledHeadingSizes to a list of numbers (1 for h1, 2 for h2, etc.)\n const enabledSizes = enabledHeadingSizes.map((tag) => Number(tag.slice(1)))\n\n // Create a regex pattern that matches any of the enabled sizes\n const pattern = `^(${enabledSizes.map((size) => `#{${size}}`).join('|')})\\\\s`\n const regExp = new RegExp(pattern)\n\n return {\n type: 'element',\n dependencies: [HeadingNode],\n export: (node, exportChildren) => {\n if (!$isHeadingNode(node)) {\n return null\n }\n const level = Number(node.getTag().slice(1))\n return '#'.repeat(level) + ' ' + exportChildren(node)\n },\n regExp,\n replace: createBlockNode((match) => {\n const tag = ('h' + match[1].length) as HeadingTagType\n return $createHeadingNode(tag)\n }),\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\nimport type { ElementNode } from 'lexical'\n\nexport const createBlockNode = (\n createNode: (match: Array<string>) => ElementNode,\n): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const node = createNode(match)\n if (node) {\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n }\n }\n}\n", "'use client'\n\nimport type { ClientTranslationKeys } from '@payloadcms/translations'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport {\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from './nodes/HorizontalRuleNode.js'\nimport { HorizontalRulePlugin } from './plugin/index.js'\n\nconst HorizontalRuleFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer],\n nodes: [HorizontalRuleNode],\n plugins: [\n {\n Component: HorizontalRulePlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: HorizontalRuleIcon,\n key: 'horizontalRule',\n keywords: ['hr', 'horizontal rule', 'line', 'separator'],\n label: ({ i18n }) => {\n return i18n.t('lexical:horizontalRule:label')\n },\n\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: HorizontalRuleIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isHorizontalRuleNode(firstNode)\n },\n key: 'horizontalRule',\n label: ({ i18n }) => {\n return i18n.t('lexical:horizontalRule:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const HorizontalRuleFeatureClientComponent = createClientComponent(\n HorizontalRuleFeatureClient,\n)\n", "import React from 'react'\n\nexport const HorizontalRuleIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect fill=\"currentColor\" height=\"1\" width=\"12\" x=\"4\" y=\"9.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AddIcon: React.FC = () => (\n <svg fill=\"none\" height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 10h10\" stroke=\"currentColor\" />\n <path d=\"M10 15V5\" stroke=\"currentColor\" />\n </svg>\n)\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { AddIcon } from '../../../lexical/ui/icons/Add/index.js'\n\nexport const toolbarAddDropdownGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AddIcon,\n items,\n key: 'add',\n order: 10,\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport {\n $createHorizontalRuleNode,\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n} from './nodes/HorizontalRuleNode.js'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [HorizontalRuleNode],\n export: (node, exportChildren) => {\n if (!$isHorizontalRuleNode(node)) {\n return null\n }\n return '---'\n },\n // match ---\n regExp: /^---\\s*$/,\n replace: (parentNode) => {\n const node = $createHorizontalRuleNode()\n if (node) {\n parentNode.replace(node)\n }\n },\n}\n", "'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../types.js'\n\nimport {\n $createHorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from '../nodes/HorizontalRuleNode.js'\n/**\n * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.\n */\nexport const HorizontalRulePlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand(\n INSERT_HORIZONTAL_RULE_COMMAND,\n (type) => {\n const selection = $getSelection()\n\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n const focusNode = selection.focus.getNode()\n\n if (focusNode !== null) {\n const horizontalRuleNode = $createHorizontalRuleNode()\n $insertNodeToNearestRoot(horizontalRuleNode)\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\n\nimport { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarIndentGroupWithItems } from './toolbarIndentGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarIndentGroupWithItems([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indentDecrease',\n label: ({ i18n }) => {\n return i18n.t('lexical:indent:decreaseLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indentIncrease',\n label: ({ i18n }) => {\n return i18n.t('lexical:indent:increaseLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n]\n\nconst IndentFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const IndentFeatureClientComponent = createClientComponent(IndentFeatureClient)\n", "import React from 'react'\n\nexport const IndentDecreaseIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H10.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H10.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M12.25 7.25L17.25 3.75V10.75L12.25 7.25Z\" fill=\"currentColor\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const IndentIncreaseIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M17.5 5H9.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17.5 10H9.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17.5 15H2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7.75 7.25L2.75 3.75V10.75L7.75 7.25Z\" fill=\"currentColor\" />\n </svg>\n)\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nexport const toolbarIndentGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'indent',\n order: 35,\n }\n}\n", "'use client'\n\nimport type { LexicalNode } from 'lexical'\n\nimport { $findMatchingParent } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { ExclusiveLinkCollectionsProps } from './feature.server.js'\nimport type { LinkFields } from './nodes/types.js'\n\nimport { LinkIcon } from '../../lexical/ui/icons/Link/index.js'\nimport { getSelectedNode } from '../../lexical/utils/getSelectedNode.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarFeatureButtonsGroupWithItems } from '../shared/toolbar/featureButtonsGroup.js'\nimport { LinkMarkdownTransformer } from './markdownTransformer.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './nodes/LinkNode.js'\nimport { AutoLinkPlugin } from './plugins/autoLink/index.js'\nimport { ClickableLinkPlugin } from './plugins/clickableLink/index.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './plugins/floatingLinkEditor/LinkEditor/commands.js'\nimport { FloatingLinkEditorPlugin } from './plugins/floatingLinkEditor/index.js'\nimport { LinkPlugin } from './plugins/link/index.js'\n\nexport type ClientProps = ExclusiveLinkCollectionsProps\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFeatureButtonsGroupWithItems([\n {\n ChildComponent: LinkIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n const selectedNode = getSelectedNode(selection)\n const linkParent = $findMatchingParent(selectedNode, $isLinkNode)\n return linkParent != null\n }\n return false\n },\n isEnabled: ({ selection }) => {\n return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length)\n },\n key: 'link',\n label: ({ i18n }) => {\n return i18n.t('lexical:link:label')\n },\n onSelect: ({ editor, isActive }) => {\n if (!isActive) {\n let selectedText: string = null\n let selectedNodes: LexicalNode[] = []\n editor.getEditorState().read(() => {\n selectedText = $getSelection()?.getTextContent()\n // We need to selected nodes here before the drawer opens, as clicking around in the drawer may change the original selection\n selectedNodes = $getSelection()?.getNodes() ?? []\n })\n\n if (!selectedText?.length) {\n return\n }\n\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: 'https://',\n }\n\n editor.dispatchCommand(TOGGLE_LINK_WITH_MODAL_COMMAND, {\n fields: linkFields,\n selectedNodes,\n text: selectedText,\n })\n } else {\n // remove link\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }\n },\n order: 1,\n },\n ]),\n]\n\nconst LinkFeatureClient: FeatureProviderProviderClient<ClientProps> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [LinkNode, AutoLinkNode],\n plugins: [\n {\n Component: LinkPlugin,\n position: 'normal',\n },\n {\n Component: AutoLinkPlugin,\n position: 'normal',\n },\n {\n Component: ClickableLinkPlugin,\n position: 'normal',\n },\n {\n Component: FloatingLinkEditorPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const LinkFeatureClientComponent = createClientComponent(LinkFeatureClient)\n", "import React from 'react'\n\nexport const LinkIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.5 11.5L11.5 8.5M8.5 7L9.625 5.875C10.868 4.633 12.882 4.633 14.125 5.875C15.368 7.118 15.368 9.133 14.125 10.375L13 11.5M7 8.5L5.746 9.754C4.56 10.94 4.519 12.85 5.652 14.087C6.814 15.354 8.78 15.449 10.058 14.298L11.5 13\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n", "import type { ElementNode, RangeSelection, TextNode } from 'lexical'\n\nimport { $isAtNodeEnd } from '@lexical/selection'\n\nexport function getSelectedNode(selection: RangeSelection): ElementNode | TextNode {\n const { anchor } = selection\n const { focus } = selection\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n if (anchorNode === focusNode) {\n return anchorNode\n }\n const isBackward = selection.isBackward()\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode\n }\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode\n}\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nexport const toolbarFeatureButtonsGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'features',\n order: 50,\n }\n}\n", "/**\n * Code taken from https://github.com/facebook/lexical/blob/main/packages/lexical-markdown/src/MarkdownTransformers.ts#L357\n */\n\n// Order of text transformers matters:\n//\n// - code should go first as it prevents any transformations inside\n\nimport type { TextMatchTransformer } from '@lexical/markdown'\n\nimport { $createTextNode, $isTextNode } from 'lexical'\n\nimport { $createLinkNode, $isLinkNode, LinkNode } from './nodes/LinkNode.js'\n\n// - then longer tags match (e.g. ** or __ should go before * or _)\nexport const LinkMarkdownTransformer: TextMatchTransformer = {\n type: 'text-match',\n dependencies: [LinkNode],\n export: (_node, exportChildren, exportFormat) => {\n if (!$isLinkNode(_node)) {\n return null\n }\n const node: LinkNode = _node\n const { url } = node.getFields()\n const linkContent = `[${node.getTextContent()}](${url})`\n const firstChild = node.getFirstChild()\n // Add text styles only if link has single text node inside. If it's more\n // then one we ignore it as markdown does not support nested styles for links\n if (node.getChildrenSize() === 1 && $isTextNode(firstChild)) {\n return exportFormat(firstChild, linkContent)\n } else {\n return linkContent\n }\n },\n importRegExp: /\\[([^[]+)\\]\\(([^()\\s]+)(?:\\s\"((?:[^\"]*\\\\\")*[^\"]*)\"\\s*)?\\)/,\n regExp: /\\[([^[]+)\\]\\(([^()\\s]+)(?:\\s\"((?:[^\"]*\\\\\")*[^\"]*)\"\\s*)?\\)$/,\n replace: (textNode, match) => {\n const [, linkText, linkUrl] = match\n const linkNode = $createLinkNode({\n fields: {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: linkUrl,\n },\n })\n const linkTextNode = $createTextNode(linkText)\n linkTextNode.setFormat(textNode.getFormat())\n linkNode.append(linkTextNode)\n textNode.replace(linkNode)\n },\n trigger: ')',\n}\n", "import type {\n BaseSelection,\n DOMConversionMap,\n DOMConversionOutput,\n EditorConfig,\n ElementNode as ElementNodeType,\n LexicalCommand,\n LexicalNode,\n NodeKey,\n RangeSelection,\n} from 'lexical'\n\nimport { addClassNamesToElement, isHTMLAnchorElement } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport {\n $applyNodeReplacement,\n $createTextNode,\n $getSelection,\n $isElementNode,\n $isRangeSelection,\n ElementNode,\n createCommand,\n} from 'lexical'\n\nimport type { LinkPayload } from '../plugins/floatingLinkEditor/types.js'\nimport type { LinkFields, SerializedLinkNode } from './types.js'\n\nconst SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:'])\n\n/** @noInheritDoc */\nexport class LinkNode extends ElementNode {\n __fields: LinkFields\n __id: string\n\n constructor({\n id,\n fields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: undefined,\n },\n key,\n }: {\n fields: LinkFields\n id: string\n key?: NodeKey\n }) {\n super(key)\n this.__fields = fields\n this.__id = id\n }\n\n static clone(node: LinkNode): LinkNode {\n return new LinkNode({\n id: node.__id,\n fields: node.__fields,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'link'\n }\n\n static importDOM(): DOMConversionMap | null {\n return {\n a: (node: Node) => ({\n conversion: $convertAnchorElement,\n priority: 1,\n }),\n }\n }\n\n static importJSON(serializedNode: SerializedLinkNode): LinkNode {\n if (\n serializedNode.version === 1 &&\n typeof serializedNode.fields?.doc?.value === 'object' &&\n serializedNode.fields?.doc?.value?.id\n ) {\n serializedNode.fields.doc.value = serializedNode.fields.doc.value.id\n serializedNode.version = 2\n }\n\n if (serializedNode.version === 2 && !serializedNode.id) {\n serializedNode.id = new ObjectID.default().toHexString()\n serializedNode.version = 3\n }\n\n const node = $createLinkNode({\n id: serializedNode.id,\n fields: serializedNode.fields,\n })\n node.setFormat(serializedNode.format)\n node.setIndent(serializedNode.indent)\n node.setDirection(serializedNode.direction)\n return node\n }\n\n canBeEmpty(): false {\n return false\n }\n\n canInsertTextAfter(): false {\n return false\n }\n\n canInsertTextBefore(): false {\n return false\n }\n\n createDOM(config: EditorConfig): HTMLAnchorElement {\n const element = document.createElement('a')\n if (this.__fields?.linkType === 'custom') {\n element.href = this.sanitizeUrl(this.__fields.url ?? '')\n }\n if (this.__fields?.newTab ?? false) {\n element.target = '_blank'\n }\n\n if (this.__fields?.newTab === true && this.__fields?.linkType === 'custom') {\n element.rel = manageRel(element.rel, 'add', 'noopener')\n }\n\n addClassNamesToElement(element, config.theme.link)\n return element\n }\n\n exportJSON(): SerializedLinkNode {\n const returnObject: SerializedLinkNode = {\n ...super.exportJSON(),\n type: this.getType(),\n fields: this.getFields(),\n version: 3,\n }\n const id = this.getID()\n if (id) {\n returnObject.id = id\n }\n return returnObject\n }\n\n extractWithChild(\n child: LexicalNode,\n selection: BaseSelection,\n destination: 'clone' | 'html',\n ): boolean {\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n\n return (\n this.isParentOf(anchorNode) &&\n this.isParentOf(focusNode) &&\n selection.getTextContent().length > 0\n )\n }\n\n getFields(): LinkFields {\n return this.getLatest().__fields\n }\n\n getID(): string {\n return this.getLatest().__id\n }\n\n insertNewAfter(selection: RangeSelection, restoreSelection = true): ElementNodeType | null {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection)\n if ($isElementNode(element)) {\n const linkNode = $createLinkNode({ fields: this.__fields })\n element.append(linkNode)\n return linkNode\n }\n return null\n }\n\n isInline(): true {\n return true\n }\n\n sanitizeUrl(url: string): string {\n try {\n const parsedUrl = new URL(url)\n // eslint-disable-next-line no-script-url\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return 'about:blank'\n }\n } catch (e) {\n return 'https://'\n }\n return url\n }\n\n setFields(fields: LinkFields): void {\n const writable = this.getWritable()\n writable.__fields = fields\n }\n\n updateDOM(prevNode: LinkNode, anchor: HTMLAnchorElement, config: EditorConfig): boolean {\n const url = this.__fields?.url\n const newTab = this.__fields?.newTab\n if (url != null && url !== prevNode.__fields?.url && this.__fields?.linkType === 'custom') {\n anchor.href = url\n }\n if (this.__fields?.linkType === 'internal' && prevNode.__fields?.linkType === 'custom') {\n anchor.removeAttribute('href')\n }\n\n // TODO: not 100% sure why we're settign rel to '' - revisit\n // Start rel config here, then check newTab below\n if (anchor.rel == null) {\n anchor.rel = ''\n }\n\n if (newTab !== prevNode.__fields?.newTab) {\n if (newTab ?? false) {\n anchor.target = '_blank'\n if (this.__fields?.linkType === 'custom') {\n anchor.rel = manageRel(anchor.rel, 'add', 'noopener')\n }\n } else {\n anchor.removeAttribute('target')\n anchor.rel = manageRel(anchor.rel, 'remove', 'noopener')\n }\n }\n\n return false\n }\n}\n\nfunction $convertAnchorElement(domNode: Node): DOMConversionOutput {\n let node: LinkNode | null = null\n if (isHTMLAnchorElement(domNode)) {\n const content = domNode.textContent\n if (content !== null && content !== '') {\n node = $createLinkNode({\n id: new ObjectID.default().toHexString(),\n fields: {\n doc: null,\n linkType: 'custom',\n newTab: domNode.getAttribute('target') === '_blank',\n url: domNode.getAttribute('href') ?? '',\n },\n })\n }\n }\n return { node }\n}\n\nexport function $createLinkNode({ id, fields }: { fields: LinkFields; id?: string }): LinkNode {\n return $applyNodeReplacement(\n new LinkNode({\n id: id ?? new ObjectID.default().toHexString(),\n fields,\n }),\n )\n}\n\nexport function $isLinkNode(node: LexicalNode | null | undefined): node is LinkNode {\n return node instanceof LinkNode\n}\n\nexport const TOGGLE_LINK_COMMAND: LexicalCommand<LinkPayload | null> =\n createCommand('TOGGLE_LINK_COMMAND')\n\nexport function $toggleLink(payload: LinkPayload): void {\n const selection = $getSelection()\n\n if (!$isRangeSelection(selection) && !payload.selectedNodes.length) {\n return\n }\n const nodes = $isRangeSelection(selection) ? selection.extract() : payload.selectedNodes\n\n if (payload === null) {\n // Remove LinkNodes\n nodes.forEach((node) => {\n const parent = node.getParent()\n\n if ($isLinkNode(parent)) {\n const children = parent.getChildren()\n\n for (let i = 0; i < children.length; i += 1) {\n parent.insertBefore(children[i])\n }\n\n parent.remove()\n }\n })\n } else {\n // Add or merge LinkNodes\n if (nodes.length === 1) {\n const firstNode = nodes[0]\n // if the first node is a LinkNode or if its\n // parent is a LinkNode, we update the URL, target and rel.\n const linkNode: LinkNode | null = $isLinkNode(firstNode)\n ? firstNode\n : $getLinkAncestor(firstNode)\n if (linkNode !== null) {\n linkNode.setFields(payload.fields)\n\n if (payload.text != null && payload.text !== linkNode.getTextContent()) {\n // remove all children and add child with new textcontent:\n linkNode.append($createTextNode(payload.text))\n linkNode.getChildren().forEach((child) => {\n if (child !== linkNode.getLastChild()) {\n child.remove()\n }\n })\n }\n return\n }\n }\n\n let prevParent: ElementNodeType | LinkNode | null = null\n let linkNode: LinkNode | null = null\n\n nodes.forEach((node) => {\n const parent = node.getParent()\n\n if (parent === linkNode || parent === null || ($isElementNode(node) && !node.isInline())) {\n return\n }\n\n if ($isLinkNode(parent)) {\n linkNode = parent\n parent.setFields(payload.fields)\n if (payload.text != null && payload.text !== parent.getTextContent()) {\n // remove all children and add child with new textcontent:\n parent.append($createTextNode(payload.text))\n parent.getChildren().forEach((child) => {\n if (child !== parent.getLastChild()) {\n child.remove()\n }\n })\n }\n return\n }\n\n if (!parent.is(prevParent)) {\n prevParent = parent\n linkNode = $createLinkNode({ fields: payload.fields })\n\n if ($isLinkNode(parent)) {\n if (node.getPreviousSibling() === null) {\n parent.insertBefore(linkNode)\n } else {\n parent.insertAfter(linkNode)\n }\n } else {\n node.insertBefore(linkNode)\n }\n }\n\n if ($isLinkNode(node)) {\n if (node.is(linkNode)) {\n return\n }\n if (linkNode !== null) {\n const children = node.getChildren()\n\n for (let i = 0; i < children.length; i += 1) {\n linkNode.append(children[i])\n }\n }\n\n node.remove()\n return\n }\n\n if (linkNode !== null) {\n linkNode.append(node)\n }\n })\n }\n}\n\nfunction $getLinkAncestor(node: LexicalNode): LinkNode | null {\n return $getAncestor(node, (ancestor) => $isLinkNode(ancestor)) as LinkNode\n}\n\nfunction $getAncestor(\n node: LexicalNode,\n predicate: (ancestor: LexicalNode) => boolean,\n): LexicalNode | null {\n let parent: LexicalNode | null = node\n while (parent !== null && (parent = parent.getParent()) !== null && !predicate(parent));\n return parent\n}\n\nfunction manageRel(input: string, action: 'add' | 'remove', value: string): string {\n let result: string\n let mutableInput = `${input}`\n if (action === 'add') {\n // if we somehow got out of sync - clean up\n if (mutableInput.includes(value)) {\n const re = new RegExp(value, 'g')\n mutableInput = mutableInput.replace(re, '').trim()\n }\n mutableInput = mutableInput.trim()\n result = mutableInput.length === 0 ? `${value}` : `${mutableInput} ${value}`\n } else {\n const re = new RegExp(value, 'g')\n result = mutableInput.replace(re, '').trim()\n }\n return result\n}\n", "import type { ElementNode, LexicalNode, RangeSelection } from 'lexical'\n\nimport { $applyNodeReplacement, $isElementNode } from 'lexical'\n\nimport type { LinkFields, SerializedAutoLinkNode } from './types.js'\n\nimport { LinkNode } from './LinkNode.js'\n\n// Custom node type to override `canInsertTextAfter` that will\n// allow typing within the link\n\nexport class AutoLinkNode extends LinkNode {\n static clone(node: AutoLinkNode): AutoLinkNode {\n return new AutoLinkNode({ id: undefined, fields: node.__fields, key: node.__key })\n }\n\n static getType(): string {\n return 'autolink'\n }\n\n static importDOM(): null {\n // TODO: Should link node should handle the import over autolink?\n return null\n }\n\n static importJSON(serializedNode: SerializedAutoLinkNode): AutoLinkNode {\n if (\n serializedNode.version === 1 &&\n typeof serializedNode.fields?.doc?.value === 'object' &&\n serializedNode.fields?.doc?.value?.id\n ) {\n serializedNode.fields.doc.value = serializedNode.fields.doc.value.id\n serializedNode.version = 2\n }\n\n const node = $createAutoLinkNode({ fields: serializedNode.fields })\n\n node.setFormat(serializedNode.format)\n node.setIndent(serializedNode.indent)\n node.setDirection(serializedNode.direction)\n return node\n }\n\n exportJSON(): SerializedAutoLinkNode {\n return {\n ...super.exportJSON(),\n type: 'autolink',\n version: 2,\n }\n }\n\n insertNewAfter(selection: RangeSelection, restoreSelection = true): ElementNode | null {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection)\n if ($isElementNode(element)) {\n const linkNode = $createAutoLinkNode({ fields: this.__fields })\n element.append(linkNode)\n return linkNode\n }\n return null\n }\n}\n\nexport function $createAutoLinkNode({ fields }: { fields: LinkFields }): AutoLinkNode {\n return $applyNodeReplacement(new AutoLinkNode({ id: undefined, fields }))\n}\nexport function $isAutoLinkNode(node: LexicalNode | null | undefined): node is AutoLinkNode {\n return node instanceof AutoLinkNode\n}\n", "'use client'\nimport type { ElementNode, LexicalEditor, LexicalNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $createTextNode,\n $getSelection,\n $isElementNode,\n $isLineBreakNode,\n $isNodeSelection,\n $isRangeSelection,\n $isTextNode,\n type TextNode,\n TextNode as TextNodeValue,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\nimport type { ClientProps } from '../../feature.client.js'\nimport type { LinkFields } from '../../nodes/types.js'\n\nimport { invariant } from '../../../../lexical/utils/invariant.js'\nimport { $createAutoLinkNode, $isAutoLinkNode, AutoLinkNode } from '../../nodes/AutoLinkNode.js'\nimport { $isLinkNode } from '../../nodes/LinkNode.js'\n\ntype ChangeHandler = (url: null | string, prevUrl: null | string) => void\n\ninterface LinkMatcherResult {\n fields?: LinkFields\n index: number\n length: number\n text: string\n url: string\n}\n\nexport type LinkMatcher = (text: string) => LinkMatcherResult | null\n\nexport function createLinkMatcherWithRegExp(\n regExp: RegExp,\n urlTransformer: (text: string) => string = (text) => text,\n) {\n return (text: string) => {\n const match = regExp.exec(text)\n if (match === null) return null\n return {\n index: match.index,\n length: match[0].length,\n text: match[0],\n url: urlTransformer(match[0]),\n }\n }\n}\n\nfunction findFirstMatch(text: string, matchers: LinkMatcher[]): LinkMatcherResult | null {\n for (let i = 0; i < matchers.length; i++) {\n const match = matchers[i](text)\n\n if (match != null) {\n return match\n }\n }\n\n return null\n}\n\nconst PUNCTUATION_OR_SPACE = /[.,;\\s]/\n\nfunction isSeparator(char: string): boolean {\n return PUNCTUATION_OR_SPACE.test(char)\n}\n\nfunction endsWithSeparator(textContent: string): boolean {\n return isSeparator(textContent[textContent.length - 1])\n}\n\nfunction startsWithSeparator(textContent: string): boolean {\n return isSeparator(textContent[0])\n}\n\nfunction isPreviousNodeValid(node: LexicalNode): boolean {\n let previousNode = node.getPreviousSibling()\n if ($isElementNode(previousNode)) {\n previousNode = previousNode.getLastDescendant()\n }\n return (\n previousNode === null ||\n $isLineBreakNode(previousNode) ||\n ($isTextNode(previousNode) && endsWithSeparator(previousNode.getTextContent()))\n )\n}\n\nfunction isNextNodeValid(node: LexicalNode): boolean {\n let nextNode = node.getNextSibling()\n if ($isElementNode(nextNode)) {\n nextNode = nextNode.getFirstDescendant()\n }\n return (\n nextNode === null ||\n $isLineBreakNode(nextNode) ||\n ($isTextNode(nextNode) && startsWithSeparator(nextNode.getTextContent()))\n )\n}\n\nfunction isContentAroundIsValid(\n matchStart: number,\n matchEnd: number,\n text: string,\n nodes: TextNode[],\n): boolean {\n const contentBeforeIsValid =\n matchStart > 0 ? isSeparator(text[matchStart - 1]) : isPreviousNodeValid(nodes[0])\n if (!contentBeforeIsValid) {\n return false\n }\n\n const contentAfterIsValid =\n matchEnd < text.length ? isSeparator(text[matchEnd]) : isNextNodeValid(nodes[nodes.length - 1])\n return contentAfterIsValid\n}\n\nfunction extractMatchingNodes(\n nodes: TextNode[],\n startIndex: number,\n endIndex: number,\n): [\n matchingOffset: number,\n unmodifiedBeforeNodes: TextNode[],\n matchingNodes: TextNode[],\n unmodifiedAfterNodes: TextNode[],\n] {\n const unmodifiedBeforeNodes: TextNode[] = []\n const matchingNodes: TextNode[] = []\n const unmodifiedAfterNodes: TextNode[] = []\n let matchingOffset = 0\n\n let currentOffset = 0\n const currentNodes = [...nodes]\n\n while (currentNodes.length > 0) {\n const currentNode = currentNodes[0]\n const currentNodeText = currentNode.getTextContent()\n const currentNodeLength = currentNodeText.length\n const currentNodeStart = currentOffset\n const currentNodeEnd = currentOffset + currentNodeLength\n\n if (currentNodeEnd <= startIndex) {\n unmodifiedBeforeNodes.push(currentNode)\n matchingOffset += currentNodeLength\n } else if (currentNodeStart >= endIndex) {\n unmodifiedAfterNodes.push(currentNode)\n } else {\n matchingNodes.push(currentNode)\n }\n currentOffset += currentNodeLength\n currentNodes.shift()\n }\n return [matchingOffset, unmodifiedBeforeNodes, matchingNodes, unmodifiedAfterNodes]\n}\n\nfunction $createAutoLinkNode_(\n nodes: TextNode[],\n startIndex: number,\n endIndex: number,\n match: LinkMatcherResult,\n): TextNode | undefined {\n const fields: LinkFields = {\n linkType: 'custom',\n url: match.url,\n ...match.fields,\n }\n\n const linkNode = $createAutoLinkNode({ fields })\n if (nodes.length === 1) {\n let remainingTextNode = nodes[0]\n let linkTextNode\n if (startIndex === 0) {\n ;[linkTextNode, remainingTextNode] = remainingTextNode.splitText(endIndex)\n } else {\n ;[, linkTextNode, remainingTextNode] = remainingTextNode.splitText(startIndex, endIndex)\n }\n const textNode = $createTextNode(match.text)\n textNode.setFormat(linkTextNode.getFormat())\n textNode.setDetail(linkTextNode.getDetail())\n textNode.setStyle(linkTextNode.getStyle())\n linkNode.append(textNode)\n linkTextNode.replace(linkNode)\n return remainingTextNode\n } else if (nodes.length > 1) {\n const firstTextNode = nodes[0]\n let offset = firstTextNode.getTextContent().length\n let firstLinkTextNode\n if (startIndex === 0) {\n firstLinkTextNode = firstTextNode\n } else {\n ;[, firstLinkTextNode] = firstTextNode.splitText(startIndex)\n }\n const linkNodes = []\n let remainingTextNode\n for (let i = 1; i < nodes.length; i++) {\n const currentNode = nodes[i]\n const currentNodeText = currentNode.getTextContent()\n const currentNodeLength = currentNodeText.length\n const currentNodeStart = offset\n const currentNodeEnd = offset + currentNodeLength\n if (currentNodeStart < endIndex) {\n if (currentNodeEnd <= endIndex) {\n linkNodes.push(currentNode)\n } else {\n const [linkTextNode, endNode] = currentNode.splitText(endIndex - currentNodeStart)\n linkNodes.push(linkTextNode)\n remainingTextNode = endNode\n }\n }\n offset += currentNodeLength\n }\n const selection = $getSelection()\n const selectedTextNode = selection ? selection.getNodes().find($isTextNode) : undefined\n const textNode = $createTextNode(firstLinkTextNode.getTextContent())\n textNode.setFormat(firstLinkTextNode.getFormat())\n textNode.setDetail(firstLinkTextNode.getDetail())\n textNode.setStyle(firstLinkTextNode.getStyle())\n linkNode.append(textNode, ...linkNodes)\n // it does not preserve caret position if caret was at the first text node\n // so we need to restore caret position\n if (selectedTextNode && selectedTextNode === firstLinkTextNode) {\n if ($isRangeSelection(selection)) {\n textNode.select(selection.anchor.offset, selection.focus.offset)\n } else if ($isNodeSelection(selection)) {\n textNode.select(0, textNode.getTextContent().length)\n }\n }\n firstLinkTextNode.replace(linkNode)\n return remainingTextNode\n }\n return undefined\n}\n\nfunction $handleLinkCreation(\n nodes: TextNode[],\n matchers: LinkMatcher[],\n onChange: ChangeHandler,\n): void {\n let currentNodes = [...nodes]\n const initialText = currentNodes.map((node) => node.getTextContent()).join('')\n let text = initialText\n\n let match\n let invalidMatchEnd = 0\n\n while ((match = findFirstMatch(text, matchers)) != null && match !== null) {\n const matchStart: number = match.index\n const matchLength: number = match.length\n const matchEnd = matchStart + matchLength\n const isValid = isContentAroundIsValid(\n invalidMatchEnd + matchStart,\n invalidMatchEnd + matchEnd,\n initialText,\n currentNodes,\n )\n\n if (isValid) {\n const [matchingOffset, , matchingNodes, unmodifiedAfterNodes] = extractMatchingNodes(\n currentNodes,\n invalidMatchEnd + matchStart,\n invalidMatchEnd + matchEnd,\n )\n\n const actualMatchStart = invalidMatchEnd + matchStart - matchingOffset\n const actualMatchEnd = invalidMatchEnd + matchEnd - matchingOffset\n const remainingTextNode = $createAutoLinkNode_(\n matchingNodes,\n actualMatchStart,\n actualMatchEnd,\n match,\n )\n currentNodes = remainingTextNode\n ? [remainingTextNode, ...unmodifiedAfterNodes]\n : unmodifiedAfterNodes\n onChange(match.url, null)\n invalidMatchEnd = 0\n } else {\n invalidMatchEnd += matchEnd\n }\n\n text = text.substring(matchEnd)\n }\n}\n\nfunction handleLinkEdit(\n linkNode: AutoLinkNode,\n matchers: LinkMatcher[],\n onChange: ChangeHandler,\n): void {\n // Check children are simple text\n const children = linkNode.getChildren()\n const childrenLength = children.length\n for (let i = 0; i < childrenLength; i++) {\n const child = children[i]\n if (!$isTextNode(child) || !child.isSimpleText()) {\n replaceWithChildren(linkNode)\n onChange(null, linkNode.getFields()?.url ?? null)\n return\n }\n }\n\n // Check text content fully matches\n const text = linkNode.getTextContent()\n const match = findFirstMatch(text, matchers)\n if (match === null || match.text !== text) {\n replaceWithChildren(linkNode)\n onChange(null, linkNode.getFields()?.url ?? null)\n return\n }\n\n // Check neighbors\n if (!isPreviousNodeValid(linkNode) || !isNextNodeValid(linkNode)) {\n replaceWithChildren(linkNode)\n onChange(null, linkNode.getFields()?.url ?? null)\n return\n }\n\n const url = linkNode.getFields()?.url\n if (url !== match?.url) {\n const flds = linkNode.getFields()\n flds.url = match?.url\n linkNode.setFields(flds)\n onChange(match.url, url ?? null)\n }\n}\n\n// Bad neighbors are edits in neighbor nodes that make AutoLinks incompatible.\n// Given the creation preconditions, these can only be simple text nodes.\nfunction handleBadNeighbors(\n textNode: TextNode,\n matchers: LinkMatcher[],\n onChange: ChangeHandler,\n): void {\n const previousSibling = textNode.getPreviousSibling()\n const nextSibling = textNode.getNextSibling()\n const text = textNode.getTextContent()\n\n if ($isAutoLinkNode(previousSibling) && !startsWithSeparator(text)) {\n previousSibling.append(textNode)\n handleLinkEdit(previousSibling, matchers, onChange)\n onChange(null, previousSibling.getFields()?.url ?? null)\n }\n\n if ($isAutoLinkNode(nextSibling) && !endsWithSeparator(text)) {\n replaceWithChildren(nextSibling)\n handleLinkEdit(nextSibling, matchers, onChange)\n onChange(null, nextSibling.getFields()?.url ?? null)\n }\n}\n\nfunction replaceWithChildren(node: ElementNode): LexicalNode[] {\n const children = node.getChildren()\n const childrenLength = children.length\n\n for (let j = childrenLength - 1; j >= 0; j--) {\n node.insertAfter(children[j])\n }\n\n node.remove()\n return children.map((child) => child.getLatest())\n}\n\nfunction getTextNodesToMatch(textNode: TextNode): TextNode[] {\n // check if next siblings are simple text nodes till a node contains a space separator\n const textNodesToMatch = [textNode]\n let nextSibling = textNode.getNextSibling()\n while (nextSibling !== null && $isTextNode(nextSibling) && nextSibling.isSimpleText()) {\n textNodesToMatch.push(nextSibling)\n if (/\\s/.test(nextSibling.getTextContent())) {\n break\n }\n nextSibling = nextSibling.getNextSibling()\n }\n return textNodesToMatch\n}\n\nfunction useAutoLink(\n editor: LexicalEditor,\n matchers: LinkMatcher[],\n onChange?: ChangeHandler,\n): void {\n useEffect(() => {\n if (!editor.hasNodes([AutoLinkNode])) {\n invariant(false, 'LexicalAutoLinkPlugin: AutoLinkNode not registered on editor')\n }\n\n const onChangeWrapped = (url: null | string, prevUrl: null | string): void => {\n if (onChange != null) {\n onChange(url, prevUrl)\n }\n }\n\n return mergeRegister(\n editor.registerNodeTransform(TextNodeValue, (textNode: TextNode) => {\n const parent = textNode.getParentOrThrow()\n const previous = textNode.getPreviousSibling()\n if ($isAutoLinkNode(parent)) {\n handleLinkEdit(parent, matchers, onChangeWrapped)\n } else if (!$isLinkNode(parent)) {\n if (\n textNode.isSimpleText() &&\n (startsWithSeparator(textNode.getTextContent()) || !$isAutoLinkNode(previous))\n ) {\n const textNodesToMatch = getTextNodesToMatch(textNode)\n $handleLinkCreation(textNodesToMatch, matchers, onChangeWrapped)\n }\n\n handleBadNeighbors(textNode, matchers, onChangeWrapped)\n }\n }),\n )\n }, [editor, matchers, onChange])\n}\n\nconst URL_REGEX =\n /((https?:\\/\\/(www\\.)?)|(www\\.))[-\\w@:%.+~#=]{1,256}\\.[a-zA-Z\\d()]{1,6}\\b([-\\w()@:%+.~#?&/=]*)/\n\nconst EMAIL_REGEX =\n /(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\])|(([a-z\\-\\d]+\\.)+[a-z]{2,}))/i\n\nconst MATCHERS = [\n createLinkMatcherWithRegExp(URL_REGEX, (text) => {\n return text.startsWith('http') ? text : `https://${text}`\n }),\n createLinkMatcherWithRegExp(EMAIL_REGEX, (text) => {\n return `mailto:${text}`\n }),\n]\n\nexport const AutoLinkPlugin: PluginComponent<ClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useAutoLink(editor, MATCHERS)\n\n return null\n}\n", "// Taken from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/shared/src/invariant.ts\n\n// invariant(condition, message) will refine types based on \"condition\", and\n// if \"condition\" is false will throw an error. This function is special-cased\n// in flow itself, so we can't name it anything else.\nexport function invariant(cond?: boolean, message?: string, ...args: string[]): asserts cond {\n if (cond) {\n return\n }\n\n throw new Error(\n 'Internal Lexical error: invariant() is meant to be replaced at compile ' +\n 'time. There is no runtime version. Error: ' +\n message,\n )\n}\n", "'use client'\nimport { ClickableLinkPlugin as LexicalClickableLinkPlugin } from '@lexical/react/LexicalClickableLinkPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\nimport type { ClientProps } from '../../feature.client.js'\n\nexport const ClickableLinkPlugin: PluginComponent<ClientProps> = () => {\n return <LexicalClickableLinkPlugin />\n}\n", "import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nimport type { LinkPayload } from '../types.js'\n\nexport const TOGGLE_LINK_WITH_MODAL_COMMAND: LexicalCommand<LinkPayload | null> = createCommand(\n 'TOGGLE_LINK_WITH_MODAL_COMMAND',\n)\n", "'use client'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../types.js'\nimport type { ClientProps } from '../../feature.client.js'\n\nimport { LinkEditor } from './LinkEditor/index.js'\nexport const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps> = (props) => {\n const { anchorElem = document.body } = props\n\n return createPortal(<LinkEditor anchorElem={anchorElem} />, anchorElem)\n}\n", "'use client'\nimport type { LexicalNode } from 'lexical'\nimport type { Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n formatDrawerSlug,\n useConfig,\n useEditDepth,\n useModal,\n useTranslation,\n} from '@payloadcms/ui/client'\nimport {\n $getSelection,\n $isLineBreakNode,\n $isRangeSelection,\n COMMAND_PRIORITY_HIGH,\n COMMAND_PRIORITY_LOW,\n KEY_ESCAPE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\n\nimport type { LinkNode } from '../../../nodes/LinkNode.js'\nimport type { LinkFields } from '../../../nodes/types.js'\nimport type { LinkPayload } from '../types.js'\n\nimport { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { getSelectedNode } from '../../../../../lexical/utils/getSelectedNode.js'\nimport { setFloatingElemPositionForLinkEditor } from '../../../../../lexical/utils/setFloatingElemPositionForLinkEditor.js'\nimport { LinkDrawer } from '../../../drawer/index.js'\nimport { $isAutoLinkNode } from '../../../nodes/AutoLinkNode.js'\nimport { $createLinkNode, $isLinkNode, TOGGLE_LINK_COMMAND } from '../../../nodes/LinkNode.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './commands.js'\n\nexport function LinkEditor({ anchorElem }: { anchorElem: HTMLElement }): React.ReactNode {\n const [editor] = useLexicalComposerContext()\n\n const editorRef = useRef<HTMLDivElement | null>(null)\n const [linkUrl, setLinkUrl] = useState(null)\n const [linkLabel, setLinkLabel] = useState(null)\n\n const { uuid } = useEditorConfigContext()\n\n const config = useConfig()\n\n const { i18n, t } = useTranslation()\n\n const [stateData, setStateData] = useState<{} | (LinkFields & { id?: string; text: string })>({})\n\n const { closeModal, isModalOpen, toggleModal } = useModal()\n const editDepth = useEditDepth()\n const [isLink, setIsLink] = useState(false)\n const [selectedNodes, setSelectedNodes] = useState<LexicalNode[]>([])\n\n const [isAutoLink, setIsAutoLink] = useState(false)\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-link-` + uuid,\n depth: editDepth,\n })\n\n const setNotLink = useCallback(() => {\n setIsLink(false)\n if (editorRef && editorRef.current) {\n editorRef.current.style.opacity = '0'\n editorRef.current.style.transform = 'translate(-10000px, -10000px)'\n }\n setIsAutoLink(false)\n setLinkUrl(null)\n setLinkLabel(null)\n setSelectedNodes([])\n setStateData({})\n }, [setIsLink, setLinkUrl, setLinkLabel, setSelectedNodes])\n\n const $updateLinkEditor = useCallback(() => {\n const selection = $getSelection()\n let selectedNodeDomRect: DOMRect | undefined = null\n\n if (!$isRangeSelection(selection) || !selection) {\n setNotLink()\n return\n }\n\n // Handle the data displayed in the floating link editor & drawer when you click on a link node\n\n const focusNode = getSelectedNode(selection)\n selectedNodeDomRect = editor.getElementByKey(focusNode.getKey())?.getBoundingClientRect()\n const focusLinkParent: LinkNode = $findMatchingParent(focusNode, $isLinkNode)\n\n // Prevent link modal from showing if selection spans further than the link: https://github.com/facebook/lexical/issues/4064\n const badNode = selection\n .getNodes()\n .filter((node) => !$isLineBreakNode(node))\n .find((node) => {\n const linkNode = $findMatchingParent(node, $isLinkNode)\n return (\n (focusLinkParent && !focusLinkParent.is(linkNode)) ||\n (linkNode && !linkNode.is(focusLinkParent))\n )\n })\n\n if (focusLinkParent == null || badNode) {\n setNotLink()\n return\n }\n\n // Initial state:\n const data: LinkFields & { text: string } = {\n doc: undefined,\n linkType: undefined,\n newTab: undefined,\n url: '',\n ...focusLinkParent.getFields(),\n id: focusLinkParent.getID(),\n text: focusLinkParent.getTextContent(),\n }\n\n if (focusLinkParent.getFields()?.linkType === 'custom') {\n setLinkUrl(focusLinkParent.getFields()?.url ?? null)\n setLinkLabel(null)\n } else {\n // internal link\n setLinkUrl(\n `/admin/collections/${focusLinkParent.getFields()?.doc?.relationTo}/${\n focusLinkParent.getFields()?.doc?.value\n }`,\n )\n\n const relatedField = config.collections.find(\n (coll) => coll.slug === focusLinkParent.getFields()?.doc?.relationTo,\n )\n if (!relatedField) {\n // Usually happens if the user removed all default fields. In this case, we let them specify the label or do not display the label at all.\n // label could be a virtual field the user added. This is useful if they want to use the link feature for things other than links.\n setLinkLabel(\n focusLinkParent.getFields()?.label ? String(focusLinkParent.getFields()?.label) : null,\n )\n setLinkUrl(\n focusLinkParent.getFields()?.url ? String(focusLinkParent.getFields()?.url) : null,\n )\n } else {\n const label = t('fields:linkedTo', {\n label: getTranslation(relatedField.labels.singular, i18n),\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(label)\n }\n }\n\n setStateData(data)\n setIsLink(true)\n setSelectedNodes(selection ? selection?.getNodes() : [])\n\n if ($isAutoLinkNode(focusLinkParent)) {\n setIsAutoLink(true)\n } else {\n setIsAutoLink(false)\n }\n\n const editorElem = editorRef.current\n const nativeSelection = window.getSelection()\n const { activeElement } = document\n\n if (editorElem === null) {\n return\n }\n\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n if (!selectedNodeDomRect) {\n // Get the DOM rect of the selected node using the native selection. This sometimes produces the wrong\n // result, which is why we use lexical's selection preferably.\n selectedNodeDomRect = nativeSelection.getRangeAt(0).getBoundingClientRect()\n }\n\n if (selectedNodeDomRect != null) {\n selectedNodeDomRect.y += 40\n setFloatingElemPositionForLinkEditor(selectedNodeDomRect, editorElem, anchorElem)\n }\n } else if (activeElement == null || activeElement.className !== 'link-input') {\n if (rootElement !== null) {\n setFloatingElemPositionForLinkEditor(null, editorElem, anchorElem)\n }\n setLinkUrl(null)\n setLinkLabel(null)\n }\n\n return true\n }, [editor, setNotLink, config.collections, t, i18n, anchorElem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_WITH_MODAL_COMMAND,\n (payload: LinkPayload) => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, payload)\n\n // Now, open the modal\n $updateLinkEditor()\n toggleModal(drawerSlug)\n\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, $updateLinkEditor, toggleModal, drawerSlug])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = (): void => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }\n\n window.addEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [anchorElem.parentElement, editor, $updateLinkEditor])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n void $updateLinkEditor()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n void $updateLinkEditor()\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ESCAPE_COMMAND,\n () => {\n if (isLink) {\n setNotLink()\n\n return true\n }\n return false\n },\n COMMAND_PRIORITY_HIGH,\n ),\n )\n }, [editor, $updateLinkEditor, isLink, setNotLink])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }, [editor, $updateLinkEditor])\n\n return (\n <React.Fragment>\n <div className=\"link-editor\" ref={editorRef}>\n <div className=\"link-input\">\n {linkUrl && linkUrl.length > 0 ? (\n <a href={linkUrl} rel=\"noopener noreferrer\" target=\"_blank\">\n {linkLabel != null && linkLabel.length > 0 ? linkLabel : linkUrl}\n </a>\n ) : linkLabel != null && linkLabel.length > 0 ? (\n <span className=\"link-input__label-pure\">{linkLabel}</span>\n ) : null}\n\n {editor.isEditable() && (\n <React.Fragment>\n <button\n aria-label=\"Edit link\"\n className=\"link-edit\"\n onClick={() => {\n toggleModal(drawerSlug)\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n tabIndex={0}\n type=\"button\"\n />\n {!isAutoLink && (\n <button\n aria-label=\"Remove link\"\n className=\"link-trash\"\n onClick={() => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n tabIndex={0}\n type=\"button\"\n />\n )}\n </React.Fragment>\n )}\n </div>\n </div>\n {isModalOpen(drawerSlug) && (\n <LinkDrawer\n drawerSlug={drawerSlug}\n handleModalSubmit={(fields: FormState, data: Data) => {\n closeModal(drawerSlug)\n\n const newLinkPayload = data as LinkFields & { text: string }\n\n const bareLinkFields: LinkFields = {\n ...newLinkPayload,\n }\n delete bareLinkFields.text\n\n // See: https://github.com/facebook/lexical/pull/5536. This updates autolink nodes to link nodes whenever a change was made (which is good!).\n editor.update(() => {\n const selection = $getSelection()\n let linkParent = null\n if ($isRangeSelection(selection)) {\n linkParent = getSelectedNode(selection).getParent()\n } else {\n if (selectedNodes.length) {\n linkParent = selectedNodes[0].getParent()\n }\n }\n\n if (linkParent && $isAutoLinkNode(linkParent)) {\n const linkNode = $createLinkNode({\n fields: bareLinkFields,\n })\n linkParent.replace(linkNode, true)\n }\n })\n\n // Needs to happen AFTER a potential auto link => link node conversion, as otherwise, the updated text to display may be lost due to\n // it being applied to the auto link node instead of the link node.\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: bareLinkFields,\n selectedNodes,\n text: newLinkPayload.text,\n })\n }}\n stateData={stateData}\n />\n )}\n </React.Fragment>\n )\n}\n", "const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\nexport function setFloatingElemPositionForLinkEditor(\n targetRect: DOMRect | null,\n floatingElem: HTMLElement,\n anchorElem: HTMLElement,\n verticalGap: number = VERTICAL_GAP,\n horizontalOffset: number = HORIZONTAL_OFFSET,\n): void {\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (top < editorScrollerRect.top) {\n top += floatingElemRect.height + targetRect.height + verticalGap * 2\n }\n\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n\n top -= anchorElementRect.top\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n}\n", "import type { FormProps } from '@payloadcms/ui/forms/Form'\nimport type { FormState } from 'payload'\n\nimport {\n Drawer,\n Form,\n FormSubmit,\n RenderFields,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useTranslation,\n} from '@payloadcms/ui/client'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { type Props } from './types.js'\n\nconst baseClass = 'lexical-link-edit-drawer'\n\nexport const LinkDrawer: React.FC<Props> = ({ drawerSlug, handleModalSubmit, stateData }) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.link.fields.fields`\n const schemaFieldsPath = `${schemaPath}.feature.link.fields`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: stateData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (stateData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, stateData])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n return (\n <Drawer className={baseClass} slug={drawerSlug} title={t('fields:editLink') ?? ''}>\n {initialState !== false && (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleModalSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('general:submit')}</FormSubmit>\n </Form>\n )}\n </Drawer>\n )\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isElementNode,\n $isRangeSelection,\n COMMAND_PRIORITY_LOW,\n PASTE_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\nimport type { ClientProps } from '../../feature.client.js'\nimport type { LinkFields } from '../../nodes/types.js'\nimport type { LinkPayload } from '../floatingLinkEditor/types.js'\n\nimport { validateUrl } from '../../../../lexical/utils/url.js'\nimport { $toggleLink, LinkNode, TOGGLE_LINK_COMMAND } from '../../nodes/LinkNode.js'\n\nexport const LinkPlugin: PluginComponent<ClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([LinkNode])) {\n throw new Error('LinkPlugin: LinkNode not registered on editor')\n }\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_COMMAND,\n (payload: LinkPayload) => {\n $toggleLink(payload)\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n validateUrl !== undefined\n ? editor.registerCommand(\n PASTE_COMMAND,\n (event) => {\n const selection = $getSelection()\n if (\n !$isRangeSelection(selection) ||\n selection.isCollapsed() ||\n !(event instanceof ClipboardEvent) ||\n event.clipboardData == null\n ) {\n return false\n }\n const clipboardText = event.clipboardData.getData('text')\n if (!validateUrl(clipboardText)) {\n return false\n }\n // If we select nodes that are elements then avoid applying the link.\n if (!selection.getNodes().some((node) => $isElementNode(node))) {\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: clipboardText,\n }\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: linkFields,\n text: null,\n })\n event.preventDefault()\n return true\n }\n return false\n },\n COMMAND_PRIORITY_LOW,\n )\n : () => {\n // Don't paste arbitrary text as a link when there's no validate function\n },\n )\n }, [editor])\n\n return null\n}\n", "export function sanitizeUrl(url: string): string {\n /** A pattern that matches safe URLs. */\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi\n\n /** A pattern that matches safe data URLs. */\n const DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z\\d+/]+=*$/i\n\n url = String(url).trim()\n\n if (url.match(SAFE_URL_PATTERN) != null || url.match(DATA_URL_PATTERN) != null) return url\n\n return 'https://'\n}\n\n// Source: https://stackoverflow.com/a/8234912/2013580\nconst absoluteRegExp =\n /(?:[A-Za-z]{3,9}:(?:\\/\\/)?(?:[-;:&=+$,\\w]+@)?[A-Za-z\\d.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z\\d.-]+)(?:\\/[+~%/.\\w-]*)?\\??[-+=&;%@.\\w]*#?\\w*/\n\n/**\n * This regex checks for relative URLs starting with / or anchor links starting with # in a string. Tested for the following use cases:\n * - /privacy-policy\n * - /privacy-policy#primary-terms\n * - #primary-terms\n * */\nconst relativeOrAnchorRegExp = /^[\\w\\-./]*(?:#\\w[\\w-]*)?$/\n\n// Do not keep validateUrl function too loose. This is run when pasting in text, to determine if links are in that text and if it should create AutoLinkNodes.\n// This is why we do not allow stuff like anchors here, as we don't want copied anchors to be turned into AutoLinkNodes.\nexport function validateUrl(url: string): boolean {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n\n if (!url) return false\n\n if (url === 'https://') return true\n\n // This makes sure URLs starting with www. instead of https are valid too\n if (absoluteRegExp.test(url)) return true\n\n // Check relative or anchor links\n if (relativeOrAnchorRegExp.test(url)) return true\n\n // While this doesn't allow URLs starting with www (which is why we use the regex above), it does properly handle tel: URLs\n try {\n new URL(url)\n return true\n } catch {\n /* empty */\n }\n\n return false\n}\n", "'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\n\nconst ChecklistFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n if (!featureProviderMap.has('unorderedList') && !featureProviderMap.has('orderedList')) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n clientFeatureProps: props,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const ChecklistFeatureClientComponent = createClientComponent(ChecklistFeatureClient)\n", "import React from 'react'\n\nexport const ChecklistIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"13\" rx=\"1.5\" stroke=\"currentColor\" width=\"13\" x=\"3.5\" y=\"3.5\" />\n <path d=\"M7 10L9 12.5L13 7.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "'use client'\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../types.js'\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n", "import type {\n SlashMenuGroup,\n SlashMenuItem,\n} from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport function slashMenuListGroupWithItems(items: SlashMenuItem[]): SlashMenuGroup {\n return {\n items,\n key: 'lists',\n label: ({ i18n }) => {\n return i18n.t('lexical:general:slashMenuListGroupLabel')\n },\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,\n replace: listReplace('check'),\n}\n", "// Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1\n\nimport type { ListNode, ListType } from '@lexical/list'\nimport type { ElementTransformer } from '@lexical/markdown'\nimport type { ElementNode } from 'lexical'\n\nimport { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list'\n\n// Amount of spaces that define indentation level\nconst LIST_INDENT_SIZE = 4\n\nexport const listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = Math.floor(match[1].length / LIST_INDENT_SIZE)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nexport const listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n", "'use client'\nimport { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\n\nexport const LexicalCheckListPlugin: PluginComponent<undefined> = () => {\n return <CheckListPlugin />\n}\n", "'use client'\nimport { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: OrderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'number') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'number') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'number') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'orderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n]\n\nconst OrderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n return {\n clientFeatureProps: props,\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('orderedList') ? [] : [ListNode, ListItemNode],\n plugins: featureProviderMap.has('orderedList')\n ? []\n : [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: OrderedListIcon,\n key: 'orderedList',\n keywords: ['ordered list', 'ol'],\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const OrderedListFeatureClientComponent = createClientComponent(OrderedListFeatureClient)\n", "import React from 'react'\n\nexport const OrderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.89284 12.479C5.89284 13.368 5.26284 13.788 4.38084 14.236C3.75084 14.558 3.43584 14.789 3.40784 15.062H5.89984V16H2.06384V15.573C2.06384 14.523 2.92484 13.935 3.66684 13.501C4.38084 13.088 4.75184 12.878 4.75184 12.458C4.75184 12.08 4.52084 11.835 4.06584 11.835C3.58984 11.835 3.30984 12.199 3.28184 12.654H2.11284C2.18984 11.681 2.87584 10.918 4.07284 10.918C5.15784 10.918 5.89284 11.555 5.89284 12.479Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M2.68608 4.535V3.737C3.54008 3.737 3.90408 3.513 4.02308 2.995H4.89108V8H3.68008L3.68008 4.535H2.68608Z\"\n fill=\"currentColor\"\n />\n <path d=\"M8 15L17 15\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M8 10L17 10\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M8 5L17 5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(\\d+)\\.\\s/,\n replace: listReplace('number'),\n}\n", "'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nconst UnorderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const UnorderedListFeatureClientComponent = createClientComponent(UnorderedListFeatureClient)\n", "import React from 'react'\n\nexport const UnorderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"4\" cy=\"5\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"10\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"15\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <path d=\"M17 5H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 10H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 15H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const UNORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)[-*+]\\s/,\n replace: listReplace('bullet'),\n}\n", "import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\nimport type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './types.js'\n\nexport function convertLexicalPluginToLexical({\n converters,\n lexicalPluginData,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginData: PayloadPluginLexicalData\n}): SerializedEditorState {\n return {\n root: {\n type: 'root',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginData?.jsonContent?.root?.children || [],\n parentNodeType: 'root',\n }),\n direction: lexicalPluginData?.jsonContent?.root?.direction || 'ltr',\n format: lexicalPluginData?.jsonContent?.root?.format || '',\n indent: lexicalPluginData?.jsonContent?.root?.indent || 0,\n version: 1,\n },\n }\n}\n\nexport function convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes,\n parentNodeType,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginNodes: SerializedLexicalNode[] | undefined\n /**\n * Type of the parent lexical node (not the type of the original, parent payload-plugin-lexical type)\n */\n parentNodeType: string\n}): SerializedLexicalNode[] {\n if (!lexicalPluginNodes?.length) {\n return []\n }\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n return (\n lexicalPluginNodes.map((lexicalPluginNode, i) => {\n if (lexicalPluginNode.type === 'paragraph') {\n return convertParagraphNode(converters, lexicalPluginNode)\n }\n if (lexicalPluginNode.type === 'text' || !lexicalPluginNode.type) {\n return convertTextNode(lexicalPluginNode)\n }\n\n const converter = converters.find((converter) =>\n converter.nodeTypes.includes(lexicalPluginNode.type),\n )\n\n if (converter) {\n return converter.converter({ childIndex: i, converters, lexicalPluginNode, parentNodeType })\n }\n\n console.warn(\n 'lexicalPluginToLexical > No converter found for node type: ' + lexicalPluginNode.type,\n )\n return unknownConverter?.converter({\n childIndex: i,\n converters,\n lexicalPluginNode,\n parentNodeType,\n })\n }) || []\n )\n}\n\nexport function convertParagraphNode(\n converters: LexicalPluginNodeConverter[],\n node: SerializedLexicalNode,\n): SerializedParagraphNode {\n return {\n ...node,\n type: 'paragraph',\n\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: (node as any).children || [],\n parentNodeType: 'paragraph',\n }),\n version: 1,\n } as SerializedParagraphNode\n}\nexport function convertTextNode(node: SerializedLexicalNode): SerializedTextNode {\n return node as SerializedTextNode\n}\n", "import type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'\nimport type { JSX } from 'react'\n\nimport { addClassNamesToElement } from '@lexical/utils'\nimport { DecoratorNode } from 'lexical'\nimport * as React from 'react'\n\nexport type UnknownConvertedNodeData = {\n nodeData: unknown\n nodeType: string\n}\n\nexport type SerializedUnknownConvertedNode = Spread<\n {\n data: UnknownConvertedNodeData\n },\n SerializedLexicalNode\n>\n\nconst Component = React.lazy(() =>\n import('./Component.js').then((module) => ({\n default: module.UnknownConvertedNodeComponent,\n })),\n)\n\n/** @noInheritDoc */\nexport class UnknownConvertedNode extends DecoratorNode<JSX.Element> {\n __data: UnknownConvertedNodeData\n\n constructor({ data, key }: { data: UnknownConvertedNodeData; key?: NodeKey }) {\n super(key)\n this.__data = data\n }\n\n static clone(node: UnknownConvertedNode): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data: node.__data,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'unknownConverted'\n }\n\n static importJSON(serializedNode: SerializedUnknownConvertedNode): UnknownConvertedNode {\n const node = $createUnknownConvertedNode({ data: serializedNode.data })\n return node\n }\n\n canInsertTextAfter(): true {\n return true\n }\n\n canInsertTextBefore(): true {\n return true\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n const element = document.createElement('span')\n addClassNamesToElement(element, 'unknownConverted')\n return element\n }\n\n decorate(): JSX.Element | null {\n return <Component data={this.__data} />\n }\n\n exportJSON(): SerializedUnknownConvertedNode {\n return {\n type: this.getType(),\n data: this.__data,\n version: 1,\n }\n }\n\n // Mutation\n\n isInline(): boolean {\n return true\n }\n\n updateDOM(prevNode: UnknownConvertedNode, dom: HTMLElement): boolean {\n return false\n }\n}\n\nexport function $createUnknownConvertedNode({\n data,\n}: {\n data: UnknownConvertedNodeData\n}): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data,\n })\n}\n\nexport function $isUnknownConvertedNode(\n node: LexicalNode | null | undefined,\n): node is UnknownConvertedNode {\n return node instanceof UnknownConvertedNode\n}\n", "'use client'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\nimport type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './converter/types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { convertLexicalPluginToLexical } from './converter/index.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nconst LexicalPluginToLexicalFeatureClient: FeatureProviderProviderClient<null> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ clientFunctions, resolvedFeatures }) => {\n const converters: LexicalPluginNodeConverter[] = Object.values(clientFunctions)\n\n return {\n clientFeatureProps: props,\n hooks: {\n load({ incomingEditorState }) {\n if (!incomingEditorState || !('jsonContent' in incomingEditorState)) {\n // incomingEditorState null or not from Lexical Plugin\n return incomingEditorState\n }\n // Lexical Plugin => convert to lexical\n\n return convertLexicalPluginToLexical({\n converters,\n lexicalPluginData: incomingEditorState as unknown as PayloadPluginLexicalData,\n })\n },\n },\n nodes: [UnknownConvertedNode],\n }\n },\n }\n}\n\nexport const LexicalPluginToLexicalFeatureClientComponent = createClientComponent(\n LexicalPluginToLexicalFeatureClient,\n)\n", "/* eslint-disable perfectionist/sort-objects */\n/* eslint-disable regexp/no-obscure-range */\n/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable regexp/no-misleading-unicode-character */\n//This copy-and-pasted from lexical here: https://github.com/facebook/lexical/blob/c2ceee223f46543d12c574e62155e619f9a18a5d/packages/lexical/src/LexicalConstants.ts\n\nimport type { ElementFormatType, TextFormatType, TextModeType } from 'lexical'\nexport type TextDetailType = 'directionless' | 'unmergable'\n\n// DOM\nexport const NodeFormat = {\n DOM_ELEMENT_TYPE: 1,\n DOM_TEXT_TYPE: 3,\n // Reconciling\n NO_DIRTY_NODES: 0,\n HAS_DIRTY_NODES: 1,\n FULL_RECONCILE: 2,\n // Text node modes\n IS_NORMAL: 0,\n IS_TOKEN: 1,\n IS_SEGMENTED: 2,\n IS_INERT: 3,\n // Text node formatting\n IS_BOLD: 1,\n IS_ITALIC: 1 << 1,\n IS_STRIKETHROUGH: 1 << 2,\n IS_UNDERLINE: 1 << 3,\n IS_CODE: 1 << 4,\n IS_SUBSCRIPT: 1 << 5,\n IS_SUPERSCRIPT: 1 << 6,\n IS_HIGHLIGHT: 1 << 7,\n // Text node details\n IS_DIRECTIONLESS: 1,\n IS_UNMERGEABLE: 1 << 1,\n // Element node formatting\n IS_ALIGN_LEFT: 1,\n IS_ALIGN_CENTER: 2,\n IS_ALIGN_RIGHT: 3,\n IS_ALIGN_JUSTIFY: 4,\n IS_ALIGN_START: 5,\n IS_ALIGN_END: 6,\n} as const\n\nexport const IS_ALL_FORMATTING =\n NodeFormat.IS_BOLD |\n NodeFormat.IS_ITALIC |\n NodeFormat.IS_STRIKETHROUGH |\n NodeFormat.IS_UNDERLINE |\n NodeFormat.IS_CODE |\n NodeFormat.IS_SUBSCRIPT |\n NodeFormat.IS_SUPERSCRIPT |\n NodeFormat.IS_HIGHLIGHT\n\n// Reconciliation\nexport const NON_BREAKING_SPACE = '\\u00A0'\n\nexport const DOUBLE_LINE_BREAK = '\\n\\n'\n\n// For FF, we need to use a non-breaking space, or it gets composition\n// in a stuck state.\n\nconst RTL = '\\u0591-\\u07FF\\uFB1D-\\uFDFD\\uFE70-\\uFEFC'\nconst LTR =\n 'A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6' +\n '\\u00F8-\\u02B8\\u0300-\\u0590\\u0800-\\u1FFF\\u200E\\u2C00-\\uFB1C' +\n '\\uFE00-\\uFE6F\\uFEFD-\\uFFFF'\n\n// eslint-disable-next-line no-misleading-character-class\nexport const RTL_REGEX = new RegExp('^[^' + LTR + ']*[' + RTL + ']')\n// eslint-disable-next-line no-misleading-character-class\nexport const LTR_REGEX = new RegExp('^[^' + RTL + ']*[' + LTR + ']')\n\nexport const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number> = {\n bold: NodeFormat.IS_BOLD,\n code: NodeFormat.IS_CODE,\n highlight: NodeFormat.IS_HIGHLIGHT,\n italic: NodeFormat.IS_ITALIC,\n strikethrough: NodeFormat.IS_STRIKETHROUGH,\n subscript: NodeFormat.IS_SUBSCRIPT,\n superscript: NodeFormat.IS_SUPERSCRIPT,\n underline: NodeFormat.IS_UNDERLINE,\n}\n\nexport const DETAIL_TYPE_TO_DETAIL: Record<TextDetailType | string, number> = {\n directionless: NodeFormat.IS_DIRECTIONLESS,\n unmergeable: NodeFormat.IS_UNMERGEABLE,\n}\n\nexport const ELEMENT_TYPE_TO_FORMAT: Record<Exclude<ElementFormatType, ''>, number> = {\n center: NodeFormat.IS_ALIGN_CENTER,\n end: NodeFormat.IS_ALIGN_END,\n justify: NodeFormat.IS_ALIGN_JUSTIFY,\n left: NodeFormat.IS_ALIGN_LEFT,\n right: NodeFormat.IS_ALIGN_RIGHT,\n start: NodeFormat.IS_ALIGN_START,\n}\n\nexport const ELEMENT_FORMAT_TO_TYPE: Record<number, ElementFormatType> = {\n [NodeFormat.IS_ALIGN_CENTER]: 'center',\n [NodeFormat.IS_ALIGN_END]: 'end',\n [NodeFormat.IS_ALIGN_JUSTIFY]: 'justify',\n [NodeFormat.IS_ALIGN_LEFT]: 'left',\n [NodeFormat.IS_ALIGN_RIGHT]: 'right',\n [NodeFormat.IS_ALIGN_START]: 'start',\n}\n\nexport const TEXT_MODE_TO_TYPE: Record<TextModeType, 0 | 1 | 2> = {\n normal: NodeFormat.IS_NORMAL,\n segmented: NodeFormat.IS_SEGMENTED,\n token: NodeFormat.IS_TOKEN,\n}\n\nexport const TEXT_TYPE_TO_MODE: Record<number, TextModeType> = {\n [NodeFormat.IS_NORMAL]: 'normal',\n [NodeFormat.IS_SEGMENTED]: 'segmented',\n [NodeFormat.IS_TOKEN]: 'token',\n}\n", "import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\nimport type { SlateNode, SlateNodeConverter } from './types.js'\n\nimport { NodeFormat } from '../../../../lexical/utils/nodeFormat.js'\n\nexport function convertSlateToLexical({\n converters,\n slateData,\n}: {\n converters: SlateNodeConverter[]\n slateData: SlateNode[]\n}): SerializedEditorState {\n return {\n root: {\n type: 'root',\n children: convertSlateNodesToLexical({\n canContainParagraphs: true,\n converters,\n parentNodeType: 'root',\n slateNodes: slateData,\n }),\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\nexport function convertSlateNodesToLexical({\n canContainParagraphs,\n converters,\n parentNodeType,\n slateNodes,\n}: {\n canContainParagraphs: boolean\n converters: SlateNodeConverter[] | undefined\n /**\n * Type of the parent lexical node (not the type of the original, parent slate type)\n */\n parentNodeType: string\n slateNodes: SlateNode[]\n}): SerializedLexicalNode[] {\n if (!converters?.length) {\n return []\n }\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n return (\n slateNodes.map((slateNode, i) => {\n if (!('type' in slateNode)) {\n if (canContainParagraphs) {\n // This is a paragraph node. They do not have a type property in Slate\n return convertParagraphNode(converters, slateNode)\n } else {\n // This is a simple text node. canContainParagraphs may be false if this is nested inside a paragraph already, since paragraphs cannot contain paragraphs\n return convertTextNode(slateNode)\n }\n }\n if (slateNode.type === 'p') {\n return convertParagraphNode(converters, slateNode)\n }\n\n const converter = converters.find((converter) => converter.nodeTypes.includes(slateNode.type))\n\n if (converter) {\n return converter.converter({ childIndex: i, converters, parentNodeType, slateNode })\n }\n\n console.warn('slateToLexical > No converter found for node type: ' + slateNode.type)\n return unknownConverter?.converter({\n childIndex: i,\n converters,\n parentNodeType,\n slateNode,\n })\n }) || []\n )\n}\n\nexport function convertParagraphNode(\n converters: SlateNodeConverter[],\n node: SlateNode,\n): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children: convertSlateNodesToLexical({\n canContainParagraphs: false,\n converters,\n parentNodeType: 'paragraph',\n slateNodes: node.children || [],\n }),\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\nexport function convertTextNode(node: SlateNode): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: convertNodeToFormat(node),\n mode: 'normal',\n style: '',\n text: node.text,\n version: 1,\n }\n}\n\nexport function convertNodeToFormat(node: SlateNode): number {\n let format = 0\n if (node.bold) {\n format = format | NodeFormat.IS_BOLD\n }\n if (node.italic) {\n format = format | NodeFormat.IS_ITALIC\n }\n if (node.strikethrough) {\n format = format | NodeFormat.IS_STRIKETHROUGH\n }\n if (node.underline) {\n format = format | NodeFormat.IS_UNDERLINE\n }\n if (node.subscript) {\n format = format | NodeFormat.IS_SUBSCRIPT\n }\n if (node.superscript) {\n format = format | NodeFormat.IS_SUPERSCRIPT\n }\n if (node.code) {\n format = format | NodeFormat.IS_CODE\n }\n return format\n}\n", "import type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'\nimport type { JSX } from 'react'\n\nimport { addClassNamesToElement } from '@lexical/utils'\nimport { DecoratorNode } from 'lexical'\nimport * as React from 'react'\n\nexport type UnknownConvertedNodeData = {\n nodeData: unknown\n nodeType: string\n}\n\nexport type SerializedUnknownConvertedNode = Spread<\n {\n data: UnknownConvertedNodeData\n },\n SerializedLexicalNode\n>\n\nconst Component = React.lazy(() =>\n import('./Component.js').then((module) => ({\n default: module.UnknownConvertedNodeComponent,\n })),\n)\n\n/** @noInheritDoc */\nexport class UnknownConvertedNode extends DecoratorNode<JSX.Element> {\n __data: UnknownConvertedNodeData\n\n constructor({ data, key }: { data: UnknownConvertedNodeData; key?: NodeKey }) {\n super(key)\n this.__data = data\n }\n\n static clone(node: UnknownConvertedNode): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data: node.__data,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'unknownConverted'\n }\n\n static importJSON(serializedNode: SerializedUnknownConvertedNode): UnknownConvertedNode {\n const node = $createUnknownConvertedNode({ data: serializedNode.data })\n return node\n }\n\n canInsertTextAfter(): true {\n return true\n }\n\n canInsertTextBefore(): true {\n return true\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n const element = document.createElement('span')\n addClassNamesToElement(element, 'unknownConverted')\n return element\n }\n\n decorate(): JSX.Element | null {\n return <Component data={this.__data} />\n }\n\n exportJSON(): SerializedUnknownConvertedNode {\n return {\n type: this.getType(),\n data: this.__data,\n version: 1,\n }\n }\n\n // Mutation\n\n isInline(): boolean {\n return true\n }\n\n updateDOM(prevNode: UnknownConvertedNode, dom: HTMLElement): boolean {\n return false\n }\n}\n\nexport function $createUnknownConvertedNode({\n data,\n}: {\n data: UnknownConvertedNodeData\n}): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data,\n })\n}\n\nexport function $isUnknownConvertedNode(\n node: LexicalNode | null | undefined,\n): node is UnknownConvertedNode {\n return node instanceof UnknownConvertedNode\n}\n", "'use client'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\nimport type { SlateNodeConverter } from './converter/types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { convertSlateToLexical } from './converter/index.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nconst SlateToLexicalFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ clientFunctions }) => {\n const converters: SlateNodeConverter[] = Object.values(clientFunctions)\n\n return {\n clientFeatureProps: props,\n hooks: {\n load({ incomingEditorState }) {\n if (\n !incomingEditorState ||\n !Array.isArray(incomingEditorState) ||\n 'root' in incomingEditorState\n ) {\n // incomingEditorState null or not from Slate\n return incomingEditorState\n }\n // Slate => convert to lexical\n\n return convertSlateToLexical({\n converters,\n slateData: incomingEditorState,\n })\n },\n },\n nodes: [UnknownConvertedNode],\n }\n },\n }\n}\n\nexport const SlateToLexicalFeatureClientComponent = createClientComponent(\n SlateToLexicalFeatureClient,\n)\n", "'use client'\n\nimport { $setBlocksType } from '@lexical/selection'\nimport { $createParagraphNode, $getSelection, $isParagraphNode, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { TextIcon } from '../../lexical/ui/icons/Text/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: TextIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isParagraphNode(node) && !$isParagraphNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'paragraph',\n label: ({ i18n }) => {\n return i18n.t('lexical:paragraph:label2')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n order: 1,\n },\n ]),\n]\n\nconst ParagraphFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: TextIcon,\n key: 'paragraph',\n keywords: ['normal', 'paragraph', 'p', 'text'],\n label: ({ i18n }) => {\n return i18n.t('lexical:paragraph:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const ParagraphFeatureClientComponent = createClientComponent(ParagraphFeatureClient)\n", "'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\nimport type { RelationshipFeatureProps } from './feature.server.js'\n\nimport { RelationshipIcon } from '../../lexical/ui/icons/Relationship/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isRelationshipNode, RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nconst RelationshipFeatureClient: FeatureProviderProviderClient<RelationshipFeatureProps> = (\n props,\n) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: RelationshipPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: RelationshipIcon,\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: RelationshipIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isRelationshipNode(firstNode)\n },\n key: 'relationship',\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const RelationshipFeatureClientComponent = createClientComponent(RelationshipFeatureClient)\n", "import React from 'react'\n\nexport const RelationshipIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_4397_10817)\">\n <path\n d=\"M7.75 12.25L15.25 4.75M15.25 4.75H11.5M15.25 4.75V8.5M13 11.5V13.75C13 14.5784 12.3284 15.25 11.5 15.25H6.25C5.42157 15.25 4.75 14.5784 4.75 13.75V8.5C4.75 7.67157 5.42157 7 6.25 7H8.5\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4397_10817\">\n <rect fill=\"currentColor\" height=\"12\" transform=\"translate(4 4)\" width=\"12\" />\n </clipPath>\n </defs>\n </svg>\n)\n", "'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui/client'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../types.js'\nimport type { RelationshipFeatureProps } from '../feature.server.js'\nimport type { RelationshipData } from '../nodes/RelationshipNode.js'\n\nimport { RelationshipDrawer } from '../drawer/index.js'\nimport { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js'\n\nexport const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData> = createCommand(\n 'INSERT_RELATIONSHIP_COMMAND',\n)\n\nexport const RelationshipPlugin: PluginComponent<RelationshipFeatureProps> = ({ clientProps }) => {\n const [editor] = useLexicalComposerContext()\n const { collections } = useConfig()\n\n let enabledRelations: string[] = null\n\n if (clientProps?.enabledCollections) {\n enabledRelations = clientProps?.enabledCollections\n } else if (clientProps?.disabledCollections) {\n enabledRelations = collections\n .filter(({ slug }) => !clientProps?.disabledCollections?.includes(slug))\n .map(({ slug }) => slug)\n }\n\n useEffect(() => {\n if (!editor.hasNodes([RelationshipNode])) {\n throw new Error('RelationshipPlugin: RelationshipNode not registered on editor')\n }\n\n return editor.registerCommand<RelationshipData>(\n INSERT_RELATIONSHIP_COMMAND,\n (payload) => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const relationshipNode = $createRelationshipNode(payload)\n // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(relationshipNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return <RelationshipDrawer enabledCollectionSlugs={enabledRelations} />\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useListDrawer } from '@payloadcms/ui/client'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport { $createRelationshipNode } from '../nodes/RelationshipNode.js'\nimport { INSERT_RELATIONSHIP_COMMAND } from '../plugins/index.js'\nimport { EnabledRelationshipsCondition } from '../utils/EnabledRelationshipsCondition.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './commands.js'\n\nconst insertRelationship = ({\n editor,\n relationTo,\n replaceNodeKey,\n value,\n}: {\n editor: LexicalEditor\n relationTo: string\n replaceNodeKey: null | string\n value: number | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_COMMAND, {\n relationTo,\n value,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace($createRelationshipNode({ relationTo, value }))\n }\n })\n }\n}\n\ntype Props = {\n enabledCollectionSlugs: null | string[]\n}\n\nconst RelationshipDrawerComponent: React.FC<Props> = ({ enabledCollectionSlugs }) => {\n const [editor] = useLexicalComposerContext()\n const [selectedCollectionSlug, setSelectedCollectionSlug] = useState(\n () => enabledCollectionSlugs[0],\n )\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n\n const [ListDrawer, ListDrawerToggler, { closeDrawer, isDrawerOpen, openDrawer }] = useListDrawer({\n collectionSlugs: enabledCollectionSlugs,\n selectedCollection: selectedCollectionSlug,\n })\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openDrawer()\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, openDrawer])\n\n const onSelect = useCallback(\n ({ collectionSlug, docID }) => {\n insertRelationship({\n editor,\n relationTo: collectionSlug,\n replaceNodeKey,\n value: docID,\n })\n closeDrawer()\n },\n [editor, closeDrawer, replaceNodeKey],\n )\n\n useEffect(() => {\n // always reset back to first option\n // TODO: this is not working, see the ListDrawer component\n setSelectedCollectionSlug(enabledCollectionSlugs[0])\n }, [isDrawerOpen, enabledCollectionSlugs])\n\n return <ListDrawer onSelect={onSelect} />\n}\n\nexport const RelationshipDrawer = (props: Props): React.ReactNode => {\n return props?.enabledCollectionSlugs?.length > 0 ? ( // If enabledCollectionSlugs it overrides what EnabledRelationshipsCondition is doing\n <RelationshipDrawerComponent {...props} />\n ) : (\n <EnabledRelationshipsCondition {...props}>\n <RelationshipDrawerComponent {...props} />\n </EnabledRelationshipsCondition>\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui/client'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { EditorConfigContextType } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport type { SanitizedClientEditorConfig } from '../../../../lexical/config/types.js'\nimport type { PluginComponentWithAnchor } from '../../../types.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../types.js'\nimport type { FixedToolbarFeatureProps } from '../feature.server.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { ToolbarButton } from '../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../shared/ToolbarDropdown/index.js'\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\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 <ToolbarButton editor={editor} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n editorConfig,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { i18n } = useTranslation()\n\n const [dropdownLabel, setDropdownLabel] = React.useState<null | string>(null)\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | null>(null)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n }, [group])\n\n const onActiveChange = ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n setDropdownLabel(null)\n } else {\n setDropdownIcon(null)\n setDropdownLabel(null)\n }\n return\n }\n const item = activeItems[0]\n\n let label = item.key\n if (item.label) {\n label = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n // Crop title to max. 25 characters\n if (label.length > 25) {\n label = label.substring(0, 25) + '...'\n }\n setDropdownLabel(label)\n setDropdownIcon(() => item.ChildComponent)\n }\n\n return (\n <div className={`fixed-toolbar__group fixed-toolbar__group-${group.key}`} key={group.key}>\n {group.type === 'dropdown' &&\n group.items.length &&\n (DropdownIcon ? (\n <ToolbarDropdown\n Icon={DropdownIcon}\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ))}\n {group.type === 'buttons' &&\n group.items.length &&\n group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })}\n {index < editorConfig.features.toolbarFixed?.groups.length - 1 && <div className=\"divider\" />}\n </div>\n )\n}\n\nfunction FixedToolbar({\n anchorElem,\n clientProps,\n editor,\n editorConfig,\n parentWithFixedToolbar,\n}: {\n anchorElem: HTMLElement\n clientProps?: FixedToolbarFeatureProps\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n parentWithFixedToolbar: EditorConfigContextType | false\n}): React.ReactNode {\n const currentToolbarRef = React.useRef<HTMLDivElement>(null)\n\n const { y } = useScrollInfo()\n\n // Memoize the parent toolbar element\n const parentToolbarElem = useMemo(() => {\n if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {\n return null\n }\n\n const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current\n let sibling = parentEditorElem.previousElementSibling\n while (sibling) {\n if (sibling.classList.contains('fixed-toolbar')) {\n return sibling\n }\n sibling = sibling.previousElementSibling\n }\n return null\n }, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar])\n\n useThrottledEffect(\n () => {\n if (!parentToolbarElem) {\n // this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo\n return\n }\n const currentToolbarElem = currentToolbarRef.current\n if (!currentToolbarElem) {\n return\n }\n\n const currentRect = currentToolbarElem.getBoundingClientRect()\n const parentRect = parentToolbarElem.getBoundingClientRect()\n\n // we only need to check for vertical overlap\n const overlapping = !(\n currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom\n )\n\n if (overlapping) {\n currentToolbarRef.current.className = 'fixed-toolbar fixed-toolbar--overlapping'\n parentToolbarElem.className = 'fixed-toolbar fixed-toolbar--hide'\n } else {\n if (!currentToolbarRef.current.classList.contains('fixed-toolbar--overlapping')) {\n return\n }\n currentToolbarRef.current.className = 'fixed-toolbar'\n parentToolbarElem.className = 'fixed-toolbar'\n }\n },\n 50,\n [currentToolbarRef, parentToolbarElem, y],\n )\n\n return (\n <div\n className=\"fixed-toolbar\"\n onFocus={(event) => {\n // Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,\n // the parent editor will be focused, and the child editor will lose focus.\n event.stopPropagation()\n }}\n ref={currentToolbarRef}\n >\n {editor.isEditable() && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarFixed?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nconst getParentEditorWithFixedToolbar = (\n editorConfigContext: EditorConfigContextType,\n): EditorConfigContextType | false => {\n if (editorConfigContext.parentEditor?.editorConfig) {\n if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {\n return editorConfigContext.parentEditor\n } else {\n if (editorConfigContext.parentEditor) {\n return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor)\n }\n }\n }\n return false\n}\n\nexport const FixedToolbarPlugin: PluginComponentWithAnchor<FixedToolbarFeatureProps> = ({\n anchorElem,\n clientProps,\n}) => {\n const [currentEditor] = useLexicalComposerContext()\n const editorConfigContext = useEditorConfigContext()\n\n const { editorConfig: currentEditorConfig } = editorConfigContext\n\n const editor = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editor || currentEditor\n : currentEditor\n\n const editorConfig = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig\n : currentEditorConfig\n\n const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext)\n\n if (clientProps?.disableIfParentHasFixedToolbar) {\n if (parentWithFixedToolbar) {\n return null\n }\n }\n\n if (!editorConfig?.features?.toolbarFixed?.groups?.length) {\n return null\n }\n\n return (\n <FixedToolbar\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n parentWithFixedToolbar={parentWithFixedToolbar}\n />\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nconst baseClass = 'toolbar-popup__button'\n\nexport const ToolbarButton = ({\n children,\n editor,\n item,\n}: {\n children: React.JSX.Element\n editor: LexicalEditor\n item: ToolbarGroupItem\n}) => {\n const [enabled, setEnabled] = useState<boolean>(true)\n const [active, setActive] = useState<boolean>(false)\n const [className, setClassName] = useState<string>(baseClass)\n const editorConfigContext = useEditorConfigContext()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (item.isActive) {\n const isActive = item.isActive({ editor, editorConfigContext, selection })\n if (active !== isActive) {\n setActive(isActive)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, editorConfigContext, selection })\n if (enabled !== isEnabled) {\n setEnabled(isEnabled)\n }\n }\n })\n }, [active, editor, editorConfigContext, 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 return (\n <button\n className={className}\n onClick={() => {\n if (enabled !== false) {\n editor._updateTags = new Set([...editor._updateTags, 'toolbar']) // without setting the tags, our onSelect will not be able to trigger our onChange as focus onChanges are ignored.\n\n editor.focus(() => {\n // We need to wrap the onSelect in the callback, so the editor is properly focused before the onSelect is called.\n item.onSelect({\n editor,\n isActive: active,\n })\n })\n\n return true\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", "'use client'\nimport React, { useCallback, useEffect } from 'react'\n\nconst baseClass = 'toolbar-popup__dropdown'\n\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { useTranslation } from '@payloadcms/ui/client'\nimport { $getSelection } from 'lexical'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { DropDown, DropDownItem } from './DropDown.js'\nconst ToolbarItem = ({\n active,\n anchorElem,\n editor,\n enabled,\n item,\n}: {\n active?: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n}) => {\n const { i18n } = useTranslation()\n\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component\n active={active}\n anchorElem={anchorElem}\n editor={editor}\n enabled={enabled}\n item={item}\n key={item.key}\n />\n )\n )\n }\n\n let title = item.key\n if (item.label) {\n title = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n // Crop title to max. 25 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <DropDownItem active={active} editor={editor} enabled={enabled} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n <span className=\"text\">{title}</span>\n </DropDownItem>\n )\n}\n\nexport const ToolbarDropdown = ({\n Icon,\n anchorElem,\n classNames,\n editor,\n groupKey,\n items,\n itemsContainerClassNames,\n label,\n maxActiveItems,\n onActiveChange,\n}: {\n Icon?: React.FC\n anchorElem: HTMLElement\n classNames?: string[]\n editor: LexicalEditor\n groupKey: string\n items: ToolbarGroupItem[]\n itemsContainerClassNames?: string[]\n label?: string\n /**\n * Maximum number of active items allowed. This is a performance optimization to prevent\n * unnecessary item active checks when the maximum number of active items is reached.\n */\n maxActiveItems?: number\n onActiveChange?: ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => void\n}) => {\n const [activeItemKeys, setActiveItemKeys] = React.useState<string[]>([])\n const [enabledItemKeys, setEnabledItemKeys] = React.useState<string[]>([])\n const editorConfigContext = useEditorConfigContext()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n\n const _activeItemKeys: string[] = []\n const _activeItems: ToolbarGroupItem[] = []\n const _enabledItemKeys: string[] = []\n\n for (const item of items) {\n if (item.isActive && (!maxActiveItems || _activeItemKeys.length < maxActiveItems)) {\n const isActive = item.isActive({ editor, editorConfigContext, selection })\n if (isActive) {\n _activeItemKeys.push(item.key)\n _activeItems.push(item)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, editorConfigContext, selection })\n if (isEnabled) {\n _enabledItemKeys.push(item.key)\n }\n } else {\n _enabledItemKeys.push(item.key)\n }\n }\n setActiveItemKeys(_activeItemKeys)\n setEnabledItemKeys(_enabledItemKeys)\n\n if (onActiveChange) {\n onActiveChange({ activeItems: _activeItems })\n }\n })\n }, [editor, editorConfigContext, items, maxActiveItems, onActiveChange])\n\n useEffect(() => {\n updateStates()\n }, [updateStates])\n\n useEffect(() => {\n document.addEventListener('mouseup', updateStates)\n return () => {\n document.removeEventListener('mouseup', updateStates)\n }\n }, [updateStates])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updateStates()\n }),\n )\n }, [editor, updateStates])\n\n return (\n <DropDown\n Icon={Icon}\n buttonAriaLabel={`${groupKey} dropdown`}\n buttonClassName={[baseClass, `${baseClass}-${groupKey}`, ...(classNames || [])]\n .filter(Boolean)\n .join(' ')}\n itemsContainerClassNames={[`${baseClass}-items`, ...(itemsContainerClassNames || [])]}\n key={groupKey}\n label={label}\n >\n {items.length &&\n items.map((item) => {\n return (\n <ToolbarItem\n active={activeItemKeys.includes(item.key)}\n anchorElem={anchorElem}\n editor={editor}\n enabled={enabledItemKeys.includes(item.key)}\n item={item}\n key={item.key}\n />\n )\n })}\n </DropDown>\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport React, { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nconst baseClass = 'toolbar-popup__dropdown-item'\n\ninterface DropDownContextType {\n registerItem: (ref: React.RefObject<HTMLButtonElement | null>) => void\n}\n\nconst DropDownContext = React.createContext<DropDownContextType | null>(null)\n\nexport function DropDownItem({\n active,\n children,\n editor,\n enabled,\n item,\n title,\n}: {\n active?: boolean\n children: React.ReactNode\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n title?: string\n}): React.ReactNode {\n const [className, setClassName] = useState<string>(baseClass)\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 editor._updateTags = new Set([...editor._updateTags, 'toolbar']) // without setting the tags, our onSelect will not be able to trigger our onChange as focus onChanges are ignored.\n\n editor.focus(() => {\n // We need to wrap the onSelect in the callback, so the editor is properly focused before the onSelect is called.\n item.onSelect({\n editor,\n isActive: active,\n })\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 itemsContainerClassNames,\n onClose,\n}: {\n children: React.ReactNode\n dropDownRef: React.Ref<HTMLDivElement>\n itemsContainerClassNames?: string[]\n onClose: () => void\n}): React.ReactElement {\n const [items, setItems] = useState<Array<React.RefObject<HTMLButtonElement | null>>>()\n const [highlightedItem, setHighlightedItem] =\n useState<React.RefObject<HTMLButtonElement | null>>()\n\n const registerItem = useCallback(\n (itemRef: React.RefObject<HTMLButtonElement | null>) => {\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 != null && highlightedItem?.current != null) {\n highlightedItem.current.focus()\n }\n }, [items, highlightedItem])\n\n return (\n <DropDownContext.Provider value={contextValue}>\n <div\n className={(itemsContainerClassNames ?? ['toolbar-popup__dropdown-items']).join(' ')}\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 itemsContainerClassNames,\n label,\n stopCloseOnClickSelf,\n}: {\n Icon?: React.FC\n buttonAriaLabel?: string\n buttonClassName: string\n children: ReactNode\n disabled?: boolean\n itemsContainerClassNames?: string[]\n label?: string\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.scrollY || 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 const portal = createPortal(\n <DropDownItems\n dropDownRef={dropDownRef}\n itemsContainerClassNames={itemsContainerClassNames}\n onClose={handleClose}\n >\n {children}\n </DropDownItems>,\n document.body,\n )\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 && <Icon />}\n {label && <span className=\"toolbar-popup__dropdown-label\">{label}</span>}\n <i className=\"toolbar-popup__dropdown-caret\" />\n </button>\n\n {showDropDown && <React.Fragment>{portal}</React.Fragment>}\n </React.Fragment>\n )\n}\n", "'use client'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\nimport type { FixedToolbarFeatureProps } from './feature.server.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { FixedToolbarPlugin } from './Toolbar/index.js'\n\nconst FixedToolbarFeatureClient: FeatureProviderProviderClient<FixedToolbarFeatureProps> = (\n props,\n) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: FixedToolbarPlugin,\n position: 'aboveContainer',\n },\n ],\n }),\n }\n}\n\nexport const FixedToolbarFeatureClientComponent = createClientComponent(FixedToolbarFeatureClient)\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n COMMAND_PRIORITY_LOW,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../types.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { getDOMRangeRect } from '../../../../lexical/utils/getDOMRangeRect.js'\nimport { setFloatingElemPosition } from '../../../../lexical/utils/setFloatingElemPosition.js'\nimport { ToolbarButton } from '../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../shared/ToolbarDropdown/index.js'\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\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 <ToolbarButton editor={editor} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { editorConfig } = useEditorConfigContext()\n\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | null>(null)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n }, [group])\n\n const onActiveChange = ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n return\n }\n const item = activeItems[0]\n setDropdownIcon(() => item.ChildComponent)\n }\n\n return (\n <div\n className={`inline-toolbar-popup__group inline-toolbar-popup__group-${group.key}`}\n key={group.key}\n >\n {group.type === 'dropdown' &&\n group.items.length &&\n (DropdownIcon ? (\n <ToolbarDropdown\n Icon={DropdownIcon}\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ))}\n {group.type === 'buttons' &&\n group.items.length &&\n group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })}\n {index < editorConfig.features.toolbarInline?.groups.length - 1 && (\n <div className=\"divider\" />\n )}\n </div>\n )\n}\n\nfunction InlineToolbar({\n anchorElem,\n editor,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n}): React.ReactNode {\n const floatingToolbarRef = useRef<HTMLDivElement | null>(null)\n const caretRef = useRef<HTMLDivElement | null>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const closeFloatingToolbar = useCallback(() => {\n if (floatingToolbarRef?.current) {\n const isOpacityZero = floatingToolbarRef.current.style.opacity === '0'\n const isPointerEventsNone = floatingToolbarRef.current.style.pointerEvents === 'none'\n\n if (!isOpacityZero) {\n floatingToolbarRef.current.style.opacity = '0'\n }\n if (!isPointerEventsNone) {\n floatingToolbarRef.current.style.pointerEvents = 'none'\n }\n }\n }, [floatingToolbarRef])\n\n const mouseMoveListener = useCallback(\n (e: MouseEvent) => {\n if (floatingToolbarRef?.current && (e.buttons === 1 || e.buttons === 3)) {\n const isOpacityZero = floatingToolbarRef.current.style.opacity === '0'\n const isPointerEventsNone = floatingToolbarRef.current.style.pointerEvents === 'none'\n if (!isOpacityZero || !isPointerEventsNone) {\n // Check if the mouse is not over the popup\n const x = e.clientX\n const y = e.clientY\n const elementUnderMouse = document.elementFromPoint(x, y)\n if (!floatingToolbarRef.current.contains(elementUnderMouse)) {\n // Mouse is not over the target element => not a normal click, but probably a drag\n closeFloatingToolbar()\n }\n }\n }\n },\n [closeFloatingToolbar],\n )\n\n const mouseUpListener = useCallback(() => {\n if (floatingToolbarRef?.current) {\n if (floatingToolbarRef.current.style.opacity !== '1') {\n floatingToolbarRef.current.style.opacity = '1'\n }\n if (floatingToolbarRef.current.style.pointerEvents !== 'auto') {\n floatingToolbarRef.current.style.pointerEvents = 'auto'\n }\n }\n }, [])\n\n useEffect(() => {\n document.addEventListener('mousemove', mouseMoveListener)\n document.addEventListener('mouseup', mouseUpListener)\n\n return () => {\n document.removeEventListener('mousemove', mouseMoveListener)\n document.removeEventListener('mouseup', mouseUpListener)\n }\n }, [floatingToolbarRef, mouseMoveListener, mouseUpListener])\n\n const $updateTextFormatFloatingToolbar = useCallback(() => {\n const selection = $getSelection()\n\n const nativeSelection = window.getSelection()\n\n if (floatingToolbarRef.current === null) {\n return\n }\n\n const possibleLinkEditor = anchorElem.querySelector(':scope > .link-editor')\n const isLinkEditorVisible =\n possibleLinkEditor !== null &&\n 'style' in possibleLinkEditor &&\n possibleLinkEditor?.style?.['opacity'] === '1'\n\n const rootElement = editor.getRootElement()\n if (\n selection !== null &&\n nativeSelection !== null &&\n !nativeSelection.isCollapsed &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n const rangeRect = getDOMRangeRect(nativeSelection, rootElement)\n\n // Position floating toolbar\n const offsetIfFlipped = setFloatingElemPosition({\n alwaysDisplayOnTop: isLinkEditorVisible,\n anchorElem,\n floatingElem: floatingToolbarRef.current,\n horizontalPosition: 'center',\n targetRect: rangeRect,\n })\n\n // Position caret\n if (caretRef.current) {\n setFloatingElemPosition({\n anchorElem: floatingToolbarRef.current,\n anchorFlippedOffset: offsetIfFlipped,\n floatingElem: caretRef.current,\n horizontalOffset: 5,\n horizontalPosition: 'center',\n specialHandlingForCaret: true,\n targetRect: rangeRect,\n verticalGap: 10,\n })\n }\n } else {\n closeFloatingToolbar()\n }\n }, [editor, closeFloatingToolbar, anchorElem])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = () => {\n editor.getEditorState().read(() => {\n $updateTextFormatFloatingToolbar()\n })\n }\n\n window.addEventListener('resize', update)\n if (scrollerElem) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n if (scrollerElem) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [editor, $updateTextFormatFloatingToolbar, anchorElem])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n $updateTextFormatFloatingToolbar()\n })\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n $updateTextFormatFloatingToolbar()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n $updateTextFormatFloatingToolbar()\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, $updateTextFormatFloatingToolbar])\n\n return (\n <div className=\"inline-toolbar-popup\" ref={floatingToolbarRef}>\n <div className=\"caret\" ref={caretRef} />\n {editor.isEditable() && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarInline?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nfunction useInlineToolbar(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n): React.ReactElement | null {\n const [isText, setIsText] = useState(false)\n\n const updatePopup = useCallback(() => {\n editor.getEditorState().read(() => {\n // Should not to pop up the floating toolbar when using IME input\n if (editor.isComposing()) {\n return\n }\n const selection = $getSelection()\n const nativeSelection = window.getSelection()\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n (!$isRangeSelection(selection) ||\n rootElement === null ||\n !rootElement.contains(nativeSelection.anchorNode))\n ) {\n setIsText(false)\n return\n }\n\n if (!$isRangeSelection(selection)) {\n return\n }\n\n if (selection.getTextContent() !== '') {\n const nodes = selection.getNodes()\n let foundNodeWithText = false\n for (const node of nodes) {\n if ($isTextNode(node)) {\n setIsText(true)\n foundNodeWithText = true\n break\n }\n }\n if (!foundNodeWithText) {\n setIsText(false)\n }\n } else {\n setIsText(false)\n }\n\n const rawTextContent = selection.getTextContent().replace(/\\n/g, '')\n if (!selection.isCollapsed() && rawTextContent === '') {\n setIsText(false)\n return\n }\n })\n }, [editor])\n\n useEffect(() => {\n document.addEventListener('selectionchange', updatePopup)\n document.addEventListener('mouseup', updatePopup)\n return () => {\n document.removeEventListener('selectionchange', updatePopup)\n document.removeEventListener('mouseup', updatePopup)\n }\n }, [updatePopup])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updatePopup()\n }),\n editor.registerRootListener(() => {\n if (editor.getRootElement() === null) {\n setIsText(false)\n }\n }),\n )\n }, [editor, updatePopup])\n\n if (!isText) {\n return null\n }\n\n return createPortal(<InlineToolbar anchorElem={anchorElem} editor={editor} />, anchorElem)\n}\n\nexport const InlineToolbarPlugin: PluginComponentWithAnchor<undefined> = ({ anchorElem }) => {\n const [editor] = useLexicalComposerContext()\n\n return useInlineToolbar(editor, anchorElem)\n}\n", "export function getDOMRangeRect(nativeSelection: Selection, rootElement: HTMLElement): DOMRect {\n const domRange = nativeSelection.getRangeAt(0)\n\n let rect\n\n if (nativeSelection.anchorNode === rootElement) {\n let inner = rootElement\n while (inner.firstElementChild != null) {\n inner = inner.firstElementChild as HTMLElement\n }\n rect = inner.getBoundingClientRect()\n } else {\n rect = domRange.getBoundingClientRect()\n }\n\n return rect\n}\n", "const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\n// TODO: needs refactoring\n// This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.\n// So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).\n// This is used for positioning the floating toolbar (anchor: richtext editor) and its caret (anchor: floating toolbar)\nexport function setFloatingElemPosition(args: {\n alwaysDisplayOnTop?: boolean\n anchorElem: HTMLElement\n anchorFlippedOffset?: number // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem: HTMLElement\n horizontalOffset?: number\n horizontalPosition?: 'center' | 'left'\n specialHandlingForCaret?: boolean\n targetRect: ClientRect | null\n verticalGap?: number\n}): number {\n const {\n alwaysDisplayOnTop = false,\n anchorElem,\n anchorFlippedOffset = 0, // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem,\n horizontalOffset = HORIZONTAL_OFFSET,\n horizontalPosition = 'left',\n specialHandlingForCaret = false,\n targetRect,\n verticalGap = VERTICAL_GAP,\n } = args\n // Returns the top offset if the target was flipped\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - floatingElemRect.height - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (horizontalPosition === 'center') {\n // Calculate left to position floatingElem to the horizontal middle of targetRect\n left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2\n }\n\n let addedToTop = 0\n if (!alwaysDisplayOnTop && top < editorScrollerRect.top && !specialHandlingForCaret) {\n addedToTop = floatingElemRect.height + targetRect.height + verticalGap * 2\n\n top += addedToTop\n }\n\n if (horizontalPosition === 'center') {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n } else if (left < editorScrollerRect.left) {\n left = editorScrollerRect.left + horizontalOffset\n }\n } else {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n }\n\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n\n if (specialHandlingForCaret && anchorFlippedOffset !== 0) {\n // Floating select toolbar was flipped (positioned below text rather than above). Thus, the caret now needs to be positioned\n // on the other side and rotated.\n top -= anchorElementRect.bottom - anchorFlippedOffset + floatingElemRect.height - 3\n // top += anchorFlippedOffset - anchorElementRect.height - floatingElemRect.height + 2\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else {\n top -= anchorElementRect.top\n\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n }\n\n return addedToTop\n}\n", "'use client'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { InlineToolbarPlugin } from './Toolbar/index.js'\n\nconst InlineToolbarFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: InlineToolbarPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n }),\n }\n}\n\nexport const InlineToolbarFeatureClientComponent = createClientComponent(InlineToolbarFeatureClient)\n", "'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { UploadIcon } from '../../lexical/ui/icons/Upload/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isUploadNode, UploadNode } from './nodes/UploadNode.js'\nimport { UploadPlugin } from './plugin/index.js'\n\nexport type UploadFeaturePropsClient = {\n collections: {\n [collection: string]: {\n hasExtraFields: boolean\n }\n }\n}\n\nconst UploadFeatureClient: FeatureProviderProviderClient<UploadFeaturePropsClient> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [UploadNode],\n plugins: [\n {\n Component: UploadPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: UploadIcon,\n key: 'upload',\n keywords: ['upload', 'image', 'file', 'img', 'picture', 'photo', 'media'],\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: UploadIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isUploadNode(firstNode)\n },\n key: 'upload',\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const UploadFeatureClientComponent = createClientComponent(UploadFeatureClient)\n", "import React from 'react'\n\nexport const UploadIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z\"\n stroke=\"#currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n", "'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui/client'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponentWithAnchor } from '../../types.js'\nimport type { UploadFeaturePropsClient } from '../feature.client.js'\nimport type { UploadData } from '../nodes/UploadNode.js'\n\nimport { UploadDrawer } from '../drawer/index.js'\nimport { $createUploadNode, UploadNode } from '../nodes/UploadNode.js'\n\nexport type InsertUploadPayload = Readonly<Omit<UploadData, 'id'> & Partial<Pick<UploadData, 'id'>>>\n\nexport const INSERT_UPLOAD_COMMAND: LexicalCommand<InsertUploadPayload> =\n createCommand('INSERT_UPLOAD_COMMAND')\n\nexport const UploadPlugin: PluginComponentWithAnchor<UploadFeaturePropsClient> = ({\n clientProps,\n}) => {\n const [editor] = useLexicalComposerContext()\n const { collections } = useConfig()\n\n useEffect(() => {\n if (!editor.hasNodes([UploadNode])) {\n throw new Error('UploadPlugin: UploadNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertUploadPayload>(\n INSERT_UPLOAD_COMMAND,\n (payload: InsertUploadPayload) => {\n editor.update(() => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const uploadNode = $createUploadNode({\n data: {\n id: payload.id,\n fields: payload.fields,\n relationTo: payload.relationTo,\n value: payload.value,\n },\n })\n // Insert upload node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(uploadNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor])\n\n return <UploadDrawer enabledCollectionSlugs={collections.map(({ slug }) => slug)} />\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useListDrawer } from '@payloadcms/ui/client'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport { EnabledRelationshipsCondition } from '../../relationship/utils/EnabledRelationshipsCondition.js'\nimport { $createUploadNode } from '../nodes/UploadNode.js'\nimport { INSERT_UPLOAD_COMMAND } from '../plugin/index.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './commands.js'\n\nconst insertUpload = ({\n editor,\n relationTo,\n replaceNodeKey,\n value,\n}: {\n editor: LexicalEditor\n relationTo: string\n replaceNodeKey: null | string\n value: number | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_UPLOAD_COMMAND, {\n fields: null,\n relationTo,\n value,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace(\n $createUploadNode({\n data: {\n fields: null,\n relationTo,\n value,\n },\n }),\n )\n }\n })\n }\n}\n\ntype Props = {\n enabledCollectionSlugs: string[]\n}\n\nconst UploadDrawerComponent: React.FC<Props> = ({ enabledCollectionSlugs }) => {\n const [editor] = useLexicalComposerContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n\n const [ListDrawer, ListDrawerToggler, { closeDrawer, openDrawer }] = useListDrawer({\n collectionSlugs: enabledCollectionSlugs,\n uploads: true,\n })\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_UPLOAD_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openDrawer()\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, openDrawer])\n\n const onSelect = useCallback(\n ({ collectionSlug, docID }) => {\n insertUpload({\n editor,\n relationTo: collectionSlug,\n replaceNodeKey,\n value: docID,\n })\n closeDrawer()\n },\n [editor, closeDrawer, replaceNodeKey],\n )\n\n return <ListDrawer onSelect={onSelect} />\n}\n\nexport const UploadDrawer = (props: Props): React.ReactNode => {\n return (\n <EnabledRelationshipsCondition {...props} uploads>\n <UploadDrawerComponent {...props} />\n </EnabledRelationshipsCondition>\n )\n}\n", "'use client'\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui/client'\nimport React, { Suspense, lazy, useEffect, useState } from 'react'\n\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\nimport type { FeatureProviderClient } from './features/types.js'\nimport type { SanitizedClientEditorConfig } from './lexical/config/types.js'\n\nimport { defaultEditorLexicalConfig } from './lexical/config/client/default.js'\nimport { loadClientFeatures } from './lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from './lexical/config/client/sanitize.js'\n\nconst RichTextEditor = lazy(() =>\n import('./Field.js').then((module) => ({ default: module.RichText })),\n)\n\nexport const RichTextField: React.FC<\n FormFieldBase & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n const { schemaPath } = useFieldProps()\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n let featureProviderComponents: GeneratedFeatureProviderComponent[] = richTextComponentMap.get(\n 'features',\n ) as GeneratedFeatureProviderComponent[]\n // order by order\n featureProviderComponents = featureProviderComponents.sort((a, b) => a.order - b.order)\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n featureProvidersAndComponentsToLoad,\n ])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n }) // TODO: Type better\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n {finalSanitizedEditorConfig && (\n <RichTextEditor {...props} editorConfig={finalSanitizedEditorConfig} />\n )}\n </Suspense>\n )\n}\n", "export function cloneDeep<T>(object: T, cache: WeakMap<any, any> = new WeakMap()): T {\n if (object === null) return null\n\n if (cache.has(object)) {\n return cache.get(object)\n }\n\n // Handle Date\n if (object instanceof Date) {\n return new Date(object.getTime()) as unknown as T\n }\n\n // Handle RegExp\n if (object instanceof RegExp) {\n return new RegExp(object.source, object.flags) as unknown as T\n }\n\n // Handle Map\n if (object instanceof Map) {\n const clonedMap = new Map()\n cache.set(object, clonedMap)\n for (const [key, value] of object.entries()) {\n clonedMap.set(key, cloneDeep(value, cache))\n }\n return clonedMap as unknown as T\n }\n\n // Handle Set\n if (object instanceof Set) {\n const clonedSet = new Set()\n cache.set(object, clonedSet)\n for (const value of object.values()) {\n clonedSet.add(cloneDeep(value, cache))\n }\n return clonedSet as unknown as T\n }\n\n // Handle Array and Object\n if (typeof object === 'object' && object !== null) {\n if ('$$typeof' in object && typeof object.$$typeof === 'symbol') {\n return object\n }\n\n const clonedObject: any = Array.isArray(object)\n ? []\n : Object.create(Object.getPrototypeOf(object))\n cache.set(object, clonedObject)\n\n for (const key in object) {\n if (object.hasOwnProperty(key) || Object.getOwnPropertySymbols(object).includes(key as any)) {\n clonedObject[key] = cloneDeep(object[key], cache)\n }\n }\n\n return clonedObject as T\n }\n\n // Handle all other cases\n return object\n}\n", "export function joinClasses(...args: Array<boolean | null | string | undefined>): string {\n return args.filter(Boolean).join(' ')\n}\n", "type Force = [number, number]\ntype Listener = (force: Force, e: TouchEvent) => void\ninterface ElementValues {\n handleTouchend: (e: TouchEvent) => void\n handleTouchstart: (e: TouchEvent) => void\n listeners: Set<Listener>\n start: Force | null\n}\n\nconst elements = new WeakMap<HTMLElement, ElementValues>()\n\nfunction readTouch(e: TouchEvent): [number, number] | null {\n const touch = e.changedTouches[0]\n if (touch === undefined) {\n return null\n }\n return [touch.clientX, touch.clientY]\n}\n\nfunction addListener(element: HTMLElement, cb: Listener): () => void {\n let elementValues = elements.get(element)\n if (elementValues === undefined) {\n const listeners = new Set<Listener>()\n const handleTouchstart = (e: TouchEvent): void => {\n if (elementValues !== undefined) {\n elementValues.start = readTouch(e)\n }\n }\n const handleTouchend = (e: TouchEvent): void => {\n if (elementValues === undefined) {\n return\n }\n const { start } = elementValues\n if (start === null) {\n return\n }\n const end = readTouch(e)\n for (const listener of listeners) {\n if (end !== null) {\n listener([end[0] - start[0], end[1] - start[1]], e)\n }\n }\n }\n element.addEventListener('touchstart', handleTouchstart)\n element.addEventListener('touchend', handleTouchend)\n\n elementValues = {\n handleTouchend,\n handleTouchstart,\n listeners,\n start: null,\n }\n elements.set(element, elementValues)\n }\n elementValues.listeners.add(cb)\n return () => {\n deleteListener(element, cb)\n }\n}\n\nfunction deleteListener(element: HTMLElement, cb: Listener): void {\n const elementValues = elements.get(element)\n if (elementValues === undefined) {\n return\n }\n const { listeners } = elementValues\n listeners.delete(cb)\n if (listeners.size === 0) {\n elements.delete(element)\n element.removeEventListener('touchstart', elementValues.handleTouchstart)\n element.removeEventListener('touchend', elementValues.handleTouchend)\n }\n}\n\nexport function addSwipeLeftListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (x < 0 && -x > Math.abs(y)) {\n cb(x, e)\n }\n })\n}\n\nexport function addSwipeRightListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (x > 0 && x > Math.abs(y)) {\n cb(x, e)\n }\n })\n}\n\nexport function addSwipeUpListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (y < 0 && -y > Math.abs(x)) {\n cb(x, e)\n }\n })\n}\n\nexport function addSwipeDownListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (y > 0 && y > Math.abs(x)) {\n cb(x, e)\n }\n })\n}\n"],
5
- "mappings": "iVAIA,OAAS,wBAAAA,OAA4B,oBACrC,OAAS,sBAAAC,GAAoB,gBAAAC,OAAoB,wBACjD,OAAS,YAAAC,OAAgB,UACzB,OAAOC,IAAS,aAAAC,GAAW,YAAAC,OAAgB,QCLpC,IAAMC,GAAyC,CACpD,MAAO,4BACP,YAAa,kCACb,eAAgB,qCAChB,KAAM,2BACN,cAAe,CACb,OAAQ,gCACR,KAAM,gCACN,QAAS,oCACT,QAAS,oCACT,MAAO,mCACP,KAAM,oCACN,MAAO,oCACP,aAAc,oCACd,QAAS,mCACT,SAAU,oCACV,QAAS,oCACT,QAAS,mCACT,OAAQ,oCACR,SAAU,oCACV,UAAW,oCACX,SAAU,oCACV,QAAS,gCACT,UAA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ACQ,EAAGC,CAAC,EAAIF,EACXE,EAAI,GAAK,CAACA,EAAI,KAAK,IAAID,CAAC,GAC1BZ,EAAGY,EAAGR,CAAC,CAEX,CAAC,CACH,CAEO,SAASY,GACdjB,EACAC,EACY,CACZ,OAAOF,GAAYC,EAAS,CAACY,EAAOP,IAAM,CACxC,GAAM,CAACQ,EAAGC,CAAC,EAAIF,EACXE,EAAI,GAAKA,EAAI,KAAK,IAAID,CAAC,GACzBZ,EAAGY,EAAGR,CAAC,CAEX,CAAC,CACH",
6
- "names": ["createHeadlessEditor", "useClientFunctions", "useTableCell", "$getRoot", "React", "useEffect", "useState", "LexicalEditorTheme", "defaultEditorLexicalConfig", "LexicalEditorTheme", "loadClientFeatures", "clientFunctions", "schemaPath", "unSanitizedEditorConfig", "featureProvider", "a", "b", "featureProviderMap", "f", "resolvedFeatures", "loaded", "relevantClientFunctions", "key", "plugin", "featureComponentKey", "feature", "sanitizeClientFeatures", "features", "sanitized", "feature", "plugin", "i", "group", "foundGroup", "sanitizedGroup", "optionGroup", "a", "b", "sanitizeClientEditorConfig", "lexical", "resolvedClientFeatureMap", "admin", "jsx", "jsxs", "RichTextCell", "props", "admin", "lexicalEditorConfig", "richTextComponentMap", "preview", "setPreview", "React", "cellData", "schemaPath", "useTableCell", "clientFunctions", "useClientFunctions", "hasLoadedFeatures", "setHasLoadedFeatures", "useState", "featureProviders", "setFeatureProviders", "finalSanitizedEditorConfig", "setFinalSanitizedEditorConfig", "featureProviderComponents", "a", "b", "featureProvidersAndComponentsToLoad", "featureProvider", "featureComponentKeys", "key", "useEffect", "featureProvidersLocal", "featureProvidersAndComponentsLoaded", "plugin", "resolvedClientFeatures", "loadClientFeatures", "sanitizeClientEditorConfig", "defaultEditorLexicalConfig", "dataToUse", "hook", "headlessEditor", "createHeadlessEditor", "getEnabledNodes", "textContent", "$getRoot", "featureComponents", "FeatureComponent", "$isElementNode", "$isRangeSelection", "FORMAT_ELEMENT_COMMAND", "jsx", "jsxs", "AlignCenterIcon", "jsx", "jsxs", "AlignJustifyIcon", "jsx", "jsxs", "AlignLeftIcon", "jsx", "jsxs", "AlignRightIcon", "useAddClientFunction", "useFieldProps", "useTableCell", "useLexicalFeature", "featureKey", "feature", "schemaPathFromFieldProps", "schemaPath", "createClientComponent", "clientFeature", "props", "useLexicalFeature", "toolbarAlignGroupWithItems", "items", "AlignLeftIcon", "toolbarGroups", "toolbarAlignGroupWithItems", "AlignLeftIcon", "selection", "$isRangeSelection", "node", "$isElementNode", "parent", "i18n", "editor", "FORMAT_ELEMENT_COMMAND", "AlignCenterIcon", "AlignRightIcon", "AlignJustifyIcon", "AlignFeatureClient", "props", "AlignFeatureClientComponent", "createClientComponent", "$createQuoteNode", "$isQuoteNode", "QuoteNode", "$setBlocksType", "$getSelection", "$isRangeSelection", "jsx", "BlockquoteIcon", "slashMenuBasicGroupWithItems", "items", "i18n", "jsx", "TextIcon", "toolbarTextDropdownGroupWithItems", "items", "TextIcon", "$createQuoteNode", "$isQuoteNode", "QuoteNode", "$createLineBreakNode", "MarkdownTransformer", "node", "exportChildren", "lines", "output", "line", "parentNode", "children", "_match", "isImport", "previousNode", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "BlockquoteIcon", "selection", "$isRangeSelection", "node", "$isQuoteNode", "i18n", "editor", "$getSelection", "$setBlocksType", "$createQuoteNode", "BlockquoteFeatureClient", "props", "MarkdownTransformer", "QuoteNode", "slashMenuBasicGroupWithItems", "BlockquoteFeatureClientComponent", "createClientComponent", "getTranslation", "jsx", "jsxs", "BlockIcon", "DecoratorBlockNode", "ObjectID", "React", "jsx", "BlockComponent", "module", "BlockNode", "_BlockNode", "fields", "format", "key", "node", "serializedNode", "$createBlockNode", "editor", "config", "element", "text", "fieldsCopy", "writable", "createCommand", "INSERT_BLOCK_COMMAND", "useLexicalComposerContext", "$insertNodeToNearestRoot", "mergeRegister", "$getPreviousSelection", "$getSelection", "$isParagraphNode", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "useEffect", "useLexicalComposerContext", "BlocksDrawer", "formatDrawerSlug", "useEditDepth", "useModal", "useTranslation", "$getNodeByKey", "COMMAND_PRIORITY_EDITOR", "createCommand", "useCallback", "useEffect", "useState", "jsx", "INSERT_BLOCK_WITH_DRAWER_COMMAND", "createCommand", "insertBlock", "blockType", "editor", "replaceNodeKey", "node", "$getNodeByKey", "$createBlockNode", "INSERT_BLOCK_COMMAND", "BlocksDrawerComponent", "useLexicalComposerContext", "editorConfig", "uuid", "useEditorConfigContext", "setReplaceNodeKey", "useState", "editDepth", "useEditDepth", "t", "useTranslation", "openModal", "useModal", "labels", "addRow", "useCallback", "rowIndex", "drawerSlug", "formatDrawerSlug", "reducedBlocks", "useEffect", "payload", "COMMAND_PRIORITY_EDITOR", "jsx", "BlocksDrawer", "jsx", "BlocksPlugin", "editor", "useLexicalComposerContext", "useEffect", "BlockNode", "mergeRegister", "INSERT_BLOCK_COMMAND", "payload", "selection", "$getSelection", "$getPreviousSelection", "$isRangeSelection", "blockNode", "$createBlockNode", "$insertNodeToNearestRoot", "focus", "focusNode", "$isParagraphNode", "node", "COMMAND_PRIORITY_EDITOR", "BlocksDrawerComponent", "BlocksFeatureClient", "props", "BlockNode", "BlocksPlugin", "block", "BlockIcon", "i18n", "getTranslation", "editor", "INSERT_BLOCK_COMMAND", "index", "BlocksFeatureClientComponent", "createClientComponent", "useLexicalComposerContext", "$createParagraphNode", "$createTextNode", "$getRoot", "React", "useCallback", "useEffect", "useLayoutEffect", "useRef", "useState", "CAN_USE_DOM", "documentMode", "CAN_USE_DOM", "IS_APPLE", "IS_FIREFOX", "CAN_USE_BEFORE_INPUT", "IS_SAFARI", "IS_IOS", "IS_ANDROID", "IS_WINDOWS", "IS_CHROME", "IS_APPLE_WEBKIT", "jsx", "jsxs", "copy", "text", "textArea", "result", "error", "download", "filename", "a", "formatStep", "step", "formattedStep", "name", "value", "isSelectAll", "event", "IS_APPLE", "sanitizeSelection", "selection", "anchorNode", "focusNode", "anchorOffset", "focusOffset", "getPathFromNodeToEditor", "node", "rootElement", "currentNode", "path", "keyPresses", "useTestRecorder", "editor", "steps", "setSteps", "useState", "isRecording", "setIsRecording", "setCurrentInnerHTML", "templatedTest", "setTemplatedTest", "previousSelectionRef", "useRef", "skipNextSelectionChangeRef", "preRef", "getCurrentEditor", "useCallback", "generateTestContent", "browserSelection", "pushStep", "currentSteps", "currentIndex", "lastStep", "useLayoutEffect", "onKeyDown", "key", "onKeyUp", "prevRootElement", "useEffect", "testContent", "dirtyElements", "dirtyLeaves", "editorState", "currentSelection", "previousSelection", "skipNextSelectionChange", "toggleEditorSelection", "currentEditor", "root", "$getRoot", "$createTextNode", "$createParagraphNode", "currentIsRecording", "onSnapshotClick", "anchorPath", "focusPath", "onCopyClick", "onDownloadClick", "e", "TestRecorderPlugin", "useLexicalComposerContext", "testRecorderButton", "testRecorderOutput", "TestRecorderFeatureClient", "props", "TestRecorderPlugin", "TestRecorderFeatureClientComponent", "createClientComponent", "useLexicalComposerContext", "TreeView", "jsx", "TreeViewPlugin", "editor", "TreeViewFeatureClient", "props", "TreeViewPlugin", "TreeViewFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "BoldIcon", "toolbarFormatGroupWithItems", "items", "BOLD_ITALIC_STAR", "BOLD_ITALIC_UNDERSCORE", "BOLD_STAR", "BOLD_UNDERSCORE", "toolbarGroups", "toolbarFormatGroupWithItems", "BoldIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "BoldFeatureClient", "props", "featureProviderMap", "markdownTransformers", "BOLD_STAR", "BOLD_UNDERSCORE", "BOLD_ITALIC_UNDERSCORE", "BOLD_ITALIC_STAR", "BoldFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "jsxs", "CodeIcon", "INLINE_CODE", "toolbarGroups", "toolbarFormatGroupWithItems", "CodeIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "InlineCodeFeatureClient", "props", "INLINE_CODE", "InlineCodeFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "ItalicIcon", "ITALIC_STAR", "ITALIC_UNDERSCORE", "toolbarGroups", "toolbarFormatGroupWithItems", "ItalicIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "ItalicFeatureClient", "props", "ITALIC_STAR", "ITALIC_UNDERSCORE", "ItalicFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "jsxs", "StrikethroughIcon", "STRIKETHROUGH", "toolbarGroups", "toolbarFormatGroupWithItems", "StrikethroughIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "StrikethroughFeatureClient", "props", "STRIKETHROUGH", "StrikethroughFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "SubscriptIcon", "toolbarGroups", "toolbarFormatGroupWithItems", "SubscriptIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "SubscriptFeatureClient", "props", "SubscriptFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "SuperscriptIcon", "toolbarGroups", "toolbarFormatGroupWithItems", "SuperscriptIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "SuperscriptFeatureClient", "props", "SuperscriptFeatureClientComponent", "createClientComponent", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "jsxs", "UnderlineIcon", "toolbarGroups", "toolbarFormatGroupWithItems", "UnderlineIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "UnderlineFeatureClient", "props", "UnderlineFeatureClientComponent", "createClientComponent", "$createHeadingNode", "$isHeadingNode", "HeadingNode", "$setBlocksType", "$getSelection", "$isRangeSelection", "jsx", "H1Icon", "jsx", "H2Icon", "jsx", "H3Icon", "jsx", "H4Icon", "jsx", "H5Icon", "jsx", "H6Icon", "$createHeadingNode", "$isHeadingNode", "HeadingNode", "createBlockNode", "createNode", "parentNode", "children", "match", "node", "MarkdownTransformer", "enabledHeadingSizes", "pattern", "tag", "size", "regExp", "HeadingNode", "node", "exportChildren", "$isHeadingNode", "level", "createBlockNode", "match", "$createHeadingNode", "$setHeading", "headingSize", "selection", "$getSelection", "$setBlocksType", "$createHeadingNode", "iconImports", "H1Icon", "H2Icon", "H3Icon", "H4Icon", "H5Icon", "H6Icon", "HeadingFeatureClient", "props", "enabledHeadingSizes", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "i", "$isRangeSelection", "node", "$isHeadingNode", "parent", "i18n", "editor", "MarkdownTransformer", "HeadingNode", "slashMenuBasicGroupWithItems", "HeadingFeatureClientComponent", "createClientComponent", "$isNodeSelection", "jsx", "HorizontalRuleIcon", "jsx", "jsxs", "AddIcon", "toolbarAddDropdownGroupWithItems", "items", "AddIcon", "MarkdownTransformer", "HorizontalRuleNode", "node", "exportChildren", "$isHorizontalRuleNode", "parentNode", "$createHorizontalRuleNode", "useLexicalComposerContext", "$insertNodeToNearestRoot", "$getSelection", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "useEffect", "HorizontalRulePlugin", "editor", "useLexicalComposerContext", "useEffect", "INSERT_HORIZONTAL_RULE_COMMAND", "type", "selection", "$getSelection", "$isRangeSelection", "horizontalRuleNode", "$createHorizontalRuleNode", "$insertNodeToNearestRoot", "COMMAND_PRIORITY_EDITOR", "HorizontalRuleFeatureClient", "props", "MarkdownTransformer", "HorizontalRuleNode", "HorizontalRulePlugin", "slashMenuBasicGroupWithItems", "HorizontalRuleIcon", "i18n", "editor", "INSERT_HORIZONTAL_RULE_COMMAND", "toolbarAddDropdownGroupWithItems", "selection", "$isNodeSelection", "firstNode", "$isHorizontalRuleNode", "HorizontalRuleFeatureClientComponent", "createClientComponent", "INDENT_CONTENT_COMMAND", "OUTDENT_CONTENT_COMMAND", "jsx", "jsxs", "IndentDecreaseIcon", "jsx", "jsxs", "IndentIncreaseIcon", "toolbarIndentGroupWithItems", "items", "toolbarGroups", "toolbarIndentGroupWithItems", "IndentDecreaseIcon", "selection", "node", "i18n", "editor", "OUTDENT_CONTENT_COMMAND", "IndentIncreaseIcon", "INDENT_CONTENT_COMMAND", "IndentFeatureClient", "props", "IndentFeatureClientComponent", "createClientComponent", "$findMatchingParent", "$getSelection", "$isRangeSelection", "jsx", "LinkIcon", "$isAtNodeEnd", "getSelectedNode", "selection", "anchor", "focus", "anchorNode", "focusNode", "toolbarFeatureButtonsGroupWithItems", "items", "$createTextNode", "$isTextNode", "addClassNamesToElement", "isHTMLAnchorElement", "ObjectID", "$applyNodeReplacement", "$createTextNode", "$getSelection", "$isElementNode", "$isRangeSelection", "ElementNode", "createCommand", "SUPPORTED_URL_PROTOCOLS", "LinkNode", "_LinkNode", "id", "fields", "key", "node", "$convertAnchorElement", "serializedNode", "$createLinkNode", "config", "element", "manageRel", "returnObject", "child", "selection", "destination", "anchorNode", "focusNode", "restoreSelection", "linkNode", "url", "parsedUrl", "writable", "prevNode", "anchor", "newTab", "domNode", "content", "$isLinkNode", "TOGGLE_LINK_COMMAND", "$toggleLink", "payload", "nodes", "parent", "children", "i", "firstNode", "$getLinkAncestor", "prevParent", "$getAncestor", "ancestor", "predicate", "input", "action", "value", "result", "mutableInput", "re", "LinkMarkdownTransformer", "LinkNode", "_node", "exportChildren", "exportFormat", "$isLinkNode", "node", "url", "linkContent", "firstChild", "$isTextNode", "textNode", "match", "linkText", "linkUrl", "linkNode", "$createLinkNode", "linkTextNode", "$createTextNode", "$applyNodeReplacement", "$isElementNode", "AutoLinkNode", "_AutoLinkNode", "LinkNode", "node", "serializedNode", "$createAutoLinkNode", "selection", "restoreSelection", "element", "$isElementNode", "linkNode", "fields", "$applyNodeReplacement", "$isAutoLinkNode", "useLexicalComposerContext", "mergeRegister", "$createTextNode", "$getSelection", "$isElementNode", "$isLineBreakNode", "$isNodeSelection", "$isRangeSelection", "$isTextNode", "TextNodeValue", "useEffect", "invariant", "cond", "message", "args", "createLinkMatcherWithRegExp", "regExp", "urlTransformer", "text", "match", "findFirstMatch", "matchers", "i", "PUNCTUATION_OR_SPACE", "isSeparator", "char", "endsWithSeparator", "textContent", "startsWithSeparator", "isPreviousNodeValid", "node", "previousNode", "$isElementNode", "$isLineBreakNode", "$isTextNode", "isNextNodeValid", "nextNode", "isContentAroundIsValid", "matchStart", "matchEnd", "nodes", "extractMatchingNodes", "startIndex", "endIndex", "unmodifiedBeforeNodes", "matchingNodes", "unmodifiedAfterNodes", "matchingOffset", "currentOffset", "currentNodes", "currentNode", "currentNodeLength", "currentNodeStart", "$createAutoLinkNode_", "fields", "linkNode", "$createAutoLinkNode", "remainingTextNode", "linkTextNode", "textNode", "$createTextNode", "firstTextNode", "offset", "firstLinkTextNode", "linkNodes", "currentNodeEnd", "endNode", "selection", "$getSelection", "selectedTextNode", "$isRangeSelection", "$isNodeSelection", "$handleLinkCreation", "onChange", "initialText", "invalidMatchEnd", "matchLength", "actualMatchStart", "actualMatchEnd", "handleLinkEdit", "children", "childrenLength", "child", "replaceWithChildren", "url", "flds", "handleBadNeighbors", "previousSibling", "nextSibling", "$isAutoLinkNode", "j", "getTextNodesToMatch", "textNodesToMatch", "useAutoLink", "editor", "useEffect", "AutoLinkNode", "invariant", "onChangeWrapped", "prevUrl", "mergeRegister", "TextNodeValue", "parent", "previous", "$isLinkNode", "URL_REGEX", "EMAIL_REGEX", "MATCHERS", "AutoLinkPlugin", "useLexicalComposerContext", "LexicalClickableLinkPlugin", "jsx", "ClickableLinkPlugin", "createCommand", "TOGGLE_LINK_WITH_MODAL_COMMAND", "createPortal", "useLexicalComposerContext", "$findMatchingParent", "mergeRegister", "getTranslation", "formatDrawerSlug", "useConfig", "useEditDepth", "useModal", "useTranslation", "$getSelection", "$isLineBreakNode", "$isRangeSelection", "COMMAND_PRIORITY_HIGH", "COMMAND_PRIORITY_LOW", "KEY_ESCAPE_COMMAND", "SELECTION_CHANGE_COMMAND", "React", "useCallback", "useEffect", "useRef", "useState", "setFloatingElemPositionForLinkEditor", "targetRect", "floatingElem", "anchorElem", "verticalGap", "horizontalOffset", "scrollerElem", "floatingElemRect", "anchorElementRect", "editorScrollerRect", "top", "left", "Drawer", "Form", "FormSubmit", "RenderFields", "useConfig", "useDocumentInfo", "useFieldProps", "useTranslation", "getFormState", "useCallback", "useEffect", "useState", "uuid", "jsx", "jsxs", "baseClass", "LinkDrawer", "drawerSlug", "handleModalSubmit", "stateData", "t", "useTranslation", "id", "useDocumentInfo", "schemaPath", "useFieldProps", "config", "useConfig", "initialState", "setInitialState", "useState", "richTextComponentMap", "useEditorConfigContext", "componentMapRenderedFieldsPath", "schemaFieldsPath", "fieldMap", "useEffect", "state", "getFormState", "onChange", "useCallback", "prevFormState", "Drawer", "Form", "uuid", "RenderFields", "FormSubmit", "jsx", "jsxs", "LinkEditor", "anchorElem", "editor", "useLexicalComposerContext", "editorRef", "useRef", "linkUrl", "setLinkUrl", "useState", "linkLabel", "setLinkLabel", "uuid", "useEditorConfigContext", "config", "useConfig", "i18n", "t", "useTranslation", "stateData", "setStateData", "closeModal", "isModalOpen", "toggleModal", "useModal", "editDepth", "useEditDepth", "isLink", "setIsLink", "selectedNodes", "setSelectedNodes", "isAutoLink", "setIsAutoLink", "drawerSlug", "formatDrawerSlug", "setNotLink", "useCallback", "$updateLinkEditor", "selection", "$getSelection", "selectedNodeDomRect", "$isRangeSelection", "focusNode", "getSelectedNode", "focusLinkParent", "$findMatchingParent", "$isLinkNode", "badNode", "node", "$isLineBreakNode", "linkNode", "data", "relatedField", "coll", "label", "getTranslation", "$isAutoLinkNode", "editorElem", "nativeSelection", "activeElement", "rootElement", "setFloatingElemPositionForLinkEditor", "useEffect", "mergeRegister", "TOGGLE_LINK_WITH_MODAL_COMMAND", "payload", "TOGGLE_LINK_COMMAND", "COMMAND_PRIORITY_LOW", "scrollerElem", "update", "editorState", "SELECTION_CHANGE_COMMAND", "KEY_ESCAPE_COMMAND", "COMMAND_PRIORITY_HIGH", "React", "event", "LinkDrawer", "fields", "newLinkPayload", "bareLinkFields", "linkParent", "$createLinkNode", "jsx", "FloatingLinkEditorPlugin", "props", "anchorElem", "createPortal", "LinkEditor", "useLexicalComposerContext", "mergeRegister", "$getSelection", "$isElementNode", "$isRangeSelection", "COMMAND_PRIORITY_LOW", "PASTE_COMMAND", "useEffect", "absoluteRegExp", "relativeOrAnchorRegExp", "validateUrl", "url", "LinkPlugin", "editor", "useLexicalComposerContext", "useEffect", "LinkNode", "mergeRegister", "TOGGLE_LINK_COMMAND", "payload", "$toggleLink", "COMMAND_PRIORITY_LOW", "validateUrl", "PASTE_COMMAND", "event", "selection", "$getSelection", "$isRangeSelection", "clipboardText", "node", "$isElementNode", "linkFields", "toolbarGroups", "toolbarFeatureButtonsGroupWithItems", "LinkIcon", "selection", "$isRangeSelection", "selectedNode", "getSelectedNode", "$findMatchingParent", "$isLinkNode", "$getSelection", "i18n", "editor", "isActive", "TOGGLE_LINK_COMMAND", "selectedText", "selectedNodes", "linkFields", "TOGGLE_LINK_WITH_MODAL_COMMAND", "LinkFeatureClient", "props", "LinkMarkdownTransformer", "LinkNode", "AutoLinkNode", "LinkPlugin", "AutoLinkPlugin", "ClickableLinkPlugin", "FloatingLinkEditorPlugin", "LinkFeatureClientComponent", "createClientComponent", "$isListNode", "INSERT_CHECK_LIST_COMMAND", "ListItemNode", "ListNode", "$isRangeSelection", "jsx", "jsxs", "ChecklistIcon", "ListPlugin", "jsx", "LexicalListPlugin", "slashMenuListGroupWithItems", "items", "i18n", "$isListNode", "ListItemNode", "ListNode", "$createListItemNode", "$createListNode", "$isListItemNode", "$isListNode", "LIST_INDENT_SIZE", "listReplace", "listType", "parentNode", "children", "match", "previousNode", "nextNode", "listItem", "firstChild", "list", "indent", "listExport", "listNode", "exportChildren", "depth", "output", "index", "listItemNode", "prefix", "CHECK_LIST", "ListNode", "ListItemNode", "node", "exportChildren", "$isListNode", "listExport", "listReplace", "CheckListPlugin", "jsx", "LexicalCheckListPlugin", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "ChecklistIcon", "selection", "$isRangeSelection", "node", "$isListNode", "parent", "parentParent", "i18n", "editor", "INSERT_CHECK_LIST_COMMAND", "ChecklistFeatureClient", "props", "featureProviderMap", "plugins", "LexicalCheckListPlugin", "LexicalListPlugin", "CHECK_LIST", "ListNode", "ListItemNode", "slashMenuListGroupWithItems", "ChecklistFeatureClientComponent", "createClientComponent", "$isListNode", "INSERT_ORDERED_LIST_COMMAND", "ListItemNode", "ListNode", "$isRangeSelection", "jsx", "jsxs", "OrderedListIcon", "$isListNode", "ListItemNode", "ListNode", "ORDERED_LIST", "ListNode", "ListItemNode", "node", "exportChildren", "$isListNode", "listExport", "listReplace", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "OrderedListIcon", "selection", "$isRangeSelection", "node", "$isListNode", "parent", "parentParent", "i18n", "editor", "INSERT_ORDERED_LIST_COMMAND", "OrderedListFeatureClient", "props", "featureProviderMap", "ORDERED_LIST", "ListNode", "ListItemNode", "LexicalListPlugin", "slashMenuListGroupWithItems", "OrderedListFeatureClientComponent", "createClientComponent", "$isListNode", "INSERT_UNORDERED_LIST_COMMAND", "ListItemNode", "ListNode", "$isRangeSelection", "jsx", "jsxs", "UnorderedListIcon", "$isListNode", "ListItemNode", "ListNode", "UNORDERED_LIST", "ListNode", "ListItemNode", "node", "exportChildren", "$isListNode", "listExport", "listReplace", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "UnorderedListIcon", "selection", "$isRangeSelection", "node", "$isListNode", "parent", "parentParent", "i18n", "editor", "INSERT_UNORDERED_LIST_COMMAND", "UnorderedListFeatureClient", "props", "UNORDERED_LIST", "ListNode", "ListItemNode", "LexicalListPlugin", "slashMenuListGroupWithItems", "UnorderedListFeatureClientComponent", "createClientComponent", "convertLexicalPluginToLexical", "converters", "lexicalPluginData", "convertLexicalPluginNodesToLexical", "lexicalPluginNodes", "parentNodeType", "unknownConverter", "converter", "lexicalPluginNode", "convertParagraphNode", "node", "addClassNamesToElement", "DecoratorNode", "React", "jsx", "Component", "module", "UnknownConvertedNode", "_UnknownConvertedNode", "data", "key", "node", "serializedNode", "$createUnknownConvertedNode", "config", "element", "prevNode", "dom", "LexicalPluginToLexicalFeatureClient", "props", "clientFunctions", "resolvedFeatures", "converters", "incomingEditorState", "convertLexicalPluginToLexical", "UnknownConvertedNode", "LexicalPluginToLexicalFeatureClientComponent", "createClientComponent", "NodeFormat", "IS_ALL_FORMATTING", "RTL", "LTR", "RTL_REGEX", "LTR_REGEX", "TEXT_TYPE_TO_FORMAT", "NodeFormat", "DETAIL_TYPE_TO_DETAIL", "ELEMENT_TYPE_TO_FORMAT", "ELEMENT_FORMAT_TO_TYPE", "TEXT_MODE_TO_TYPE", "TEXT_TYPE_TO_MODE", "convertSlateToLexical", "converters", "slateData", "convertSlateNodesToLexical", "canContainParagraphs", "parentNodeType", "slateNodes", "unknownConverter", "converter", "slateNode", "i", "convertParagraphNode", "convertTextNode", "node", "convertNodeToFormat", "format", "NodeFormat", "addClassNamesToElement", "DecoratorNode", "React", "jsx", "Component", "module", "UnknownConvertedNode", "_UnknownConvertedNode", "data", "key", "node", "serializedNode", "$createUnknownConvertedNode", "config", "element", "prevNode", "dom", "SlateToLexicalFeatureClient", "props", "clientFunctions", "converters", "incomingEditorState", "convertSlateToLexical", "UnknownConvertedNode", "SlateToLexicalFeatureClientComponent", "createClientComponent", "$setBlocksType", "$createParagraphNode", "$getSelection", "$isParagraphNode", "$isRangeSelection", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "TextIcon", "selection", "$isRangeSelection", "node", "$isParagraphNode", "i18n", "editor", "$getSelection", "$setBlocksType", "$createParagraphNode", "ParagraphFeatureClient", "props", "slashMenuBasicGroupWithItems", "ParagraphFeatureClientComponent", "createClientComponent", "$isNodeSelection", "jsx", "jsxs", "RelationshipIcon", "useLexicalComposerContext", "$insertNodeToNearestRoot", "useConfig", "$getPreviousSelection", "$getSelection", "$isParagraphNode", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "createCommand", "useEffect", "useLexicalComposerContext", "useListDrawer", "$getNodeByKey", "COMMAND_PRIORITY_EDITOR", "useCallback", "useEffect", "useState", "jsx", "insertRelationship", "editor", "relationTo", "replaceNodeKey", "value", "node", "$getNodeByKey", "$createRelationshipNode", "INSERT_RELATIONSHIP_COMMAND", "RelationshipDrawerComponent", "enabledCollectionSlugs", "useLexicalComposerContext", "selectedCollectionSlug", "setSelectedCollectionSlug", "useState", "setReplaceNodeKey", "ListDrawer", "ListDrawerToggler", "closeDrawer", "isDrawerOpen", "openDrawer", "useListDrawer", "useEffect", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "payload", "COMMAND_PRIORITY_EDITOR", "onSelect", "useCallback", "collectionSlug", "docID", "RelationshipDrawer", "props", "EnabledRelationshipsCondition", "jsx", "INSERT_RELATIONSHIP_COMMAND", "createCommand", "RelationshipPlugin", "clientProps", "editor", "useLexicalComposerContext", "collections", "useConfig", "enabledRelations", "slug", "useEffect", "RelationshipNode", "payload", "selection", "$getSelection", "$getPreviousSelection", "$isRangeSelection", "relationshipNode", "$createRelationshipNode", "$insertNodeToNearestRoot", "focus", "focusNode", "$isParagraphNode", "node", "COMMAND_PRIORITY_EDITOR", "RelationshipDrawer", "RelationshipFeatureClient", "props", "RelationshipNode", "RelationshipPlugin", "slashMenuBasicGroupWithItems", "RelationshipIcon", "i18n", "editor", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "toolbarAddDropdownGroupWithItems", "selection", "$isNodeSelection", "firstNode", "$isRelationshipNode", "RelationshipFeatureClientComponent", "createClientComponent", "useLexicalComposerContext", "useScrollInfo", "useThrottledEffect", "useTranslation", "React", "useMemo", "mergeRegister", "$getSelection", "useCallback", "useEffect", "useState", "jsx", "baseClass", "ToolbarButton", "children", "editor", "item", "enabled", "setEnabled", "useState", "active", "setActive", "className", "setClassName", "editorConfigContext", "useEditorConfigContext", "updateStates", "useCallback", "selection", "$getSelection", "isActive", "isEnabled", "useEffect", "mergeRegister", "e", "React", "useCallback", "useEffect", "mergeRegister", "useTranslation", "$getSelection", "React", "useCallback", "useEffect", "useMemo", "useRef", "useState", "createPortal", "jsx", "jsxs", "baseClass", "DropDownContext", "DropDownItem", "active", "children", "editor", "enabled", "item", "title", "className", "setClassName", "ref", "dropDownContext", "registerItem", "e", "DropDownItems", "dropDownRef", "itemsContainerClassNames", "onClose", "items", "setItems", "highlightedItem", "setHighlightedItem", "itemRef", "prev", "handleKeyDown", "event", "key", "index", "contextValue", "DropDown", "Icon", "buttonAriaLabel", "buttonClassName", "disabled", "label", "stopCloseOnClickSelf", "buttonRef", "showDropDown", "setShowDropDown", "handleClose", "button", "dropDown", "left", "top", "scrollTopOffset", "handle", "target", "portal", "jsx", "jsxs", "baseClass", "ToolbarItem", "active", "anchorElem", "editor", "enabled", "item", "i18n", "useTranslation", "title", "DropDownItem", "ToolbarDropdown", "Icon", "classNames", "groupKey", "items", "itemsContainerClassNames", "label", "maxActiveItems", "onActiveChange", "activeItemKeys", "setActiveItemKeys", "React", "enabledItemKeys", "setEnabledItemKeys", "editorConfigContext", "useEditorConfigContext", "updateStates", "useCallback", "selection", "$getSelection", "_activeItemKeys", "_activeItems", "_enabledItemKeys", "useEffect", "mergeRegister", "DropDown", "jsx", "jsxs", "ButtonGroupItem", "anchorElem", "editor", "item", "ToolbarButton", "ToolbarGroupComponent", "editorConfig", "group", "index", "i18n", "useTranslation", "dropdownLabel", "setDropdownLabel", "DropdownIcon", "setDropdownIcon", "onActiveChange", "activeItems", "label", "ToolbarDropdown", "FixedToolbar", "clientProps", "parentWithFixedToolbar", "currentToolbarRef", "y", "useScrollInfo", "parentToolbarElem", "useMemo", "sibling", "useThrottledEffect", "currentToolbarElem", "currentRect", "parentRect", "event", "i", "getParentEditorWithFixedToolbar", "editorConfigContext", "FixedToolbarPlugin", "currentEditor", "useLexicalComposerContext", "useEditorConfigContext", "currentEditorConfig", "FixedToolbarFeatureClient", "props", "FixedToolbarPlugin", "FixedToolbarFeatureClientComponent", "createClientComponent", "useLexicalComposerContext", "mergeRegister", "$getSelection", "$isRangeSelection", "$isTextNode", "COMMAND_PRIORITY_LOW", "SELECTION_CHANGE_COMMAND", "useCallback", "useEffect", "useRef", "useState", "React", "createPortal", "getDOMRangeRect", "nativeSelection", "rootElement", "domRange", "rect", "inner", "setFloatingElemPosition", "args", "alwaysDisplayOnTop", "anchorElem", "anchorFlippedOffset", "floatingElem", "horizontalOffset", "horizontalPosition", "specialHandlingForCaret", "targetRect", "verticalGap", "scrollerElem", "floatingElemRect", "anchorElementRect", "editorScrollerRect", "top", "left", "addedToTop", "jsx", "jsxs", "ButtonGroupItem", "anchorElem", "editor", "item", "ToolbarButton", "ToolbarGroupComponent", "group", "index", "editorConfig", "useEditorConfigContext", "DropdownIcon", "setDropdownIcon", "onActiveChange", "activeItems", "ToolbarDropdown", "InlineToolbar", "floatingToolbarRef", "useRef", "caretRef", "closeFloatingToolbar", "useCallback", "isOpacityZero", "isPointerEventsNone", "mouseMoveListener", "e", "x", "y", "elementUnderMouse", "mouseUpListener", "useEffect", "$updateTextFormatFloatingToolbar", "selection", "$getSelection", "nativeSelection", "possibleLinkEditor", "isLinkEditorVisible", "rootElement", "rangeRect", "getDOMRangeRect", "offsetIfFlipped", "setFloatingElemPosition", "scrollerElem", "update", "mergeRegister", "editorState", "SELECTION_CHANGE_COMMAND", "COMMAND_PRIORITY_LOW", "i", "useInlineToolbar", "isText", "setIsText", "useState", "updatePopup", "$isRangeSelection", "nodes", "foundNodeWithText", "node", "$isTextNode", "rawTextContent", "createPortal", "InlineToolbarPlugin", "useLexicalComposerContext", "InlineToolbarFeatureClient", "props", "InlineToolbarPlugin", "InlineToolbarFeatureClientComponent", "createClientComponent", "$isNodeSelection", "jsx", "jsxs", "UploadIcon", "useLexicalComposerContext", "$insertNodeToNearestRoot", "mergeRegister", "useConfig", "$getPreviousSelection", "$getSelection", "$isParagraphNode", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "createCommand", "useEffect", "useLexicalComposerContext", "useListDrawer", "$getNodeByKey", "COMMAND_PRIORITY_EDITOR", "useCallback", "useEffect", "useState", "jsx", "insertUpload", "editor", "relationTo", "replaceNodeKey", "value", "node", "$getNodeByKey", "$createUploadNode", "INSERT_UPLOAD_COMMAND", "UploadDrawerComponent", "enabledCollectionSlugs", "useLexicalComposerContext", "setReplaceNodeKey", "useState", "ListDrawer", "ListDrawerToggler", "closeDrawer", "openDrawer", "useListDrawer", "useEffect", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "payload", "COMMAND_PRIORITY_EDITOR", "onSelect", "useCallback", "collectionSlug", "docID", "UploadDrawer", "props", "EnabledRelationshipsCondition", "jsx", "INSERT_UPLOAD_COMMAND", "createCommand", "UploadPlugin", "clientProps", "editor", "useLexicalComposerContext", "collections", "useConfig", "useEffect", "UploadNode", "mergeRegister", "payload", "selection", "$getSelection", "$getPreviousSelection", "$isRangeSelection", "uploadNode", "$createUploadNode", "$insertNodeToNearestRoot", "focus", "focusNode", "$isParagraphNode", "node", "COMMAND_PRIORITY_EDITOR", "UploadDrawer", "slug", "UploadFeatureClient", "props", "UploadNode", "UploadPlugin", "slashMenuBasicGroupWithItems", "UploadIcon", "i18n", "editor", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "toolbarAddDropdownGroupWithItems", "selection", "$isNodeSelection", "firstNode", "$isUploadNode", "UploadFeatureClientComponent", "createClientComponent", "ShimmerEffect", "useClientFunctions", "useFieldProps", "React", "Suspense", "lazy", "useEffect", "useState", "jsx", "jsxs", "RichTextEditor", "lazy", "module", "RichTextField", "props", "admin", "lexicalEditorConfig", "richTextComponentMap", "schemaPath", "useFieldProps", "clientFunctions", "useClientFunctions", "hasLoadedFeatures", "setHasLoadedFeatures", "useState", "featureProviders", "setFeatureProviders", "finalSanitizedEditorConfig", "setFinalSanitizedEditorConfig", "featureProviderComponents", "a", "b", "featureProvidersAndComponentsToLoad", "featureProvider", "featureComponentKeys", "key", "useEffect", "featureProvidersLocal", "featureProvidersAndComponentsLoaded", "plugin", "resolvedClientFeatures", "loadClientFeatures", "sanitizeClientEditorConfig", "defaultEditorLexicalConfig", "Suspense", "ShimmerEffect", "React", "featureComponents", "FeatureComponent", "cloneDeep", "object", "cache", "clonedMap", "key", "value", "clonedSet", "clonedObject", "joinClasses", "args", "elements", "readTouch", "touch", "addListener", "element", "cb", "elementValues", "listeners", "handleTouchstart", "e", "handleTouchend", "start", "end", "listener", "deleteListener", "addSwipeLeftListener", "force", "x", "y", "addSwipeRightListener", "addSwipeUpListener", "addSwipeDownListener"]
3
+ "sources": ["../../../src/cell/index.tsx", "../../../src/lexical/theme/EditorTheme.tsx", "../../../src/lexical/config/client/default.ts", "../../../src/lexical/config/client/loader.ts", "../../../src/lexical/config/client/sanitize.ts", "../../../src/features/align/feature.client.tsx", "../../../src/lexical/ui/icons/AlignCenter/index.tsx", "../../../src/lexical/ui/icons/AlignJustify/index.tsx", "../../../src/lexical/ui/icons/AlignLeft/index.tsx", "../../../src/lexical/ui/icons/AlignRight/index.tsx", "../../../src/utilities/useLexicalFeature.tsx", "../../../src/features/createClientComponent.tsx", "../../../src/utilities/createClientFeature.ts", "../../../src/features/align/toolbarAlignGroup.ts", "../../../src/features/blockquote/feature.client.tsx", "../../../src/lexical/ui/icons/Blockquote/index.tsx", "../../../src/features/shared/slashMenu/basicGroup.ts", "../../../src/lexical/ui/icons/Text/index.tsx", "../../../src/features/shared/toolbar/textDropdownGroup.ts", "../../../src/features/blockquote/markdownTransformer.ts", "../../../src/features/blocks/feature.client.tsx", "../../../src/lexical/ui/icons/Block/index.tsx", "../../../src/features/blocks/nodes/BlocksNode.tsx", "../../../src/features/blocks/plugin/commands.ts", "../../../src/features/blocks/plugin/index.tsx", "../../../src/features/blocks/drawer/index.tsx", "../../../src/features/debug/testRecorder/plugin/index.tsx", "../../../src/lexical/utils/canUseDOM.ts", "../../../src/lexical/utils/environment.ts", "../../../src/features/debug/testRecorder/feature.client.tsx", "../../../src/features/debug/treeView/plugin/index.tsx", "../../../src/features/debug/treeView/feature.client.tsx", "../../../src/features/format/bold/feature.client.tsx", "../../../src/lexical/ui/icons/Bold/index.tsx", "../../../src/features/format/shared/toolbarFormatGroup.ts", "../../../src/features/format/bold/markdownTransformers.ts", "../../../src/features/format/inlineCode/feature.client.tsx", "../../../src/lexical/ui/icons/Code/index.tsx", "../../../src/features/format/inlineCode/markdownTransformers.ts", "../../../src/features/format/italic/feature.client.tsx", "../../../src/lexical/ui/icons/Italic/index.tsx", "../../../src/features/format/italic/markdownTransformers.ts", "../../../src/features/format/strikethrough/feature.client.tsx", "../../../src/lexical/ui/icons/Strikethrough/index.tsx", "../../../src/features/format/strikethrough/markdownTransformers.ts", "../../../src/features/format/subscript/feature.client.tsx", "../../../src/lexical/ui/icons/Subscript/index.tsx", "../../../src/features/format/superscript/feature.client.tsx", "../../../src/lexical/ui/icons/Superscript/index.tsx", "../../../src/features/format/underline/feature.client.tsx", "../../../src/lexical/ui/icons/Underline/index.tsx", "../../../src/features/heading/feature.client.tsx", "../../../src/lexical/ui/icons/H1/index.tsx", "../../../src/lexical/ui/icons/H2/index.tsx", "../../../src/lexical/ui/icons/H3/index.tsx", "../../../src/lexical/ui/icons/H4/index.tsx", "../../../src/lexical/ui/icons/H5/index.tsx", "../../../src/lexical/ui/icons/H6/index.tsx", "../../../src/features/heading/markdownTransformer.ts", "../../../src/lexical/utils/markdown/createBlockNode.ts", "../../../src/features/horizontalRule/feature.client.tsx", "../../../src/lexical/ui/icons/HorizontalRule/index.tsx", "../../../src/lexical/ui/icons/Add/index.tsx", "../../../src/features/shared/toolbar/addDropdownGroup.ts", "../../../src/features/horizontalRule/markdownTransformer.ts", "../../../src/features/horizontalRule/plugin/index.tsx", "../../../src/features/indent/feature.client.tsx", "../../../src/lexical/ui/icons/IndentDecrease/index.tsx", "../../../src/lexical/ui/icons/IndentIncrease/index.tsx", "../../../src/features/indent/toolbarIndentGroup.ts", "../../../src/features/link/feature.client.tsx", "../../../src/lexical/ui/icons/Link/index.tsx", "../../../src/lexical/utils/getSelectedNode.ts", "../../../src/features/shared/toolbar/featureButtonsGroup.ts", "../../../src/features/link/markdownTransformer.ts", "../../../src/features/link/nodes/LinkNode.ts", "../../../src/features/link/nodes/AutoLinkNode.ts", "../../../src/features/link/plugins/autoLink/index.tsx", "../../../src/lexical/utils/invariant.ts", "../../../src/features/link/plugins/clickableLink/index.tsx", "../../../src/features/link/plugins/floatingLinkEditor/LinkEditor/commands.ts", "../../../src/features/link/plugins/floatingLinkEditor/index.tsx", "../../../src/features/link/plugins/floatingLinkEditor/LinkEditor/index.tsx", "../../../src/lexical/utils/setFloatingElemPositionForLinkEditor.ts", "../../../src/features/link/drawer/index.tsx", "../../../src/features/link/plugins/link/index.tsx", "../../../src/lexical/utils/url.ts", "../../../src/features/lists/checklist/feature.client.tsx", "../../../src/lexical/ui/icons/Checklist/index.tsx", "../../../src/features/lists/plugin/index.tsx", "../../../src/features/lists/shared/slashMenuListGroup.ts", "../../../src/features/lists/checklist/markdownTransformers.ts", "../../../src/features/lists/shared/markdown.ts", "../../../src/features/lists/checklist/plugin/index.tsx", "../../../src/features/lists/orderedList/feature.client.tsx", "../../../src/lexical/ui/icons/OrderedList/index.tsx", "../../../src/features/lists/orderedList/markdownTransformer.ts", "../../../src/features/lists/unorderedList/feature.client.tsx", "../../../src/lexical/ui/icons/UnorderedList/index.tsx", "../../../src/features/lists/unorderedList/markdownTransformer.ts", "../../../src/features/migrations/lexicalPluginToLexical/converter/index.ts", "../../../src/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.tsx", "../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx", "../../../src/lexical/utils/nodeFormat.ts", "../../../src/features/migrations/slateToLexical/converter/index.ts", "../../../src/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.tsx", "../../../src/features/migrations/slateToLexical/feature.client.tsx", "../../../src/features/paragraph/feature.client.tsx", "../../../src/features/relationship/feature.client.tsx", "../../../src/lexical/ui/icons/Relationship/index.tsx", "../../../src/features/relationship/plugins/index.tsx", "../../../src/features/relationship/drawer/index.tsx", "../../../src/features/toolbars/fixed/Toolbar/index.tsx", "../../../src/features/toolbars/shared/ToolbarButton/index.tsx", "../../../src/features/toolbars/shared/ToolbarDropdown/index.tsx", "../../../src/features/toolbars/shared/ToolbarDropdown/DropDown.tsx", "../../../src/features/toolbars/fixed/feature.client.tsx", "../../../src/features/toolbars/inline/Toolbar/index.tsx", "../../../src/lexical/utils/getDOMRangeRect.ts", "../../../src/lexical/utils/setFloatingElemPosition.ts", "../../../src/features/toolbars/inline/feature.client.tsx", "../../../src/features/upload/feature.client.tsx", "../../../src/lexical/ui/icons/Upload/index.tsx", "../../../src/features/upload/plugin/index.tsx", "../../../src/features/upload/drawer/index.tsx", "../../../src/field/index.tsx", "../../../src/lexical/utils/cloneDeep.ts", "../../../src/lexical/utils/joinClasses.ts", "../../../src/lexical/utils/swipe.ts"],
4
+ "sourcesContent": ["'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { CellComponentProps } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { useClientFunctions, useTableCell } from '@payloadcms/ui'\nimport { $getRoot } from 'lexical'\nimport React, { useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../lexical/config/client/default.js'\nimport { loadClientFeatures } from '../lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../lexical/config/client/sanitize.js'\nimport { getEnabledNodes } from '../lexical/nodes/index.js'\n\nexport const RichTextCell: React.FC<\n CellComponentProps & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n\n const [preview, setPreview] = React.useState('Loading...')\n\n const {\n cellData,\n cellProps: { schemaPath },\n } = useTableCell()\n\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<\n FeatureProviderClient<unknown, unknown>[]\n >([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n const featureProviderComponents: GeneratedFeatureProviderComponent[] = (\n richTextComponentMap.get('features') as GeneratedFeatureProviderComponent[]\n ).sort((a, b) => a.order - b.order) // order by order\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown, unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0 // feature providers and components only\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n featureProviderComponents,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n richTextComponentMap,\n featureProvidersAndComponentsToLoad,\n ])\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n return\n }\n let dataToUse = cellData\n if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {\n setPreview('')\n return\n }\n\n // Transform data through load hooks\n if (finalSanitizedEditorConfig?.features?.hooks?.load?.length) {\n finalSanitizedEditorConfig.features.hooks.load.forEach((hook) => {\n dataToUse = hook({ incomingEditorState: dataToUse })\n })\n }\n\n if (!dataToUse || typeof dataToUse !== 'object') {\n setPreview('')\n return\n }\n\n // If data is from Slate and not Lexical\n if (Array.isArray(dataToUse) && !('root' in dataToUse)) {\n setPreview('')\n return\n }\n\n // If data is from payload-plugin-lexical\n if ('jsonContent' in dataToUse) {\n setPreview('')\n return\n }\n\n // initialize headless editor\n const headlessEditor = createHeadlessEditor({\n namespace: finalSanitizedEditorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig: finalSanitizedEditorConfig }),\n theme: finalSanitizedEditorConfig.lexical.theme,\n })\n headlessEditor.setEditorState(headlessEditor.parseEditorState(dataToUse))\n\n const textContent =\n headlessEditor.getEditorState().read(() => {\n return $getRoot().getTextContent()\n }) || ''\n\n // Limiting the number of characters shown is done in a CSS rule\n setPreview(textContent)\n }, [cellData, lexicalEditorConfig, hasLoadedFeatures, finalSanitizedEditorConfig])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n })\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientFeature}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return <span>{preview}</span>\n}\n", "import type { EditorThemeClasses } from 'lexical'\n\nexport const LexicalEditorTheme: EditorThemeClasses = {\n block: 'LexicalEditorTheme__block',\n blockCursor: 'LexicalEditorTheme__blockCursor',\n characterLimit: 'LexicalEditorTheme__characterLimit',\n code: 'LexicalEditorTheme__code',\n codeHighlight: {\n atrule: 'LexicalEditorTheme__tokenAttr',\n attr: 'LexicalEditorTheme__tokenAttr',\n boolean: 'LexicalEditorTheme__tokenProperty',\n builtin: 'LexicalEditorTheme__tokenSelector',\n cdata: 'LexicalEditorTheme__tokenComment',\n char: 'LexicalEditorTheme__tokenSelector',\n class: 'LexicalEditorTheme__tokenFunction',\n 'class-name': 'LexicalEditorTheme__tokenFunction',\n comment: 'LexicalEditorTheme__tokenComment',\n constant: 'LexicalEditorTheme__tokenProperty',\n deleted: 'LexicalEditorTheme__tokenProperty',\n doctype: 'LexicalEditorTheme__tokenComment',\n entity: 'LexicalEditorTheme__tokenOperator',\n function: 'LexicalEditorTheme__tokenFunction',\n important: 'LexicalEditorTheme__tokenVariable',\n inserted: 'LexicalEditorTheme__tokenSelector',\n keyword: 'LexicalEditorTheme__tokenAttr',\n namespace: 'LexicalEditorTheme__tokenVariable',\n number: 'LexicalEditorTheme__tokenProperty',\n operator: 'LexicalEditorTheme__tokenOperator',\n prolog: 'LexicalEditorTheme__tokenComment',\n property: 'LexicalEditorTheme__tokenProperty',\n punctuation: 'LexicalEditorTheme__tokenPunctuation',\n regex: 'LexicalEditorTheme__tokenVariable',\n selector: 'LexicalEditorTheme__tokenSelector',\n string: 'LexicalEditorTheme__tokenSelector',\n symbol: 'LexicalEditorTheme__tokenProperty',\n tag: 'LexicalEditorTheme__tokenProperty',\n url: 'LexicalEditorTheme__tokenOperator',\n variable: 'LexicalEditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'LexicalEditorTheme__embedBlock',\n focus: 'LexicalEditorTheme__embedBlockFocus',\n },\n hashtag: 'LexicalEditorTheme__hashtag',\n heading: {\n h1: 'LexicalEditorTheme__h1',\n h2: 'LexicalEditorTheme__h2',\n h3: 'LexicalEditorTheme__h3',\n h4: 'LexicalEditorTheme__h4',\n h5: 'LexicalEditorTheme__h5',\n h6: 'LexicalEditorTheme__h6',\n },\n hr: 'LexicalEditorTheme__hr',\n indent: 'LexicalEditorTheme__indent',\n inlineImage: 'LexicalEditor__inline-image',\n link: 'LexicalEditorTheme__link',\n list: {\n checklist: 'LexicalEditorTheme__checklist',\n listitem: 'LexicalEditorTheme__listItem',\n listitemChecked: 'LexicalEditorTheme__listItemChecked',\n listitemUnchecked: 'LexicalEditorTheme__listItemUnchecked',\n nested: {\n listitem: 'LexicalEditorTheme__nestedListItem',\n },\n olDepth: [\n 'LexicalEditorTheme__ol1',\n 'LexicalEditorTheme__ol2',\n 'LexicalEditorTheme__ol3',\n 'LexicalEditorTheme__ol4',\n 'LexicalEditorTheme__ol5',\n ],\n ul: 'LexicalEditorTheme__ul',\n },\n ltr: 'LexicalEditorTheme__ltr',\n mark: 'LexicalEditorTheme__mark',\n markOverlap: 'LexicalEditorTheme__markOverlap',\n paragraph: 'LexicalEditorTheme__paragraph',\n quote: 'LexicalEditorTheme__quote',\n relationship: 'LexicalEditorTheme__relationship',\n rtl: 'LexicalEditorTheme__rtl',\n table: 'LexicalEditorTheme__table',\n tableAddColumns: 'LexicalEditorTheme__tableAddColumns',\n tableAddRows: 'LexicalEditorTheme__tableAddRows',\n tableCell: 'LexicalEditorTheme__tableCell',\n tableCellActionButton: 'LexicalEditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'LexicalEditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'LexicalEditorTheme__tableCellEditing',\n tableCellHeader: 'LexicalEditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'LexicalEditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'LexicalEditorTheme__tableCellResizer',\n tableCellSelected: 'LexicalEditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'LexicalEditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'LexicalEditorTheme__tableCellResizeRuler',\n tableSelected: 'LexicalEditorTheme__tableSelected',\n text: {\n bold: 'LexicalEditorTheme__textBold',\n code: 'LexicalEditorTheme__textCode',\n italic: 'LexicalEditorTheme__textItalic',\n strikethrough: 'LexicalEditorTheme__textStrikethrough',\n subscript: 'LexicalEditorTheme__textSubscript',\n superscript: 'LexicalEditorTheme__textSuperscript',\n underline: 'LexicalEditorTheme__textUnderline',\n underlineStrikethrough: 'LexicalEditorTheme__textUnderlineStrikethrough',\n },\n upload: 'editor-upload',\n}\n", "'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { LexicalEditorTheme } from '../../theme/EditorTheme.js'\n\nexport const defaultEditorLexicalConfig: LexicalEditorConfig = {\n namespace: 'lexical',\n theme: LexicalEditorTheme,\n}\n", "'use client'\n\nimport type {\n ClientFeatureProviderMap,\n FeatureProviderClient,\n ResolvedClientFeatureMap,\n} from '../../../features/typesClient.js'\nimport type { ClientEditorConfig } from '../types.js'\n\n/**\n * This function expects client functions to ALREADY be ordered & dependencies checked on the server\n * @param unSanitizedEditorConfig\n */\nexport function loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig,\n}: {\n clientFunctions?: Record<string, any>\n schemaPath: string\n unSanitizedEditorConfig: ClientEditorConfig\n}): ResolvedClientFeatureMap {\n for (const featureProvider of unSanitizedEditorConfig.features) {\n if (\n !featureProvider?.clientFeatureProps?.featureKey ||\n featureProvider?.clientFeatureProps?.order === undefined ||\n featureProvider?.clientFeatureProps?.order === null\n ) {\n throw new Error(\n 'A Feature you have installed does not return the client props as clientFeatureProps. Please make sure to always return those props, even if they are null, as other important props like order and featureKey are later on injected.',\n )\n }\n }\n\n // sort unSanitizedEditorConfig.features by order\n unSanitizedEditorConfig.features = unSanitizedEditorConfig.features.sort(\n (a, b) => a.clientFeatureProps.order - b.clientFeatureProps.order,\n )\n\n const featureProviderMap: ClientFeatureProviderMap = new Map(\n unSanitizedEditorConfig.features.map(\n (f) =>\n [f.clientFeatureProps.featureKey, f] as [string, FeatureProviderClient<unknown, unknown>],\n ),\n )\n\n const resolvedFeatures: ResolvedClientFeatureMap = new Map()\n\n // Make sure all dependencies declared in the respective features exist\n let loaded = 0\n for (const featureProvider of unSanitizedEditorConfig.features) {\n /**\n * Load relevant clientFunctions scoped to this feature and then pass them to the client feature\n */\n const relevantClientFunctions: Record<string, any> = {}\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (\n key.startsWith(\n `lexicalFeature.${schemaPath}.${featureProvider.clientFeatureProps.featureKey}.components.`,\n )\n ) {\n const featureComponentKey = key.split(\n `${schemaPath}.${featureProvider.clientFeatureProps.featureKey}.components.`,\n )[1]\n relevantClientFunctions[featureComponentKey] = plugin\n }\n })\n\n const feature =\n typeof featureProvider.feature === 'function'\n ? featureProvider.feature({\n clientFunctions: relevantClientFunctions,\n featureProviderMap,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n : featureProvider.feature\n\n resolvedFeatures.set(featureProvider.clientFeatureProps.featureKey, {\n ...feature,\n key: featureProvider.clientFeatureProps.featureKey,\n order: loaded,\n })\n\n loaded++\n }\n\n return resolvedFeatures\n}\n", "'use client'\n\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type {\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n} from '../../../features/typesClient.js'\nimport type { LexicalFieldAdminProps } from '../../../types.js'\nimport type { SanitizedClientEditorConfig } from '../types.js'\n\nexport const sanitizeClientFeatures = (\n features: ResolvedClientFeatureMap,\n): SanitizedClientFeatures => {\n const sanitized: SanitizedClientFeatures = {\n enabledFeatures: [],\n hooks: {\n load: [],\n save: [],\n },\n markdownTransformers: [],\n nodes: [],\n plugins: [],\n slashMenu: {\n dynamicGroups: [],\n groups: [],\n },\n toolbarFixed: {\n groups: [],\n },\n toolbarInline: {\n groups: [],\n },\n }\n\n if (!features?.size) {\n return sanitized\n }\n\n features.forEach((feature) => {\n if (feature.hooks) {\n if (feature.hooks?.load?.length) {\n sanitized.hooks.load = sanitized.hooks.load.concat(feature.hooks.load)\n }\n if (feature.hooks?.save?.length) {\n sanitized.hooks.save = sanitized.hooks.save.concat(feature.hooks.save)\n }\n }\n\n if (feature.nodes?.length) {\n sanitized.nodes = sanitized.nodes.concat(feature.nodes)\n }\n if (feature.plugins?.length) {\n feature.plugins.forEach((plugin, i) => {\n sanitized.plugins.push({\n Component: plugin.Component,\n clientProps: feature.sanitizedClientFeatureProps,\n key: feature.key + i,\n position: plugin.position,\n })\n })\n }\n\n if (feature.toolbarInline?.groups?.length) {\n for (const group of feature.toolbarInline.groups) {\n // 1. find the group with the same key or create new one\n let foundGroup = sanitized.toolbarInline.groups.find(\n (sanitizedGroup) => sanitizedGroup.key === group.key,\n )\n if (!foundGroup) {\n foundGroup = {\n ...group,\n items: [],\n }\n } else {\n sanitized.toolbarInline.groups = sanitized.toolbarInline.groups.filter(\n (sanitizedGroup) => sanitizedGroup.key !== group.key,\n )\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (group?.items?.length) {\n foundGroup.items = foundGroup.items.concat(group.items)\n }\n sanitized.toolbarInline?.groups.push(foundGroup)\n }\n }\n\n if (feature.toolbarFixed?.groups?.length) {\n for (const group of feature.toolbarFixed.groups) {\n // 1. find the group with the same key or create new one\n let foundGroup = sanitized.toolbarFixed.groups.find(\n (sanitizedGroup) => sanitizedGroup.key === group.key,\n )\n if (!foundGroup) {\n foundGroup = {\n ...group,\n items: [],\n }\n } else {\n sanitized.toolbarFixed.groups = sanitized.toolbarFixed.groups.filter(\n (sanitizedGroup) => sanitizedGroup.key !== group.key,\n )\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (group?.items?.length) {\n foundGroup.items = foundGroup.items.concat(group.items)\n }\n sanitized.toolbarFixed?.groups.push(foundGroup)\n }\n }\n\n if (feature.slashMenu?.groups) {\n if (feature.slashMenu.dynamicGroups?.length) {\n sanitized.slashMenu.dynamicGroups = sanitized.slashMenu.dynamicGroups.concat(\n feature.slashMenu.dynamicGroups,\n )\n }\n\n for (const optionGroup of feature.slashMenu.groups) {\n // 1. find the group with the same name or create new one\n let group = sanitized.slashMenu.groups.find((group) => group.key === optionGroup.key)\n if (!group) {\n group = {\n ...optionGroup,\n items: [],\n }\n } else {\n sanitized.slashMenu.groups = sanitized.slashMenu.groups.filter(\n (group) => group.key !== optionGroup.key,\n )\n }\n\n // 2. Add options to group options array and add to sanitized.slashMenu.groupsWithOptions\n if (optionGroup?.items?.length) {\n group.items = group.items.concat(optionGroup.items)\n }\n sanitized.slashMenu.groups.push(group)\n }\n }\n\n if (feature.markdownTransformers?.length) {\n sanitized.markdownTransformers = sanitized.markdownTransformers.concat(\n feature.markdownTransformers,\n )\n }\n sanitized.enabledFeatures.push(feature.key)\n })\n\n // Sort sanitized.toolbarInline.groups by order property\n sanitized.toolbarInline.groups.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n // Sort sanitized.toolbarFixed.groups by order property\n sanitized.toolbarFixed.groups.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n\n // Sort sanitized.toolbarInline.groups.[group].entries by order property\n for (const group of sanitized.toolbarInline.groups) {\n group.items.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n }\n\n // Sort sanitized.toolbarFixed.groups.[group].entries by order property\n for (const group of sanitized.toolbarFixed.groups) {\n group.items.sort((a, b) => {\n if (a.order && b.order) {\n return a.order - b.order\n } else if (a.order) {\n return -1\n } else if (b.order) {\n return 1\n } else {\n return 0\n }\n })\n }\n\n return sanitized\n}\n\nexport function sanitizeClientEditorConfig(\n lexical: LexicalEditorConfig,\n resolvedClientFeatureMap: ResolvedClientFeatureMap,\n admin?: LexicalFieldAdminProps,\n): SanitizedClientEditorConfig {\n return {\n admin,\n features: sanitizeClientFeatures(resolvedClientFeatureMap),\n lexical,\n resolvedFeatureMap: resolvedClientFeatureMap,\n }\n}\n", "'use client'\n\nimport { $isElementNode, $isRangeSelection, FORMAT_ELEMENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\n\nimport { AlignCenterIcon } from '../../lexical/ui/icons/AlignCenter/index.js'\nimport { AlignJustifyIcon } from '../../lexical/ui/icons/AlignJustify/index.js'\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\nimport { AlignRightIcon } from '../../lexical/ui/icons/AlignRight/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { toolbarAlignGroupWithItems } from './toolbarAlignGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarAlignGroupWithItems([\n {\n ChildComponent: AlignLeftIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'left') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'left') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignLeft',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignLeftLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'left')\n },\n order: 1,\n },\n {\n ChildComponent: AlignCenterIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'center') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'center') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignCenter',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignCenterLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'center')\n },\n order: 2,\n },\n {\n ChildComponent: AlignRightIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'right') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'right') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignRight',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignRightLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'right')\n },\n order: 3,\n },\n {\n ChildComponent: AlignJustifyIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'justify') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'justify') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignJustify',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignJustifyLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'justify')\n },\n order: 4,\n },\n ]),\n]\n\nexport const AlignFeatureClient = createClientFeature({\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const AlignCenterIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5 15H15\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AlignJustifyIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AlignLeftIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H12.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AlignRightIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "'use client'\n\nimport { useAddClientFunction, useFieldProps, useTableCell } from '@payloadcms/ui'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\n\nexport const useLexicalFeature = <ClientFeatureProps,>(\n featureKey: string,\n feature: FeatureProviderClient<ClientFeatureProps>,\n) => {\n const { schemaPath: schemaPathFromFieldProps } = useFieldProps()\n const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature)\n}\n", "'use client'\n\nimport type { FeatureProviderProviderClient } from './typesClient.js'\nimport type { ServerFeature } from './typesServer.js'\n\nimport { useLexicalFeature } from '../utilities/useLexicalFeature.js'\n\n/**\n * Utility function to create a client component for the client feature\n */\nexport const createClientComponent = <ClientFeatureProps,>(\n clientFeature: FeatureProviderProviderClient<ClientFeatureProps>,\n): ServerFeature<unknown, ClientFeatureProps>['ClientFeature'] => {\n return (props) => {\n useLexicalFeature(props.featureKey, clientFeature(props))\n return null\n }\n}\n", "import type React from 'react'\n\nimport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n ResolvedClientFeatureMap,\n} from '../features/typesClient.js'\nimport type { ClientEditorConfig } from '../lexical/config/types.js'\n\nimport { createClientComponent } from '../features/createClientComponent.js'\n\nexport type CreateClientFeatureArgs<UnSanitizedClientProps, ClientProps> =\n | ((props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n props: ClientComponentProps<UnSanitizedClientProps>\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientProps>)\n | Omit<ClientFeature<ClientProps>, 'sanitizedClientFeatureProps'>\n\nexport const createClientFeature: <\n UnSanitizedClientProps = undefined,\n ClientProps = UnSanitizedClientProps,\n>(\n args: CreateClientFeatureArgs<UnSanitizedClientProps, ClientProps>,\n) => React.FC<ClientComponentProps<ClientProps>> = (feature) => {\n const featureProviderProvideClient: FeatureProviderProviderClient<any, any> = (props) => {\n const featureProviderClient: Partial<FeatureProviderClient<any, any>> = {\n clientFeatureProps: props,\n }\n\n if (typeof feature === 'function') {\n featureProviderClient.feature = ({\n clientFunctions,\n featureProviderMap,\n resolvedFeatures,\n unSanitizedEditorConfig,\n }) => {\n const toReturn = feature({\n clientFunctions,\n featureProviderMap,\n props,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n\n if (toReturn.sanitizedClientFeatureProps === null) {\n toReturn.sanitizedClientFeatureProps = props\n }\n\n return toReturn\n }\n } else {\n ;(feature as ClientFeature<any>).sanitizedClientFeatureProps = props\n featureProviderClient.feature = feature as ClientFeature<any>\n }\n return featureProviderClient as FeatureProviderClient<any, any>\n }\n\n return createClientComponent(featureProviderProvideClient)\n}\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\n\nexport const toolbarAlignGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AlignLeftIcon,\n items,\n key: 'align',\n order: 30,\n }\n}\n", "'use client'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\n\nimport { BlockquoteIcon } from '../../lexical/ui/icons/Blockquote/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: BlockquoteIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isQuoteNode(node) && !$isQuoteNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'blockquote',\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n order: 20,\n },\n ]),\n]\n\nexport const BlockquoteFeatureClient = createClientFeature({\n markdownTransformers: [MarkdownTransformer],\n nodes: [QuoteNode],\n\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: BlockquoteIcon,\n key: 'blockquote',\n keywords: ['quote', 'blockquote'],\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const BlockquoteIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.5353 10.5725C13.5353 9.47709 11.0456 9.99991 11.0456 7.85883C11.0456 6.46464 12.1162 5.61816 13.361 5.61816C14.805 5.61816 16 6.86298 16 8.92937C16 11.2945 14.4564 13.7841 11.1203 14.3816L10.8216 13.1368C12.888 12.4895 13.5353 11.4937 13.5353 10.5725ZM6.71369 10.5725C6.71369 9.47709 4.22407 9.99991 4.22407 7.85883C4.22407 6.46464 5.29461 5.61816 6.53942 5.61816C7.9834 5.61816 9.17842 6.86298 9.17842 8.92937C9.17842 11.2945 7.63485 13.7841 4.29876 14.3816L4 13.1368C6.06639 12.4895 6.71369 11.4937 6.71369 10.5725Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type {\n SlashMenuGroup,\n SlashMenuItem,\n} from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport function slashMenuBasicGroupWithItems(items: SlashMenuItem[]): SlashMenuGroup {\n return {\n items,\n key: 'basic',\n label: ({ i18n }) => {\n return i18n.t('lexical:general:slashMenuBasicGroupLabel')\n },\n }\n}\n", "import React from 'react'\n\nexport const TextIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.708 14.5H7.79785V13.9414H8.01367C9.00391 13.9414 9.15625 13.9033 9.15625 13.6113V6.70508H8.07715C6.82031 6.70508 6.73145 7.08594 6.28711 8.67285H5.80469L5.91895 6.12109H13.5869L13.7012 8.67285H13.2188C12.7744 7.08594 12.6855 6.70508 11.4287 6.70508H10.3496V13.6113C10.3496 13.9033 10.502 13.9414 11.4922 13.9414H11.708V14.5Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { TextIcon } from '../../../lexical/ui/icons/Text/index.js'\n\nexport const toolbarTextDropdownGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: TextIcon,\n items,\n key: 'text',\n order: 25,\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n", "'use client'\n\nimport type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { BlockIcon } from '../../lexical/ui/icons/Block/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\n\nexport type BlocksFeatureClientProps = {\n reducedBlocks: ReducedBlock[]\n}\n\nexport const BlocksFeatureClient = createClientFeature<BlocksFeatureClientProps>(({ props }) => ({\n nodes: [BlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: [\n {\n items: props.reducedBlocks.map((block) => {\n return {\n Icon: BlockIcon,\n key: 'block-' + block.slug,\n keywords: ['block', 'blocks', block.slug],\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n }\n }),\n key: 'blocks',\n label: ({ i18n }) => {\n return i18n.t('lexical:blocks:label')\n },\n },\n ],\n },\n toolbarFixed: {\n groups: [\n {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: props.reducedBlocks.map((block, index) => {\n return {\n ChildComponent: BlockIcon,\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + block.slug,\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n order: index,\n }\n }),\n key: 'blocks',\n order: 20,\n },\n ],\n },\n}))\n", "import React from 'react'\n\nexport const BlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"8\" y=\"5\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"5\" y=\"11\" />\n <rect height=\"4\" rx=\"0.5\" stroke=\"currentColor\" width=\"4\" x=\"11\" y=\"11\" />\n </svg>\n)\n", "import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n ElementFormatType,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n Spread,\n} from 'lexical'\n\nimport { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport ObjectID from 'bson-objectid'\nimport React, { type JSX } from 'react'\n\nexport type BlockFields = {\n /** Block form data */\n [key: string]: any\n blockName: string\n blockType: string\n id: string\n}\n\nconst BlockComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.BlockComponent,\n })),\n)\n\nexport type SerializedBlockNode = Spread<\n {\n fields: BlockFields\n },\n SerializedDecoratorBlockNode\n>\n\nexport class BlockNode extends DecoratorBlockNode {\n __fields: BlockFields\n\n constructor({\n fields,\n format,\n key,\n }: {\n fields: BlockFields\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__fields = fields\n }\n\n static clone(node: BlockNode): BlockNode {\n return new BlockNode({\n fields: node.__fields,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'block'\n }\n\n static importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static importJSON(serializedNode: SerializedBlockNode): BlockNode {\n if (serializedNode.version === 1) {\n // Convert (version 1 had the fields wrapped in another, unnecessary data property)\n serializedNode = {\n ...serializedNode,\n fields: {\n ...(serializedNode as any).fields.data,\n },\n version: 2,\n }\n }\n const node = $createBlockNode(serializedNode.fields)\n node.setFormat(serializedNode.format)\n return node\n }\n\n static isInline(): false {\n return false\n }\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n // @ts-expect-error\n return <BlockComponent formData={this.getFields()} nodeKey={this.getKey()} />\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('div')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n exportJSON(): SerializedBlockNode {\n return {\n ...super.exportJSON(),\n type: this.getType(),\n fields: this.getFields(),\n version: 2,\n }\n }\n\n getFields(): BlockFields {\n return this.getLatest().__fields\n }\n\n getTextContent(): string {\n return `Block Field`\n }\n\n setFields(fields: BlockFields): void {\n const fieldsCopy = JSON.parse(JSON.stringify(fields)) as BlockFields\n\n const writable = this.getWritable()\n writable.__fields = fieldsCopy\n }\n}\n\nexport function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode {\n return new BlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode {\n return node instanceof BlockNode\n}\n", "import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nimport type { InsertBlockPayload } from './index.js'\n\nexport const INSERT_BLOCK_COMMAND: LexicalCommand<InsertBlockPayload> =\n createCommand('INSERT_BLOCK_COMMAND')\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../typesClient.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\nimport type { BlockFields } from '../nodes/BlocksNode.js'\n\nimport { BlocksDrawerComponent } from '../drawer/index.js'\nimport { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './commands.js'\n\nexport type InsertBlockPayload = Exclude<BlockFields, 'id'>\n\nexport const BlocksPlugin: PluginComponent<BlocksFeatureClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([BlockNode])) {\n throw new Error('BlocksPlugin: BlocksNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertBlockPayload>(\n INSERT_BLOCK_COMMAND,\n (payload: InsertBlockPayload) => {\n editor.update(() => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const blockNode = $createBlockNode(payload)\n // Insert blocks node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(blockNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor])\n\n return <BlocksDrawerComponent />\n}\n", "'use client'\nimport type { LexicalCommand, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport {\n BlocksDrawer,\n formatDrawerSlug,\n useEditDepth,\n useModal,\n useTranslation,\n} from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ClientComponentProps } from '../../typesClient.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { $createBlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from '../plugin/commands.js'\nconst baseClass = 'lexical-blocks-drawer'\n\nexport const INSERT_BLOCK_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_BLOCK_WITH_DRAWER_COMMAND')\n\nconst insertBlock = ({\n blockType,\n editor,\n replaceNodeKey,\n}: {\n blockType: string\n editor: LexicalEditor\n replaceNodeKey: null | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace(\n $createBlockNode({\n id: null,\n blockName: '',\n blockType,\n }),\n )\n }\n })\n }\n}\n\nexport const BlocksDrawerComponent: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig, uuid } = useEditorConfigContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n const editDepth = useEditDepth()\n const { t } = useTranslation()\n const { openModal } = useModal()\n\n const labels = {\n plural: t('fields:blocks') || 'Blocks',\n singular: t('fields:block') || 'Block',\n }\n\n const addRow = useCallback(\n (rowIndex: number, blockType: string) => {\n insertBlock({\n blockType,\n editor,\n replaceNodeKey,\n })\n },\n [editor, replaceNodeKey],\n )\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-blocks-` + uuid,\n depth: editDepth,\n })\n\n const reducedBlocks = (\n editorConfig?.resolvedFeatureMap?.get('blocks')\n ?.sanitizedClientFeatureProps as ClientComponentProps<BlocksFeatureClientProps>\n )?.reducedBlocks\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_BLOCK_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openModal(drawerSlug)\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, drawerSlug, openModal])\n\n return (\n <BlocksDrawer\n addRow={addRow}\n addRowIndex={0}\n blocks={reducedBlocks}\n drawerSlug={drawerSlug}\n labels={labels}\n />\n )\n}\n", "'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\n\nimport { IS_APPLE } from '../../../../lexical/utils/environment.js'\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'Enter',\n 'Backspace',\n 'Delete',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = window.getSelection()\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = window.getSelection()\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = window.getSelection()\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n", "export const CAN_USE_DOM: boolean =\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n", "import { CAN_USE_DOM } from './canUseDOM.js'\n\ndeclare global {\n interface Document {\n documentMode?: unknown\n }\n\n interface Window {\n MSStream?: unknown\n }\n}\n\nconst documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null\n\nexport const IS_APPLE: boolean = CAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform)\n\nexport const IS_FIREFOX: boolean =\n CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent)\n\nexport const CAN_USE_BEFORE_INPUT: boolean =\n CAN_USE_DOM && 'InputEvent' in window && !documentMode\n ? 'getTargetRanges' in new window.InputEvent('input')\n : false\n\nexport const IS_SAFARI: boolean = CAN_USE_DOM && /Version\\/[\\d.].*Safari/.test(navigator.userAgent)\n\nexport const IS_IOS: boolean =\n CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream\n\nexport const IS_ANDROID: boolean = CAN_USE_DOM && /Android/.test(navigator.userAgent)\n\nexport const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform)\nexport const IS_CHROME: boolean = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent)\n// export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;\n\nexport const IS_APPLE_WEBKIT =\n CAN_USE_DOM && /AppleWebKit\\/[\\d.]+/.test(navigator.userAgent) && !IS_CHROME\n", "'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { TestRecorderPlugin } from './plugin/index.js'\n\nexport const TestRecorderFeatureClient = createClientFeature({\n plugins: [\n {\n Component: TestRecorderPlugin,\n position: 'bottom',\n },\n ],\n})\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n", "'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { TreeViewPlugin } from './plugin/index.js'\n\nexport const TreeViewFeatureClient = createClientFeature({\n plugins: [\n {\n Component: TreeViewPlugin,\n position: 'bottom',\n },\n ],\n})\n", "'use client'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nexport const BoldFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n", "import React from 'react'\n\nexport const BoldIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.6772 15H6.27017V5.718H10.4172C12.6792 5.718 13.8492 6.602 13.8492 8.292C13.8492 9.098 13.1992 9.982 12.4712 10.216C13.3812 10.476 14.1742 11.256 14.1742 12.322C14.1742 14.09 12.9002 15 10.6772 15ZM8.46717 9.501H10.3262C11.3012 9.501 11.7042 9.046 11.7042 8.409C11.7042 7.72 11.2362 7.317 10.3392 7.317H8.46717V9.501ZM8.46717 11.061V13.401H10.4822C11.4702 13.401 11.9642 12.959 11.9642 12.218C11.9642 11.49 11.4702 11.061 10.4822 11.061H8.46717Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "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", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const BOLD_ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n tag: '***',\n}\n\nexport const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n intraword: false,\n tag: '___',\n}\n\nexport const BOLD_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n tag: '**',\n}\n\nexport const BOLD_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n intraword: false,\n tag: '__',\n}\n", "'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nexport const InlineCodeFeatureClient = createClientFeature({\n markdownTransformers: [INLINE_CODE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const CodeIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M7.76465 6L3.76465 10L7.76465 14\" stroke=\"currentColor\" />\n <path d=\"M12.2354 6L16.2354 10L12.2354 14\" stroke=\"currentColor\" />\n </svg>\n)\n", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const INLINE_CODE: TextFormatTransformer = {\n type: 'text-format',\n format: ['code'],\n tag: '`',\n}\n", "'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.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\nexport const ItalicFeatureClient = createClientFeature({\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const ItalicIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.311 14.2969L11.0327 15H6.18408L6.4624 14.2969C7.54639 14.2969 7.70752 14.209 7.83936 13.8721L10.8423 6.45996C10.8716 6.38672 10.8862 6.32812 10.8862 6.26953C10.8862 6.09375 10.6519 6.03516 9.80225 6.03516L10.0952 5.33203H14.9438L14.6509 6.03516C13.5669 6.03516 13.4204 6.12305 13.2886 6.45996L10.2856 13.8721C10.2563 13.9453 10.2271 14.0039 10.2271 14.0625C10.2271 14.2383 10.4614 14.2969 11.311 14.2969Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n tag: '*',\n}\n\nexport const ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n intraword: false,\n tag: '_',\n}\n", "'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.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\nexport const StrikethroughFeatureClient = createClientFeature({\n markdownTransformers: [STRIKETHROUGH],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const StrikethroughIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.50756 12.76H7.42756C7.56256 14.215 8.82256 14.71 10.1576 14.71C11.4326 14.71 12.4226 14.14 12.4226 13.06C12.4226 12.28 11.9576 11.845 10.6676 11.605L8.70256 11.245C7.12756 10.96 5.85256 10.21 5.85256 8.335C5.85256 6.43 7.53256 5.11 9.87256 5.11C12.4226 5.11 13.9526 6.22 14.1626 8.23H12.2876C12.1526 7.18 11.2226 6.595 9.88756 6.595C8.59756 6.595 7.78756 7.27 7.78756 8.215C7.78756 9.1 8.34256 9.385 9.49756 9.61L11.5676 10.015C13.3226 10.345 14.3726 11.215 14.3726 12.94C14.3726 14.89 12.5876 16.18 10.2176 16.18C7.66756 16.18 5.70256 15.115 5.50756 12.76Z\"\n fill=\"currentColor\"\n />\n <path d=\"M4.99756 11.44H15.0026V12.19H4.99756V11.44Z\" fill=\"currentColor\" />\n </svg>\n)\n", "import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const STRIKETHROUGH: TextFormatTransformer = {\n type: 'text-format',\n format: ['strikethrough'],\n tag: '~~',\n}\n", "'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { SubscriptIcon } from '../../../lexical/ui/icons/Subscript/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.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\nexport const SubscriptFeatureClient = createClientFeature({\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const SubscriptIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 13.258C16.7768 14.155 16.1398 14.532 15.2038 15C14.5538 15.325 14.2808 15.546 14.2418 15.78H16.7898V16.82H12.7208V16.339C12.7208 15.286 13.5918 14.675 14.3588 14.233C15.0868 13.83 15.4378 13.635 15.4378 13.232C15.4378 12.894 15.2038 12.686 14.8268 12.686C14.3848 12.686 14.1248 13.024 14.1118 13.427H12.7468C12.8248 12.426 13.5528 11.633 14.8398 11.633C15.9448 11.633 16.7768 12.257 16.7768 13.258Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { SuperscriptIcon } from '../../../lexical/ui/icons/Superscript/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.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\nexport const SuperscriptFeatureClient = createClientFeature({\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const SuperscriptIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.167 15L7.45002 11.36L4.73302 15H2.91302L6.55302 10.177L3.23802 5.718H5.20102L7.54102 8.89L9.89402 5.718H11.714L8.43802 10.06L12.13 15H10.167ZM16.7768 7.252C16.7768 8.149 16.1398 8.526 15.2038 8.994C14.5538 9.319 14.2808 9.54 14.2418 9.774H16.7898V10.814H12.7208V10.333C12.7208 9.28 13.5918 8.669 14.3588 8.227C15.0868 7.824 15.4378 7.629 15.4378 7.226C15.4378 6.888 15.2038 6.68 14.8268 6.68C14.3848 6.68 14.1248 7.018 14.1118 7.421H12.7468C12.8248 6.42 13.5528 5.627 14.8398 5.627C15.9448 5.627 16.7768 6.251 16.7768 7.252Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { UnderlineIcon } from '../../../lexical/ui/icons/Underline/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.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\nexport const UnderlineFeatureClient = createClientFeature({\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const UnderlineIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.9656 11.256C13.9656 13.791 12.5096 15.156 10.0006 15.156C7.50461 15.156 6.03561 13.791 6.03561 11.23V5.718H7.76461V11.243C7.76461 12.868 8.50561 13.778 10.0006 13.778C11.4956 13.778 12.2496 12.868 12.2496 11.243V5.718H13.9656V11.256Z\"\n fill=\"currentColor\"\n />\n <path d=\"M5.09961 16.3H14.9016V16.95H5.09961V16.3Z\" fill=\"currentColor\" />\n </svg>\n)\n", "'use client'\n\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { HeadingFeatureProps } from './feature.server.js'\n\nimport { H1Icon } from '../../lexical/ui/icons/H1/index.js'\nimport { H2Icon } from '../../lexical/ui/icons/H2/index.js'\nimport { H3Icon } from '../../lexical/ui/icons/H3/index.js'\nimport { H4Icon } from '../../lexical/ui/icons/H4/index.js'\nimport { H5Icon } from '../../lexical/ui/icons/H5/index.js'\nimport { H6Icon } from '../../lexical/ui/icons/H6/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nconst $setHeading = (headingSize: HeadingTagType) => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createHeadingNode(headingSize))\n}\n\nconst iconImports = {\n h1: H1Icon,\n h2: H2Icon,\n h3: H3Icon,\n h4: H4Icon,\n h5: H5Icon,\n h6: H6Icon,\n}\n\nexport const HeadingFeatureClient = createClientFeature<HeadingFeatureProps>(({ props }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = props\n\n const toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems(\n enabledHeadingSizes.map((headingSize, i) => {\n return {\n ChildComponent: iconImports[headingSize],\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isHeadingNode(node) && node.getTag() === headingSize) {\n continue\n }\n\n const parent = node.getParent()\n if ($isHeadingNode(parent) && parent.getTag() === headingSize) {\n continue\n }\n\n return false\n }\n return true\n },\n key: headingSize,\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', { headingLevel: headingSize.charAt(1) })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n order: i + 2,\n }\n }),\n ),\n ]\n\n return {\n markdownTransformers: [MarkdownTransformer(enabledHeadingSizes)],\n nodes: [HeadingNode],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: enabledHeadingSizes?.length\n ? [\n slashMenuBasicGroupWithItems(\n enabledHeadingSizes.map((headingSize) => {\n return {\n Icon: iconImports[headingSize],\n key: `heading-${headingSize.charAt(1)}`,\n keywords: ['heading', headingSize],\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', {\n headingLevel: headingSize.charAt(1),\n })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n }\n }),\n ),\n ]\n : [],\n },\n toolbarFixed: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n toolbarInline: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n }\n})\n", "import React from 'react'\n\nexport const H1Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.639 13.5V7.074H6.196V9.648H9.076V7.074H10.642V13.5H9.076V10.836H6.196V13.5H4.639ZM11.5656 9.045V8.019C12.6636 8.019 13.1316 7.731 13.2846 7.065H14.4006V13.5H12.8436V9.045H11.5656Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H2Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM15.9796 8.973C15.9796 10.116 15.1696 10.656 14.0356 11.232C13.2256 11.646 12.8206 11.943 12.7846 12.294H15.9886V13.5H11.0566V12.951C11.0566 11.601 12.1636 10.845 13.1176 10.287C14.0356 9.756 14.5126 9.486 14.5126 8.946C14.5126 8.46 14.2156 8.145 13.6306 8.145C13.0186 8.145 12.6586 8.613 12.6226 9.198H11.1196C11.2186 7.947 12.1006 6.966 13.6396 6.966C15.0346 6.966 15.9796 7.785 15.9796 8.973Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H3Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.139 13.5V7.074H5.696V9.648H8.576V7.074H10.142V13.5H8.576V10.836H5.696V13.5H4.139ZM16.1146 11.745C16.1146 12.744 15.2236 13.608 13.6126 13.608C12.0736 13.608 11.0926 12.762 10.9846 11.547H12.4696C12.5146 12.114 13.0006 12.456 13.6126 12.456C14.2876 12.456 14.6746 12.132 14.6746 11.619C14.6746 11.061 14.2426 10.836 13.6216 10.836H12.9826V9.738H13.6036C14.1526 9.738 14.5486 9.486 14.5486 8.937C14.5486 8.46 14.2156 8.127 13.6486 8.127C13.0366 8.127 12.6586 8.514 12.6226 9.045H11.1916C11.2726 7.929 12.1276 6.966 13.6666 6.966C15.1876 6.966 15.9706 7.848 15.9706 8.865C15.9706 9.603 15.5026 10.143 14.8186 10.269C15.6196 10.404 16.1146 10.971 16.1146 11.745Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H4Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM15.1736 7.074V10.854H16.3706V12.033H15.1736V13.5H13.6796V12.033H10.5116V10.845L13.4996 7.074H15.1736ZM13.6796 8.46L11.8256 10.854H13.6796V8.46Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H5Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.1576 10.269C12.6896 10.269 12.3746 10.494 12.2216 10.737H10.8176L11.1956 7.074H15.2546V8.28H12.3206L12.1856 9.549C12.4016 9.351 12.8516 9.126 13.4636 9.126C14.7866 9.126 15.6596 10.053 15.6596 11.358C15.6596 12.609 14.7326 13.608 13.1756 13.608C11.5826 13.608 10.6556 12.753 10.5566 11.511H12.1136C12.1586 12.06 12.5456 12.465 13.1576 12.465C13.8236 12.465 14.1746 11.97 14.1746 11.376C14.1746 10.764 13.8416 10.269 13.1576 10.269Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import React from 'react'\n\nexport const H6Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.639 13.5V7.074H5.196V9.648H8.076V7.074H9.642V13.5H8.076V10.836H5.196V13.5H3.639ZM13.3646 8.127C12.5456 8.127 12.0416 8.937 12.0416 9.999C12.3296 9.54 12.8246 9.207 13.5536 9.207C14.8586 9.207 15.8036 10.134 15.8036 11.376C15.8036 12.645 14.8226 13.608 13.3196 13.608C11.7266 13.608 10.6196 12.393 10.6196 10.395C10.6196 8.316 11.7716 6.966 13.4186 6.966C14.7056 6.966 15.5786 7.749 15.7316 8.829H14.3186C14.2016 8.415 13.9226 8.127 13.3646 8.127ZM13.3106 12.51C13.9586 12.51 14.3816 12.042 14.3816 11.385C14.3816 10.737 13.9586 10.278 13.3106 10.278C12.6536 10.278 12.2126 10.737 12.2126 11.385C12.2126 12.042 12.6536 12.51 13.3106 12.51Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n", "import type { ElementTransformer } from '@lexical/markdown'\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\n\nimport { createBlockNode } from '../../lexical/utils/markdown/createBlockNode.js'\n\nexport const MarkdownTransformer: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer = (\n enabledHeadingSizes,\n) => {\n // Convert enabledHeadingSizes to a list of numbers (1 for h1, 2 for h2, etc.)\n const enabledSizes = enabledHeadingSizes.map((tag) => Number(tag.slice(1)))\n\n // Create a regex pattern that matches any of the enabled sizes\n const pattern = `^(${enabledSizes.map((size) => `#{${size}}`).join('|')})\\\\s`\n const regExp = new RegExp(pattern)\n\n return {\n type: 'element',\n dependencies: [HeadingNode],\n export: (node, exportChildren) => {\n if (!$isHeadingNode(node)) {\n return null\n }\n const level = Number(node.getTag().slice(1))\n return '#'.repeat(level) + ' ' + exportChildren(node)\n },\n regExp,\n replace: createBlockNode((match) => {\n const tag = ('h' + match[1].length) as HeadingTagType\n return $createHeadingNode(tag)\n }),\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\nimport type { ElementNode } from 'lexical'\n\nexport const createBlockNode = (\n createNode: (match: Array<string>) => ElementNode,\n): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const node = createNode(match)\n if (node) {\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n }\n }\n}\n", "'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport {\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from './nodes/HorizontalRuleNode.js'\nimport { HorizontalRulePlugin } from './plugin/index.js'\n\nexport const HorizontalRuleFeatureClient = createClientFeature({\n markdownTransformers: [MarkdownTransformer],\n nodes: [HorizontalRuleNode],\n plugins: [\n {\n Component: HorizontalRulePlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: HorizontalRuleIcon,\n key: 'horizontalRule',\n keywords: ['hr', 'horizontal rule', 'line', 'separator'],\n label: ({ i18n }) => {\n return i18n.t('lexical:horizontalRule:label')\n },\n\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: HorizontalRuleIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isHorizontalRuleNode(firstNode)\n },\n key: 'horizontalRule',\n label: ({ i18n }) => {\n return i18n.t('lexical:horizontalRule:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n})\n", "import React from 'react'\n\nexport const HorizontalRuleIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect fill=\"currentColor\" height=\"1\" width=\"12\" x=\"4\" y=\"9.5\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const AddIcon: React.FC = () => (\n <svg fill=\"none\" height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 10h10\" stroke=\"currentColor\" />\n <path d=\"M10 15V5\" stroke=\"currentColor\" />\n </svg>\n)\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { AddIcon } from '../../../lexical/ui/icons/Add/index.js'\n\nexport const toolbarAddDropdownGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AddIcon,\n items,\n key: 'add',\n order: 10,\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport {\n $createHorizontalRuleNode,\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n} from './nodes/HorizontalRuleNode.js'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [HorizontalRuleNode],\n export: (node, exportChildren) => {\n if (!$isHorizontalRuleNode(node)) {\n return null\n }\n return '---'\n },\n // match ---\n regExp: /^---\\s*$/,\n replace: (parentNode) => {\n const node = $createHorizontalRuleNode()\n if (node) {\n parentNode.replace(node)\n }\n },\n}\n", "'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../typesClient.js'\n\nimport {\n $createHorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from '../nodes/HorizontalRuleNode.js'\n/**\n * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.\n */\nexport const HorizontalRulePlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand(\n INSERT_HORIZONTAL_RULE_COMMAND,\n (type) => {\n const selection = $getSelection()\n\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n const focusNode = selection.focus.getNode()\n\n if (focusNode !== null) {\n const horizontalRuleNode = $createHorizontalRuleNode()\n $insertNodeToNearestRoot(horizontalRuleNode)\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\n\nimport { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { toolbarIndentGroupWithItems } from './toolbarIndentGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarIndentGroupWithItems([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indentDecrease',\n label: ({ i18n }) => {\n return i18n.t('lexical:indent:decreaseLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indentIncrease',\n label: ({ i18n }) => {\n return i18n.t('lexical:indent:increaseLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n]\n\nexport const IndentFeatureClient = createClientFeature({\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const IndentDecreaseIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.5 5H10.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 10H10.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M12.25 7.25L17.25 3.75V10.75L12.25 7.25Z\" fill=\"currentColor\" />\n </svg>\n)\n", "import React from 'react'\n\nexport const IndentIncreaseIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M17.5 5H9.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17.5 10H9.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17.5 15H2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M7.75 7.25L2.75 3.75V10.75L7.75 7.25Z\" fill=\"currentColor\" />\n </svg>\n)\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nexport const toolbarIndentGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'indent',\n order: 35,\n }\n}\n", "'use client'\n\nimport type { LexicalNode } from 'lexical'\n\nimport { $findMatchingParent } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { ExclusiveLinkCollectionsProps } from './feature.server.js'\nimport type { LinkFields } from './nodes/types.js'\n\nimport { LinkIcon } from '../../lexical/ui/icons/Link/index.js'\nimport { getSelectedNode } from '../../lexical/utils/getSelectedNode.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { toolbarFeatureButtonsGroupWithItems } from '../shared/toolbar/featureButtonsGroup.js'\nimport { LinkMarkdownTransformer } from './markdownTransformer.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from './nodes/LinkNode.js'\nimport { AutoLinkPlugin } from './plugins/autoLink/index.js'\nimport { ClickableLinkPlugin } from './plugins/clickableLink/index.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './plugins/floatingLinkEditor/LinkEditor/commands.js'\nimport { FloatingLinkEditorPlugin } from './plugins/floatingLinkEditor/index.js'\nimport { LinkPlugin } from './plugins/link/index.js'\n\nexport type ClientProps = ExclusiveLinkCollectionsProps\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFeatureButtonsGroupWithItems([\n {\n ChildComponent: LinkIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n const selectedNode = getSelectedNode(selection)\n const linkParent = $findMatchingParent(selectedNode, $isLinkNode)\n return linkParent != null\n }\n return false\n },\n isEnabled: ({ selection }) => {\n return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length)\n },\n key: 'link',\n label: ({ i18n }) => {\n return i18n.t('lexical:link:label')\n },\n onSelect: ({ editor, isActive }) => {\n if (!isActive) {\n let selectedText: string = null\n let selectedNodes: LexicalNode[] = []\n editor.getEditorState().read(() => {\n selectedText = $getSelection()?.getTextContent()\n // We need to selected nodes here before the drawer opens, as clicking around in the drawer may change the original selection\n selectedNodes = $getSelection()?.getNodes() ?? []\n })\n\n if (!selectedText?.length) {\n return\n }\n\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: 'https://',\n }\n\n editor.dispatchCommand(TOGGLE_LINK_WITH_MODAL_COMMAND, {\n fields: linkFields,\n selectedNodes,\n text: selectedText,\n })\n } else {\n // remove link\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }\n },\n order: 1,\n },\n ]),\n]\n\nexport const LinkFeatureClient = createClientFeature({\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [LinkNode, AutoLinkNode],\n plugins: [\n {\n Component: LinkPlugin,\n position: 'normal',\n },\n {\n Component: AutoLinkPlugin,\n position: 'normal',\n },\n {\n Component: ClickableLinkPlugin,\n position: 'normal',\n },\n {\n Component: FloatingLinkEditorPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const LinkIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.5 11.5L11.5 8.5M8.5 7L9.625 5.875C10.868 4.633 12.882 4.633 14.125 5.875C15.368 7.118 15.368 9.133 14.125 10.375L13 11.5M7 8.5L5.746 9.754C4.56 10.94 4.519 12.85 5.652 14.087C6.814 15.354 8.78 15.449 10.058 14.298L11.5 13\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n", "import type { ElementNode, RangeSelection, TextNode } from 'lexical'\n\nimport { $isAtNodeEnd } from '@lexical/selection'\n\nexport function getSelectedNode(selection: RangeSelection): ElementNode | TextNode {\n const { anchor } = selection\n const { focus } = selection\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n if (anchorNode === focusNode) {\n return anchorNode\n }\n const isBackward = selection.isBackward()\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode\n }\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode\n}\n", "import type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nexport const toolbarFeatureButtonsGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'features',\n order: 50,\n }\n}\n", "/**\n * Code taken from https://github.com/facebook/lexical/blob/main/packages/lexical-markdown/src/MarkdownTransformers.ts#L357\n */\n\n// Order of text transformers matters:\n//\n// - code should go first as it prevents any transformations inside\n\nimport type { TextMatchTransformer } from '@lexical/markdown'\n\nimport { $createTextNode, $isTextNode } from 'lexical'\n\nimport { $createLinkNode, $isLinkNode, LinkNode } from './nodes/LinkNode.js'\n\n// - then longer tags match (e.g. ** or __ should go before * or _)\nexport const LinkMarkdownTransformer: TextMatchTransformer = {\n type: 'text-match',\n dependencies: [LinkNode],\n export: (_node, exportChildren, exportFormat) => {\n if (!$isLinkNode(_node)) {\n return null\n }\n const node: LinkNode = _node\n const { url } = node.getFields()\n const linkContent = `[${node.getTextContent()}](${url})`\n const firstChild = node.getFirstChild()\n // Add text styles only if link has single text node inside. If it's more\n // then one we ignore it as markdown does not support nested styles for links\n if (node.getChildrenSize() === 1 && $isTextNode(firstChild)) {\n return exportFormat(firstChild, linkContent)\n } else {\n return linkContent\n }\n },\n importRegExp: /\\[([^[]+)\\]\\(([^()\\s]+)(?:\\s\"((?:[^\"]*\\\\\")*[^\"]*)\"\\s*)?\\)/,\n regExp: /\\[([^[]+)\\]\\(([^()\\s]+)(?:\\s\"((?:[^\"]*\\\\\")*[^\"]*)\"\\s*)?\\)$/,\n replace: (textNode, match) => {\n const [, linkText, linkUrl] = match\n const linkNode = $createLinkNode({\n fields: {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: linkUrl,\n },\n })\n const linkTextNode = $createTextNode(linkText)\n linkTextNode.setFormat(textNode.getFormat())\n linkNode.append(linkTextNode)\n textNode.replace(linkNode)\n },\n trigger: ')',\n}\n", "import type {\n BaseSelection,\n DOMConversionMap,\n DOMConversionOutput,\n EditorConfig,\n ElementNode as ElementNodeType,\n LexicalCommand,\n LexicalNode,\n NodeKey,\n RangeSelection,\n} from 'lexical'\n\nimport { addClassNamesToElement, isHTMLAnchorElement } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport {\n $applyNodeReplacement,\n $createTextNode,\n $getSelection,\n $isElementNode,\n $isRangeSelection,\n ElementNode,\n createCommand,\n} from 'lexical'\n\nimport type { LinkPayload } from '../plugins/floatingLinkEditor/types.js'\nimport type { LinkFields, SerializedLinkNode } from './types.js'\n\nconst SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:'])\n\n/** @noInheritDoc */\nexport class LinkNode extends ElementNode {\n __fields: LinkFields\n __id: string\n\n constructor({\n id,\n fields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: undefined,\n },\n key,\n }: {\n fields: LinkFields\n id: string\n key?: NodeKey\n }) {\n super(key)\n this.__fields = fields\n this.__id = id\n }\n\n static clone(node: LinkNode): LinkNode {\n return new LinkNode({\n id: node.__id,\n fields: node.__fields,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'link'\n }\n\n static importDOM(): DOMConversionMap | null {\n return {\n a: (node: Node) => ({\n conversion: $convertAnchorElement,\n priority: 1,\n }),\n }\n }\n\n static importJSON(serializedNode: SerializedLinkNode): LinkNode {\n if (\n serializedNode.version === 1 &&\n typeof serializedNode.fields?.doc?.value === 'object' &&\n serializedNode.fields?.doc?.value?.id\n ) {\n serializedNode.fields.doc.value = serializedNode.fields.doc.value.id\n serializedNode.version = 2\n }\n\n if (serializedNode.version === 2 && !serializedNode.id) {\n serializedNode.id = new ObjectID.default().toHexString()\n serializedNode.version = 3\n }\n\n const node = $createLinkNode({\n id: serializedNode.id,\n fields: serializedNode.fields,\n })\n node.setFormat(serializedNode.format)\n node.setIndent(serializedNode.indent)\n node.setDirection(serializedNode.direction)\n return node\n }\n\n canBeEmpty(): false {\n return false\n }\n\n canInsertTextAfter(): false {\n return false\n }\n\n canInsertTextBefore(): false {\n return false\n }\n\n createDOM(config: EditorConfig): HTMLAnchorElement {\n const element = document.createElement('a')\n if (this.__fields?.linkType === 'custom') {\n element.href = this.sanitizeUrl(this.__fields.url ?? '')\n }\n if (this.__fields?.newTab ?? false) {\n element.target = '_blank'\n }\n\n if (this.__fields?.newTab === true && this.__fields?.linkType === 'custom') {\n element.rel = manageRel(element.rel, 'add', 'noopener')\n }\n\n addClassNamesToElement(element, config.theme.link)\n return element\n }\n\n exportJSON(): SerializedLinkNode {\n const returnObject: SerializedLinkNode = {\n ...super.exportJSON(),\n type: this.getType(),\n fields: this.getFields(),\n version: 3,\n }\n const id = this.getID()\n if (id) {\n returnObject.id = id\n }\n return returnObject\n }\n\n extractWithChild(\n child: LexicalNode,\n selection: BaseSelection,\n destination: 'clone' | 'html',\n ): boolean {\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n\n return (\n this.isParentOf(anchorNode) &&\n this.isParentOf(focusNode) &&\n selection.getTextContent().length > 0\n )\n }\n\n getFields(): LinkFields {\n return this.getLatest().__fields\n }\n\n getID(): string {\n return this.getLatest().__id\n }\n\n insertNewAfter(selection: RangeSelection, restoreSelection = true): ElementNodeType | null {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection)\n if ($isElementNode(element)) {\n const linkNode = $createLinkNode({ fields: this.__fields })\n element.append(linkNode)\n return linkNode\n }\n return null\n }\n\n isInline(): true {\n return true\n }\n\n sanitizeUrl(url: string): string {\n try {\n const parsedUrl = new URL(url)\n // eslint-disable-next-line no-script-url\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return 'about:blank'\n }\n } catch (e) {\n return 'https://'\n }\n return url\n }\n\n setFields(fields: LinkFields): void {\n const writable = this.getWritable()\n writable.__fields = fields\n }\n\n updateDOM(prevNode: LinkNode, anchor: HTMLAnchorElement, config: EditorConfig): boolean {\n const url = this.__fields?.url\n const newTab = this.__fields?.newTab\n if (url != null && url !== prevNode.__fields?.url && this.__fields?.linkType === 'custom') {\n anchor.href = url\n }\n if (this.__fields?.linkType === 'internal' && prevNode.__fields?.linkType === 'custom') {\n anchor.removeAttribute('href')\n }\n\n // TODO: not 100% sure why we're settign rel to '' - revisit\n // Start rel config here, then check newTab below\n if (anchor.rel == null) {\n anchor.rel = ''\n }\n\n if (newTab !== prevNode.__fields?.newTab) {\n if (newTab ?? false) {\n anchor.target = '_blank'\n if (this.__fields?.linkType === 'custom') {\n anchor.rel = manageRel(anchor.rel, 'add', 'noopener')\n }\n } else {\n anchor.removeAttribute('target')\n anchor.rel = manageRel(anchor.rel, 'remove', 'noopener')\n }\n }\n\n return false\n }\n}\n\nfunction $convertAnchorElement(domNode: Node): DOMConversionOutput {\n let node: LinkNode | null = null\n if (isHTMLAnchorElement(domNode)) {\n const content = domNode.textContent\n if (content !== null && content !== '') {\n node = $createLinkNode({\n id: new ObjectID.default().toHexString(),\n fields: {\n doc: null,\n linkType: 'custom',\n newTab: domNode.getAttribute('target') === '_blank',\n url: domNode.getAttribute('href') ?? '',\n },\n })\n }\n }\n return { node }\n}\n\nexport function $createLinkNode({ id, fields }: { fields: LinkFields; id?: string }): LinkNode {\n return $applyNodeReplacement(\n new LinkNode({\n id: id ?? new ObjectID.default().toHexString(),\n fields,\n }),\n )\n}\n\nexport function $isLinkNode(node: LexicalNode | null | undefined): node is LinkNode {\n return node instanceof LinkNode\n}\n\nexport const TOGGLE_LINK_COMMAND: LexicalCommand<LinkPayload | null> =\n createCommand('TOGGLE_LINK_COMMAND')\n\nexport function $toggleLink(payload: LinkPayload): void {\n const selection = $getSelection()\n\n if (!$isRangeSelection(selection) && !payload.selectedNodes.length) {\n return\n }\n const nodes = $isRangeSelection(selection) ? selection.extract() : payload.selectedNodes\n\n if (payload === null) {\n // Remove LinkNodes\n nodes.forEach((node) => {\n const parent = node.getParent()\n\n if ($isLinkNode(parent)) {\n const children = parent.getChildren()\n\n for (let i = 0; i < children.length; i += 1) {\n parent.insertBefore(children[i])\n }\n\n parent.remove()\n }\n })\n } else {\n // Add or merge LinkNodes\n if (nodes.length === 1) {\n const firstNode = nodes[0]\n // if the first node is a LinkNode or if its\n // parent is a LinkNode, we update the URL, target and rel.\n const linkNode: LinkNode | null = $isLinkNode(firstNode)\n ? firstNode\n : $getLinkAncestor(firstNode)\n if (linkNode !== null) {\n linkNode.setFields(payload.fields)\n\n if (payload.text != null && payload.text !== linkNode.getTextContent()) {\n // remove all children and add child with new textcontent:\n linkNode.append($createTextNode(payload.text))\n linkNode.getChildren().forEach((child) => {\n if (child !== linkNode.getLastChild()) {\n child.remove()\n }\n })\n }\n return\n }\n }\n\n let prevParent: ElementNodeType | LinkNode | null = null\n let linkNode: LinkNode | null = null\n\n nodes.forEach((node) => {\n const parent = node.getParent()\n\n if (parent === linkNode || parent === null || ($isElementNode(node) && !node.isInline())) {\n return\n }\n\n if ($isLinkNode(parent)) {\n linkNode = parent\n parent.setFields(payload.fields)\n if (payload.text != null && payload.text !== parent.getTextContent()) {\n // remove all children and add child with new textcontent:\n parent.append($createTextNode(payload.text))\n parent.getChildren().forEach((child) => {\n if (child !== parent.getLastChild()) {\n child.remove()\n }\n })\n }\n return\n }\n\n if (!parent.is(prevParent)) {\n prevParent = parent\n linkNode = $createLinkNode({ fields: payload.fields })\n\n if ($isLinkNode(parent)) {\n if (node.getPreviousSibling() === null) {\n parent.insertBefore(linkNode)\n } else {\n parent.insertAfter(linkNode)\n }\n } else {\n node.insertBefore(linkNode)\n }\n }\n\n if ($isLinkNode(node)) {\n if (node.is(linkNode)) {\n return\n }\n if (linkNode !== null) {\n const children = node.getChildren()\n\n for (let i = 0; i < children.length; i += 1) {\n linkNode.append(children[i])\n }\n }\n\n node.remove()\n return\n }\n\n if (linkNode !== null) {\n linkNode.append(node)\n }\n })\n }\n}\n\nfunction $getLinkAncestor(node: LexicalNode): LinkNode | null {\n return $getAncestor(node, (ancestor) => $isLinkNode(ancestor)) as LinkNode\n}\n\nfunction $getAncestor(\n node: LexicalNode,\n predicate: (ancestor: LexicalNode) => boolean,\n): LexicalNode | null {\n let parent: LexicalNode | null = node\n while (parent !== null && (parent = parent.getParent()) !== null && !predicate(parent));\n return parent\n}\n\nfunction manageRel(input: string, action: 'add' | 'remove', value: string): string {\n let result: string\n let mutableInput = `${input}`\n if (action === 'add') {\n // if we somehow got out of sync - clean up\n if (mutableInput.includes(value)) {\n const re = new RegExp(value, 'g')\n mutableInput = mutableInput.replace(re, '').trim()\n }\n mutableInput = mutableInput.trim()\n result = mutableInput.length === 0 ? `${value}` : `${mutableInput} ${value}`\n } else {\n const re = new RegExp(value, 'g')\n result = mutableInput.replace(re, '').trim()\n }\n return result\n}\n", "import type { ElementNode, LexicalNode, RangeSelection } from 'lexical'\n\nimport { $applyNodeReplacement, $isElementNode } from 'lexical'\n\nimport type { LinkFields, SerializedAutoLinkNode } from './types.js'\n\nimport { LinkNode } from './LinkNode.js'\n\n// Custom node type to override `canInsertTextAfter` that will\n// allow typing within the link\n\nexport class AutoLinkNode extends LinkNode {\n static clone(node: AutoLinkNode): AutoLinkNode {\n return new AutoLinkNode({ id: undefined, fields: node.__fields, key: node.__key })\n }\n\n static getType(): string {\n return 'autolink'\n }\n\n static importDOM(): null {\n // TODO: Should link node should handle the import over autolink?\n return null\n }\n\n static importJSON(serializedNode: SerializedAutoLinkNode): AutoLinkNode {\n if (\n serializedNode.version === 1 &&\n typeof serializedNode.fields?.doc?.value === 'object' &&\n serializedNode.fields?.doc?.value?.id\n ) {\n serializedNode.fields.doc.value = serializedNode.fields.doc.value.id\n serializedNode.version = 2\n }\n\n const node = $createAutoLinkNode({ fields: serializedNode.fields })\n\n node.setFormat(serializedNode.format)\n node.setIndent(serializedNode.indent)\n node.setDirection(serializedNode.direction)\n return node\n }\n\n exportJSON(): SerializedAutoLinkNode {\n return {\n ...super.exportJSON(),\n type: 'autolink',\n version: 2,\n }\n }\n\n insertNewAfter(selection: RangeSelection, restoreSelection = true): ElementNode | null {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection)\n if ($isElementNode(element)) {\n const linkNode = $createAutoLinkNode({ fields: this.__fields })\n element.append(linkNode)\n return linkNode\n }\n return null\n }\n}\n\nexport function $createAutoLinkNode({ fields }: { fields: LinkFields }): AutoLinkNode {\n return $applyNodeReplacement(new AutoLinkNode({ id: undefined, fields }))\n}\nexport function $isAutoLinkNode(node: LexicalNode | null | undefined): node is AutoLinkNode {\n return node instanceof AutoLinkNode\n}\n", "'use client'\nimport type { ElementNode, LexicalEditor, LexicalNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $createTextNode,\n $getSelection,\n $isElementNode,\n $isLineBreakNode,\n $isNodeSelection,\n $isRangeSelection,\n $isTextNode,\n type TextNode,\n TextNode as TextNodeValue,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { ClientProps } from '../../feature.client.js'\nimport type { LinkFields } from '../../nodes/types.js'\n\nimport { invariant } from '../../../../lexical/utils/invariant.js'\nimport { $createAutoLinkNode, $isAutoLinkNode, AutoLinkNode } from '../../nodes/AutoLinkNode.js'\nimport { $isLinkNode } from '../../nodes/LinkNode.js'\n\ntype ChangeHandler = (url: null | string, prevUrl: null | string) => void\n\ninterface LinkMatcherResult {\n fields?: LinkFields\n index: number\n length: number\n text: string\n url: string\n}\n\nexport type LinkMatcher = (text: string) => LinkMatcherResult | null\n\nexport function createLinkMatcherWithRegExp(\n regExp: RegExp,\n urlTransformer: (text: string) => string = (text) => text,\n) {\n return (text: string) => {\n const match = regExp.exec(text)\n if (match === null) return null\n return {\n index: match.index,\n length: match[0].length,\n text: match[0],\n url: urlTransformer(match[0]),\n }\n }\n}\n\nfunction findFirstMatch(text: string, matchers: LinkMatcher[]): LinkMatcherResult | null {\n for (let i = 0; i < matchers.length; i++) {\n const match = matchers[i](text)\n\n if (match != null) {\n return match\n }\n }\n\n return null\n}\n\nconst PUNCTUATION_OR_SPACE = /[.,;\\s]/\n\nfunction isSeparator(char: string): boolean {\n return PUNCTUATION_OR_SPACE.test(char)\n}\n\nfunction endsWithSeparator(textContent: string): boolean {\n return isSeparator(textContent[textContent.length - 1])\n}\n\nfunction startsWithSeparator(textContent: string): boolean {\n return isSeparator(textContent[0])\n}\n\nfunction isPreviousNodeValid(node: LexicalNode): boolean {\n let previousNode = node.getPreviousSibling()\n if ($isElementNode(previousNode)) {\n previousNode = previousNode.getLastDescendant()\n }\n return (\n previousNode === null ||\n $isLineBreakNode(previousNode) ||\n ($isTextNode(previousNode) && endsWithSeparator(previousNode.getTextContent()))\n )\n}\n\nfunction isNextNodeValid(node: LexicalNode): boolean {\n let nextNode = node.getNextSibling()\n if ($isElementNode(nextNode)) {\n nextNode = nextNode.getFirstDescendant()\n }\n return (\n nextNode === null ||\n $isLineBreakNode(nextNode) ||\n ($isTextNode(nextNode) && startsWithSeparator(nextNode.getTextContent()))\n )\n}\n\nfunction isContentAroundIsValid(\n matchStart: number,\n matchEnd: number,\n text: string,\n nodes: TextNode[],\n): boolean {\n const contentBeforeIsValid =\n matchStart > 0 ? isSeparator(text[matchStart - 1]) : isPreviousNodeValid(nodes[0])\n if (!contentBeforeIsValid) {\n return false\n }\n\n const contentAfterIsValid =\n matchEnd < text.length ? isSeparator(text[matchEnd]) : isNextNodeValid(nodes[nodes.length - 1])\n return contentAfterIsValid\n}\n\nfunction extractMatchingNodes(\n nodes: TextNode[],\n startIndex: number,\n endIndex: number,\n): [\n matchingOffset: number,\n unmodifiedBeforeNodes: TextNode[],\n matchingNodes: TextNode[],\n unmodifiedAfterNodes: TextNode[],\n] {\n const unmodifiedBeforeNodes: TextNode[] = []\n const matchingNodes: TextNode[] = []\n const unmodifiedAfterNodes: TextNode[] = []\n let matchingOffset = 0\n\n let currentOffset = 0\n const currentNodes = [...nodes]\n\n while (currentNodes.length > 0) {\n const currentNode = currentNodes[0]\n const currentNodeText = currentNode.getTextContent()\n const currentNodeLength = currentNodeText.length\n const currentNodeStart = currentOffset\n const currentNodeEnd = currentOffset + currentNodeLength\n\n if (currentNodeEnd <= startIndex) {\n unmodifiedBeforeNodes.push(currentNode)\n matchingOffset += currentNodeLength\n } else if (currentNodeStart >= endIndex) {\n unmodifiedAfterNodes.push(currentNode)\n } else {\n matchingNodes.push(currentNode)\n }\n currentOffset += currentNodeLength\n currentNodes.shift()\n }\n return [matchingOffset, unmodifiedBeforeNodes, matchingNodes, unmodifiedAfterNodes]\n}\n\nfunction $createAutoLinkNode_(\n nodes: TextNode[],\n startIndex: number,\n endIndex: number,\n match: LinkMatcherResult,\n): TextNode | undefined {\n const fields: LinkFields = {\n linkType: 'custom',\n url: match.url,\n ...match.fields,\n }\n\n const linkNode = $createAutoLinkNode({ fields })\n if (nodes.length === 1) {\n let remainingTextNode = nodes[0]\n let linkTextNode\n if (startIndex === 0) {\n ;[linkTextNode, remainingTextNode] = remainingTextNode.splitText(endIndex)\n } else {\n ;[, linkTextNode, remainingTextNode] = remainingTextNode.splitText(startIndex, endIndex)\n }\n const textNode = $createTextNode(match.text)\n textNode.setFormat(linkTextNode.getFormat())\n textNode.setDetail(linkTextNode.getDetail())\n textNode.setStyle(linkTextNode.getStyle())\n linkNode.append(textNode)\n linkTextNode.replace(linkNode)\n return remainingTextNode\n } else if (nodes.length > 1) {\n const firstTextNode = nodes[0]\n let offset = firstTextNode.getTextContent().length\n let firstLinkTextNode\n if (startIndex === 0) {\n firstLinkTextNode = firstTextNode\n } else {\n ;[, firstLinkTextNode] = firstTextNode.splitText(startIndex)\n }\n const linkNodes = []\n let remainingTextNode\n for (let i = 1; i < nodes.length; i++) {\n const currentNode = nodes[i]\n const currentNodeText = currentNode.getTextContent()\n const currentNodeLength = currentNodeText.length\n const currentNodeStart = offset\n const currentNodeEnd = offset + currentNodeLength\n if (currentNodeStart < endIndex) {\n if (currentNodeEnd <= endIndex) {\n linkNodes.push(currentNode)\n } else {\n const [linkTextNode, endNode] = currentNode.splitText(endIndex - currentNodeStart)\n linkNodes.push(linkTextNode)\n remainingTextNode = endNode\n }\n }\n offset += currentNodeLength\n }\n const selection = $getSelection()\n const selectedTextNode = selection ? selection.getNodes().find($isTextNode) : undefined\n const textNode = $createTextNode(firstLinkTextNode.getTextContent())\n textNode.setFormat(firstLinkTextNode.getFormat())\n textNode.setDetail(firstLinkTextNode.getDetail())\n textNode.setStyle(firstLinkTextNode.getStyle())\n linkNode.append(textNode, ...linkNodes)\n // it does not preserve caret position if caret was at the first text node\n // so we need to restore caret position\n if (selectedTextNode && selectedTextNode === firstLinkTextNode) {\n if ($isRangeSelection(selection)) {\n textNode.select(selection.anchor.offset, selection.focus.offset)\n } else if ($isNodeSelection(selection)) {\n textNode.select(0, textNode.getTextContent().length)\n }\n }\n firstLinkTextNode.replace(linkNode)\n return remainingTextNode\n }\n return undefined\n}\n\nfunction $handleLinkCreation(\n nodes: TextNode[],\n matchers: LinkMatcher[],\n onChange: ChangeHandler,\n): void {\n let currentNodes = [...nodes]\n const initialText = currentNodes.map((node) => node.getTextContent()).join('')\n let text = initialText\n\n let match\n let invalidMatchEnd = 0\n\n while ((match = findFirstMatch(text, matchers)) != null && match !== null) {\n const matchStart: number = match.index\n const matchLength: number = match.length\n const matchEnd = matchStart + matchLength\n const isValid = isContentAroundIsValid(\n invalidMatchEnd + matchStart,\n invalidMatchEnd + matchEnd,\n initialText,\n currentNodes,\n )\n\n if (isValid) {\n const [matchingOffset, , matchingNodes, unmodifiedAfterNodes] = extractMatchingNodes(\n currentNodes,\n invalidMatchEnd + matchStart,\n invalidMatchEnd + matchEnd,\n )\n\n const actualMatchStart = invalidMatchEnd + matchStart - matchingOffset\n const actualMatchEnd = invalidMatchEnd + matchEnd - matchingOffset\n const remainingTextNode = $createAutoLinkNode_(\n matchingNodes,\n actualMatchStart,\n actualMatchEnd,\n match,\n )\n currentNodes = remainingTextNode\n ? [remainingTextNode, ...unmodifiedAfterNodes]\n : unmodifiedAfterNodes\n onChange(match.url, null)\n invalidMatchEnd = 0\n } else {\n invalidMatchEnd += matchEnd\n }\n\n text = text.substring(matchEnd)\n }\n}\n\nfunction handleLinkEdit(\n linkNode: AutoLinkNode,\n matchers: LinkMatcher[],\n onChange: ChangeHandler,\n): void {\n // Check children are simple text\n const children = linkNode.getChildren()\n const childrenLength = children.length\n for (let i = 0; i < childrenLength; i++) {\n const child = children[i]\n if (!$isTextNode(child) || !child.isSimpleText()) {\n replaceWithChildren(linkNode)\n onChange(null, linkNode.getFields()?.url ?? null)\n return\n }\n }\n\n // Check text content fully matches\n const text = linkNode.getTextContent()\n const match = findFirstMatch(text, matchers)\n if (match === null || match.text !== text) {\n replaceWithChildren(linkNode)\n onChange(null, linkNode.getFields()?.url ?? null)\n return\n }\n\n // Check neighbors\n if (!isPreviousNodeValid(linkNode) || !isNextNodeValid(linkNode)) {\n replaceWithChildren(linkNode)\n onChange(null, linkNode.getFields()?.url ?? null)\n return\n }\n\n const url = linkNode.getFields()?.url\n if (url !== match?.url) {\n const flds = linkNode.getFields()\n flds.url = match?.url\n linkNode.setFields(flds)\n onChange(match.url, url ?? null)\n }\n}\n\n// Bad neighbors are edits in neighbor nodes that make AutoLinks incompatible.\n// Given the creation preconditions, these can only be simple text nodes.\nfunction handleBadNeighbors(\n textNode: TextNode,\n matchers: LinkMatcher[],\n onChange: ChangeHandler,\n): void {\n const previousSibling = textNode.getPreviousSibling()\n const nextSibling = textNode.getNextSibling()\n const text = textNode.getTextContent()\n\n if ($isAutoLinkNode(previousSibling) && !startsWithSeparator(text)) {\n previousSibling.append(textNode)\n handleLinkEdit(previousSibling, matchers, onChange)\n onChange(null, previousSibling.getFields()?.url ?? null)\n }\n\n if ($isAutoLinkNode(nextSibling) && !endsWithSeparator(text)) {\n replaceWithChildren(nextSibling)\n handleLinkEdit(nextSibling, matchers, onChange)\n onChange(null, nextSibling.getFields()?.url ?? null)\n }\n}\n\nfunction replaceWithChildren(node: ElementNode): LexicalNode[] {\n const children = node.getChildren()\n const childrenLength = children.length\n\n for (let j = childrenLength - 1; j >= 0; j--) {\n node.insertAfter(children[j])\n }\n\n node.remove()\n return children.map((child) => child.getLatest())\n}\n\nfunction getTextNodesToMatch(textNode: TextNode): TextNode[] {\n // check if next siblings are simple text nodes till a node contains a space separator\n const textNodesToMatch = [textNode]\n let nextSibling = textNode.getNextSibling()\n while (nextSibling !== null && $isTextNode(nextSibling) && nextSibling.isSimpleText()) {\n textNodesToMatch.push(nextSibling)\n if (/\\s/.test(nextSibling.getTextContent())) {\n break\n }\n nextSibling = nextSibling.getNextSibling()\n }\n return textNodesToMatch\n}\n\nfunction useAutoLink(\n editor: LexicalEditor,\n matchers: LinkMatcher[],\n onChange?: ChangeHandler,\n): void {\n useEffect(() => {\n if (!editor.hasNodes([AutoLinkNode])) {\n invariant(false, 'LexicalAutoLinkPlugin: AutoLinkNode not registered on editor')\n }\n\n const onChangeWrapped = (url: null | string, prevUrl: null | string): void => {\n if (onChange != null) {\n onChange(url, prevUrl)\n }\n }\n\n return mergeRegister(\n editor.registerNodeTransform(TextNodeValue, (textNode: TextNode) => {\n const parent = textNode.getParentOrThrow()\n const previous = textNode.getPreviousSibling()\n if ($isAutoLinkNode(parent)) {\n handleLinkEdit(parent, matchers, onChangeWrapped)\n } else if (!$isLinkNode(parent)) {\n if (\n textNode.isSimpleText() &&\n (startsWithSeparator(textNode.getTextContent()) || !$isAutoLinkNode(previous))\n ) {\n const textNodesToMatch = getTextNodesToMatch(textNode)\n $handleLinkCreation(textNodesToMatch, matchers, onChangeWrapped)\n }\n\n handleBadNeighbors(textNode, matchers, onChangeWrapped)\n }\n }),\n )\n }, [editor, matchers, onChange])\n}\n\nconst URL_REGEX =\n /((https?:\\/\\/(www\\.)?)|(www\\.))[-\\w@:%.+~#=]{1,256}\\.[a-zA-Z\\d()]{1,6}\\b([-\\w()@:%+.~#?&/=]*)/\n\nconst EMAIL_REGEX =\n /(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\])|(([a-z\\-\\d]+\\.)+[a-z]{2,}))/i\n\nconst MATCHERS = [\n createLinkMatcherWithRegExp(URL_REGEX, (text) => {\n return text.startsWith('http') ? text : `https://${text}`\n }),\n createLinkMatcherWithRegExp(EMAIL_REGEX, (text) => {\n return `mailto:${text}`\n }),\n]\n\nexport const AutoLinkPlugin: PluginComponent<ClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useAutoLink(editor, MATCHERS)\n\n return null\n}\n", "// Taken from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/shared/src/invariant.ts\n\n// invariant(condition, message) will refine types based on \"condition\", and\n// if \"condition\" is false will throw an error. This function is special-cased\n// in flow itself, so we can't name it anything else.\nexport function invariant(cond?: boolean, message?: string, ...args: string[]): asserts cond {\n if (cond) {\n return\n }\n\n throw new Error(\n 'Internal Lexical error: invariant() is meant to be replaced at compile ' +\n 'time. There is no runtime version. Error: ' +\n message,\n )\n}\n", "'use client'\nimport { ClickableLinkPlugin as LexicalClickableLinkPlugin } from '@lexical/react/LexicalClickableLinkPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { ClientProps } from '../../feature.client.js'\n\nexport const ClickableLinkPlugin: PluginComponent<ClientProps> = () => {\n return <LexicalClickableLinkPlugin />\n}\n", "import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nimport type { LinkPayload } from '../types.js'\n\nexport const TOGGLE_LINK_WITH_MODAL_COMMAND: LexicalCommand<LinkPayload | null> = createCommand(\n 'TOGGLE_LINK_WITH_MODAL_COMMAND',\n)\n", "'use client'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../typesClient.js'\nimport type { ClientProps } from '../../feature.client.js'\n\nimport { LinkEditor } from './LinkEditor/index.js'\nexport const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps> = (props) => {\n const { anchorElem = document.body } = props\n\n return createPortal(<LinkEditor anchorElem={anchorElem} />, anchorElem)\n}\n", "'use client'\nimport type { LexicalNode } from 'lexical'\nimport type { Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport { formatDrawerSlug, useConfig, useEditDepth, useModal, useTranslation } from '@payloadcms/ui'\nimport {\n $getSelection,\n $isLineBreakNode,\n $isRangeSelection,\n COMMAND_PRIORITY_HIGH,\n COMMAND_PRIORITY_LOW,\n KEY_ESCAPE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\n\nimport type { LinkNode } from '../../../nodes/LinkNode.js'\nimport type { LinkFields } from '../../../nodes/types.js'\nimport type { LinkPayload } from '../types.js'\n\nimport { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { getSelectedNode } from '../../../../../lexical/utils/getSelectedNode.js'\nimport { setFloatingElemPositionForLinkEditor } from '../../../../../lexical/utils/setFloatingElemPositionForLinkEditor.js'\nimport { LinkDrawer } from '../../../drawer/index.js'\nimport { $isAutoLinkNode } from '../../../nodes/AutoLinkNode.js'\nimport { $createLinkNode, $isLinkNode, TOGGLE_LINK_COMMAND } from '../../../nodes/LinkNode.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './commands.js'\n\nexport function LinkEditor({ anchorElem }: { anchorElem: HTMLElement }): React.ReactNode {\n const [editor] = useLexicalComposerContext()\n\n const editorRef = useRef<HTMLDivElement | null>(null)\n const [linkUrl, setLinkUrl] = useState(null)\n const [linkLabel, setLinkLabel] = useState(null)\n\n const { uuid } = useEditorConfigContext()\n\n const config = useConfig()\n\n const { i18n, t } = useTranslation()\n\n const [stateData, setStateData] = useState<{} | (LinkFields & { id?: string; text: string })>({})\n\n const { closeModal, isModalOpen, toggleModal } = useModal()\n const editDepth = useEditDepth()\n const [isLink, setIsLink] = useState(false)\n const [selectedNodes, setSelectedNodes] = useState<LexicalNode[]>([])\n\n const [isAutoLink, setIsAutoLink] = useState(false)\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-link-` + uuid,\n depth: editDepth,\n })\n\n const setNotLink = useCallback(() => {\n setIsLink(false)\n if (editorRef && editorRef.current) {\n editorRef.current.style.opacity = '0'\n editorRef.current.style.transform = 'translate(-10000px, -10000px)'\n }\n setIsAutoLink(false)\n setLinkUrl(null)\n setLinkLabel(null)\n setSelectedNodes([])\n setStateData({})\n }, [setIsLink, setLinkUrl, setLinkLabel, setSelectedNodes])\n\n const $updateLinkEditor = useCallback(() => {\n const selection = $getSelection()\n let selectedNodeDomRect: DOMRect | undefined = null\n\n if (!$isRangeSelection(selection) || !selection) {\n setNotLink()\n return\n }\n\n // Handle the data displayed in the floating link editor & drawer when you click on a link node\n\n const focusNode = getSelectedNode(selection)\n selectedNodeDomRect = editor.getElementByKey(focusNode.getKey())?.getBoundingClientRect()\n const focusLinkParent: LinkNode = $findMatchingParent(focusNode, $isLinkNode)\n\n // Prevent link modal from showing if selection spans further than the link: https://github.com/facebook/lexical/issues/4064\n const badNode = selection\n .getNodes()\n .filter((node) => !$isLineBreakNode(node))\n .find((node) => {\n const linkNode = $findMatchingParent(node, $isLinkNode)\n return (\n (focusLinkParent && !focusLinkParent.is(linkNode)) ||\n (linkNode && !linkNode.is(focusLinkParent))\n )\n })\n\n if (focusLinkParent == null || badNode) {\n setNotLink()\n return\n }\n\n // Initial state:\n const data: LinkFields & { text: string } = {\n doc: undefined,\n linkType: undefined,\n newTab: undefined,\n url: '',\n ...focusLinkParent.getFields(),\n id: focusLinkParent.getID(),\n text: focusLinkParent.getTextContent(),\n }\n\n if (focusLinkParent.getFields()?.linkType === 'custom') {\n setLinkUrl(focusLinkParent.getFields()?.url ?? null)\n setLinkLabel(null)\n } else {\n // internal link\n setLinkUrl(\n `/admin/collections/${focusLinkParent.getFields()?.doc?.relationTo}/${\n focusLinkParent.getFields()?.doc?.value\n }`,\n )\n\n const relatedField = config.collections.find(\n (coll) => coll.slug === focusLinkParent.getFields()?.doc?.relationTo,\n )\n if (!relatedField) {\n // Usually happens if the user removed all default fields. In this case, we let them specify the label or do not display the label at all.\n // label could be a virtual field the user added. This is useful if they want to use the link feature for things other than links.\n setLinkLabel(\n focusLinkParent.getFields()?.label ? String(focusLinkParent.getFields()?.label) : null,\n )\n setLinkUrl(\n focusLinkParent.getFields()?.url ? String(focusLinkParent.getFields()?.url) : null,\n )\n } else {\n const label = t('fields:linkedTo', {\n label: getTranslation(relatedField.labels.singular, i18n),\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(label)\n }\n }\n\n setStateData(data)\n setIsLink(true)\n setSelectedNodes(selection ? selection?.getNodes() : [])\n\n if ($isAutoLinkNode(focusLinkParent)) {\n setIsAutoLink(true)\n } else {\n setIsAutoLink(false)\n }\n\n const editorElem = editorRef.current\n const nativeSelection = window.getSelection()\n const { activeElement } = document\n\n if (editorElem === null) {\n return\n }\n\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n if (!selectedNodeDomRect) {\n // Get the DOM rect of the selected node using the native selection. This sometimes produces the wrong\n // result, which is why we use lexical's selection preferably.\n selectedNodeDomRect = nativeSelection.getRangeAt(0).getBoundingClientRect()\n }\n\n if (selectedNodeDomRect != null) {\n selectedNodeDomRect.y += 40\n setFloatingElemPositionForLinkEditor(selectedNodeDomRect, editorElem, anchorElem)\n }\n } else if (activeElement == null || activeElement.className !== 'link-input') {\n if (rootElement !== null) {\n setFloatingElemPositionForLinkEditor(null, editorElem, anchorElem)\n }\n setLinkUrl(null)\n setLinkLabel(null)\n }\n\n return true\n }, [editor, setNotLink, config.collections, t, i18n, anchorElem])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_WITH_MODAL_COMMAND,\n (payload: LinkPayload) => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, payload)\n\n // Now, open the modal\n $updateLinkEditor()\n toggleModal(drawerSlug)\n\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, $updateLinkEditor, toggleModal, drawerSlug])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = (): void => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }\n\n window.addEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [anchorElem.parentElement, editor, $updateLinkEditor])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n void $updateLinkEditor()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n void $updateLinkEditor()\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ESCAPE_COMMAND,\n () => {\n if (isLink) {\n setNotLink()\n\n return true\n }\n return false\n },\n COMMAND_PRIORITY_HIGH,\n ),\n )\n }, [editor, $updateLinkEditor, isLink, setNotLink])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }, [editor, $updateLinkEditor])\n\n return (\n <React.Fragment>\n <div className=\"link-editor\" ref={editorRef}>\n <div className=\"link-input\">\n {linkUrl && linkUrl.length > 0 ? (\n <a href={linkUrl} rel=\"noopener noreferrer\" target=\"_blank\">\n {linkLabel != null && linkLabel.length > 0 ? linkLabel : linkUrl}\n </a>\n ) : linkLabel != null && linkLabel.length > 0 ? (\n <span className=\"link-input__label-pure\">{linkLabel}</span>\n ) : null}\n\n {editor.isEditable() && (\n <React.Fragment>\n <button\n aria-label=\"Edit link\"\n className=\"link-edit\"\n onClick={() => {\n toggleModal(drawerSlug)\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n tabIndex={0}\n type=\"button\"\n />\n {!isAutoLink && (\n <button\n aria-label=\"Remove link\"\n className=\"link-trash\"\n onClick={() => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n tabIndex={0}\n type=\"button\"\n />\n )}\n </React.Fragment>\n )}\n </div>\n </div>\n {isModalOpen(drawerSlug) && (\n <LinkDrawer\n drawerSlug={drawerSlug}\n handleModalSubmit={(fields: FormState, data: Data) => {\n closeModal(drawerSlug)\n\n const newLinkPayload = data as LinkFields & { text: string }\n\n const bareLinkFields: LinkFields = {\n ...newLinkPayload,\n }\n delete bareLinkFields.text\n\n // See: https://github.com/facebook/lexical/pull/5536. This updates autolink nodes to link nodes whenever a change was made (which is good!).\n editor.update(() => {\n const selection = $getSelection()\n let linkParent = null\n if ($isRangeSelection(selection)) {\n linkParent = getSelectedNode(selection).getParent()\n } else {\n if (selectedNodes.length) {\n linkParent = selectedNodes[0].getParent()\n }\n }\n\n if (linkParent && $isAutoLinkNode(linkParent)) {\n const linkNode = $createLinkNode({\n fields: bareLinkFields,\n })\n linkParent.replace(linkNode, true)\n }\n })\n\n // Needs to happen AFTER a potential auto link => link node conversion, as otherwise, the updated text to display may be lost due to\n // it being applied to the auto link node instead of the link node.\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: bareLinkFields,\n selectedNodes,\n text: newLinkPayload.text,\n })\n }}\n stateData={stateData}\n />\n )}\n </React.Fragment>\n )\n}\n", "const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\nexport function setFloatingElemPositionForLinkEditor(\n targetRect: DOMRect | null,\n floatingElem: HTMLElement,\n anchorElem: HTMLElement,\n verticalGap: number = VERTICAL_GAP,\n horizontalOffset: number = HORIZONTAL_OFFSET,\n): void {\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (top < editorScrollerRect.top) {\n top += floatingElemRect.height + targetRect.height + verticalGap * 2\n }\n\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n\n top -= anchorElementRect.top\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n}\n", "import type { FormProps } from '@payloadcms/ui'\nimport type { FormState } from 'payload'\n\nimport {\n Drawer,\n Form,\n FormSubmit,\n RenderFields,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useTranslation,\n} from '@payloadcms/ui'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { type Props } from './types.js'\n\nconst baseClass = 'lexical-link-edit-drawer'\n\nexport const LinkDrawer: React.FC<Props> = ({ drawerSlug, handleModalSubmit, stateData }) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.link.fields.fields`\n const schemaFieldsPath = `${schemaPath}.feature.link.fields`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: stateData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (stateData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, stateData])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n return (\n <Drawer className={baseClass} slug={drawerSlug} title={t('fields:editLink') ?? ''}>\n {initialState !== false && (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleModalSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('general:submit')}</FormSubmit>\n </Form>\n )}\n </Drawer>\n )\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isElementNode,\n $isRangeSelection,\n COMMAND_PRIORITY_LOW,\n PASTE_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { ClientProps } from '../../feature.client.js'\nimport type { LinkFields } from '../../nodes/types.js'\nimport type { LinkPayload } from '../floatingLinkEditor/types.js'\n\nimport { validateUrl } from '../../../../lexical/utils/url.js'\nimport { $toggleLink, LinkNode, TOGGLE_LINK_COMMAND } from '../../nodes/LinkNode.js'\n\nexport const LinkPlugin: PluginComponent<ClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([LinkNode])) {\n throw new Error('LinkPlugin: LinkNode not registered on editor')\n }\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_COMMAND,\n (payload: LinkPayload) => {\n $toggleLink(payload)\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n validateUrl !== undefined\n ? editor.registerCommand(\n PASTE_COMMAND,\n (event) => {\n const selection = $getSelection()\n if (\n !$isRangeSelection(selection) ||\n selection.isCollapsed() ||\n !(event instanceof ClipboardEvent) ||\n event.clipboardData == null\n ) {\n return false\n }\n const clipboardText = event.clipboardData.getData('text')\n if (!validateUrl(clipboardText)) {\n return false\n }\n // If we select nodes that are elements then avoid applying the link.\n if (!selection.getNodes().some((node) => $isElementNode(node))) {\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: clipboardText,\n }\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: linkFields,\n text: null,\n })\n event.preventDefault()\n return true\n }\n return false\n },\n COMMAND_PRIORITY_LOW,\n )\n : () => {\n // Don't paste arbitrary text as a link when there's no validate function\n },\n )\n }, [editor])\n\n return null\n}\n", "export function sanitizeUrl(url: string): string {\n /** A pattern that matches safe URLs. */\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi\n\n /** A pattern that matches safe data URLs. */\n const DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z\\d+/]+=*$/i\n\n url = String(url).trim()\n\n if (url.match(SAFE_URL_PATTERN) != null || url.match(DATA_URL_PATTERN) != null) return url\n\n return 'https://'\n}\n\n// Source: https://stackoverflow.com/a/8234912/2013580\nconst absoluteRegExp =\n /(?:[A-Za-z]{3,9}:(?:\\/\\/)?(?:[-;:&=+$,\\w]+@)?[A-Za-z\\d.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z\\d.-]+)(?:\\/[+~%/.\\w-]*)?\\??[-+=&;%@.\\w]*#?\\w*/\n\n/**\n * This regex checks for relative URLs starting with / or anchor links starting with # in a string. Tested for the following use cases:\n * - /privacy-policy\n * - /privacy-policy#primary-terms\n * - #primary-terms\n * */\nconst relativeOrAnchorRegExp = /^[\\w\\-./]*(?:#\\w[\\w-]*)?$/\n\n// Do not keep validateUrl function too loose. This is run when pasting in text, to determine if links are in that text and if it should create AutoLinkNodes.\n// This is why we do not allow stuff like anchors here, as we don't want copied anchors to be turned into AutoLinkNodes.\nexport function validateUrl(url: string): boolean {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n\n if (!url) return false\n\n if (url === 'https://') return true\n\n // This makes sure URLs starting with www. instead of https are valid too\n if (absoluteRegExp.test(url)) return true\n\n // Check relative or anchor links\n if (relativeOrAnchorRegExp.test(url)) return true\n\n // While this doesn't allow URLs starting with www (which is why we use the regex above), it does properly handle tel: URLs\n try {\n new URL(url)\n return true\n } catch {\n /* empty */\n }\n\n return false\n}\n", "'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature } from '../../typesClient.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\n\nexport const ChecklistFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n if (!featureProviderMap.has('unorderedList') && !featureProviderMap.has('orderedList')) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n", "import React from 'react'\n\nexport const ChecklistIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect height=\"13\" rx=\"1.5\" stroke=\"currentColor\" width=\"13\" x=\"3.5\" y=\"3.5\" />\n <path d=\"M7 10L9 12.5L13 7.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "'use client'\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../typesClient.js'\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n", "import type {\n SlashMenuGroup,\n SlashMenuItem,\n} from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport function slashMenuListGroupWithItems(items: SlashMenuItem[]): SlashMenuGroup {\n return {\n items,\n key: 'lists',\n label: ({ i18n }) => {\n return i18n.t('lexical:general:slashMenuListGroupLabel')\n },\n }\n}\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,\n replace: listReplace('check'),\n}\n", "// Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1\n\nimport type { ListNode, ListType } from '@lexical/list'\nimport type { ElementTransformer } from '@lexical/markdown'\nimport type { ElementNode } from 'lexical'\n\nimport { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list'\n\n// Amount of spaces that define indentation level\nconst LIST_INDENT_SIZE = 4\n\nexport const listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = Math.floor(match[1].length / LIST_INDENT_SIZE)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nexport const listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n", "'use client'\nimport { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\n\nexport const LexicalCheckListPlugin: PluginComponent<undefined> = () => {\n return <CheckListPlugin />\n}\n", "'use client'\nimport { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: OrderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'number') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'number') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'number') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'orderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n]\n\nexport const OrderedListFeatureClient = createClientFeature(({ featureProviderMap }) => {\n return {\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('orderedList') ? [] : [ListNode, ListItemNode],\n plugins: featureProviderMap.has('orderedList')\n ? []\n : [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: OrderedListIcon,\n key: 'orderedList',\n keywords: ['ordered list', 'ol'],\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n", "import React from 'react'\n\nexport const OrderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.89284 12.479C5.89284 13.368 5.26284 13.788 4.38084 14.236C3.75084 14.558 3.43584 14.789 3.40784 15.062H5.89984V16H2.06384V15.573C2.06384 14.523 2.92484 13.935 3.66684 13.501C4.38084 13.088 4.75184 12.878 4.75184 12.458C4.75184 12.08 4.52084 11.835 4.06584 11.835C3.58984 11.835 3.30984 12.199 3.28184 12.654H2.11284C2.18984 11.681 2.87584 10.918 4.07284 10.918C5.15784 10.918 5.89284 11.555 5.89284 12.479Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M2.68608 4.535V3.737C3.54008 3.737 3.90408 3.513 4.02308 2.995H4.89108V8H3.68008L3.68008 4.535H2.68608Z\"\n fill=\"currentColor\"\n />\n <path d=\"M8 15L17 15\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M8 10L17 10\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M8 5L17 5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(\\d+)\\.\\s/,\n replace: listReplace('number'),\n}\n", "'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../shared/slashMenuListGroup.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nexport const UnorderedListFeatureClient = createClientFeature({\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "import React from 'react'\n\nexport const UnorderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"4\" cy=\"5\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"10\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"15\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <path d=\"M17 5H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 10H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 15H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n", "import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const UNORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)[-*+]\\s/,\n replace: listReplace('bullet'),\n}\n", "import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\nimport type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './types.js'\n\nexport function convertLexicalPluginToLexical({\n converters,\n lexicalPluginData,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginData: PayloadPluginLexicalData\n}): SerializedEditorState {\n return {\n root: {\n type: 'root',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginData?.jsonContent?.root?.children || [],\n parentNodeType: 'root',\n }),\n direction: lexicalPluginData?.jsonContent?.root?.direction || 'ltr',\n format: lexicalPluginData?.jsonContent?.root?.format || '',\n indent: lexicalPluginData?.jsonContent?.root?.indent || 0,\n version: 1,\n },\n }\n}\n\nexport function convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes,\n parentNodeType,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginNodes: SerializedLexicalNode[] | undefined\n /**\n * Type of the parent lexical node (not the type of the original, parent payload-plugin-lexical type)\n */\n parentNodeType: string\n}): SerializedLexicalNode[] {\n if (!lexicalPluginNodes?.length) {\n return []\n }\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n return (\n lexicalPluginNodes.map((lexicalPluginNode, i) => {\n if (lexicalPluginNode.type === 'paragraph') {\n return convertParagraphNode(converters, lexicalPluginNode)\n }\n if (lexicalPluginNode.type === 'text' || !lexicalPluginNode.type) {\n return convertTextNode(lexicalPluginNode)\n }\n\n const converter = converters.find((converter) =>\n converter.nodeTypes.includes(lexicalPluginNode.type),\n )\n\n if (converter) {\n return converter.converter({ childIndex: i, converters, lexicalPluginNode, parentNodeType })\n }\n\n console.warn(\n 'lexicalPluginToLexical > No converter found for node type: ' + lexicalPluginNode.type,\n )\n return unknownConverter?.converter({\n childIndex: i,\n converters,\n lexicalPluginNode,\n parentNodeType,\n })\n }) || []\n )\n}\n\nexport function convertParagraphNode(\n converters: LexicalPluginNodeConverter[],\n node: SerializedLexicalNode,\n): SerializedParagraphNode {\n return {\n ...node,\n type: 'paragraph',\n\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: (node as any).children || [],\n parentNodeType: 'paragraph',\n }),\n version: 1,\n } as SerializedParagraphNode\n}\nexport function convertTextNode(node: SerializedLexicalNode): SerializedTextNode {\n return node as SerializedTextNode\n}\n", "import type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'\nimport type { JSX } from 'react'\n\nimport { addClassNamesToElement } from '@lexical/utils'\nimport { DecoratorNode } from 'lexical'\nimport * as React from 'react'\n\nexport type UnknownConvertedNodeData = {\n nodeData: unknown\n nodeType: string\n}\n\nexport type SerializedUnknownConvertedNode = Spread<\n {\n data: UnknownConvertedNodeData\n },\n SerializedLexicalNode\n>\n\nconst Component = React.lazy(() =>\n import('./Component.js').then((module) => ({\n default: module.UnknownConvertedNodeComponent,\n })),\n)\n\n/** @noInheritDoc */\nexport class UnknownConvertedNode extends DecoratorNode<JSX.Element> {\n __data: UnknownConvertedNodeData\n\n constructor({ data, key }: { data: UnknownConvertedNodeData; key?: NodeKey }) {\n super(key)\n this.__data = data\n }\n\n static clone(node: UnknownConvertedNode): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data: node.__data,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'unknownConverted'\n }\n\n static importJSON(serializedNode: SerializedUnknownConvertedNode): UnknownConvertedNode {\n const node = $createUnknownConvertedNode({ data: serializedNode.data })\n return node\n }\n\n canInsertTextAfter(): true {\n return true\n }\n\n canInsertTextBefore(): true {\n return true\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n const element = document.createElement('span')\n addClassNamesToElement(element, 'unknownConverted')\n return element\n }\n\n decorate(): JSX.Element | null {\n return <Component data={this.__data} />\n }\n\n exportJSON(): SerializedUnknownConvertedNode {\n return {\n type: this.getType(),\n data: this.__data,\n version: 1,\n }\n }\n\n // Mutation\n\n isInline(): boolean {\n return true\n }\n\n updateDOM(prevNode: UnknownConvertedNode, dom: HTMLElement): boolean {\n return false\n }\n}\n\nexport function $createUnknownConvertedNode({\n data,\n}: {\n data: UnknownConvertedNodeData\n}): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data,\n })\n}\n\nexport function $isUnknownConvertedNode(\n node: LexicalNode | null | undefined,\n): node is UnknownConvertedNode {\n return node instanceof UnknownConvertedNode\n}\n", "'use client'\n\nimport type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './converter/types.js'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { convertLexicalPluginToLexical } from './converter/index.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nexport const LexicalPluginToLexicalFeatureClient = createClientFeature(({ clientFunctions }) => {\n const converters: LexicalPluginNodeConverter[] = Object.values(clientFunctions)\n\n return {\n hooks: {\n load({ incomingEditorState }) {\n if (!incomingEditorState || !('jsonContent' in incomingEditorState)) {\n // incomingEditorState null or not from Lexical Plugin\n return incomingEditorState\n }\n // Lexical Plugin => convert to lexical\n\n return convertLexicalPluginToLexical({\n converters,\n lexicalPluginData: incomingEditorState as unknown as PayloadPluginLexicalData,\n })\n },\n },\n nodes: [UnknownConvertedNode],\n }\n})\n", "/* eslint-disable perfectionist/sort-objects */\n/* eslint-disable regexp/no-obscure-range */\n/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n/* eslint-disable regexp/no-misleading-unicode-character */\n//This copy-and-pasted from lexical here: https://github.com/facebook/lexical/blob/c2ceee223f46543d12c574e62155e619f9a18a5d/packages/lexical/src/LexicalConstants.ts\n\nimport type { ElementFormatType, TextFormatType, TextModeType } from 'lexical'\nexport type TextDetailType = 'directionless' | 'unmergable'\n\n// DOM\nexport const NodeFormat = {\n DOM_ELEMENT_TYPE: 1,\n DOM_TEXT_TYPE: 3,\n // Reconciling\n NO_DIRTY_NODES: 0,\n HAS_DIRTY_NODES: 1,\n FULL_RECONCILE: 2,\n // Text node modes\n IS_NORMAL: 0,\n IS_TOKEN: 1,\n IS_SEGMENTED: 2,\n IS_INERT: 3,\n // Text node formatting\n IS_BOLD: 1,\n IS_ITALIC: 1 << 1,\n IS_STRIKETHROUGH: 1 << 2,\n IS_UNDERLINE: 1 << 3,\n IS_CODE: 1 << 4,\n IS_SUBSCRIPT: 1 << 5,\n IS_SUPERSCRIPT: 1 << 6,\n IS_HIGHLIGHT: 1 << 7,\n // Text node details\n IS_DIRECTIONLESS: 1,\n IS_UNMERGEABLE: 1 << 1,\n // Element node formatting\n IS_ALIGN_LEFT: 1,\n IS_ALIGN_CENTER: 2,\n IS_ALIGN_RIGHT: 3,\n IS_ALIGN_JUSTIFY: 4,\n IS_ALIGN_START: 5,\n IS_ALIGN_END: 6,\n} as const\n\nexport const IS_ALL_FORMATTING =\n NodeFormat.IS_BOLD |\n NodeFormat.IS_ITALIC |\n NodeFormat.IS_STRIKETHROUGH |\n NodeFormat.IS_UNDERLINE |\n NodeFormat.IS_CODE |\n NodeFormat.IS_SUBSCRIPT |\n NodeFormat.IS_SUPERSCRIPT |\n NodeFormat.IS_HIGHLIGHT\n\n// Reconciliation\nexport const NON_BREAKING_SPACE = '\\u00A0'\n\nexport const DOUBLE_LINE_BREAK = '\\n\\n'\n\n// For FF, we need to use a non-breaking space, or it gets composition\n// in a stuck state.\n\nconst RTL = '\\u0591-\\u07FF\\uFB1D-\\uFDFD\\uFE70-\\uFEFC'\nconst LTR =\n 'A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6' +\n '\\u00F8-\\u02B8\\u0300-\\u0590\\u0800-\\u1FFF\\u200E\\u2C00-\\uFB1C' +\n '\\uFE00-\\uFE6F\\uFEFD-\\uFFFF'\n\n// eslint-disable-next-line no-misleading-character-class\nexport const RTL_REGEX = new RegExp('^[^' + LTR + ']*[' + RTL + ']')\n// eslint-disable-next-line no-misleading-character-class\nexport const LTR_REGEX = new RegExp('^[^' + RTL + ']*[' + LTR + ']')\n\nexport const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number> = {\n bold: NodeFormat.IS_BOLD,\n code: NodeFormat.IS_CODE,\n highlight: NodeFormat.IS_HIGHLIGHT,\n italic: NodeFormat.IS_ITALIC,\n strikethrough: NodeFormat.IS_STRIKETHROUGH,\n subscript: NodeFormat.IS_SUBSCRIPT,\n superscript: NodeFormat.IS_SUPERSCRIPT,\n underline: NodeFormat.IS_UNDERLINE,\n}\n\nexport const DETAIL_TYPE_TO_DETAIL: Record<TextDetailType | string, number> = {\n directionless: NodeFormat.IS_DIRECTIONLESS,\n unmergeable: NodeFormat.IS_UNMERGEABLE,\n}\n\nexport const ELEMENT_TYPE_TO_FORMAT: Record<Exclude<ElementFormatType, ''>, number> = {\n center: NodeFormat.IS_ALIGN_CENTER,\n end: NodeFormat.IS_ALIGN_END,\n justify: NodeFormat.IS_ALIGN_JUSTIFY,\n left: NodeFormat.IS_ALIGN_LEFT,\n right: NodeFormat.IS_ALIGN_RIGHT,\n start: NodeFormat.IS_ALIGN_START,\n}\n\nexport const ELEMENT_FORMAT_TO_TYPE: Record<number, ElementFormatType> = {\n [NodeFormat.IS_ALIGN_CENTER]: 'center',\n [NodeFormat.IS_ALIGN_END]: 'end',\n [NodeFormat.IS_ALIGN_JUSTIFY]: 'justify',\n [NodeFormat.IS_ALIGN_LEFT]: 'left',\n [NodeFormat.IS_ALIGN_RIGHT]: 'right',\n [NodeFormat.IS_ALIGN_START]: 'start',\n}\n\nexport const TEXT_MODE_TO_TYPE: Record<TextModeType, 0 | 1 | 2> = {\n normal: NodeFormat.IS_NORMAL,\n segmented: NodeFormat.IS_SEGMENTED,\n token: NodeFormat.IS_TOKEN,\n}\n\nexport const TEXT_TYPE_TO_MODE: Record<number, TextModeType> = {\n [NodeFormat.IS_NORMAL]: 'normal',\n [NodeFormat.IS_SEGMENTED]: 'segmented',\n [NodeFormat.IS_TOKEN]: 'token',\n}\n", "import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\nimport type { SlateNode, SlateNodeConverter } from './types.js'\n\nimport { NodeFormat } from '../../../../lexical/utils/nodeFormat.js'\n\nexport function convertSlateToLexical({\n converters,\n slateData,\n}: {\n converters: SlateNodeConverter[]\n slateData: SlateNode[]\n}): SerializedEditorState {\n return {\n root: {\n type: 'root',\n children: convertSlateNodesToLexical({\n canContainParagraphs: true,\n converters,\n parentNodeType: 'root',\n slateNodes: slateData,\n }),\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\nexport function convertSlateNodesToLexical({\n canContainParagraphs,\n converters,\n parentNodeType,\n slateNodes,\n}: {\n canContainParagraphs: boolean\n converters: SlateNodeConverter[] | undefined\n /**\n * Type of the parent lexical node (not the type of the original, parent slate type)\n */\n parentNodeType: string\n slateNodes: SlateNode[]\n}): SerializedLexicalNode[] {\n if (!converters?.length) {\n return []\n }\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n return (\n slateNodes.map((slateNode, i) => {\n if (!('type' in slateNode)) {\n if (canContainParagraphs) {\n // This is a paragraph node. They do not have a type property in Slate\n return convertParagraphNode(converters, slateNode)\n } else {\n // This is a simple text node. canContainParagraphs may be false if this is nested inside a paragraph already, since paragraphs cannot contain paragraphs\n return convertTextNode(slateNode)\n }\n }\n if (slateNode.type === 'p') {\n return convertParagraphNode(converters, slateNode)\n }\n\n const converter = converters.find((converter) => converter.nodeTypes.includes(slateNode.type))\n\n if (converter) {\n return converter.converter({ childIndex: i, converters, parentNodeType, slateNode })\n }\n\n console.warn('slateToLexical > No converter found for node type: ' + slateNode.type)\n return unknownConverter?.converter({\n childIndex: i,\n converters,\n parentNodeType,\n slateNode,\n })\n }) || []\n )\n}\n\nexport function convertParagraphNode(\n converters: SlateNodeConverter[],\n node: SlateNode,\n): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children: convertSlateNodesToLexical({\n canContainParagraphs: false,\n converters,\n parentNodeType: 'paragraph',\n slateNodes: node.children || [],\n }),\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\nexport function convertTextNode(node: SlateNode): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: convertNodeToFormat(node),\n mode: 'normal',\n style: '',\n text: node.text,\n version: 1,\n }\n}\n\nexport function convertNodeToFormat(node: SlateNode): number {\n let format = 0\n if (node.bold) {\n format = format | NodeFormat.IS_BOLD\n }\n if (node.italic) {\n format = format | NodeFormat.IS_ITALIC\n }\n if (node.strikethrough) {\n format = format | NodeFormat.IS_STRIKETHROUGH\n }\n if (node.underline) {\n format = format | NodeFormat.IS_UNDERLINE\n }\n if (node.subscript) {\n format = format | NodeFormat.IS_SUBSCRIPT\n }\n if (node.superscript) {\n format = format | NodeFormat.IS_SUPERSCRIPT\n }\n if (node.code) {\n format = format | NodeFormat.IS_CODE\n }\n return format\n}\n", "import type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'\nimport type { JSX } from 'react'\n\nimport { addClassNamesToElement } from '@lexical/utils'\nimport { DecoratorNode } from 'lexical'\nimport * as React from 'react'\n\nexport type UnknownConvertedNodeData = {\n nodeData: unknown\n nodeType: string\n}\n\nexport type SerializedUnknownConvertedNode = Spread<\n {\n data: UnknownConvertedNodeData\n },\n SerializedLexicalNode\n>\n\nconst Component = React.lazy(() =>\n import('./Component.js').then((module) => ({\n default: module.UnknownConvertedNodeComponent,\n })),\n)\n\n/** @noInheritDoc */\nexport class UnknownConvertedNode extends DecoratorNode<JSX.Element> {\n __data: UnknownConvertedNodeData\n\n constructor({ data, key }: { data: UnknownConvertedNodeData; key?: NodeKey }) {\n super(key)\n this.__data = data\n }\n\n static clone(node: UnknownConvertedNode): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data: node.__data,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'unknownConverted'\n }\n\n static importJSON(serializedNode: SerializedUnknownConvertedNode): UnknownConvertedNode {\n const node = $createUnknownConvertedNode({ data: serializedNode.data })\n return node\n }\n\n canInsertTextAfter(): true {\n return true\n }\n\n canInsertTextBefore(): true {\n return true\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n const element = document.createElement('span')\n addClassNamesToElement(element, 'unknownConverted')\n return element\n }\n\n decorate(): JSX.Element | null {\n return <Component data={this.__data} />\n }\n\n exportJSON(): SerializedUnknownConvertedNode {\n return {\n type: this.getType(),\n data: this.__data,\n version: 1,\n }\n }\n\n // Mutation\n\n isInline(): boolean {\n return true\n }\n\n updateDOM(prevNode: UnknownConvertedNode, dom: HTMLElement): boolean {\n return false\n }\n}\n\nexport function $createUnknownConvertedNode({\n data,\n}: {\n data: UnknownConvertedNodeData\n}): UnknownConvertedNode {\n return new UnknownConvertedNode({\n data,\n })\n}\n\nexport function $isUnknownConvertedNode(\n node: LexicalNode | null | undefined,\n): node is UnknownConvertedNode {\n return node instanceof UnknownConvertedNode\n}\n", "'use client'\n\nimport type { SlateNodeConverter } from './converter/types.js'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { convertSlateToLexical } from './converter/index.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nexport const SlateToLexicalFeatureClient = createClientFeature(({ clientFunctions }) => {\n const converters: SlateNodeConverter[] = Object.values(clientFunctions)\n\n return {\n hooks: {\n load({ incomingEditorState }) {\n if (\n !incomingEditorState ||\n !Array.isArray(incomingEditorState) ||\n 'root' in incomingEditorState\n ) {\n // incomingEditorState null or not from Slate\n return incomingEditorState\n }\n // Slate => convert to lexical\n\n return convertSlateToLexical({\n converters,\n slateData: incomingEditorState,\n })\n },\n },\n nodes: [UnknownConvertedNode],\n }\n})\n", "'use client'\n\nimport { $setBlocksType } from '@lexical/selection'\nimport { $createParagraphNode, $getSelection, $isParagraphNode, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\n\nimport { TextIcon } from '../../lexical/ui/icons/Text/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: TextIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isParagraphNode(node) && !$isParagraphNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'paragraph',\n label: ({ i18n }) => {\n return i18n.t('lexical:paragraph:label2')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n order: 1,\n },\n ]),\n]\n\nexport const ParagraphFeatureClient = createClientFeature({\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: TextIcon,\n key: 'paragraph',\n keywords: ['normal', 'paragraph', 'p', 'text'],\n label: ({ i18n }) => {\n return i18n.t('lexical:paragraph:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createParagraphNode())\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n", "'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { RelationshipFeatureProps } from './feature.server.js'\n\nimport { RelationshipIcon } from '../../lexical/ui/icons/Relationship/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isRelationshipNode, RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nexport const RelationshipFeatureClient = createClientFeature<RelationshipFeatureProps>({\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: RelationshipPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: RelationshipIcon,\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: RelationshipIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isRelationshipNode(firstNode)\n },\n key: 'relationship',\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n", "import React from 'react'\n\nexport const RelationshipIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_4397_10817)\">\n <path\n d=\"M7.75 12.25L15.25 4.75M15.25 4.75H11.5M15.25 4.75V8.5M13 11.5V13.75C13 14.5784 12.3284 15.25 11.5 15.25H6.25C5.42157 15.25 4.75 14.5784 4.75 13.75V8.5C4.75 7.67157 5.42157 7 6.25 7H8.5\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4397_10817\">\n <rect fill=\"currentColor\" height=\"12\" transform=\"translate(4 4)\" width=\"12\" />\n </clipPath>\n </defs>\n </svg>\n)\n", "'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../typesClient.js'\nimport type { RelationshipFeatureProps } from '../feature.server.js'\nimport type { RelationshipData } from '../nodes/RelationshipNode.js'\n\nimport { RelationshipDrawer } from '../drawer/index.js'\nimport { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js'\n\nexport const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData> = createCommand(\n 'INSERT_RELATIONSHIP_COMMAND',\n)\n\nexport const RelationshipPlugin: PluginComponent<RelationshipFeatureProps> = ({ clientProps }) => {\n const [editor] = useLexicalComposerContext()\n const { collections } = useConfig()\n\n let enabledRelations: string[] = null\n\n if (clientProps?.enabledCollections) {\n enabledRelations = clientProps?.enabledCollections\n } else if (clientProps?.disabledCollections) {\n enabledRelations = collections\n .filter(({ slug }) => !clientProps?.disabledCollections?.includes(slug))\n .map(({ slug }) => slug)\n }\n\n useEffect(() => {\n if (!editor.hasNodes([RelationshipNode])) {\n throw new Error('RelationshipPlugin: RelationshipNode not registered on editor')\n }\n\n return editor.registerCommand<RelationshipData>(\n INSERT_RELATIONSHIP_COMMAND,\n (payload) => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const relationshipNode = $createRelationshipNode(payload)\n // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(relationshipNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return <RelationshipDrawer enabledCollectionSlugs={enabledRelations} />\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useListDrawer } from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport { $createRelationshipNode } from '../nodes/RelationshipNode.js'\nimport { INSERT_RELATIONSHIP_COMMAND } from '../plugins/index.js'\nimport { EnabledRelationshipsCondition } from '../utils/EnabledRelationshipsCondition.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './commands.js'\n\nconst insertRelationship = ({\n editor,\n relationTo,\n replaceNodeKey,\n value,\n}: {\n editor: LexicalEditor\n relationTo: string\n replaceNodeKey: null | string\n value: number | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_COMMAND, {\n relationTo,\n value,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace($createRelationshipNode({ relationTo, value }))\n }\n })\n }\n}\n\ntype Props = {\n enabledCollectionSlugs: null | string[]\n}\n\nconst RelationshipDrawerComponent: React.FC<Props> = ({ enabledCollectionSlugs }) => {\n const [editor] = useLexicalComposerContext()\n const [selectedCollectionSlug, setSelectedCollectionSlug] = useState(\n () => enabledCollectionSlugs[0],\n )\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n\n const [ListDrawer, ListDrawerToggler, { closeDrawer, isDrawerOpen, openDrawer }] = useListDrawer({\n collectionSlugs: enabledCollectionSlugs,\n selectedCollection: selectedCollectionSlug,\n })\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openDrawer()\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, openDrawer])\n\n const onSelect = useCallback(\n ({ collectionSlug, docID }) => {\n insertRelationship({\n editor,\n relationTo: collectionSlug,\n replaceNodeKey,\n value: docID,\n })\n closeDrawer()\n },\n [editor, closeDrawer, replaceNodeKey],\n )\n\n useEffect(() => {\n // always reset back to first option\n // TODO: this is not working, see the ListDrawer component\n setSelectedCollectionSlug(enabledCollectionSlugs[0])\n }, [isDrawerOpen, enabledCollectionSlugs])\n\n return <ListDrawer onSelect={onSelect} />\n}\n\nexport const RelationshipDrawer = (props: Props): React.ReactNode => {\n return props?.enabledCollectionSlugs?.length > 0 ? ( // If enabledCollectionSlugs it overrides what EnabledRelationshipsCondition is doing\n <RelationshipDrawerComponent {...props} />\n ) : (\n <EnabledRelationshipsCondition {...props}>\n <RelationshipDrawerComponent {...props} />\n </EnabledRelationshipsCondition>\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { EditorConfigContextType } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport type { SanitizedClientEditorConfig } from '../../../../lexical/config/types.js'\nimport type { PluginComponentWithAnchor } from '../../../typesClient.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../types.js'\nimport type { FixedToolbarFeatureProps } from '../feature.server.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { ToolbarButton } from '../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../shared/ToolbarDropdown/index.js'\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\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 <ToolbarButton editor={editor} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n editorConfig,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { i18n } = useTranslation()\n\n const [dropdownLabel, setDropdownLabel] = React.useState<null | string>(null)\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | null>(null)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n }, [group])\n\n const onActiveChange = ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n setDropdownLabel(null)\n } else {\n setDropdownIcon(null)\n setDropdownLabel(null)\n }\n return\n }\n const item = activeItems[0]\n\n let label = item.key\n if (item.label) {\n label = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n // Crop title to max. 25 characters\n if (label.length > 25) {\n label = label.substring(0, 25) + '...'\n }\n setDropdownLabel(label)\n setDropdownIcon(() => item.ChildComponent)\n }\n\n return (\n <div className={`fixed-toolbar__group fixed-toolbar__group-${group.key}`} key={group.key}>\n {group.type === 'dropdown' &&\n group.items.length &&\n (DropdownIcon ? (\n <ToolbarDropdown\n Icon={DropdownIcon}\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ))}\n {group.type === 'buttons' &&\n group.items.length &&\n group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })}\n {index < editorConfig.features.toolbarFixed?.groups.length - 1 && <div className=\"divider\" />}\n </div>\n )\n}\n\nfunction FixedToolbar({\n anchorElem,\n clientProps,\n editor,\n editorConfig,\n parentWithFixedToolbar,\n}: {\n anchorElem: HTMLElement\n clientProps?: FixedToolbarFeatureProps\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n parentWithFixedToolbar: EditorConfigContextType | false\n}): React.ReactNode {\n const currentToolbarRef = React.useRef<HTMLDivElement>(null)\n\n const { y } = useScrollInfo()\n\n // Memoize the parent toolbar element\n const parentToolbarElem = useMemo(() => {\n if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {\n return null\n }\n\n const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current\n let sibling = parentEditorElem.previousElementSibling\n while (sibling) {\n if (sibling.classList.contains('fixed-toolbar')) {\n return sibling\n }\n sibling = sibling.previousElementSibling\n }\n return null\n }, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar])\n\n useThrottledEffect(\n () => {\n if (!parentToolbarElem) {\n // this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo\n return\n }\n const currentToolbarElem = currentToolbarRef.current\n if (!currentToolbarElem) {\n return\n }\n\n const currentRect = currentToolbarElem.getBoundingClientRect()\n const parentRect = parentToolbarElem.getBoundingClientRect()\n\n // we only need to check for vertical overlap\n const overlapping = !(\n currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom\n )\n\n if (overlapping) {\n currentToolbarRef.current.className = 'fixed-toolbar fixed-toolbar--overlapping'\n parentToolbarElem.className = 'fixed-toolbar fixed-toolbar--hide'\n } else {\n if (!currentToolbarRef.current.classList.contains('fixed-toolbar--overlapping')) {\n return\n }\n currentToolbarRef.current.className = 'fixed-toolbar'\n parentToolbarElem.className = 'fixed-toolbar'\n }\n },\n 50,\n [currentToolbarRef, parentToolbarElem, y],\n )\n\n return (\n <div\n className=\"fixed-toolbar\"\n onFocus={(event) => {\n // Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,\n // the parent editor will be focused, and the child editor will lose focus.\n event.stopPropagation()\n }}\n ref={currentToolbarRef}\n >\n {editor.isEditable() && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarFixed?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nconst getParentEditorWithFixedToolbar = (\n editorConfigContext: EditorConfigContextType,\n): EditorConfigContextType | false => {\n if (editorConfigContext.parentEditor?.editorConfig) {\n if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {\n return editorConfigContext.parentEditor\n } else {\n if (editorConfigContext.parentEditor) {\n return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor)\n }\n }\n }\n return false\n}\n\nexport const FixedToolbarPlugin: PluginComponentWithAnchor<FixedToolbarFeatureProps> = ({\n anchorElem,\n clientProps,\n}) => {\n const [currentEditor] = useLexicalComposerContext()\n const editorConfigContext = useEditorConfigContext()\n\n const { editorConfig: currentEditorConfig } = editorConfigContext\n\n const editor = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editor || currentEditor\n : currentEditor\n\n const editorConfig = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig\n : currentEditorConfig\n\n const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext)\n\n if (clientProps?.disableIfParentHasFixedToolbar) {\n if (parentWithFixedToolbar) {\n return null\n }\n }\n\n if (!editorConfig?.features?.toolbarFixed?.groups?.length) {\n return null\n }\n\n return (\n <FixedToolbar\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n parentWithFixedToolbar={parentWithFixedToolbar}\n />\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { $getSelection } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nconst baseClass = 'toolbar-popup__button'\n\nexport const ToolbarButton = ({\n children,\n editor,\n item,\n}: {\n children: React.JSX.Element\n editor: LexicalEditor\n item: ToolbarGroupItem\n}) => {\n const [enabled, setEnabled] = useState<boolean>(true)\n const [active, setActive] = useState<boolean>(false)\n const [className, setClassName] = useState<string>(baseClass)\n const editorConfigContext = useEditorConfigContext()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if (item.isActive) {\n const isActive = item.isActive({ editor, editorConfigContext, selection })\n if (active !== isActive) {\n setActive(isActive)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, editorConfigContext, selection })\n if (enabled !== isEnabled) {\n setEnabled(isEnabled)\n }\n }\n })\n }, [active, editor, editorConfigContext, 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 return (\n <button\n className={className}\n onClick={() => {\n if (enabled !== false) {\n editor._updateTags = new Set([...editor._updateTags, 'toolbar']) // without setting the tags, our onSelect will not be able to trigger our onChange as focus onChanges are ignored.\n\n editor.focus(() => {\n // We need to wrap the onSelect in the callback, so the editor is properly focused before the onSelect is called.\n item.onSelect({\n editor,\n isActive: active,\n })\n })\n\n return true\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", "'use client'\nimport React, { useCallback, useEffect } from 'react'\n\nconst baseClass = 'toolbar-popup__dropdown'\n\nimport type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport { useTranslation } from '@payloadcms/ui'\nimport { $getSelection } from 'lexical'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { DropDown, DropDownItem } from './DropDown.js'\nconst ToolbarItem = ({\n active,\n anchorElem,\n editor,\n enabled,\n item,\n}: {\n active?: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n}) => {\n const { i18n } = useTranslation()\n\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component\n active={active}\n anchorElem={anchorElem}\n editor={editor}\n enabled={enabled}\n item={item}\n key={item.key}\n />\n )\n )\n }\n\n let title = item.key\n if (item.label) {\n title = typeof item.label === 'function' ? item.label({ i18n }) : item.label\n }\n // Crop title to max. 25 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <DropDownItem active={active} editor={editor} enabled={enabled} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n <span className=\"text\">{title}</span>\n </DropDownItem>\n )\n}\n\nexport const ToolbarDropdown = ({\n Icon,\n anchorElem,\n classNames,\n editor,\n groupKey,\n items,\n itemsContainerClassNames,\n label,\n maxActiveItems,\n onActiveChange,\n}: {\n Icon?: React.FC\n anchorElem: HTMLElement\n classNames?: string[]\n editor: LexicalEditor\n groupKey: string\n items: ToolbarGroupItem[]\n itemsContainerClassNames?: string[]\n label?: string\n /**\n * Maximum number of active items allowed. This is a performance optimization to prevent\n * unnecessary item active checks when the maximum number of active items is reached.\n */\n maxActiveItems?: number\n onActiveChange?: ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => void\n}) => {\n const [activeItemKeys, setActiveItemKeys] = React.useState<string[]>([])\n const [enabledItemKeys, setEnabledItemKeys] = React.useState<string[]>([])\n const editorConfigContext = useEditorConfigContext()\n\n const updateStates = useCallback(() => {\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n\n const _activeItemKeys: string[] = []\n const _activeItems: ToolbarGroupItem[] = []\n const _enabledItemKeys: string[] = []\n\n for (const item of items) {\n if (item.isActive && (!maxActiveItems || _activeItemKeys.length < maxActiveItems)) {\n const isActive = item.isActive({ editor, editorConfigContext, selection })\n if (isActive) {\n _activeItemKeys.push(item.key)\n _activeItems.push(item)\n }\n }\n if (item.isEnabled) {\n const isEnabled = item.isEnabled({ editor, editorConfigContext, selection })\n if (isEnabled) {\n _enabledItemKeys.push(item.key)\n }\n } else {\n _enabledItemKeys.push(item.key)\n }\n }\n setActiveItemKeys(_activeItemKeys)\n setEnabledItemKeys(_enabledItemKeys)\n\n if (onActiveChange) {\n onActiveChange({ activeItems: _activeItems })\n }\n })\n }, [editor, editorConfigContext, items, maxActiveItems, onActiveChange])\n\n useEffect(() => {\n updateStates()\n }, [updateStates])\n\n useEffect(() => {\n document.addEventListener('mouseup', updateStates)\n return () => {\n document.removeEventListener('mouseup', updateStates)\n }\n }, [updateStates])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updateStates()\n }),\n )\n }, [editor, updateStates])\n\n return (\n <DropDown\n Icon={Icon}\n buttonAriaLabel={`${groupKey} dropdown`}\n buttonClassName={[baseClass, `${baseClass}-${groupKey}`, ...(classNames || [])]\n .filter(Boolean)\n .join(' ')}\n itemsContainerClassNames={[`${baseClass}-items`, ...(itemsContainerClassNames || [])]}\n key={groupKey}\n label={label}\n >\n {items.length &&\n items.map((item) => {\n return (\n <ToolbarItem\n active={activeItemKeys.includes(item.key)}\n anchorElem={anchorElem}\n editor={editor}\n enabled={enabledItemKeys.includes(item.key)}\n item={item}\n key={item.key}\n />\n )\n })}\n </DropDown>\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport React, { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { ToolbarGroupItem } from '../../types.js'\n\nconst baseClass = 'toolbar-popup__dropdown-item'\n\ninterface DropDownContextType {\n registerItem: (ref: React.RefObject<HTMLButtonElement | null>) => void\n}\n\nconst DropDownContext = React.createContext<DropDownContextType | null>(null)\n\nexport function DropDownItem({\n active,\n children,\n editor,\n enabled,\n item,\n title,\n}: {\n active?: boolean\n children: React.ReactNode\n editor: LexicalEditor\n enabled?: boolean\n item: ToolbarGroupItem\n title?: string\n}): React.ReactNode {\n const [className, setClassName] = useState<string>(baseClass)\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 editor._updateTags = new Set([...editor._updateTags, 'toolbar']) // without setting the tags, our onSelect will not be able to trigger our onChange as focus onChanges are ignored.\n\n editor.focus(() => {\n // We need to wrap the onSelect in the callback, so the editor is properly focused before the onSelect is called.\n item.onSelect({\n editor,\n isActive: active,\n })\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 itemsContainerClassNames,\n onClose,\n}: {\n children: React.ReactNode\n dropDownRef: React.Ref<HTMLDivElement>\n itemsContainerClassNames?: string[]\n onClose: () => void\n}): React.ReactElement {\n const [items, setItems] = useState<Array<React.RefObject<HTMLButtonElement | null>>>()\n const [highlightedItem, setHighlightedItem] =\n useState<React.RefObject<HTMLButtonElement | null>>()\n\n const registerItem = useCallback(\n (itemRef: React.RefObject<HTMLButtonElement | null>) => {\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 != null && highlightedItem?.current != null) {\n highlightedItem.current.focus()\n }\n }, [items, highlightedItem])\n\n return (\n <DropDownContext.Provider value={contextValue}>\n <div\n className={(itemsContainerClassNames ?? ['toolbar-popup__dropdown-items']).join(' ')}\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 itemsContainerClassNames,\n label,\n stopCloseOnClickSelf,\n}: {\n Icon?: React.FC\n buttonAriaLabel?: string\n buttonClassName: string\n children: ReactNode\n disabled?: boolean\n itemsContainerClassNames?: string[]\n label?: string\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.scrollY || 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 const portal = createPortal(\n <DropDownItems\n dropDownRef={dropDownRef}\n itemsContainerClassNames={itemsContainerClassNames}\n onClose={handleClose}\n >\n {children}\n </DropDownItems>,\n document.body,\n )\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 && <Icon />}\n {label && <span className=\"toolbar-popup__dropdown-label\">{label}</span>}\n <i className=\"toolbar-popup__dropdown-caret\" />\n </button>\n\n {showDropDown && <React.Fragment>{portal}</React.Fragment>}\n </React.Fragment>\n )\n}\n", "'use client'\n\nimport type { FixedToolbarFeatureProps } from './feature.server.js'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { FixedToolbarPlugin } from './Toolbar/index.js'\n\nexport const FixedToolbarFeatureClient = createClientFeature<FixedToolbarFeatureProps>({\n plugins: [\n {\n Component: FixedToolbarPlugin,\n position: 'aboveContainer',\n },\n ],\n})\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n COMMAND_PRIORITY_LOW,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../typesClient.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../types.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { getDOMRangeRect } from '../../../../lexical/utils/getDOMRangeRect.js'\nimport { setFloatingElemPosition } from '../../../../lexical/utils/setFloatingElemPosition.js'\nimport { ToolbarButton } from '../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../shared/ToolbarDropdown/index.js'\nfunction ButtonGroupItem({\n anchorElem,\n editor,\n item,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n item: ToolbarGroupItem\n}): React.ReactNode {\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 <ToolbarButton editor={editor} item={item} key={item.key}>\n {item?.ChildComponent && <item.ChildComponent />}\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n group,\n index,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n group: ToolbarGroup\n index: number\n}): React.ReactNode {\n const { editorConfig } = useEditorConfigContext()\n\n const [DropdownIcon, setDropdownIcon] = React.useState<React.FC | null>(null)\n\n React.useEffect(() => {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n }, [group])\n\n const onActiveChange = ({ activeItems }: { activeItems: ToolbarGroupItem[] }) => {\n if (!activeItems.length) {\n if (group?.type === 'dropdown' && group.items.length && group.ChildComponent) {\n setDropdownIcon(() => group.ChildComponent)\n } else {\n setDropdownIcon(null)\n }\n return\n }\n const item = activeItems[0]\n setDropdownIcon(() => item.ChildComponent)\n }\n\n return (\n <div\n className={`inline-toolbar-popup__group inline-toolbar-popup__group-${group.key}`}\n key={group.key}\n >\n {group.type === 'dropdown' &&\n group.items.length &&\n (DropdownIcon ? (\n <ToolbarDropdown\n Icon={DropdownIcon}\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ) : (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n groupKey={group.key}\n items={group.items}\n maxActiveItems={1}\n onActiveChange={onActiveChange}\n />\n ))}\n {group.type === 'buttons' &&\n group.items.length &&\n group.items.map((item) => {\n return (\n <ButtonGroupItem anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n })}\n {index < editorConfig.features.toolbarInline?.groups.length - 1 && (\n <div className=\"divider\" />\n )}\n </div>\n )\n}\n\nfunction InlineToolbar({\n anchorElem,\n editor,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n}): React.ReactNode {\n const floatingToolbarRef = useRef<HTMLDivElement | null>(null)\n const caretRef = useRef<HTMLDivElement | null>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const closeFloatingToolbar = useCallback(() => {\n if (floatingToolbarRef?.current) {\n const isOpacityZero = floatingToolbarRef.current.style.opacity === '0'\n const isPointerEventsNone = floatingToolbarRef.current.style.pointerEvents === 'none'\n\n if (!isOpacityZero) {\n floatingToolbarRef.current.style.opacity = '0'\n }\n if (!isPointerEventsNone) {\n floatingToolbarRef.current.style.pointerEvents = 'none'\n }\n }\n }, [floatingToolbarRef])\n\n const mouseMoveListener = useCallback(\n (e: MouseEvent) => {\n if (floatingToolbarRef?.current && (e.buttons === 1 || e.buttons === 3)) {\n const isOpacityZero = floatingToolbarRef.current.style.opacity === '0'\n const isPointerEventsNone = floatingToolbarRef.current.style.pointerEvents === 'none'\n if (!isOpacityZero || !isPointerEventsNone) {\n // Check if the mouse is not over the popup\n const x = e.clientX\n const y = e.clientY\n const elementUnderMouse = document.elementFromPoint(x, y)\n if (!floatingToolbarRef.current.contains(elementUnderMouse)) {\n // Mouse is not over the target element => not a normal click, but probably a drag\n closeFloatingToolbar()\n }\n }\n }\n },\n [closeFloatingToolbar],\n )\n\n const mouseUpListener = useCallback(() => {\n if (floatingToolbarRef?.current) {\n if (floatingToolbarRef.current.style.opacity !== '1') {\n floatingToolbarRef.current.style.opacity = '1'\n }\n if (floatingToolbarRef.current.style.pointerEvents !== 'auto') {\n floatingToolbarRef.current.style.pointerEvents = 'auto'\n }\n }\n }, [])\n\n useEffect(() => {\n document.addEventListener('mousemove', mouseMoveListener)\n document.addEventListener('mouseup', mouseUpListener)\n\n return () => {\n document.removeEventListener('mousemove', mouseMoveListener)\n document.removeEventListener('mouseup', mouseUpListener)\n }\n }, [floatingToolbarRef, mouseMoveListener, mouseUpListener])\n\n const $updateTextFormatFloatingToolbar = useCallback(() => {\n const selection = $getSelection()\n\n const nativeSelection = window.getSelection()\n\n if (floatingToolbarRef.current === null) {\n return\n }\n\n const possibleLinkEditor = anchorElem.querySelector(':scope > .link-editor')\n const isLinkEditorVisible =\n possibleLinkEditor !== null &&\n 'style' in possibleLinkEditor &&\n possibleLinkEditor?.style?.['opacity'] === '1'\n\n const rootElement = editor.getRootElement()\n if (\n selection !== null &&\n nativeSelection !== null &&\n !nativeSelection.isCollapsed &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n const rangeRect = getDOMRangeRect(nativeSelection, rootElement)\n\n // Position floating toolbar\n const offsetIfFlipped = setFloatingElemPosition({\n alwaysDisplayOnTop: isLinkEditorVisible,\n anchorElem,\n floatingElem: floatingToolbarRef.current,\n horizontalPosition: 'center',\n targetRect: rangeRect,\n })\n\n // Position caret\n if (caretRef.current) {\n setFloatingElemPosition({\n anchorElem: floatingToolbarRef.current,\n anchorFlippedOffset: offsetIfFlipped,\n floatingElem: caretRef.current,\n horizontalOffset: 5,\n horizontalPosition: 'center',\n specialHandlingForCaret: true,\n targetRect: rangeRect,\n verticalGap: 10,\n })\n }\n } else {\n closeFloatingToolbar()\n }\n }, [editor, closeFloatingToolbar, anchorElem])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = () => {\n editor.getEditorState().read(() => {\n $updateTextFormatFloatingToolbar()\n })\n }\n\n window.addEventListener('resize', update)\n if (scrollerElem) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n if (scrollerElem) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [editor, $updateTextFormatFloatingToolbar, anchorElem])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n $updateTextFormatFloatingToolbar()\n })\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n $updateTextFormatFloatingToolbar()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n $updateTextFormatFloatingToolbar()\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, $updateTextFormatFloatingToolbar])\n\n return (\n <div className=\"inline-toolbar-popup\" ref={floatingToolbarRef}>\n <div className=\"caret\" ref={caretRef} />\n {editor.isEditable() && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarInline?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n index={i}\n key={group.key}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nfunction useInlineToolbar(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n): React.ReactElement | null {\n const [isText, setIsText] = useState(false)\n\n const updatePopup = useCallback(() => {\n editor.getEditorState().read(() => {\n // Should not to pop up the floating toolbar when using IME input\n if (editor.isComposing()) {\n return\n }\n const selection = $getSelection()\n const nativeSelection = window.getSelection()\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n (!$isRangeSelection(selection) ||\n rootElement === null ||\n !rootElement.contains(nativeSelection.anchorNode))\n ) {\n setIsText(false)\n return\n }\n\n if (!$isRangeSelection(selection)) {\n return\n }\n\n if (selection.getTextContent() !== '') {\n const nodes = selection.getNodes()\n let foundNodeWithText = false\n for (const node of nodes) {\n if ($isTextNode(node)) {\n setIsText(true)\n foundNodeWithText = true\n break\n }\n }\n if (!foundNodeWithText) {\n setIsText(false)\n }\n } else {\n setIsText(false)\n }\n\n const rawTextContent = selection.getTextContent().replace(/\\n/g, '')\n if (!selection.isCollapsed() && rawTextContent === '') {\n setIsText(false)\n return\n }\n })\n }, [editor])\n\n useEffect(() => {\n document.addEventListener('selectionchange', updatePopup)\n document.addEventListener('mouseup', updatePopup)\n return () => {\n document.removeEventListener('selectionchange', updatePopup)\n document.removeEventListener('mouseup', updatePopup)\n }\n }, [updatePopup])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(() => {\n updatePopup()\n }),\n editor.registerRootListener(() => {\n if (editor.getRootElement() === null) {\n setIsText(false)\n }\n }),\n )\n }, [editor, updatePopup])\n\n if (!isText) {\n return null\n }\n\n return createPortal(<InlineToolbar anchorElem={anchorElem} editor={editor} />, anchorElem)\n}\n\nexport const InlineToolbarPlugin: PluginComponentWithAnchor<undefined> = ({ anchorElem }) => {\n const [editor] = useLexicalComposerContext()\n\n return useInlineToolbar(editor, anchorElem)\n}\n", "export function getDOMRangeRect(nativeSelection: Selection, rootElement: HTMLElement): DOMRect {\n const domRange = nativeSelection.getRangeAt(0)\n\n let rect\n\n if (nativeSelection.anchorNode === rootElement) {\n let inner = rootElement\n while (inner.firstElementChild != null) {\n inner = inner.firstElementChild as HTMLElement\n }\n rect = inner.getBoundingClientRect()\n } else {\n rect = domRange.getBoundingClientRect()\n }\n\n return rect\n}\n", "const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\n// TODO: needs refactoring\n// This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.\n// So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).\n// This is used for positioning the floating toolbar (anchor: richtext editor) and its caret (anchor: floating toolbar)\nexport function setFloatingElemPosition(args: {\n alwaysDisplayOnTop?: boolean\n anchorElem: HTMLElement\n anchorFlippedOffset?: number // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem: HTMLElement\n horizontalOffset?: number\n horizontalPosition?: 'center' | 'left'\n specialHandlingForCaret?: boolean\n targetRect: ClientRect | null\n verticalGap?: number\n}): number {\n const {\n alwaysDisplayOnTop = false,\n anchorElem,\n anchorFlippedOffset = 0, // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem,\n horizontalOffset = HORIZONTAL_OFFSET,\n horizontalPosition = 'left',\n specialHandlingForCaret = false,\n targetRect,\n verticalGap = VERTICAL_GAP,\n } = args\n // Returns the top offset if the target was flipped\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - floatingElemRect.height - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (horizontalPosition === 'center') {\n // Calculate left to position floatingElem to the horizontal middle of targetRect\n left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2\n }\n\n let addedToTop = 0\n if (!alwaysDisplayOnTop && top < editorScrollerRect.top && !specialHandlingForCaret) {\n addedToTop = floatingElemRect.height + targetRect.height + verticalGap * 2\n\n top += addedToTop\n }\n\n if (horizontalPosition === 'center') {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n } else if (left < editorScrollerRect.left) {\n left = editorScrollerRect.left + horizontalOffset\n }\n } else {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n }\n\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n\n if (specialHandlingForCaret && anchorFlippedOffset !== 0) {\n // Floating select toolbar was flipped (positioned below text rather than above). Thus, the caret now needs to be positioned\n // on the other side and rotated.\n top -= anchorElementRect.bottom - anchorFlippedOffset + floatingElemRect.height - 3\n // top += anchorFlippedOffset - anchorElementRect.height - floatingElemRect.height + 2\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else {\n top -= anchorElementRect.top\n\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n }\n\n return addedToTop\n}\n", "'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { InlineToolbarPlugin } from './Toolbar/index.js'\n\nexport const InlineToolbarFeatureClient = createClientFeature({\n plugins: [\n {\n Component: InlineToolbarPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n})\n", "'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport { UploadIcon } from '../../lexical/ui/icons/Upload/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isUploadNode, UploadNode } from './nodes/UploadNode.js'\nimport { UploadPlugin } from './plugin/index.js'\n\nexport type UploadFeaturePropsClient = {\n collections: {\n [collection: string]: {\n hasExtraFields: boolean\n }\n }\n}\n\nexport const UploadFeatureClient = createClientFeature<UploadFeaturePropsClient>({\n nodes: [UploadNode],\n plugins: [\n {\n Component: UploadPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: UploadIcon,\n key: 'upload',\n keywords: ['upload', 'image', 'file', 'img', 'picture', 'photo', 'media'],\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: UploadIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isUploadNode(firstNode)\n },\n key: 'upload',\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n", "import React from 'react'\n\nexport const UploadIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z\"\n stroke=\"#currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n", "'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponentWithAnchor } from '../../typesClient.js'\nimport type { UploadFeaturePropsClient } from '../feature.client.js'\nimport type { UploadData } from '../nodes/UploadNode.js'\n\nimport { UploadDrawer } from '../drawer/index.js'\nimport { $createUploadNode, UploadNode } from '../nodes/UploadNode.js'\n\nexport type InsertUploadPayload = Readonly<Omit<UploadData, 'id'> & Partial<Pick<UploadData, 'id'>>>\n\nexport const INSERT_UPLOAD_COMMAND: LexicalCommand<InsertUploadPayload> =\n createCommand('INSERT_UPLOAD_COMMAND')\n\nexport const UploadPlugin: PluginComponentWithAnchor<UploadFeaturePropsClient> = ({\n clientProps,\n}) => {\n const [editor] = useLexicalComposerContext()\n const { collections } = useConfig()\n\n useEffect(() => {\n if (!editor.hasNodes([UploadNode])) {\n throw new Error('UploadPlugin: UploadNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertUploadPayload>(\n INSERT_UPLOAD_COMMAND,\n (payload: InsertUploadPayload) => {\n editor.update(() => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const uploadNode = $createUploadNode({\n data: {\n id: payload.id,\n fields: payload.fields,\n relationTo: payload.relationTo,\n value: payload.value,\n },\n })\n // Insert upload node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(uploadNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor])\n\n return <UploadDrawer enabledCollectionSlugs={collections.map(({ slug }) => slug)} />\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useListDrawer } from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport { EnabledRelationshipsCondition } from '../../relationship/utils/EnabledRelationshipsCondition.js'\nimport { $createUploadNode } from '../nodes/UploadNode.js'\nimport { INSERT_UPLOAD_COMMAND } from '../plugin/index.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './commands.js'\n\nconst insertUpload = ({\n editor,\n relationTo,\n replaceNodeKey,\n value,\n}: {\n editor: LexicalEditor\n relationTo: string\n replaceNodeKey: null | string\n value: number | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_UPLOAD_COMMAND, {\n fields: null,\n relationTo,\n value,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace(\n $createUploadNode({\n data: {\n fields: null,\n relationTo,\n value,\n },\n }),\n )\n }\n })\n }\n}\n\ntype Props = {\n enabledCollectionSlugs: string[]\n}\n\nconst UploadDrawerComponent: React.FC<Props> = ({ enabledCollectionSlugs }) => {\n const [editor] = useLexicalComposerContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n\n const [ListDrawer, ListDrawerToggler, { closeDrawer, openDrawer }] = useListDrawer({\n collectionSlugs: enabledCollectionSlugs,\n uploads: true,\n })\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_UPLOAD_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openDrawer()\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, openDrawer])\n\n const onSelect = useCallback(\n ({ collectionSlug, docID }) => {\n insertUpload({\n editor,\n relationTo: collectionSlug,\n replaceNodeKey,\n value: docID,\n })\n closeDrawer()\n },\n [editor, closeDrawer, replaceNodeKey],\n )\n\n return <ListDrawer onSelect={onSelect} />\n}\n\nexport const UploadDrawer = (props: Props): React.ReactNode => {\n return (\n <EnabledRelationshipsCondition {...props} uploads>\n <UploadDrawerComponent {...props} />\n </EnabledRelationshipsCondition>\n )\n}\n", "'use client'\nimport type { FormFieldBase } from '@payloadcms/ui'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui'\nimport React, { Suspense, lazy, useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../lexical/config/client/default.js'\nimport { loadClientFeatures } from '../lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../lexical/config/client/sanitize.js'\n\nconst RichTextEditor = lazy(() =>\n import('./Field.js').then((module) => ({ default: module.RichText })),\n)\n\nexport const RichTextField: React.FC<\n FormFieldBase & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n const { schemaPath } = useFieldProps()\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<\n FeatureProviderClient<unknown, unknown>[]\n >([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n let featureProviderComponents: GeneratedFeatureProviderComponent[] = richTextComponentMap.get(\n 'features',\n ) as GeneratedFeatureProviderComponent[]\n // order by order\n featureProviderComponents = featureProviderComponents.sort((a, b) => a.order - b.order)\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown, unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n featureProvidersAndComponentsToLoad,\n ])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n }) // TODO: Type better\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientFeature}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n {finalSanitizedEditorConfig && (\n <RichTextEditor {...props} editorConfig={finalSanitizedEditorConfig} />\n )}\n </Suspense>\n )\n}\n", "export function cloneDeep<T>(object: T, cache: WeakMap<any, any> = new WeakMap()): T {\n if (object === null) return null\n\n if (cache.has(object)) {\n return cache.get(object)\n }\n\n // Handle Date\n if (object instanceof Date) {\n return new Date(object.getTime()) as unknown as T\n }\n\n // Handle RegExp\n if (object instanceof RegExp) {\n return new RegExp(object.source, object.flags) as unknown as T\n }\n\n // Handle Map\n if (object instanceof Map) {\n const clonedMap = new Map()\n cache.set(object, clonedMap)\n for (const [key, value] of object.entries()) {\n clonedMap.set(key, cloneDeep(value, cache))\n }\n return clonedMap as unknown as T\n }\n\n // Handle Set\n if (object instanceof Set) {\n const clonedSet = new Set()\n cache.set(object, clonedSet)\n for (const value of object.values()) {\n clonedSet.add(cloneDeep(value, cache))\n }\n return clonedSet as unknown as T\n }\n\n // Handle Array and Object\n if (typeof object === 'object' && object !== null) {\n if ('$$typeof' in object && typeof object.$$typeof === 'symbol') {\n return object\n }\n\n const clonedObject: any = Array.isArray(object)\n ? []\n : Object.create(Object.getPrototypeOf(object))\n cache.set(object, clonedObject)\n\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) ||\n Object.getOwnPropertySymbols(object).includes(key as any)\n ) {\n clonedObject[key] = cloneDeep(object[key], cache)\n }\n }\n\n return clonedObject as T\n }\n\n // Handle all other cases\n return object\n}\n", "export function joinClasses(...args: Array<boolean | null | string | undefined>): string {\n return args.filter(Boolean).join(' ')\n}\n", "type Force = [number, number]\ntype Listener = (force: Force, e: TouchEvent) => void\ninterface ElementValues {\n handleTouchend: (e: TouchEvent) => void\n handleTouchstart: (e: TouchEvent) => void\n listeners: Set<Listener>\n start: Force | null\n}\n\nconst elements = new WeakMap<HTMLElement, ElementValues>()\n\nfunction readTouch(e: TouchEvent): [number, number] | null {\n const touch = e.changedTouches[0]\n if (touch === undefined) {\n return null\n }\n return [touch.clientX, touch.clientY]\n}\n\nfunction addListener(element: HTMLElement, cb: Listener): () => void {\n let elementValues = elements.get(element)\n if (elementValues === undefined) {\n const listeners = new Set<Listener>()\n const handleTouchstart = (e: TouchEvent): void => {\n if (elementValues !== undefined) {\n elementValues.start = readTouch(e)\n }\n }\n const handleTouchend = (e: TouchEvent): void => {\n if (elementValues === undefined) {\n return\n }\n const { start } = elementValues\n if (start === null) {\n return\n }\n const end = readTouch(e)\n for (const listener of listeners) {\n if (end !== null) {\n listener([end[0] - start[0], end[1] - start[1]], e)\n }\n }\n }\n element.addEventListener('touchstart', handleTouchstart)\n element.addEventListener('touchend', handleTouchend)\n\n elementValues = {\n handleTouchend,\n handleTouchstart,\n listeners,\n start: null,\n }\n elements.set(element, elementValues)\n }\n elementValues.listeners.add(cb)\n return () => {\n deleteListener(element, cb)\n }\n}\n\nfunction deleteListener(element: HTMLElement, cb: Listener): void {\n const elementValues = elements.get(element)\n if (elementValues === undefined) {\n return\n }\n const { listeners } = elementValues\n listeners.delete(cb)\n if (listeners.size === 0) {\n elements.delete(element)\n element.removeEventListener('touchstart', elementValues.handleTouchstart)\n element.removeEventListener('touchend', elementValues.handleTouchend)\n }\n}\n\nexport function addSwipeLeftListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (x < 0 && -x > Math.abs(y)) {\n cb(x, e)\n }\n })\n}\n\nexport function addSwipeRightListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (x > 0 && x > Math.abs(y)) {\n cb(x, e)\n }\n })\n}\n\nexport function addSwipeUpListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (y < 0 && -y > Math.abs(x)) {\n cb(x, e)\n }\n })\n}\n\nexport function addSwipeDownListener(\n element: HTMLElement,\n cb: (_force: number, e: TouchEvent) => void,\n): () => void {\n return addListener(element, (force, e) => {\n const [x, y] = force\n if (y > 0 && y > Math.abs(x)) {\n cb(x, e)\n }\n })\n}\n"],
5
+ "mappings": "yVAIA,OAAS,wBAAAA,OAA4B,oBACrC,OAAS,sBAAAC,GAAoB,gBAAAC,OAAoB,iBACjD,OAAS,YAAAC,OAAgB,UACzB,OAAOC,IAAS,aAAAC,GAAW,YAAAC,OAAgB,QCLpC,IAAMC,GAAyC,CACpD,MAAO,4BACP,YAAa,kCACb,eAAgB,qCAChB,KAAM,2BACN,cAAe,CACb,OAAQ,gCACR,KAAM,gCACN,QAAS,oCACT,QAAS,oCACT,MAAO,mCACP,KAAM,oCACN,MAAO,oCACP,aAAc,oCACd,QAAS,mCACT,SAAU,oCACV,QAAS,oCACT,QAAS,mCACT,OAAQ,oCACR,SAAU,oCACV,UAAW,oCACX,SAAU,oCACV,QAAS,gCACT,UAAW,oCACX,OAAQ,oCACR,SAAU,oCACV,OAAQ,mCACR,SAAU,oCACV,YAAa,uCACb,MAAO,oCACP,SAAU,oCACV,OAAQ,oCACR,OAAQ,oCACR,IAAK,oCACL,IAAK,oCACL,SAAU,mCACZ,EACA,WAAY,CACV,KAAM,iCACN,MAAO,qCACT,EACA,QAAS,8BACT,QAAS,CACP,GAAI,yBACJ,GAAI,yBACJ,GAAI,yBACJ,GAAI,yBACJ,GAAI,yBACJ,GAAI,wBACN,EACA,GAAI,yBACJ,OAAQ,6BACR,YAAa,8BACb,KAAM,2BACN,KAAM,CACJ,UAAW,gCACX,SAAU,+BACV,gBAAiB,sCACjB,kBAAmB,wCACnB,OAAQ,CACN,SAAU,oCACZ,EACA,QAAS,CACP,0BACA,0BACA,0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tBC,EAAU,OAAOF,CAAE,EACfE,EAAU,OAAS,IACrBP,GAAS,OAAOI,CAAO,EACvBA,EAAQ,oBAAoB,aAAcE,EAAc,gBAAgB,EACxEF,EAAQ,oBAAoB,WAAYE,EAAc,cAAc,EAExE,CAEO,SAASS,GACdX,EACAC,EACY,CACZ,OAAOF,GAAYC,EAAS,CAACY,EAAOP,IAAM,CACxC,GAAM,CAACQ,EAAGC,CAAC,EAAIF,EACXC,EAAI,GAAK,CAACA,EAAI,KAAK,IAAIC,CAAC,GAC1Bb,EAAGY,EAAGR,CAAC,CAEX,CAAC,CACH,CAEO,SAASU,GACdf,EACAC,EACY,CACZ,OAAOF,GAAYC,EAAS,CAACY,EAAOP,IAAM,CACxC,GAAM,CAACQ,EAAGC,CAAC,EAAIF,EACXC,EAAI,GAAKA,EAAI,KAAK,IAAIC,CAAC,GACzBb,EAAGY,EAAGR,CAAC,CAEX,CAAC,CACH,CAEO,SAASW,GACdhB,EACAC,EACY,CACZ,OAAOF,GAAYC,EAAS,CAACY,EAAOP,IAAM,CACxC,GAAM,CAACQ,EAAGC,CAAC,EAAIF,EACXE,EAAI,GAAK,CAACA,EAAI,KAAK,IAAID,CAAC,GAC1BZ,EAAGY,EAAGR,CAAC,CAEX,CAAC,CACH,CAEO,SAASY,GACdjB,EACAC,EACY,CACZ,OAAOF,GAAYC,EAAS,CAACY,EAAOP,IAAM,CACxC,GAAM,CAACQ,EAAGC,CAAC,EAAIF,EACXE,EAAI,GAAKA,EAAI,KAAK,IAAID,CAAC,GACzBZ,EAAGY,EAAGR,CAAC,CAEX,CAAC,CACH",
6
+ "names": ["createHeadlessEditor", "useClientFunctions", "useTableCell", "$getRoot", "React", "useEffect", "useState", "LexicalEditorTheme", "defaultEditorLexicalConfig", "LexicalEditorTheme", "loadClientFeatures", "clientFunctions", "schemaPath", "unSanitizedEditorConfig", "featureProvider", "a", "b", "featureProviderMap", "f", "resolvedFeatures", "loaded", "relevantClientFunctions", "key", "plugin", "featureComponentKey", "feature", "sanitizeClientFeatures", "features", "sanitized", "feature", "plugin", "i", "group", "foundGroup", "sanitizedGroup", "optionGroup", "a", "b", "sanitizeClientEditorConfig", "lexical", "resolvedClientFeatureMap", "admin", "jsx", "jsxs", "RichTextCell", "props", "admin", "lexicalEditorConfig", "richTextComponentMap", "preview", "setPreview", "React", "cellData", "schemaPath", "useTableCell", "clientFunctions", "useClientFunctions", "hasLoadedFeatures", "setHasLoadedFeatures", "useState", "featureProviders", "setFeatureProviders", "finalSanitizedEditorConfig", "setFinalSanitizedEditorConfig", "featureProviderComponents", "a", "b", "featureProvidersAndComponentsToLoad", "featureProvider", "featureComponentKeys", "key", "useEffect", "featureProvidersLocal", "featureProvidersAndComponentsLoaded", "plugin", "resolvedClientFeatures", "loadClientFeatures", "sanitizeClientEditorConfig", "defaultEditorLexicalConfig", "dataToUse", "hook", "headlessEditor", "createHeadlessEditor", "getEnabledNodes", "textContent", "$getRoot", "featureComponents", "FeatureComponent", "$isElementNode", "$isRangeSelection", "FORMAT_ELEMENT_COMMAND", "jsx", "jsxs", "AlignCenterIcon", "jsx", "jsxs", "AlignJustifyIcon", "jsx", "jsxs", "AlignLeftIcon", "jsx", "jsxs", "AlignRightIcon", "useAddClientFunction", "useFieldProps", "useTableCell", "useLexicalFeature", "featureKey", "feature", "schemaPathFromFieldProps", "schemaPath", "createClientComponent", "clientFeature", "props", "useLexicalFeature", "createClientFeature", "feature", "createClientComponent", "props", "featureProviderClient", "clientFunctions", "featureProviderMap", "resolvedFeatures", "unSanitizedEditorConfig", "toReturn", "toolbarAlignGroupWithItems", "items", "AlignLeftIcon", "toolbarGroups", "toolbarAlignGroupWithItems", "AlignLeftIcon", "selection", "$isRangeSelection", "node", "$isElementNode", "parent", "i18n", "editor", "FORMAT_ELEMENT_COMMAND", "AlignCenterIcon", "AlignRightIcon", "AlignJustifyIcon", "AlignFeatureClient", "createClientFeature", "$createQuoteNode", "$isQuoteNode", "QuoteNode", "$setBlocksType", "$getSelection", "$isRangeSelection", "jsx", "BlockquoteIcon", "slashMenuBasicGroupWithItems", "items", "i18n", "jsx", "TextIcon", "toolbarTextDropdownGroupWithItems", "items", "TextIcon", "$createQuoteNode", "$isQuoteNode", "QuoteNode", "$createLineBreakNode", "MarkdownTransformer", "node", "exportChildren", "lines", "output", "line", "parentNode", "children", "_match", "isImport", "previousNode", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "BlockquoteIcon", "selection", "$isRangeSelection", "node", "$isQuoteNode", "i18n", "editor", "$getSelection", "$setBlocksType", "$createQuoteNode", "BlockquoteFeatureClient", "createClientFeature", "MarkdownTransformer", "QuoteNode", "slashMenuBasicGroupWithItems", "getTranslation", "jsx", "jsxs", "BlockIcon", "DecoratorBlockNode", "ObjectID", "React", "jsx", "BlockComponent", "module", "BlockNode", "_BlockNode", "fields", "format", "key", "node", "serializedNode", "$createBlockNode", "editor", "config", "element", "text", "fieldsCopy", "writable", "$isBlockNode", "createCommand", "INSERT_BLOCK_COMMAND", "useLexicalComposerContext", "$insertNodeToNearestRoot", "mergeRegister", "$getPreviousSelection", "$getSelection", "$isParagraphNode", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "useEffect", "useLexicalComposerContext", "BlocksDrawer", "formatDrawerSlug", "useEditDepth", "useModal", "useTranslation", "$getNodeByKey", "COMMAND_PRIORITY_EDITOR", "createCommand", "useCallback", "useEffect", "useState", "jsx", "INSERT_BLOCK_WITH_DRAWER_COMMAND", "createCommand", "insertBlock", "blockType", "editor", "replaceNodeKey", "node", "$getNodeByKey", "$createBlockNode", "INSERT_BLOCK_COMMAND", "BlocksDrawerComponent", "useLexicalComposerContext", "editorConfig", "uuid", "useEditorConfigContext", "setReplaceNodeKey", "useState", "editDepth", "useEditDepth", "t", "useTranslation", "openModal", "useModal", "labels", "addRow", "useCallback", "rowIndex", "drawerSlug", "formatDrawerSlug", "reducedBlocks", "useEffect", "payload", "COMMAND_PRIORITY_EDITOR", "jsx", "BlocksDrawer", "jsx", "BlocksPlugin", "editor", "useLexicalComposerContext", "useEffect", "BlockNode", "mergeRegister", "INSERT_BLOCK_COMMAND", "payload", "selection", "$getSelection", "$getPreviousSelection", "$isRangeSelection", "blockNode", "$createBlockNode", "$insertNodeToNearestRoot", "focus", "focusNode", "$isParagraphNode", "node", "COMMAND_PRIORITY_EDITOR", "BlocksDrawerComponent", "BlocksFeatureClient", "createClientFeature", "props", "BlockNode", "BlocksPlugin", "block", "BlockIcon", "i18n", "getTranslation", "editor", "INSERT_BLOCK_COMMAND", "index", "useLexicalComposerContext", "$createParagraphNode", "$createTextNode", "$getRoot", "React", "useCallback", "useEffect", "useLayoutEffect", "useRef", "useState", "CAN_USE_DOM", "documentMode", "CAN_USE_DOM", "IS_APPLE", "IS_FIREFOX", "CAN_USE_BEFORE_INPUT", "IS_SAFARI", "IS_IOS", "IS_ANDROID", "IS_WINDOWS", "IS_CHROME", "IS_APPLE_WEBKIT", "jsx", "jsxs", "copy", "text", "textArea", "result", "error", "download", "filename", "a", "formatStep", "step", "formattedStep", "name", "value", "isSelectAll", "event", "IS_APPLE", "sanitizeSelection", "selection", "anchorNode", "focusNode", "anchorOffset", "focusOffset", "getPathFromNodeToEditor", "node", "rootElement", "currentNode", "path", "keyPresses", "useTestRecorder", "editor", "steps", "setSteps", "useState", "isRecording", "setIsRecording", "setCurrentInnerHTML", "templatedTest", "setTemplatedTest", "previousSelectionRef", "useRef", "skipNextSelectionChangeRef", "preRef", "getCurrentEditor", "useCallback", "generateTestContent", "browserSelection", "pushStep", "currentSteps", "currentIndex", "lastStep", "useLayoutEffect", "onKeyDown", "key", "onKeyUp", "prevRootElement", "useEffect", "testContent", "dirtyElements", "dirtyLeaves", "editorState", "currentSelection", "previousSelection", "skipNextSelectionChange", "toggleEditorSelection", "currentEditor", "root", "$getRoot", "$createTextNode", "$createParagraphNode", "currentIsRecording", "onSnapshotClick", "anchorPath", "focusPath", "onCopyClick", "onDownloadClick", "e", "TestRecorderPlugin", "useLexicalComposerContext", "testRecorderButton", "testRecorderOutput", "TestRecorderFeatureClient", "createClientFeature", "TestRecorderPlugin", "useLexicalComposerContext", "TreeView", "jsx", "TreeViewPlugin", "editor", "TreeViewFeatureClient", "createClientFeature", "TreeViewPlugin", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "BoldIcon", "toolbarFormatGroupWithItems", "items", "BOLD_ITALIC_STAR", "BOLD_ITALIC_UNDERSCORE", "BOLD_STAR", "BOLD_UNDERSCORE", "toolbarGroups", "toolbarFormatGroupWithItems", "BoldIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "BoldFeatureClient", "createClientFeature", "featureProviderMap", "markdownTransformers", "BOLD_STAR", "BOLD_UNDERSCORE", "BOLD_ITALIC_UNDERSCORE", "BOLD_ITALIC_STAR", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "jsxs", "CodeIcon", "INLINE_CODE", "toolbarGroups", "toolbarFormatGroupWithItems", "CodeIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "InlineCodeFeatureClient", "createClientFeature", "INLINE_CODE", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "ItalicIcon", "ITALIC_STAR", "ITALIC_UNDERSCORE", "toolbarGroups", "toolbarFormatGroupWithItems", "ItalicIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "ItalicFeatureClient", "createClientFeature", "ITALIC_STAR", "ITALIC_UNDERSCORE", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "jsxs", "StrikethroughIcon", "STRIKETHROUGH", "toolbarGroups", "toolbarFormatGroupWithItems", "StrikethroughIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "StrikethroughFeatureClient", "createClientFeature", "STRIKETHROUGH", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "SubscriptIcon", "toolbarGroups", "toolbarFormatGroupWithItems", "SubscriptIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "SubscriptFeatureClient", "createClientFeature", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "SuperscriptIcon", "toolbarGroups", "toolbarFormatGroupWithItems", "SuperscriptIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "SuperscriptFeatureClient", "createClientFeature", "$isRangeSelection", "FORMAT_TEXT_COMMAND", "jsx", "jsxs", "UnderlineIcon", "toolbarGroups", "toolbarFormatGroupWithItems", "UnderlineIcon", "selection", "$isRangeSelection", "editor", "FORMAT_TEXT_COMMAND", "UnderlineFeatureClient", "createClientFeature", "$createHeadingNode", "$isHeadingNode", "HeadingNode", "$setBlocksType", "$getSelection", "$isRangeSelection", "jsx", "H1Icon", "jsx", "H2Icon", "jsx", "H3Icon", "jsx", "H4Icon", "jsx", "H5Icon", "jsx", "H6Icon", "$createHeadingNode", "$isHeadingNode", "HeadingNode", "createBlockNode", "createNode", "parentNode", "children", "match", "node", "MarkdownTransformer", "enabledHeadingSizes", "pattern", "tag", "size", "regExp", "HeadingNode", "node", "exportChildren", "$isHeadingNode", "level", "createBlockNode", "match", "$createHeadingNode", "$setHeading", "headingSize", "selection", "$getSelection", "$setBlocksType", "$createHeadingNode", "iconImports", "H1Icon", "H2Icon", "H3Icon", "H4Icon", "H5Icon", "H6Icon", "HeadingFeatureClient", "createClientFeature", "props", "enabledHeadingSizes", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "i", "$isRangeSelection", "node", "$isHeadingNode", "parent", "i18n", "editor", "MarkdownTransformer", "HeadingNode", "slashMenuBasicGroupWithItems", "$isNodeSelection", "jsx", "HorizontalRuleIcon", "jsx", "jsxs", "AddIcon", "toolbarAddDropdownGroupWithItems", "items", "AddIcon", "MarkdownTransformer", "HorizontalRuleNode", "node", "exportChildren", "$isHorizontalRuleNode", "parentNode", "$createHorizontalRuleNode", "useLexicalComposerContext", "$insertNodeToNearestRoot", "$getSelection", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "useEffect", "HorizontalRulePlugin", "editor", "useLexicalComposerContext", "useEffect", "INSERT_HORIZONTAL_RULE_COMMAND", "type", "selection", "$getSelection", "$isRangeSelection", "horizontalRuleNode", "$createHorizontalRuleNode", "$insertNodeToNearestRoot", "COMMAND_PRIORITY_EDITOR", "HorizontalRuleFeatureClient", "createClientFeature", "MarkdownTransformer", "HorizontalRuleNode", "HorizontalRulePlugin", "slashMenuBasicGroupWithItems", "HorizontalRuleIcon", "i18n", "editor", "INSERT_HORIZONTAL_RULE_COMMAND", "toolbarAddDropdownGroupWithItems", "selection", "$isNodeSelection", "firstNode", "$isHorizontalRuleNode", "INDENT_CONTENT_COMMAND", "OUTDENT_CONTENT_COMMAND", "jsx", "jsxs", "IndentDecreaseIcon", "jsx", "jsxs", "IndentIncreaseIcon", "toolbarIndentGroupWithItems", "items", "toolbarGroups", "toolbarIndentGroupWithItems", "IndentDecreaseIcon", "selection", "node", "i18n", "editor", "OUTDENT_CONTENT_COMMAND", "IndentIncreaseIcon", "INDENT_CONTENT_COMMAND", "IndentFeatureClient", "createClientFeature", "$findMatchingParent", "$getSelection", "$isRangeSelection", "jsx", "LinkIcon", "$isAtNodeEnd", "getSelectedNode", "selection", "anchor", "focus", "anchorNode", "focusNode", "toolbarFeatureButtonsGroupWithItems", "items", "$createTextNode", "$isTextNode", "addClassNamesToElement", "isHTMLAnchorElement", "ObjectID", "$applyNodeReplacement", "$createTextNode", "$getSelection", "$isElementNode", "$isRangeSelection", "ElementNode", "createCommand", "SUPPORTED_URL_PROTOCOLS", "LinkNode", "_LinkNode", "id", "fields", "key", "node", "$convertAnchorElement", "serializedNode", "$createLinkNode", "config", "element", "manageRel", "returnObject", "child", "selection", "destination", "anchorNode", "focusNode", "restoreSelection", "linkNode", "url", "parsedUrl", "writable", "prevNode", "anchor", "newTab", "domNode", "content", "$isLinkNode", "TOGGLE_LINK_COMMAND", "$toggleLink", "payload", "nodes", "parent", "children", "i", "firstNode", "$getLinkAncestor", "prevParent", "$getAncestor", "ancestor", "predicate", "input", "action", "value", "result", "mutableInput", "re", "LinkMarkdownTransformer", "LinkNode", "_node", "exportChildren", "exportFormat", "$isLinkNode", "node", "url", "linkContent", "firstChild", "$isTextNode", "textNode", "match", "linkText", "linkUrl", "linkNode", "$createLinkNode", "linkTextNode", "$createTextNode", "$applyNodeReplacement", "$isElementNode", "AutoLinkNode", "_AutoLinkNode", "LinkNode", "node", "serializedNode", "$createAutoLinkNode", "selection", "restoreSelection", "element", "$isElementNode", "linkNode", "fields", "$applyNodeReplacement", "$isAutoLinkNode", "useLexicalComposerContext", "mergeRegister", "$createTextNode", "$getSelection", "$isElementNode", "$isLineBreakNode", "$isNodeSelection", "$isRangeSelection", "$isTextNode", "TextNodeValue", "useEffect", "invariant", "cond", "message", "args", "createLinkMatcherWithRegExp", "regExp", "urlTransformer", "text", "match", "findFirstMatch", "matchers", "i", "PUNCTUATION_OR_SPACE", "isSeparator", "char", "endsWithSeparator", "textContent", "startsWithSeparator", "isPreviousNodeValid", "node", "previousNode", "$isElementNode", "$isLineBreakNode", "$isTextNode", "isNextNodeValid", "nextNode", "isContentAroundIsValid", "matchStart", "matchEnd", "nodes", "extractMatchingNodes", "startIndex", "endIndex", "unmodifiedBeforeNodes", "matchingNodes", "unmodifiedAfterNodes", "matchingOffset", "currentOffset", "currentNodes", "currentNode", "currentNodeLength", "currentNodeStart", "$createAutoLinkNode_", "fields", "linkNode", "$createAutoLinkNode", "remainingTextNode", "linkTextNode", "textNode", "$createTextNode", "firstTextNode", "offset", "firstLinkTextNode", "linkNodes", "currentNodeEnd", "endNode", "selection", "$getSelection", "selectedTextNode", "$isRangeSelection", "$isNodeSelection", "$handleLinkCreation", "onChange", "initialText", "invalidMatchEnd", "matchLength", "actualMatchStart", "actualMatchEnd", "handleLinkEdit", "children", "childrenLength", "child", "replaceWithChildren", "url", "flds", "handleBadNeighbors", "previousSibling", "nextSibling", "$isAutoLinkNode", "j", "getTextNodesToMatch", "textNodesToMatch", "useAutoLink", "editor", "useEffect", "AutoLinkNode", "invariant", "onChangeWrapped", "prevUrl", "mergeRegister", "TextNodeValue", "parent", "previous", "$isLinkNode", "URL_REGEX", "EMAIL_REGEX", "MATCHERS", "AutoLinkPlugin", "useLexicalComposerContext", "LexicalClickableLinkPlugin", "jsx", "ClickableLinkPlugin", "createCommand", "TOGGLE_LINK_WITH_MODAL_COMMAND", "createPortal", "useLexicalComposerContext", "$findMatchingParent", "mergeRegister", "getTranslation", "formatDrawerSlug", "useConfig", "useEditDepth", "useModal", "useTranslation", "$getSelection", "$isLineBreakNode", "$isRangeSelection", "COMMAND_PRIORITY_HIGH", "COMMAND_PRIORITY_LOW", "KEY_ESCAPE_COMMAND", "SELECTION_CHANGE_COMMAND", "React", "useCallback", "useEffect", "useRef", "useState", "setFloatingElemPositionForLinkEditor", "targetRect", "floatingElem", "anchorElem", "verticalGap", "horizontalOffset", "scrollerElem", "floatingElemRect", "anchorElementRect", "editorScrollerRect", "top", "left", "Drawer", "Form", "FormSubmit", "RenderFields", "useConfig", "useDocumentInfo", "useFieldProps", "useTranslation", "getFormState", "useCallback", "useEffect", "useState", "uuid", "jsx", "jsxs", "baseClass", "LinkDrawer", "drawerSlug", "handleModalSubmit", "stateData", "t", "useTranslation", "id", "useDocumentInfo", "schemaPath", "useFieldProps", "config", "useConfig", "initialState", "setInitialState", "useState", "richTextComponentMap", "useEditorConfigContext", "componentMapRenderedFieldsPath", "schemaFieldsPath", "fieldMap", "useEffect", "state", "getFormState", "onChange", "useCallback", "prevFormState", "Drawer", "Form", "uuid", "RenderFields", "FormSubmit", "jsx", "jsxs", "LinkEditor", "anchorElem", "editor", "useLexicalComposerContext", "editorRef", "useRef", "linkUrl", "setLinkUrl", "useState", "linkLabel", "setLinkLabel", "uuid", "useEditorConfigContext", "config", "useConfig", "i18n", "t", "useTranslation", "stateData", "setStateData", "closeModal", "isModalOpen", "toggleModal", "useModal", "editDepth", "useEditDepth", "isLink", "setIsLink", "selectedNodes", "setSelectedNodes", "isAutoLink", "setIsAutoLink", "drawerSlug", "formatDrawerSlug", "setNotLink", "useCallback", "$updateLinkEditor", "selection", "$getSelection", "selectedNodeDomRect", "$isRangeSelection", "focusNode", "getSelectedNode", "focusLinkParent", "$findMatchingParent", "$isLinkNode", "badNode", "node", "$isLineBreakNode", "linkNode", "data", "relatedField", "coll", "label", "getTranslation", "$isAutoLinkNode", "editorElem", "nativeSelection", "activeElement", "rootElement", "setFloatingElemPositionForLinkEditor", "useEffect", "mergeRegister", "TOGGLE_LINK_WITH_MODAL_COMMAND", "payload", "TOGGLE_LINK_COMMAND", "COMMAND_PRIORITY_LOW", "scrollerElem", "update", "editorState", "SELECTION_CHANGE_COMMAND", "KEY_ESCAPE_COMMAND", "COMMAND_PRIORITY_HIGH", "React", "event", "LinkDrawer", "fields", "newLinkPayload", "bareLinkFields", "linkParent", "$createLinkNode", "jsx", "FloatingLinkEditorPlugin", "props", "anchorElem", "createPortal", "LinkEditor", "useLexicalComposerContext", "mergeRegister", "$getSelection", "$isElementNode", "$isRangeSelection", "COMMAND_PRIORITY_LOW", "PASTE_COMMAND", "useEffect", "absoluteRegExp", "relativeOrAnchorRegExp", "validateUrl", "url", "LinkPlugin", "editor", "useLexicalComposerContext", "useEffect", "LinkNode", "mergeRegister", "TOGGLE_LINK_COMMAND", "payload", "$toggleLink", "COMMAND_PRIORITY_LOW", "validateUrl", "PASTE_COMMAND", "event", "selection", "$getSelection", "$isRangeSelection", "clipboardText", "node", "$isElementNode", "linkFields", "toolbarGroups", "toolbarFeatureButtonsGroupWithItems", "LinkIcon", "selection", "$isRangeSelection", "selectedNode", "getSelectedNode", "$findMatchingParent", "$isLinkNode", "$getSelection", "i18n", "editor", "isActive", "TOGGLE_LINK_COMMAND", "selectedText", "selectedNodes", "linkFields", "TOGGLE_LINK_WITH_MODAL_COMMAND", "LinkFeatureClient", "createClientFeature", "LinkMarkdownTransformer", "LinkNode", "AutoLinkNode", "LinkPlugin", "AutoLinkPlugin", "ClickableLinkPlugin", "FloatingLinkEditorPlugin", "$isListNode", "INSERT_CHECK_LIST_COMMAND", "ListItemNode", "ListNode", "$isRangeSelection", "jsx", "jsxs", "ChecklistIcon", "ListPlugin", "jsx", "LexicalListPlugin", "slashMenuListGroupWithItems", "items", "i18n", "$isListNode", "ListItemNode", "ListNode", "$createListItemNode", "$createListNode", "$isListItemNode", "$isListNode", "LIST_INDENT_SIZE", "listReplace", "listType", "parentNode", "children", "match", "previousNode", "nextNode", "listItem", "firstChild", "list", "indent", "listExport", "listNode", "exportChildren", "depth", "output", "index", "listItemNode", "prefix", "CHECK_LIST", "ListNode", "ListItemNode", "node", "exportChildren", "$isListNode", "listExport", "listReplace", "CheckListPlugin", "jsx", "LexicalCheckListPlugin", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "ChecklistIcon", "selection", "$isRangeSelection", "node", "$isListNode", "parent", "parentParent", "i18n", "editor", "INSERT_CHECK_LIST_COMMAND", "ChecklistFeatureClient", "createClientFeature", "featureProviderMap", "plugins", "LexicalCheckListPlugin", "LexicalListPlugin", "CHECK_LIST", "ListNode", "ListItemNode", "slashMenuListGroupWithItems", "$isListNode", "INSERT_ORDERED_LIST_COMMAND", "ListItemNode", "ListNode", "$isRangeSelection", "jsx", "jsxs", "OrderedListIcon", "$isListNode", "ListItemNode", "ListNode", "ORDERED_LIST", "ListNode", "ListItemNode", "node", "exportChildren", "$isListNode", "listExport", "listReplace", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "OrderedListIcon", "selection", "$isRangeSelection", "node", "$isListNode", "parent", "parentParent", "i18n", "editor", "INSERT_ORDERED_LIST_COMMAND", "OrderedListFeatureClient", "createClientFeature", "featureProviderMap", "ORDERED_LIST", "ListNode", "ListItemNode", "LexicalListPlugin", "slashMenuListGroupWithItems", "$isListNode", "INSERT_UNORDERED_LIST_COMMAND", "ListItemNode", "ListNode", "$isRangeSelection", "jsx", "jsxs", "UnorderedListIcon", "$isListNode", "ListItemNode", "ListNode", "UNORDERED_LIST", "ListNode", "ListItemNode", "node", "exportChildren", "$isListNode", "listExport", "listReplace", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "UnorderedListIcon", "selection", "$isRangeSelection", "node", "$isListNode", "parent", "parentParent", "i18n", "editor", "INSERT_UNORDERED_LIST_COMMAND", "UnorderedListFeatureClient", "createClientFeature", "UNORDERED_LIST", "ListNode", "ListItemNode", "LexicalListPlugin", "slashMenuListGroupWithItems", "convertLexicalPluginToLexical", "converters", "lexicalPluginData", "convertLexicalPluginNodesToLexical", "lexicalPluginNodes", "parentNodeType", "unknownConverter", "converter", "lexicalPluginNode", "convertParagraphNode", "node", "addClassNamesToElement", "DecoratorNode", "React", "jsx", "Component", "module", "UnknownConvertedNode", "_UnknownConvertedNode", "data", "key", "node", "serializedNode", "$createUnknownConvertedNode", "config", "element", "prevNode", "dom", "LexicalPluginToLexicalFeatureClient", "createClientFeature", "clientFunctions", "converters", "incomingEditorState", "convertLexicalPluginToLexical", "UnknownConvertedNode", "NodeFormat", "IS_ALL_FORMATTING", "NON_BREAKING_SPACE", "DOUBLE_LINE_BREAK", "RTL", "LTR", "RTL_REGEX", "LTR_REGEX", "TEXT_TYPE_TO_FORMAT", "DETAIL_TYPE_TO_DETAIL", "ELEMENT_TYPE_TO_FORMAT", "ELEMENT_FORMAT_TO_TYPE", "TEXT_MODE_TO_TYPE", "TEXT_TYPE_TO_MODE", "convertSlateToLexical", "converters", "slateData", "convertSlateNodesToLexical", "canContainParagraphs", "parentNodeType", "slateNodes", "unknownConverter", "converter", "slateNode", "i", "convertParagraphNode", "convertTextNode", "node", "convertNodeToFormat", "format", "NodeFormat", "addClassNamesToElement", "DecoratorNode", "React", "jsx", "Component", "module", "UnknownConvertedNode", "_UnknownConvertedNode", "data", "key", "node", "serializedNode", "$createUnknownConvertedNode", "config", "element", "prevNode", "dom", "SlateToLexicalFeatureClient", "createClientFeature", "clientFunctions", "converters", "incomingEditorState", "convertSlateToLexical", "UnknownConvertedNode", "$setBlocksType", "$createParagraphNode", "$getSelection", "$isParagraphNode", "$isRangeSelection", "toolbarGroups", "toolbarTextDropdownGroupWithItems", "TextIcon", "selection", "$isRangeSelection", "node", "$isParagraphNode", "i18n", "editor", "$getSelection", "$setBlocksType", "$createParagraphNode", "ParagraphFeatureClient", "createClientFeature", "slashMenuBasicGroupWithItems", "$isNodeSelection", "jsx", "jsxs", "RelationshipIcon", "useLexicalComposerContext", "$insertNodeToNearestRoot", "useConfig", "$getPreviousSelection", "$getSelection", "$isParagraphNode", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "createCommand", "useEffect", "useLexicalComposerContext", "useListDrawer", "$getNodeByKey", "COMMAND_PRIORITY_EDITOR", "useCallback", "useEffect", "useState", "jsx", "insertRelationship", "editor", "relationTo", "replaceNodeKey", "value", "node", "$getNodeByKey", "$createRelationshipNode", "INSERT_RELATIONSHIP_COMMAND", "RelationshipDrawerComponent", "enabledCollectionSlugs", "useLexicalComposerContext", "selectedCollectionSlug", "setSelectedCollectionSlug", "useState", "setReplaceNodeKey", "ListDrawer", "ListDrawerToggler", "closeDrawer", "isDrawerOpen", "openDrawer", "useListDrawer", "useEffect", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "payload", "COMMAND_PRIORITY_EDITOR", "onSelect", "useCallback", "collectionSlug", "docID", "RelationshipDrawer", "props", "EnabledRelationshipsCondition", "jsx", "INSERT_RELATIONSHIP_COMMAND", "createCommand", "RelationshipPlugin", "clientProps", "editor", "useLexicalComposerContext", "collections", "useConfig", "enabledRelations", "slug", "useEffect", "RelationshipNode", "payload", "selection", "$getSelection", "$getPreviousSelection", "$isRangeSelection", "relationshipNode", "$createRelationshipNode", "$insertNodeToNearestRoot", "focus", "focusNode", "$isParagraphNode", "node", "COMMAND_PRIORITY_EDITOR", "RelationshipDrawer", "RelationshipFeatureClient", "createClientFeature", "RelationshipNode", "RelationshipPlugin", "slashMenuBasicGroupWithItems", "RelationshipIcon", "i18n", "editor", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "toolbarAddDropdownGroupWithItems", "selection", "$isNodeSelection", "firstNode", "$isRelationshipNode", "useLexicalComposerContext", "useScrollInfo", "useThrottledEffect", "useTranslation", "React", "useMemo", "mergeRegister", "$getSelection", "useCallback", "useEffect", "useState", "jsx", "baseClass", "ToolbarButton", "children", "editor", "item", "enabled", "setEnabled", "useState", "active", "setActive", "className", "setClassName", "editorConfigContext", "useEditorConfigContext", "updateStates", "useCallback", "selection", "$getSelection", "isActive", "isEnabled", "useEffect", "mergeRegister", "e", "React", "useCallback", "useEffect", "mergeRegister", "useTranslation", "$getSelection", "React", "useCallback", "useEffect", "useMemo", "useRef", "useState", "createPortal", "jsx", "jsxs", "baseClass", "DropDownContext", "DropDownItem", "active", "children", "editor", "enabled", "item", "title", "className", "setClassName", "ref", "dropDownContext", "registerItem", "e", "DropDownItems", "dropDownRef", "itemsContainerClassNames", "onClose", "items", "setItems", "highlightedItem", "setHighlightedItem", "itemRef", "prev", "handleKeyDown", "event", "key", "index", "contextValue", "DropDown", "Icon", "buttonAriaLabel", "buttonClassName", "disabled", "label", "stopCloseOnClickSelf", "buttonRef", "showDropDown", "setShowDropDown", "handleClose", "button", "dropDown", "left", "top", "scrollTopOffset", "handle", "target", "portal", "jsx", "jsxs", "baseClass", "ToolbarItem", "active", "anchorElem", "editor", "enabled", "item", "i18n", "useTranslation", "title", "DropDownItem", "ToolbarDropdown", "Icon", "classNames", "groupKey", "items", "itemsContainerClassNames", "label", "maxActiveItems", "onActiveChange", "activeItemKeys", "setActiveItemKeys", "React", "enabledItemKeys", "setEnabledItemKeys", "editorConfigContext", "useEditorConfigContext", "updateStates", "useCallback", "selection", "$getSelection", "_activeItemKeys", "_activeItems", "_enabledItemKeys", "useEffect", "mergeRegister", "DropDown", "jsx", "jsxs", "ButtonGroupItem", "anchorElem", "editor", "item", "ToolbarButton", "ToolbarGroupComponent", "editorConfig", "group", "index", "i18n", "useTranslation", "dropdownLabel", "setDropdownLabel", "DropdownIcon", "setDropdownIcon", "onActiveChange", "activeItems", "label", "ToolbarDropdown", "FixedToolbar", "clientProps", "parentWithFixedToolbar", "currentToolbarRef", "y", "useScrollInfo", "parentToolbarElem", "useMemo", "sibling", "useThrottledEffect", "currentToolbarElem", "currentRect", "parentRect", "event", "i", "getParentEditorWithFixedToolbar", "editorConfigContext", "FixedToolbarPlugin", "currentEditor", "useLexicalComposerContext", "useEditorConfigContext", "currentEditorConfig", "FixedToolbarFeatureClient", "createClientFeature", "FixedToolbarPlugin", "useLexicalComposerContext", "mergeRegister", "$getSelection", "$isRangeSelection", "$isTextNode", "COMMAND_PRIORITY_LOW", "SELECTION_CHANGE_COMMAND", "useCallback", "useEffect", "useRef", "useState", "React", "createPortal", "getDOMRangeRect", "nativeSelection", "rootElement", "domRange", "rect", "inner", "setFloatingElemPosition", "args", "alwaysDisplayOnTop", "anchorElem", "anchorFlippedOffset", "floatingElem", "horizontalOffset", "horizontalPosition", "specialHandlingForCaret", "targetRect", "verticalGap", "scrollerElem", "floatingElemRect", "anchorElementRect", "editorScrollerRect", "top", "left", "addedToTop", "jsx", "jsxs", "ButtonGroupItem", "anchorElem", "editor", "item", "ToolbarButton", "ToolbarGroupComponent", "group", "index", "editorConfig", "useEditorConfigContext", "DropdownIcon", "setDropdownIcon", "onActiveChange", "activeItems", "ToolbarDropdown", "InlineToolbar", "floatingToolbarRef", "useRef", "caretRef", "closeFloatingToolbar", "useCallback", "isOpacityZero", "isPointerEventsNone", "mouseMoveListener", "e", "x", "y", "elementUnderMouse", "mouseUpListener", "useEffect", "$updateTextFormatFloatingToolbar", "selection", "$getSelection", "nativeSelection", "possibleLinkEditor", "isLinkEditorVisible", "rootElement", "rangeRect", "getDOMRangeRect", "offsetIfFlipped", "setFloatingElemPosition", "scrollerElem", "update", "mergeRegister", "editorState", "SELECTION_CHANGE_COMMAND", "COMMAND_PRIORITY_LOW", "i", "useInlineToolbar", "isText", "setIsText", "useState", "updatePopup", "$isRangeSelection", "nodes", "foundNodeWithText", "node", "$isTextNode", "rawTextContent", "createPortal", "InlineToolbarPlugin", "useLexicalComposerContext", "InlineToolbarFeatureClient", "createClientFeature", "InlineToolbarPlugin", "$isNodeSelection", "jsx", "jsxs", "UploadIcon", "useLexicalComposerContext", "$insertNodeToNearestRoot", "mergeRegister", "useConfig", "$getPreviousSelection", "$getSelection", "$isParagraphNode", "$isRangeSelection", "COMMAND_PRIORITY_EDITOR", "createCommand", "useEffect", "useLexicalComposerContext", "useListDrawer", "$getNodeByKey", "COMMAND_PRIORITY_EDITOR", "useCallback", "useEffect", "useState", "jsx", "insertUpload", "editor", "relationTo", "replaceNodeKey", "value", "node", "$getNodeByKey", "$createUploadNode", "INSERT_UPLOAD_COMMAND", "UploadDrawerComponent", "enabledCollectionSlugs", "useLexicalComposerContext", "setReplaceNodeKey", "useState", "ListDrawer", "ListDrawerToggler", "closeDrawer", "openDrawer", "useListDrawer", "useEffect", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "payload", "COMMAND_PRIORITY_EDITOR", "onSelect", "useCallback", "collectionSlug", "docID", "UploadDrawer", "props", "EnabledRelationshipsCondition", "jsx", "INSERT_UPLOAD_COMMAND", "createCommand", "UploadPlugin", "clientProps", "editor", "useLexicalComposerContext", "collections", "useConfig", "useEffect", "UploadNode", "mergeRegister", "payload", "selection", "$getSelection", "$getPreviousSelection", "$isRangeSelection", "uploadNode", "$createUploadNode", "$insertNodeToNearestRoot", "focus", "focusNode", "$isParagraphNode", "node", "COMMAND_PRIORITY_EDITOR", "UploadDrawer", "slug", "UploadFeatureClient", "createClientFeature", "UploadNode", "UploadPlugin", "slashMenuBasicGroupWithItems", "UploadIcon", "i18n", "editor", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "toolbarAddDropdownGroupWithItems", "selection", "$isNodeSelection", "firstNode", "$isUploadNode", "ShimmerEffect", "useClientFunctions", "useFieldProps", "React", "Suspense", "lazy", "useEffect", "useState", "jsx", "jsxs", "RichTextEditor", "lazy", "module", "RichTextField", "props", "admin", "lexicalEditorConfig", "richTextComponentMap", "schemaPath", "useFieldProps", "clientFunctions", "useClientFunctions", "hasLoadedFeatures", "setHasLoadedFeatures", "useState", "featureProviders", "setFeatureProviders", "finalSanitizedEditorConfig", "setFinalSanitizedEditorConfig", "featureProviderComponents", "a", "b", "featureProvidersAndComponentsToLoad", "featureProvider", "featureComponentKeys", "key", "useEffect", "featureProvidersLocal", "featureProvidersAndComponentsLoaded", "plugin", "resolvedClientFeatures", "loadClientFeatures", "sanitizeClientEditorConfig", "defaultEditorLexicalConfig", "Suspense", "ShimmerEffect", "React", "featureComponents", "FeatureComponent", "cloneDeep", "object", "cache", "clonedMap", "key", "value", "clonedSet", "clonedObject", "joinClasses", "args", "elements", "readTouch", "touch", "addListener", "element", "cb", "elementValues", "listeners", "handleTouchstart", "e", "handleTouchend", "start", "end", "listener", "deleteListener", "addSwipeLeftListener", "force", "x", "y", "addSwipeRightListener", "addSwipeUpListener", "addSwipeDownListener"]
7
7
  }