@payloadcms/richtext-lexical 3.0.0-canary.3bd3027 → 3.0.0-canary.483db21

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 (734) hide show
  1. package/dist/cell/index.d.ts +2 -2
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -2
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/client/Field-5GGTGCKC.js +2 -0
  6. package/dist/exports/client/Field-5GGTGCKC.js.map +7 -0
  7. package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js +2 -0
  8. package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js.map +7 -0
  9. package/dist/exports/client/bundled.css +1 -1
  10. package/dist/exports/client/{chunk-OSR74ZNW.js → chunk-6QXGZYUK.js} +2 -2
  11. package/dist/exports/client/chunk-6QXGZYUK.js.map +7 -0
  12. package/dist/exports/client/chunk-EBB2CEB6.js +2 -0
  13. package/dist/exports/client/chunk-EBB2CEB6.js.map +7 -0
  14. package/dist/exports/client/chunk-IPCJ5EVK.js +2 -0
  15. package/dist/exports/client/chunk-IPCJ5EVK.js.map +7 -0
  16. package/dist/exports/client/{chunk-3K3B6PJM.js → chunk-IWZVO3AI.js} +2 -2
  17. package/dist/exports/client/chunk-IWZVO3AI.js.map +7 -0
  18. package/dist/exports/client/{chunk-MLIITFAS.js → chunk-Q5DYR7MH.js} +2 -2
  19. package/dist/exports/client/chunk-Q5DYR7MH.js.map +7 -0
  20. package/dist/exports/client/chunk-VUVXZJJR.js +2 -0
  21. package/dist/exports/client/chunk-VUVXZJJR.js.map +7 -0
  22. package/dist/exports/client/component-D4GWDXK5.js +2 -0
  23. package/dist/exports/client/component-D4GWDXK5.js.map +7 -0
  24. package/dist/exports/client/component-KA7FDRMA.js +2 -0
  25. package/dist/exports/client/component-KA7FDRMA.js.map +7 -0
  26. package/dist/exports/client/{component-QWIGEOVD.js → component-VM36FRT2.js} +2 -2
  27. package/dist/exports/client/componentInline-6EKPZSCV.js +2 -0
  28. package/dist/exports/client/componentInline-6EKPZSCV.js.map +7 -0
  29. package/dist/exports/client/index.d.ts +17 -6
  30. package/dist/exports/client/index.d.ts.map +1 -1
  31. package/dist/exports/client/index.js +8 -6
  32. package/dist/exports/client/index.js.map +4 -4
  33. package/dist/features/align/feature.client.js.map +1 -1
  34. package/dist/features/align/feature.server.d.ts +1 -1
  35. package/dist/features/align/feature.server.d.ts.map +1 -1
  36. package/dist/features/align/feature.server.js.map +1 -1
  37. package/dist/features/align/i18n.js.map +1 -1
  38. package/dist/features/align/toolbarAlignGroup.js.map +1 -1
  39. package/dist/features/blockquote/feature.client.js.map +1 -1
  40. package/dist/features/blockquote/feature.server.d.ts +6 -1
  41. package/dist/features/blockquote/feature.server.d.ts.map +1 -1
  42. package/dist/features/blockquote/feature.server.js +5 -2
  43. package/dist/features/blockquote/feature.server.js.map +1 -1
  44. package/dist/features/blockquote/i18n.js.map +1 -1
  45. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  46. package/dist/features/blocks/component/BlockContent.d.ts +5 -5
  47. package/dist/features/blocks/component/BlockContent.d.ts.map +1 -1
  48. package/dist/features/blocks/component/BlockContent.js +7 -4
  49. package/dist/features/blocks/component/BlockContent.js.map +1 -1
  50. package/dist/features/blocks/component/FormSavePlugin.js +1 -1
  51. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
  52. package/dist/features/blocks/component/index.d.ts +0 -4
  53. package/dist/features/blocks/component/index.d.ts.map +1 -1
  54. package/dist/features/blocks/component/index.js +10 -6
  55. package/dist/features/blocks/component/index.js.map +1 -1
  56. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  57. package/dist/features/blocks/componentInline/index.d.ts +10 -0
  58. package/dist/features/blocks/componentInline/index.d.ts.map +1 -0
  59. package/dist/features/blocks/componentInline/index.js +133 -0
  60. package/dist/features/blocks/componentInline/index.js.map +1 -0
  61. package/dist/features/blocks/feature.client.d.ts +6 -2
  62. package/dist/features/blocks/feature.client.d.ts.map +1 -1
  63. package/dist/features/blocks/feature.client.js +70 -8
  64. package/dist/features/blocks/feature.client.js.map +1 -1
  65. package/dist/features/blocks/feature.server.d.ts +3 -2
  66. package/dist/features/blocks/feature.server.d.ts.map +1 -1
  67. package/dist/features/blocks/feature.server.js +100 -45
  68. package/dist/features/blocks/feature.server.js.map +1 -1
  69. package/dist/features/blocks/graphQLPopulationPromise.d.ts +4 -3
  70. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
  71. package/dist/features/blocks/graphQLPopulationPromise.js +2 -2
  72. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
  73. package/dist/features/blocks/i18n.d.ts.map +1 -1
  74. package/dist/features/blocks/i18n.js +192 -0
  75. package/dist/features/blocks/i18n.js.map +1 -1
  76. package/dist/features/blocks/nodes/BlocksNode.d.ts +7 -5
  77. package/dist/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  78. package/dist/features/blocks/nodes/BlocksNode.js +3 -3
  79. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
  80. package/dist/features/blocks/nodes/InlineBlocksNode.d.ts +39 -0
  81. package/dist/features/blocks/nodes/InlineBlocksNode.d.ts.map +1 -0
  82. package/dist/features/blocks/nodes/InlineBlocksNode.js +94 -0
  83. package/dist/features/blocks/nodes/InlineBlocksNode.js.map +1 -0
  84. package/dist/features/blocks/plugin/commands.d.ts +5 -0
  85. package/dist/features/blocks/plugin/commands.d.ts.map +1 -1
  86. package/dist/features/blocks/plugin/commands.js +2 -0
  87. package/dist/features/blocks/plugin/commands.js.map +1 -1
  88. package/dist/features/blocks/plugin/index.d.ts +1 -1
  89. package/dist/features/blocks/plugin/index.d.ts.map +1 -1
  90. package/dist/features/blocks/plugin/index.js +76 -7
  91. package/dist/features/blocks/plugin/index.js.map +1 -1
  92. package/dist/features/blocks/validate.d.ts +4 -3
  93. package/dist/features/blocks/validate.d.ts.map +1 -1
  94. package/dist/features/blocks/validate.js +4 -3
  95. package/dist/features/blocks/validate.js.map +1 -1
  96. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  97. package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
  98. package/dist/features/converters/html/converter/converters/paragraph.js +5 -2
  99. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  100. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  101. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  102. package/dist/features/converters/html/converter/index.d.ts +8 -2
  103. package/dist/features/converters/html/converter/index.d.ts.map +1 -1
  104. package/dist/features/converters/html/converter/index.js +14 -5
  105. package/dist/features/converters/html/converter/index.js.map +1 -1
  106. package/dist/features/converters/html/converter/types.d.ts +7 -4
  107. package/dist/features/converters/html/converter/types.d.ts.map +1 -1
  108. package/dist/features/converters/html/converter/types.js.map +1 -1
  109. package/dist/features/converters/html/feature.server.d.ts +3 -3
  110. package/dist/features/converters/html/feature.server.d.ts.map +1 -1
  111. package/dist/features/converters/html/feature.server.js.map +1 -1
  112. package/dist/features/converters/html/field/index.d.ts.map +1 -1
  113. package/dist/features/converters/html/field/index.js +5 -2
  114. package/dist/features/converters/html/field/index.js.map +1 -1
  115. package/dist/features/createClientComponent.d.ts +2 -1
  116. package/dist/features/createClientComponent.d.ts.map +1 -1
  117. package/dist/features/createClientComponent.js.map +1 -1
  118. package/dist/features/createFeaturePropComponent.js +1 -1
  119. package/dist/features/createFeaturePropComponent.js.map +1 -1
  120. package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
  121. package/dist/features/debug/testRecorder/feature.server.d.ts +1 -1
  122. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  123. package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
  124. package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
  125. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  126. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
  127. package/dist/features/debug/treeView/feature.client.js.map +1 -1
  128. package/dist/features/debug/treeView/feature.server.d.ts +1 -1
  129. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
  130. package/dist/features/debug/treeView/feature.server.js.map +1 -1
  131. package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
  132. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
  133. package/dist/features/debug/treeView/plugin/index.js.map +1 -1
  134. package/dist/features/experimental_table/feature.client.d.ts +2 -0
  135. package/dist/features/experimental_table/feature.client.d.ts.map +1 -0
  136. package/dist/features/experimental_table/feature.client.js +71 -0
  137. package/dist/features/experimental_table/feature.client.js.map +1 -0
  138. package/dist/features/experimental_table/feature.server.d.ts +13 -0
  139. package/dist/features/experimental_table/feature.server.d.ts.map +1 -0
  140. package/dist/features/experimental_table/feature.server.js +125 -0
  141. package/dist/features/experimental_table/feature.server.js.map +1 -0
  142. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts +4 -0
  143. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  144. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js +604 -0
  145. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js.map +1 -0
  146. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts +3 -0
  147. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  148. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js +327 -0
  149. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js.map +1 -0
  150. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +12 -0
  151. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  152. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +181 -0
  153. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  154. package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts +24 -0
  155. package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts.map +1 -0
  156. package/dist/features/experimental_table/plugins/TablePlugin/index.js +98 -0
  157. package/dist/features/experimental_table/plugins/TablePlugin/index.js.map +1 -0
  158. package/dist/features/experimental_table/utils/debounce.d.ts +61 -0
  159. package/dist/features/experimental_table/utils/debounce.d.ts.map +1 -0
  160. package/dist/features/experimental_table/utils/debounce.js +202 -0
  161. package/dist/features/experimental_table/utils/debounce.js.map +1 -0
  162. package/dist/features/experimental_table/utils/useDebounce.d.ts +6 -0
  163. package/dist/features/experimental_table/utils/useDebounce.d.ts.map +1 -0
  164. package/dist/features/experimental_table/utils/useDebounce.js +18 -0
  165. package/dist/features/experimental_table/utils/useDebounce.js.map +1 -0
  166. package/dist/features/format/bold/feature.client.js.map +1 -1
  167. package/dist/features/format/bold/feature.server.d.ts +1 -1
  168. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  169. package/dist/features/format/bold/feature.server.js.map +1 -1
  170. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  171. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  172. package/dist/features/format/inlineCode/feature.server.d.ts +1 -1
  173. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  174. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  175. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  176. package/dist/features/format/italic/feature.client.js.map +1 -1
  177. package/dist/features/format/italic/feature.server.d.ts +1 -1
  178. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  179. package/dist/features/format/italic/feature.server.js.map +1 -1
  180. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  181. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  182. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  183. package/dist/features/format/strikethrough/feature.server.d.ts +1 -1
  184. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  185. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  186. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  187. package/dist/features/format/subscript/feature.client.js.map +1 -1
  188. package/dist/features/format/subscript/feature.server.d.ts +1 -1
  189. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  190. package/dist/features/format/subscript/feature.server.js.map +1 -1
  191. package/dist/features/format/superscript/feature.client.js.map +1 -1
  192. package/dist/features/format/superscript/feature.server.d.ts +1 -1
  193. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  194. package/dist/features/format/superscript/feature.server.js.map +1 -1
  195. package/dist/features/format/underline/feature.client.js.map +1 -1
  196. package/dist/features/format/underline/feature.server.d.ts +1 -1
  197. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  198. package/dist/features/format/underline/feature.server.js.map +1 -1
  199. package/dist/features/heading/feature.client.js.map +1 -1
  200. package/dist/features/heading/feature.server.d.ts +6 -2
  201. package/dist/features/heading/feature.server.d.ts.map +1 -1
  202. package/dist/features/heading/feature.server.js +5 -2
  203. package/dist/features/heading/feature.server.js.map +1 -1
  204. package/dist/features/heading/i18n.js +2 -2
  205. package/dist/features/heading/i18n.js.map +1 -1
  206. package/dist/features/heading/markdownTransformer.js.map +1 -1
  207. package/dist/features/horizontalRule/component/index.js.map +1 -1
  208. package/dist/features/horizontalRule/feature.client.js.map +1 -1
  209. package/dist/features/horizontalRule/feature.server.d.ts +1 -1
  210. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
  211. package/dist/features/horizontalRule/feature.server.js.map +1 -1
  212. package/dist/features/horizontalRule/i18n.js.map +1 -1
  213. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
  214. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +5 -2
  215. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -1
  216. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
  217. package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
  218. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
  219. package/dist/features/horizontalRule/plugin/index.js.map +1 -1
  220. package/dist/features/indent/feature.client.js.map +1 -1
  221. package/dist/features/indent/feature.server.d.ts +1 -1
  222. package/dist/features/indent/feature.server.d.ts.map +1 -1
  223. package/dist/features/indent/feature.server.js.map +1 -1
  224. package/dist/features/indent/i18n.js.map +1 -1
  225. package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
  226. package/dist/features/link/drawer/baseFields.d.ts +2 -2
  227. package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
  228. package/dist/features/link/drawer/baseFields.js.map +1 -1
  229. package/dist/features/link/feature.client.d.ts +2 -2
  230. package/dist/features/link/feature.client.js.map +1 -1
  231. package/dist/features/link/feature.server.d.ts +6 -6
  232. package/dist/features/link/feature.server.d.ts.map +1 -1
  233. package/dist/features/link/feature.server.js +12 -16
  234. package/dist/features/link/feature.server.js.map +1 -1
  235. package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
  236. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
  237. package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
  238. package/dist/features/link/i18n.js.map +1 -1
  239. package/dist/features/link/markdownTransformer.js.map +1 -1
  240. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  241. package/dist/features/link/nodes/AutoLinkNode.js +7 -1
  242. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  243. package/dist/features/link/nodes/LinkNode.js +1 -2
  244. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  245. package/dist/features/link/nodes/types.d.ts +10 -6
  246. package/dist/features/link/nodes/types.d.ts.map +1 -1
  247. package/dist/features/link/nodes/types.js.map +1 -1
  248. package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
  249. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
  250. package/dist/features/link/plugins/autoLink/index.js +21 -5
  251. package/dist/features/link/plugins/autoLink/index.js.map +1 -1
  252. package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
  253. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  254. package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
  255. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  256. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  257. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +11 -7
  258. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  259. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
  260. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  261. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  262. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  263. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
  264. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  265. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  266. package/dist/features/link/plugins/link/index.d.ts +1 -1
  267. package/dist/features/link/plugins/link/index.d.ts.map +1 -1
  268. package/dist/features/link/plugins/link/index.js.map +1 -1
  269. package/dist/features/link/validate.d.ts +1 -1
  270. package/dist/features/link/validate.d.ts.map +1 -1
  271. package/dist/features/link/validate.js +2 -1
  272. package/dist/features/link/validate.js.map +1 -1
  273. package/dist/features/lists/checklist/feature.client.js.map +1 -1
  274. package/dist/features/lists/checklist/feature.server.d.ts +1 -1
  275. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
  276. package/dist/features/lists/checklist/feature.server.js.map +1 -1
  277. package/dist/features/lists/checklist/i18n.js.map +1 -1
  278. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  279. package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
  280. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
  281. package/dist/features/lists/checklist/plugin/index.js.map +1 -1
  282. package/dist/features/lists/htmlConverter.d.ts +1 -1
  283. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  284. package/dist/features/lists/htmlConverter.js +10 -4
  285. package/dist/features/lists/htmlConverter.js.map +1 -1
  286. package/dist/features/lists/orderedList/feature.client.js.map +1 -1
  287. package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
  288. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
  289. package/dist/features/lists/orderedList/feature.server.js.map +1 -1
  290. package/dist/features/lists/orderedList/i18n.js.map +1 -1
  291. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  292. package/dist/features/lists/plugin/index.d.ts +11 -1
  293. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  294. package/dist/features/lists/plugin/index.js.map +1 -1
  295. package/dist/features/lists/shared/markdown.js.map +1 -1
  296. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  297. package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
  298. package/dist/features/lists/unorderedList/feature.server.d.ts +1 -1
  299. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  300. package/dist/features/lists/unorderedList/feature.server.js.map +1 -1
  301. package/dist/features/lists/unorderedList/i18n.js.map +1 -1
  302. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  314. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  319. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  321. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  322. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  323. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  324. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  325. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  326. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  327. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  328. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  329. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  330. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +2 -2
  331. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -1
  332. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  333. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  334. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -1
  335. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  336. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  337. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  338. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  339. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
  341. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  343. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -1
  345. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  346. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  347. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  349. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  351. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  352. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  354. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  355. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  356. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  357. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  358. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
  359. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  360. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  361. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  362. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  363. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  364. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  365. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  366. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  367. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  368. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
  369. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  370. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  371. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  372. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  373. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  374. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  375. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  376. package/dist/features/migrations/slateToLexical/converter/index.js +1 -0
  377. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  378. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  379. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  380. package/dist/features/migrations/slateToLexical/feature.server.d.ts +3 -1
  381. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  382. package/dist/features/migrations/slateToLexical/feature.server.js +3 -1
  383. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  384. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  385. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  386. package/dist/features/paragraph/feature.client.js.map +1 -1
  387. package/dist/features/paragraph/feature.server.d.ts +1 -1
  388. package/dist/features/paragraph/feature.server.d.ts.map +1 -1
  389. package/dist/features/paragraph/feature.server.js.map +1 -1
  390. package/dist/features/paragraph/i18n.js.map +1 -1
  391. package/dist/features/relationship/drawer/commands.js.map +1 -1
  392. package/dist/features/relationship/drawer/index.js.map +1 -1
  393. package/dist/features/relationship/feature.client.d.ts +6 -6
  394. package/dist/features/relationship/feature.client.js.map +1 -1
  395. package/dist/features/relationship/feature.server.d.ts +6 -5
  396. package/dist/features/relationship/feature.server.d.ts.map +1 -1
  397. package/dist/features/relationship/feature.server.js.map +1 -1
  398. package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
  399. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
  400. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
  401. package/dist/features/relationship/i18n.js.map +1 -1
  402. package/dist/features/relationship/nodes/RelationshipNode.d.ts +6 -2
  403. package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  404. package/dist/features/relationship/nodes/RelationshipNode.js +1 -1
  405. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
  406. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts +0 -1
  407. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  408. package/dist/features/relationship/nodes/components/RelationshipComponent.js +2 -3
  409. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  410. package/dist/features/relationship/plugins/index.d.ts +1 -1
  411. package/dist/features/relationship/plugins/index.d.ts.map +1 -1
  412. package/dist/features/relationship/plugins/index.js.map +1 -1
  413. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  414. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  415. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  416. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  417. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  418. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
  419. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  420. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  421. package/dist/features/toolbars/fixed/feature.client.d.ts +1 -1
  422. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  423. package/dist/features/toolbars/fixed/feature.client.js +8 -15
  424. package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
  425. package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
  426. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  427. package/dist/features/toolbars/fixed/feature.server.js +16 -18
  428. package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
  429. package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
  430. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  431. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
  432. package/dist/features/toolbars/inline/feature.client.d.ts +1 -1
  433. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
  434. package/dist/features/toolbars/inline/feature.client.js +9 -16
  435. package/dist/features/toolbars/inline/feature.client.js.map +1 -1
  436. package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
  437. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
  438. package/dist/features/toolbars/inline/feature.server.js +8 -11
  439. package/dist/features/toolbars/inline/feature.server.js.map +1 -1
  440. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  441. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  442. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +0 -1
  443. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  444. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  445. package/dist/features/toolbars/types.d.ts +37 -5
  446. package/dist/features/toolbars/types.d.ts.map +1 -1
  447. package/dist/features/toolbars/types.js.map +1 -1
  448. package/dist/features/typeUtilities.d.ts +1 -1
  449. package/dist/features/typeUtilities.d.ts.map +1 -1
  450. package/dist/features/typeUtilities.js.map +1 -1
  451. package/dist/features/typesClient.d.ts +186 -0
  452. package/dist/features/typesClient.d.ts.map +1 -0
  453. package/dist/features/typesClient.js +3 -0
  454. package/dist/features/typesClient.js.map +1 -0
  455. package/dist/features/{types.d.ts → typesServer.d.ts} +50 -202
  456. package/dist/features/typesServer.d.ts.map +1 -0
  457. package/dist/features/typesServer.js +3 -0
  458. package/dist/features/typesServer.js.map +1 -0
  459. package/dist/features/upload/component/index.d.ts.map +1 -1
  460. package/dist/features/upload/component/index.js +34 -11
  461. package/dist/features/upload/component/index.js.map +1 -1
  462. package/dist/features/upload/drawer/commands.js.map +1 -1
  463. package/dist/features/upload/drawer/index.js.map +1 -1
  464. package/dist/features/upload/feature.client.d.ts +1 -1
  465. package/dist/features/upload/feature.client.d.ts.map +1 -1
  466. package/dist/features/upload/feature.client.js +62 -69
  467. package/dist/features/upload/feature.client.js.map +1 -1
  468. package/dist/features/upload/feature.server.d.ts +3 -4
  469. package/dist/features/upload/feature.server.d.ts.map +1 -1
  470. package/dist/features/upload/feature.server.js +157 -169
  471. package/dist/features/upload/feature.server.js.map +1 -1
  472. package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
  473. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
  474. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
  475. package/dist/features/upload/i18n.js.map +1 -1
  476. package/dist/features/upload/nodes/UploadNode.d.ts +7 -5
  477. package/dist/features/upload/nodes/UploadNode.d.ts.map +1 -1
  478. package/dist/features/upload/nodes/UploadNode.js +1 -2
  479. package/dist/features/upload/nodes/UploadNode.js.map +1 -1
  480. package/dist/features/upload/plugin/index.d.ts +1 -1
  481. package/dist/features/upload/plugin/index.d.ts.map +1 -1
  482. package/dist/features/upload/plugin/index.js.map +1 -1
  483. package/dist/features/upload/validate.d.ts +1 -1
  484. package/dist/features/upload/validate.d.ts.map +1 -1
  485. package/dist/features/upload/validate.js +1 -0
  486. package/dist/features/upload/validate.js.map +1 -1
  487. package/dist/field/Field.d.ts +3 -3
  488. package/dist/field/Field.d.ts.map +1 -1
  489. package/dist/field/Field.js +14 -12
  490. package/dist/field/Field.js.map +1 -1
  491. package/dist/field/index.d.ts +3 -3
  492. package/dist/field/index.d.ts.map +1 -1
  493. package/dist/field/index.js +11 -9
  494. package/dist/field/index.js.map +1 -1
  495. package/dist/i18n.js.map +1 -1
  496. package/dist/index.d.ts +14 -9
  497. package/dist/index.d.ts.map +1 -1
  498. package/dist/index.js +16 -16
  499. package/dist/index.js.map +1 -1
  500. package/dist/lexical/EditorPlugin.d.ts +1 -1
  501. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  502. package/dist/lexical/EditorPlugin.js.map +1 -1
  503. package/dist/lexical/LexicalEditor.d.ts +2 -2
  504. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  505. package/dist/lexical/LexicalEditor.js +0 -6
  506. package/dist/lexical/LexicalEditor.js.map +1 -1
  507. package/dist/lexical/LexicalProvider.d.ts +3 -3
  508. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  509. package/dist/lexical/LexicalProvider.js +26 -6
  510. package/dist/lexical/LexicalProvider.js.map +1 -1
  511. package/dist/lexical/config/client/EditorConfigProvider.d.ts +5 -5
  512. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  513. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  514. package/dist/lexical/config/client/default.js.map +1 -1
  515. package/dist/lexical/config/client/loader.d.ts +1 -1
  516. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  517. package/dist/lexical/config/client/loader.js.map +1 -1
  518. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  519. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  520. package/dist/lexical/config/client/sanitize.js +4 -0
  521. package/dist/lexical/config/client/sanitize.js.map +1 -1
  522. package/dist/lexical/config/server/default.d.ts +2 -2
  523. package/dist/lexical/config/server/default.d.ts.map +1 -1
  524. package/dist/lexical/config/server/default.js.map +1 -1
  525. package/dist/lexical/config/server/loader.d.ts +1 -1
  526. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  527. package/dist/lexical/config/server/loader.js.map +1 -1
  528. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  529. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  530. package/dist/lexical/config/server/sanitize.js.map +1 -1
  531. package/dist/lexical/config/types.d.ts +4 -3
  532. package/dist/lexical/config/types.d.ts.map +1 -1
  533. package/dist/lexical/config/types.js.map +1 -1
  534. package/dist/lexical/nodes/index.js.map +1 -1
  535. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  536. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +4 -4
  537. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  538. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +0 -2
  539. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  540. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +0 -1
  541. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  542. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +1 -20
  543. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  544. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +23 -8
  545. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  546. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  547. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  548. package/dist/lexical/plugins/SlashMenu/index.js +43 -41
  549. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  550. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  551. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  552. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  553. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  554. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  555. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  556. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  557. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  558. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  559. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  560. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  561. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  562. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  563. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  564. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  565. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  566. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  567. package/dist/lexical/ui/ContentEditable.js +8 -1
  568. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  569. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  570. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  571. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  572. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  573. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  574. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  575. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  576. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  577. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  579. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  580. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  582. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  583. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  585. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  588. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  589. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -0
  591. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -0
  592. package/dist/lexical/ui/icons/InlineBlocks/index.js +20 -0
  593. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -0
  594. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  595. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/Meatballs/index.d.ts +3 -0
  597. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -0
  598. package/dist/lexical/ui/icons/Meatballs/index.js +25 -0
  599. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -0
  600. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  601. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  603. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  604. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Table/index.d.ts +3 -0
  606. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -0
  607. package/dist/lexical/ui/icons/Table/index.js +20 -0
  608. package/dist/lexical/ui/icons/Table/index.js.map +1 -0
  609. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  611. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  612. package/dist/lexical/ui/icons/Upload/index.js +1 -1
  613. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  614. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  615. package/dist/lexical/utils/environment.js.map +1 -1
  616. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  617. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  618. package/dist/lexical/utils/guard.js.map +1 -1
  619. package/dist/lexical/utils/invariant.js.map +1 -1
  620. package/dist/lexical/utils/joinClasses.js.map +1 -1
  621. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  622. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  623. package/dist/lexical/utils/point.js.map +1 -1
  624. package/dist/lexical/utils/rect.js.map +1 -1
  625. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  626. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  627. package/dist/lexical/utils/swipe.js.map +1 -1
  628. package/dist/lexical/utils/url.js.map +1 -1
  629. package/dist/nodeTypes.d.ts +32 -0
  630. package/dist/nodeTypes.d.ts.map +1 -0
  631. package/dist/nodeTypes.js +3 -0
  632. package/dist/nodeTypes.js.map +1 -0
  633. package/dist/populateGraphQL/defaultValue.d.ts.map +1 -1
  634. package/dist/populateGraphQL/defaultValue.js +1 -0
  635. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  636. package/dist/populateGraphQL/populate.d.ts +4 -4
  637. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  638. package/dist/populateGraphQL/populate.js.map +1 -1
  639. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +3 -3
  640. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  641. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  642. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +4 -4
  643. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  644. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  645. package/dist/types.d.ts +6 -6
  646. package/dist/types.d.ts.map +1 -1
  647. package/dist/types.js.map +1 -1
  648. package/dist/utilities/createClientFeature.d.ts +1 -1
  649. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  650. package/dist/utilities/createClientFeature.js.map +1 -1
  651. package/dist/utilities/createServerFeature.d.ts +3 -3
  652. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  653. package/dist/utilities/createServerFeature.js.map +1 -1
  654. package/dist/utilities/fieldsDrawer/Drawer.d.ts +18 -0
  655. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -0
  656. package/dist/utilities/fieldsDrawer/Drawer.js +26 -0
  657. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -0
  658. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -0
  659. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -0
  660. package/dist/utilities/fieldsDrawer/DrawerContent.js +90 -0
  661. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -0
  662. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  663. package/dist/utilities/generateComponentMap.d.ts +1 -1
  664. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  665. package/dist/utilities/generateComponentMap.js +6 -4
  666. package/dist/utilities/generateComponentMap.js.map +1 -1
  667. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  668. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  669. package/dist/utilities/generateSchemaMap.js +10 -1
  670. package/dist/utilities/generateSchemaMap.js.map +1 -1
  671. package/dist/utilities/migrateSlateToLexical/index.d.ts +15 -0
  672. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -0
  673. package/dist/utilities/migrateSlateToLexical/index.js +105 -0
  674. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -0
  675. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +9 -0
  676. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -0
  677. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +77 -0
  678. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -0
  679. package/dist/utilities/recurseNodeTree.js.map +1 -1
  680. package/dist/utilities/upgradeLexicalData/index.d.ts +11 -0
  681. package/dist/utilities/upgradeLexicalData/index.d.ts.map +1 -0
  682. package/dist/utilities/upgradeLexicalData/index.js +101 -0
  683. package/dist/utilities/upgradeLexicalData/index.js.map +1 -0
  684. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +9 -0
  685. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -0
  686. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +74 -0
  687. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -0
  688. package/dist/utilities/useLexicalFeature.d.ts +1 -1
  689. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  690. package/dist/utilities/useLexicalFeature.js.map +1 -1
  691. package/dist/validate/index.js.map +1 -1
  692. package/dist/validate/validateNodes.d.ts +2 -2
  693. package/dist/validate/validateNodes.d.ts.map +1 -1
  694. package/dist/validate/validateNodes.js.map +1 -1
  695. package/package.json +44 -43
  696. package/dist/exports/client/Field-YMWNSE3A.js +0 -2
  697. package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
  698. package/dist/exports/client/RelationshipComponent-5OU5HATX.js +0 -2
  699. package/dist/exports/client/RelationshipComponent-5OU5HATX.js.map +0 -7
  700. package/dist/exports/client/chunk-3K3B6PJM.js.map +0 -7
  701. package/dist/exports/client/chunk-MLIITFAS.js.map +0 -7
  702. package/dist/exports/client/chunk-OSR74ZNW.js.map +0 -7
  703. package/dist/exports/client/chunk-WDKKMO4H.js +0 -2
  704. package/dist/exports/client/chunk-WDKKMO4H.js.map +0 -7
  705. package/dist/exports/client/chunk-ZITHDR53.js +0 -2
  706. package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
  707. package/dist/exports/client/component-IAKI3GRY.js +0 -2
  708. package/dist/exports/client/component-IAKI3GRY.js.map +0 -7
  709. package/dist/exports/client/component-W3PV5MJ7.js +0 -2
  710. package/dist/exports/client/component-W3PV5MJ7.js.map +0 -7
  711. package/dist/features/blocks/drawer/index.d.ts +0 -9
  712. package/dist/features/blocks/drawer/index.d.ts.map +0 -1
  713. package/dist/features/blocks/drawer/index.js +0 -78
  714. package/dist/features/blocks/drawer/index.js.map +0 -1
  715. package/dist/features/link/drawer/index.d.ts +0 -5
  716. package/dist/features/link/drawer/index.d.ts.map +0 -1
  717. package/dist/features/link/drawer/index.js +0 -94
  718. package/dist/features/link/drawer/index.js.map +0 -1
  719. package/dist/features/link/drawer/types.d.ts +0 -10
  720. package/dist/features/link/drawer/types.d.ts.map +0 -1
  721. package/dist/features/link/drawer/types.js +0 -3
  722. package/dist/features/link/drawer/types.js.map +0 -1
  723. package/dist/features/types.d.ts.map +0 -1
  724. package/dist/features/types.js +0 -3
  725. package/dist/features/types.js.map +0 -1
  726. package/dist/features/upload/component/ExtraFieldsDrawer/index.d.ts +0 -12
  727. package/dist/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +0 -1
  728. package/dist/features/upload/component/ExtraFieldsDrawer/index.js +0 -123
  729. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +0 -1
  730. package/dist/lexical/utils/cloneDeep.d.ts +0 -2
  731. package/dist/lexical/utils/cloneDeep.d.ts.map +0 -1
  732. package/dist/lexical/utils/cloneDeep.js +0 -50
  733. package/dist/lexical/utils/cloneDeep.js.map +0 -1
  734. /package/dist/exports/client/{component-QWIGEOVD.js.map → component-VM36FRT2.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/client/EditorConfigProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport * as React from 'react'\nimport { createContext, useContext, useMemo, useRef, useState } from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../types.js'\n\n// Should always produce a 20 character pseudo-random string\nfunction generateQuickGuid(): string {\n return Math.random().toString(36).substring(2, 12) + Math.random().toString(36).substring(2, 12)\n}\n\nexport interface EditorConfigContextType {\n // Editor focus handling\n blurEditor: (editorContext: EditorConfigContextType) => void\n childrenEditors: React.RefObject<Map<string, EditorConfigContextType>>\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement>\n field: FormFieldBase & {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n // Editor focus handling\n focusEditor: (editorContext: EditorConfigContextType) => void\n focusedEditor: EditorConfigContextType | null\n parentEditor: EditorConfigContextType\n registerChild: (uuid: string, editorContext: EditorConfigContextType) => void\n unregisterChild?: (uuid: string) => void\n uuid: string\n}\n\nconst Context: React.Context<EditorConfigContextType> = createContext({\n editorConfig: null,\n field: null,\n uuid: null,\n})\n\nexport const EditorConfigProvider = ({\n children,\n editorConfig,\n editorContainerRef,\n fieldProps,\n parentContext,\n}: {\n children: React.ReactNode\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement>\n fieldProps: FormFieldBase & {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n parentContext?: EditorConfigContextType\n}): React.ReactNode => {\n const [editor] = useLexicalComposerContext()\n // State to store the UUID\n const [uuid] = useState(generateQuickGuid())\n\n const childrenEditors = useRef<Map<string, EditorConfigContextType>>(new Map())\n const [focusedEditor, setFocusedEditor] = useState<EditorConfigContextType | null>(null)\n const focusHistory = useRef<Set<string>>(new Set())\n\n const editorContext = useMemo(\n () =>\n ({\n blurEditor: (editorContext: EditorConfigContextType) => {\n //setFocusedEditor(null) // Clear focused editor\n focusHistory.current.clear() // Reset focus history when focus is lost\n },\n childrenEditors,\n editor,\n editorConfig,\n editorContainerRef,\n field: fieldProps,\n focusEditor: (editorContext: EditorConfigContextType) => {\n const editorUUID = editorContext.uuid\n\n // Avoid recursion by checking if this editor is already focused in this cycle\n if (focusHistory.current.has(editorUUID)) {\n return\n }\n\n // Add this editor to the history to prevent future recursions in this cycle\n focusHistory.current.add(editorUUID)\n setFocusedEditor(editorContext)\n\n // Propagate focus event to parent and children, ensuring they do not refocus this editor\n if (parentContext?.uuid) {\n parentContext.focusEditor(editorContext)\n }\n childrenEditors.current.forEach((childEditor, childUUID) => {\n childEditor.focusEditor(editorContext)\n })\n\n focusHistory.current.clear()\n },\n focusedEditor,\n parentEditor: parentContext,\n registerChild: (childUUID, childEditorContext) => {\n if (!childrenEditors.current.has(childUUID)) {\n const newMap = new Map(childrenEditors.current)\n newMap.set(childUUID, childEditorContext)\n childrenEditors.current = newMap\n }\n },\n unregisterChild: (childUUID) => {\n if (childrenEditors.current.has(childUUID)) {\n const newMap = new Map(childrenEditors.current)\n newMap.delete(childUUID)\n childrenEditors.current = newMap\n }\n },\n\n uuid,\n }) as EditorConfigContextType,\n [\n editor,\n childrenEditors,\n editorConfig,\n editorContainerRef,\n fieldProps,\n focusedEditor,\n parentContext,\n uuid,\n ],\n )\n\n return <Context.Provider value={editorContext}>{children}</Context.Provider>\n}\n\nexport const useEditorConfigContext = (): EditorConfigContextType => {\n const context = useContext(Context)\n if (context === undefined) {\n throw new Error('useEditorConfigContext must be used within an EditorConfigProvider')\n }\n return context\n}\n"],"names":["useLexicalComposerContext","React","createContext","useContext","useMemo","useRef","useState","generateQuickGuid","Math","random","toString","substring","Context","editorConfig","field","uuid","EditorConfigProvider","children","editorContainerRef","fieldProps","parentContext","editor","childrenEditors","Map","focusedEditor","setFocusedEditor","focusHistory","Set","editorContext","blurEditor","current","clear","focusEditor","editorUUID","has","add","forEach","childEditor","childUUID","parentEditor","registerChild","childEditorContext","newMap","set","unregisterChild","delete","Provider","value","useEditorConfigContext","context","undefined","Error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAKA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,YAAYC,WAAW,QAAO;AAC9B,SAASC,aAAa,EAAEC,UAAU,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAI5E,4DAA4D;AAC5D,SAASC;IACP,OAAOC,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,SAAS,CAAC,GAAG,MAAMH,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,SAAS,CAAC,GAAG;AAC/F;AAuBA,MAAMC,wBAAkDV,cAAc;IACpEW,cAAc;IACdC,OA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AACI,GAAG,CAACI,YAAY;oBAC1C,MAAMI,SAAS,IAAInB,IAAID,gBAAgBQ,OAAO;oBAC9CY,OAAOG,MAAM,CAACP;oBACdhB,gBAAgBQ,OAAO,GAAGY;gBAC5B;YACF;YAEA3B;QACF,CAAA,GACF;QACEM;QACAC;QACAT;QACAK;QACAC;QACAK;QACAJ;QACAL;KACD;IAGH,qBAAO,KAACH,QAAQkC,QAAQ;QAACC,OAAOnB;kBAAgBX;;AAClD,EAAC;AAED,OAAO,MAAM+B,yBAAyB;IACpC,MAAMC,UAAU9C,WAAWS;IAC3B,IAAIqC,YAAYC,WAAW;QACzB,MAAM,IAAIC,MAAM;IAClB;IACA,OAAOF;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/client/EditorConfigProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { LexicalEditor } from 'lexical'\nimport type { FormFieldBase } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport * as React from 'react'\nimport { createContext, useContext, useMemo, useRef, useState } from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../types.js'\n\n// Should always produce a 20 character pseudo-random string\nfunction generateQuickGuid(): string {\n return Math.random().toString(36).substring(2, 12) + Math.random().toString(36).substring(2, 12)\n}\n\nexport interface EditorConfigContextType {\n // Editor focus handling\n blurEditor: (editorContext: EditorConfigContextType) => void\n childrenEditors: React.RefObject<Map<string, EditorConfigContextType>>\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement>\n field: {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n } & FormFieldBase\n // Editor focus handling\n focusEditor: (editorContext: EditorConfigContextType) => void\n focusedEditor: EditorConfigContextType | null\n parentEditor: EditorConfigContextType\n registerChild: (uuid: string, editorContext: EditorConfigContextType) => void\n unregisterChild?: (uuid: string) => void\n uuid: string\n}\n\nconst Context: React.Context<EditorConfigContextType> = createContext({\n editorConfig: null,\n field: null,\n uuid: null,\n})\n\nexport const EditorConfigProvider = ({\n children,\n editorConfig,\n editorContainerRef,\n fieldProps,\n parentContext,\n}: {\n children: React.ReactNode\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement>\n fieldProps: {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n } & FormFieldBase\n parentContext?: EditorConfigContextType\n}): React.ReactNode => {\n const [editor] = useLexicalComposerContext()\n // State to store the UUID\n const [uuid] = useState(generateQuickGuid())\n\n const childrenEditors = useRef<Map<string, EditorConfigContextType>>(new Map())\n const [focusedEditor, setFocusedEditor] = useState<EditorConfigContextType | null>(null)\n const focusHistory = useRef<Set<string>>(new Set())\n\n const editorContext = useMemo(\n () =>\n ({\n blurEditor: (editorContext: EditorConfigContextType) => {\n //setFocusedEditor(null) // Clear focused editor\n focusHistory.current.clear() // Reset focus history when focus is lost\n },\n childrenEditors,\n editor,\n editorConfig,\n editorContainerRef,\n field: fieldProps,\n focusEditor: (editorContext: EditorConfigContextType) => {\n const editorUUID = editorContext.uuid\n\n // Avoid recursion by checking if this editor is already focused in this cycle\n if (focusHistory.current.has(editorUUID)) {\n return\n }\n\n // Add this editor to the history to prevent future recursions in this cycle\n focusHistory.current.add(editorUUID)\n setFocusedEditor(editorContext)\n\n // Propagate focus event to parent and children, ensuring they do not refocus this editor\n if (parentContext?.uuid) {\n parentContext.focusEditor(editorContext)\n }\n childrenEditors.current.forEach((childEditor, childUUID) => {\n childEditor.focusEditor(editorContext)\n })\n\n focusHistory.current.clear()\n },\n focusedEditor,\n parentEditor: parentContext,\n registerChild: (childUUID, childEditorContext) => {\n if (!childrenEditors.current.has(childUUID)) {\n const newMap = new Map(childrenEditors.current)\n newMap.set(childUUID, childEditorContext)\n childrenEditors.current = newMap\n }\n },\n unregisterChild: (childUUID) => {\n if (childrenEditors.current.has(childUUID)) {\n const newMap = new Map(childrenEditors.current)\n newMap.delete(childUUID)\n childrenEditors.current = newMap\n }\n },\n\n uuid,\n }) as EditorConfigContextType,\n [\n editor,\n childrenEditors,\n editorConfig,\n editorContainerRef,\n fieldProps,\n focusedEditor,\n parentContext,\n uuid,\n ],\n )\n\n return <Context.Provider value={editorContext}>{children}</Context.Provider>\n}\n\nexport const useEditorConfigContext = (): EditorConfigContextType => {\n const context = useContext(Context)\n if (context === undefined) {\n throw new Error('useEditorConfigContext must be used within an EditorConfigProvider')\n }\n return context\n}\n"],"names":["useLexicalComposerContext","React","createContext","useContext","useMemo","useRef","useState","generateQuickGuid","Math","random","toString","substring","Context","editorConfig","field","uuid","EditorConfigProvider","children","editorContainerRef","fieldProps","parentContext","editor","childrenEditors","Map","focusedEditor","setFocusedEditor","focusHistory","Set","editorContext","blurEditor","current","clear","focusEditor","editorUUID","has","add","forEach","childEditor","childUUID","parentEditor","registerChild","childEditorContext","newMap","set","unregisterChild","delete","Provider","value","useEditorConfigContext","context","undefined","Error"],"mappings":"AAAA;;AAKA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,YAAYC,WAAW,QAAO;AAC9B,SAASC,aAAa,EAAEC,UAAU,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAI5E,4DAA4D;AAC5D,SAASC;IACP,OAAOC,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,SAAS,CAAC,GAAG,MAAMH,KAAKC,MAAM,GAAGC,QAAQ,CAAC,IAAIC,SAAS,CAAC,GAAG;AAC/F;AAuBA,MAAMC,wBAAkDV,cAAc;IACpEW,cAAc;IACdC,OAAO;IACPC,MAAM;AACR;AAEA,OAAO,MAAMC,uBAAuB,CAAC,EACnCC,QAAQ,EACRJ,YAAY,EACZK,kBAAkB,EAClBC,UAAU,EACVC,aAAa,EAWd;IACC,MAAM,CAACC,OAAO,GAAGrB;IACjB,0BAA0B;IAC1B,MAAM,CAACe,KAAK,GAAGT,S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K;QACAJ;QACAL;KACD;IAGH,qBAAO,KAACH,QAAQkC,QAAQ;QAACC,OAAOnB;kBAAgBX;;AAClD,EAAC;AAED,OAAO,MAAM+B,yBAAyB;IACpC,MAAMC,UAAU9C,WAAWS;IAC3B,IAAIqC,YAAYC,WAAW;QACzB,MAAM,IAAIC,MAAM;IAClB;IACA,OAAOF;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/client/default.ts"],"sourcesContent":["'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"],"names":["LexicalEditorTheme","defaultEditorLexicalConfig","namespace","theme"],"rangeMappings":";;;;;","mappings":"AAAA;AAGA,SAASA,kBAAkB,QAAQ,6BAA4B;AAE/D,OAAO,MAAMC,6BAAkD;IAC7DC,WAAW;IACXC,OAAOH;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/client/default.ts"],"sourcesContent":["'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"],"names":["LexicalEditorTheme","defaultEditorLexicalConfig","namespace","theme"],"mappings":"AAAA;AAGA,SAASA,kBAAkB,QAAQ,6BAA4B;AAE/D,OAAO,MAAMC,6BAAkD;IAC7DC,WAAW;IACXC,OAAOH;AACT,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { ResolvedClientFeatureMap } from '../../../features/types.js';
1
+ import type { ResolvedClientFeatureMap } from '../../../features/typesClient.js';
2
2
  import type { ClientEditorConfig } from '../types.js';
3
3
  /**
4
4
  * This function expects client functions to ALREADY be ordered & dependencies checked on the server
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/client/loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,wBAAwB,EACzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,UAAU,EACV,uBAAuB,GACxB,EAAE;IACD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,uBAAuB,EAAE,kBAAkB,CAAA;CAC5C,GAAG,wBAAwB,CAmE3B"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/client/loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,wBAAwB,EACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,UAAU,EACV,uBAAuB,GACxB,EAAE;IACD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,uBAAuB,EAAE,kBAAkB,CAAA;CAC5C,GAAG,wBAAwB,CAmE3B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/client/loader.ts"],"sourcesContent":["'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) =>\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"],"names":["loadClientFeatures","clientFunctions","schemaPath","unSanitizedEditorConfig","featureProvider","features","clientFeatureProps","featureKey","order","undefined","Error","sort","a","b","featureProviderMap","Map","map","f","resolvedFeatures","loaded","relevantClientFunctions","Object","entries","forEach","key","plugin","startsWith","featureComponentKey","split","feature","set"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AASA;;;CAGC,GACD,OAAO,SAASA,mBAAmB,EACjCC,eAAe,EACfC,UAAU,EACVC,uBAAuB,EAKxB;IACC,KAAK,MAAMC,mBAAmBD,wBAAwBE,QAAQ,CAAE;QAC9D,IACE,CAACD,iBAAiBE,oBAAoBC,cACtCH,iBAAiBE,oBAAoBE,UAAUC,aAC/CL,iBAAiBE,oBAAoBE,UAAU,MAC/C;YACA,MAAM,IAAIE,MACR;QAEJ;IACF;IAEA,iDAAiD;IACjDP,wBAAwBE,QAAQ,GAAGF,wBAAwBE,QAAQ,CAACM,IAAI,CACtE,CAACC,GAAGC,IAAMD,EAAEN,kBAAkB,CAACE,KAAK,GAAGK,EAAEP,kBAAkB,CAACE,KAAK;IAGnE,MAAMM,qBAA+C,IAAIC,IACvDZ,wBAAwBE,QAAQ,CAACW,GAAG,CAClC,CAACC,IACC;YAACA,EAAEX,kBAAkB,CAACC,UAAU;YAAEU;SAAE;IAI1C,MAAMC,mBAA6C,IAAIH;IAEvD,uEAAuE;IACvE,IAAII,SAAS;IACb,KAAK,MAAMf,mBAAmBD,wBAAwBE,QAAQ,CAAE;QAC9D;;KAEC,GACD,MAAMe,0BAA+C,CAAC;QACtDC,OAAOC,OAAO,CAACrB,iBAAiBsB,OAAO,CAAC,CAAC,CAACC,KAAKC,OAAO;YACpD,IACED,IAAIE,UAAU,CACZ,CAAC,eAAe,EAAExB,WAAW,CAAC,EAAEE,gBAAgBE,kBAAkB,CAACC,UAAU,CAAC,YAAY,CAAC,GAE7F;gBACA,MAAMoB,sBAAsBH,IAAII,KAAK,CACnC,CAAC,EAAE1B,WAAW,CAAC,EAAEE,gBAAgBE,kBAAkB,CAACC,UAAU,CAAC,YAAY,CAAC,CAC7E,CAAC,EAAE;gBACJa,uBAAuB,CAACO,oBAAoB,GAAGF;YACjD;QACF;QAEA,MAAMI,UACJ,OAAOzB,gBAAgByB,OAAO,KAAK,aAC/BzB,gBAAgByB,OAAO,CAAC;YACtB5B,iBAAiBmB;YACjBN;YACAI;YACAf;QACF,KACAC,gBAAgByB,OAAO;QAE7BX,iBAAiBY,GAAG,CAAC1B,gBAAgBE,kBAAkB,CAACC,UAAU,EAAE;YAClE,GAAGsB,OAAO;YACVL,KAAKpB,gBAAgBE,kBAAkB,CAACC,UAAU;YAClDC,OAAOW;QACT;QAEAA;IACF;IAEA,OAAOD;AACT"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/client/loader.ts"],"sourcesContent":["'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"],"names":["loadClientFeatures","clientFunctions","schemaPath","unSanitizedEditorConfig","featureProvider","features","clientFeatureProps","featureKey","order","undefined","Error","sort","a","b","featureProviderMap","Map","map","f","resolvedFeatures","loaded","relevantClientFunctions","Object","entries","forEach","key","plugin","startsWith","featureComponentKey","split","feature","set"],"mappings":"AAAA;AASA;;;CAGC,GACD,OAAO,SAASA,mBAAmB,EACjCC,eAAe,EACfC,UAAU,EACVC,uBAAuB,EAKxB;IACC,KAAK,MAAMC,mBAAmBD,wBAAwBE,QAAQ,CAAE;QAC9D,IACE,CAACD,iBAAiBE,oBAAoBC,cACtCH,iBAAiBE,oBAAoBE,UAAUC,aAC/CL,iBAAiBE,oBAAoBE,UAAU,MAC/C;YACA,MAAM,IAAIE,MACR;QAEJ;IACF;IAEA,iDAAiD;IACjDP,wBAAwBE,QAAQ,GAAGF,wBAAwBE,QAAQ,CAACM,IAAI,CACtE,CAACC,GAAGC,IAAMD,EAAEN,kBAAkB,CAACE,KAAK,GAAGK,EAAEP,kBAAkB,CAACE,KAAK;IAGnE,MAAMM,qBAA+C,IAAIC,IACvDZ,wBAAwBE,QAAQ,CAACW,GAAG,CAClC,CAACC,IACC;YAACA,EAAEX,kBAAkB,CAACC,UAAU;YAAEU;SAAE;IAI1C,MAAMC,mBAA6C,IAAIH;IAEvD,uEAAuE;IACvE,IAAII,SAAS;IACb,KAAK,MAAMf,mBAAmBD,wBAAwBE,QAAQ,CAAE;QAC9D;;KAEC,GACD,MAAMe,0BAA+C,CAAC;QACtDC,OAAOC,OAAO,CAACrB,iBAAiBsB,OAAO,CAAC,CAAC,CAACC,KAAKC,OAAO;YACpD,IACED,IAAIE,UAAU,CACZ,CAAC,eAAe,EAAExB,WAAW,CAAC,EAAEE,gBAAgBE,kBAAkB,CAACC,UAAU,CAAC,YAAY,CAAC,GAE7F;gBACA,MAAMoB,sBAAsBH,IAAII,KAAK,CACnC,CAAC,EAAE1B,WAAW,CAAC,EAAEE,gBAAgBE,kBAAkB,CAACC,UAAU,CAAC,YAAY,CAAC,CAC7E,CAAC,EAAE;gBACJa,uBAAuB,CAACO,oBAAoB,GAAGF;YACjD;QACF;QAEA,MAAMI,UACJ,OAAOzB,gBAAgByB,OAAO,KAAK,aAC/BzB,gBAAgByB,OAAO,CAAC;YACtB5B,iBAAiBmB;YACjBN;YACAI;YACAf;QACF,KACAC,gBAAgByB,OAAO;QAE7BX,iBAAiBY,GAAG,CAAC1B,gBAAgBE,kBAAkB,CAACC,UAAU,EAAE;YAClE,GAAGsB,OAAO;YACVL,KAAKpB,gBAAgBE,kBAAkB,CAACC,UAAU;YAClDC,OAAOW;QACT;QAEAA;IACF;IAEA,OAAOD;AACT"}
@@ -1,5 +1,5 @@
1
1
  import type { EditorConfig as LexicalEditorConfig } from 'lexical';
2
- import type { ResolvedClientFeatureMap, SanitizedClientFeatures } from '../../../features/types.js';
2
+ import type { ResolvedClientFeatureMap, SanitizedClientFeatures } from '../../../features/typesClient.js';
3
3
  import type { LexicalFieldAdminProps } from '../../../types.js';
4
4
  import type { SanitizedClientEditorConfig } from '../types.js';
5
5
  export declare const sanitizeClientFeatures: (features: ResolvedClientFeatureMap) => SanitizedClientFeatures;
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/client/sanitize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AACnG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAE9D,eAAO,MAAM,sBAAsB,aACvB,wBAAwB,KACjC,uBAiMF,CAAA;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,mBAAmB,EAC5B,wBAAwB,EAAE,wBAAwB,EAClD,KAAK,CAAC,EAAE,sBAAsB,GAC7B,2BAA2B,CAO7B"}
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/client/sanitize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAE9D,eAAO,MAAM,sBAAsB,aACvB,wBAAwB,KACjC,uBAsMF,CAAA;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,mBAAmB,EAC5B,wBAAwB,EAAE,wBAAwB,EAClD,KAAK,CAAC,EAAE,sBAAsB,GAC7B,2BAA2B,CAO7B"}
@@ -9,6 +9,7 @@ export const sanitizeClientFeatures = (features)=>{
9
9
  markdownTransformers: [],
10
10
  nodes: [],
11
11
  plugins: [],
12
+ providers: [],
12
13
  slashMenu: {
13
14
  dynamicGroups: [],
14
15
  groups: []
@@ -32,6 +33,9 @@ export const sanitizeClientFeatures = (features)=>{
32
33
  sanitized.hooks.save = sanitized.hooks.save.concat(feature.hooks.save);
33
34
  }
34
35
  }
36
+ if (feature.providers?.length) {
37
+ sanitized.providers = sanitized.providers.concat(feature.providers);
38
+ }
35
39
  if (feature.nodes?.length) {
36
40
  sanitized.nodes = sanitized.nodes.concat(feature.nodes);
37
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/client/sanitize.ts"],"sourcesContent":["'use client'\n\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type { ResolvedClientFeatureMap, SanitizedClientFeatures } from '../../../features/types.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"],"names":["sanitizeClientFeatures","features","sanitized","enabledFeatures","hooks","load","save","markdownTransformers","nodes","plugins","slashMenu","dynamicGroups","groups","toolbarFixed","toolbarInline","size","forEach","feature","length","concat","plugin","i","push","Component","clientProps","sanitizedClientFeatureProps","key","position","group","foundGroup","find","sanitizedGroup","items","filter","optionGroup","sort","a","b","order","sanitizeClientEditorConfig","lexical","resolvedClientFeatureMap","admin","resolvedFeatureMap"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAQA,OAAO,MAAMA,yBAAyB,CACpCC;IAEA,MAAMC,YAAqC;QACzCC,iBAAiB,EAAE;QACnBC,OAAO;YACLC,MAAM,EAAE;YACRC,MAAM,EAAE;QACV;QACAC,sBAAsB,EAAE;QACxBC,OAAO,EAAE;QACTC,SAAS,EAAE;QACXC,WAAW;YACTC,eAAe,EAAE;YACjBC,QAAQ,EAAE;QACZ;QACAC,cAAc;YACZD,QAAQ,EAAE;QACZ;QACAE,eAAe;YACbF,QAAQ,EAAE;QACZ;IACF;IAEA,IAAI,CAACX,UAAUc,MAAM;QACnB,OAAOb;IACT;IAEAD,SAASe,OAAO,CAAC,CAACC;QAChB,IAAIA,QAAQb,KAAK,EAAE;YACjB,IAAIa,QAAQb,KAAK,EAAEC,MAAMa,QAAQ;gBAC/BhB,UAAUE,KAAK,CAACC,IAAI,GAAGH,UAAUE,KAAK,CAACC,IAAI,CAACc,MAAM,CAACF,QAAQb,KAAK,CAACC,IAAI;YACvE;YACA,IAAIY,QAAQb,KAAK,EAAEE,MAAMY,QAAQ;gBAC/BhB,UAAUE,KAAK,CAACE,IAAI,GAAGJ,UAAUE,KAAK,CAACE,IAAI,CAACa,MAAM,CAACF,QAAQb,KAAK,CAACE,IAAI;YACvE;QACF;QAEA,IAAIW,QA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,KAAK,EAAE;gBAClB,OAAO;YACT,OAAO;gBACL,OAAO;YACT;QACF;IACF;IAEA,uEAAuE;IACvE,KAAK,MAAMV,SAAS1B,UAAUW,YAAY,CAACD,MAAM,CAAE;QACjDgB,MAAMI,KAAK,CAACG,IAAI,CAAC,CAACC,GAAGC;YACnB,IAAID,EAAEE,KAAK,IAAID,EAAEC,KAAK,EAAE;gBACtB,OAAOF,EAAEE,KAAK,GAAGD,EAAEC,KAAK;YAC1B,OAAO,IAAIF,EAAEE,KAAK,EAAE;gBAClB,OAAO,CAAC;YACV,OAAO,IAAID,EAAEC,KAAK,EAAE;gBAClB,OAAO;YACT,OAAO;gBACL,OAAO;YACT;QACF;IACF;IAEA,OAAOpC;AACT,EAAC;AAED,OAAO,SAASqC,2BACdC,OAA4B,EAC5BC,wBAAkD,EAClDC,KAA8B;IAE9B,OAAO;QACLA;QACAzC,UAAUD,uBAAuByC;QACjCD;QACAG,oBAAoBF;IACtB;AACF"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/client/sanitize.ts"],"sourcesContent":["'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 providers: [],\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.providers?.length) {\n sanitized.providers = sanitized.providers.concat(feature.providers)\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"],"names":["sanitizeClientFeatures","features","sanitized","enabledFeatures","hooks","load","save","markdownTransformers","nodes","plugins","providers","slashMenu","dynamicGroups","groups","toolbarFixed","toolbarInline","size","forEach","feature","length","concat","plugin","i","push","Component","clientProps","sanitizedClientFeatureProps","key","position","group","foundGroup","find","sanitizedGroup","items","filter","optionGroup","sort","a","b","order","sanitizeClientEditorConfig","lexical","resolvedClientFeatureMap","admin","resolvedFeatureMap"],"mappings":"AAAA;AAWA,OAAO,MAAMA,yBAAyB,CACpCC;IAEA,MAAMC,YAAqC;QACzCC,iBAAiB,EAAE;QACnBC,OAAO;YACLC,MAAM,EAAE;YACRC,MAAM,EAAE;QACV;QACAC,sBAAsB,EAAE;QACxBC,OAAO,EAAE;QACTC,SAAS,EAAE;QACXC,WAAW,EAAE;QACbC,WAAW;YACTC,eAAe,EAAE;YACjBC,QAAQ,EAAE;QACZ;QACAC,cAAc;YACZD,QAAQ,EAAE;QACZ;QACAE,eAAe;YACbF,QAAQ,EAAE;QACZ;IACF;IAEA,IAAI,CAACZ,UAAUe,MAAM;QACnB,OAAOd;IACT;IAEAD,SAASgB,OAAO,CAAC,CAACC;QAChB,IAAIA,QAAQd,KAAK,EAAE;YACjB,IAAIc,QAAQd,KAAK,EAAEC,MAAMc,QAAQ;gBAC/BjB,UAAUE,KAAK,CAACC,IAAI,GAAGH,UAAUE,KAAK,CAACC,IAAI,CAACe,MAAM,CAACF,QAAQd,KAAK,CAACC,IAAI;YACvE;YACA,IAAIa,QAAQd,KAAK,EAAEE,MAAMa,QAAQ;gBAC/BjB,UAAUE,KAAK,CAACE,IAAI,GAAGJ,UAAUE,KAAK,CAACE,IAAI,CAACc,MAAM,CAACF,QAAQd,KAAK,CAACE,IAAI;YACvE;QACF;QAEA,IAAI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B,OAAOF,EAAEE,KAAK,GAAGD,EAAEC,KAAK;YAC1B,OAAO,IAAIF,EAAEE,KAAK,EAAE;gBAClB,OAAO,CAAC;YACV,OAAO,IAAID,EAAEC,KAAK,EAAE;gBAClB,OAAO;YACT,OAAO;gBACL,OAAO;YACT;QACF;IACF;IAEA,uEAAuE;IACvE,KAAK,MAAMV,SAAS3B,UAAUY,YAAY,CAACD,MAAM,CAAE;QACjDgB,MAAMI,KAAK,CAACG,IAAI,CAAC,CAACC,GAAGC;YACnB,IAAID,EAAEE,KAAK,IAAID,EAAEC,KAAK,EAAE;gBACtB,OAAOF,EAAEE,KAAK,GAAGD,EAAEC,KAAK;YAC1B,OAAO,IAAIF,EAAEE,KAAK,EAAE;gBAClB,OAAO,CAAC;YACV,OAAO,IAAID,EAAEC,KAAK,EAAE;gBAClB,OAAO;YACT,OAAO;gBACL,OAAO;YACT;QACF;IACF;IAEA,OAAOrC;AACT,EAAC;AAED,OAAO,SAASsC,2BACdC,OAA4B,EAC5BC,wBAAkD,EAClDC,KAA8B;IAE9B,OAAO;QACLA;QACA1C,UAAUD,uBAAuB0C;QACjCD;QACAG,oBAAoBF;IACtB;AACF"}
@@ -1,7 +1,7 @@
1
1
  import type { EditorConfig as LexicalEditorConfig } from 'lexical';
2
- import type { FeatureProviderServer } from '../../../features/types.js';
2
+ import type { FeatureProviderServer } from '../../../features/typesServer.js';
3
3
  import type { ServerEditorConfig } from '../types.js';
4
4
  export declare const defaultEditorLexicalConfig: LexicalEditorConfig;
5
- export declare const defaultEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[];
5
+ export declare const defaultEditorFeatures: FeatureProviderServer<any, any, any>[];
6
6
  export declare const defaultEditorConfig: ServerEditorConfig;
7
7
  //# sourceMappingURL=default.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/server/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAwBrD,eAAO,MAAM,0BAA0B,EAAE,mBAGxC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAqBnF,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,kBAGjC,CAAA"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/server/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAwBrD,eAAO,MAAM,0BAA0B,EAAE,mBAGxC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAqBvE,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,kBAGjC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/server/default.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type { FeatureProviderServer } from '../../../features/types.js'\nimport type { ServerEditorConfig } from '../types.js'\n\nimport { AlignFeature } from '../../../features/align/feature.server.js'\nimport { BlockquoteFeature } from '../../../features/blockquote/feature.server.js'\nimport { BoldFeature } from '../../../features/format/bold/feature.server.js'\nimport { InlineCodeFeature } from '../../../features/format/inlineCode/feature.server.js'\nimport { ItalicFeature } from '../../../features/format/italic/feature.server.js'\nimport { StrikethroughFeature } from '../../../features/format/strikethrough/feature.server.js'\nimport { SubscriptFeature } from '../../../features/format/subscript/feature.server.js'\nimport { SuperscriptFeature } from '../../../features/format/superscript/feature.server.js'\nimport { UnderlineFeature } from '../../../features/format/underline/feature.server.js'\nimport { HeadingFeature } from '../../../features/heading/feature.server.js'\nimport { HorizontalRuleFeature } from '../../../features/horizontalRule/feature.server.js'\nimport { IndentFeature } from '../../../features/indent/feature.server.js'\nimport { LinkFeature } from '../../../features/link/feature.server.js'\nimport { ChecklistFeature } from '../../../features/lists/checklist/feature.server.js'\nimport { OrderedListFeature } from '../../../features/lists/orderedList/feature.server.js'\nimport { UnorderedListFeature } from '../../../features/lists/unorderedList/feature.server.js'\nimport { ParagraphFeature } from '../../../features/paragraph/feature.server.js'\nimport { RelationshipFeature } from '../../../features/relationship/feature.server.js'\nimport { InlineToolbarFeature } from '../../../features/toolbars/inline/feature.server.js'\nimport { UploadFeature } from '../../../features/upload/feature.server.js'\nimport { LexicalEditorTheme } from '../../theme/EditorTheme.js'\n\nexport const defaultEditorLexicalConfig: LexicalEditorConfig = {\n namespace: 'lexical',\n theme: LexicalEditorTheme,\n}\n\nexport const defaultEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = [\n BoldFeature(),\n ItalicFeature(),\n UnderlineFeature(),\n StrikethroughFeature(),\n SubscriptFeature(),\n SuperscriptFeature(),\n InlineCodeFeature(),\n ParagraphFeature(),\n HeadingFeature(),\n AlignFeature(),\n IndentFeature(),\n UnorderedListFeature(),\n OrderedListFeature(),\n ChecklistFeature(),\n LinkFeature(),\n RelationshipFeature(),\n BlockquoteFeature(),\n UploadFeature(),\n HorizontalRuleFeature(),\n InlineToolbarFeature(),\n]\n\nexport const defaultEditorConfig: ServerEditorConfig = {\n features: defaultEditorFeatures,\n lexical: defaultEditorLexicalConfig,\n}\n"],"names":["AlignFeature","BlockquoteFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","ChecklistFeature","OrderedListFeature","UnorderedListFeature","ParagraphFeature","RelationshipFeature","InlineToolbarFeature","UploadFeature","LexicalEditorTheme","defaultEditorLexicalConfig","namespace","theme","defaultEditorFeatures","defaultEditorConfig","features","lexical"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAKA,SAASA,YAAY,QAAQ,4CAA2C;AACxE,SAASC,iBAAiB,QAAQ,iDAAgD;AAClF,SAASC,WAAW,QAAQ,kDAAiD;AAC7E,SAASC,iBAAiB,QAAQ,wDAAuD;AACzF,SAASC,aAAa,QAAQ,oDAAmD;AACjF,SAASC,oBAAoB,QAAQ,2DAA0D;AAC/F,SAASC,gBAAgB,QAAQ,uDAAsD;AACvF,SAASC,kBAAkB,QAAQ,yDAAwD;AAC3F,SAASC,gBAAgB,QAAQ,uDAAsD;AACvF,SAASC,cAAc,QAAQ,8CAA6C;AAC5E,SAASC,qBAAqB,QAAQ,qDAAoD;AAC1F,SAASC,aAAa,QAAQ,6CAA4C;AAC1E,SAASC,WAAW,QAAQ,2CAA0C;AACtE,SAASC,gBAAgB,QAAQ,sDAAqD;AACtF,SAASC,kBAAkB,QAAQ,wDAAuD;AAC1F,SAASC,oBAAoB,QAAQ,0DAAyD;AAC9F,SAASC,gBAAgB,QAAQ,gDAA+C;AAChF,SAASC,mBAAmB,QAAQ,mDAAkD;AACtF,SAASC,oBAAoB,QAAQ,sDAAqD;AAC1F,SAASC,aAAa,QAAQ,6CAA4C;AAC1E,SAASC,kBAAkB,QAAQ,6BAA4B;AAE/D,OAAO,MAAMC,6BAAkD;IAC7DC,WAAW;IACXC,OAAOH;AACT,EAAC;AAED,OAAO,MAAMI,wBAA4E;IACvFtB;IACAE;IACAI;IACAH;IACAC;IACAC;IACAJ;IACAa;IACAP;IACAT;IACAW;IACAI;IACAD;IACAD;IACAD;IACAK;IACAhB;IACAkB;IACAT;IACAQ;CACD,CAAA;AAED,OAAO,MAAMO,sBAA0C;IACrDC,UAAUF;IACVG,SAASN;AACX,EAAC"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/server/default.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type { FeatureProviderServer } from '../../../features/typesServer.js'\nimport type { ServerEditorConfig } from '../types.js'\n\nimport { AlignFeature } from '../../../features/align/feature.server.js'\nimport { BlockquoteFeature } from '../../../features/blockquote/feature.server.js'\nimport { BoldFeature } from '../../../features/format/bold/feature.server.js'\nimport { InlineCodeFeature } from '../../../features/format/inlineCode/feature.server.js'\nimport { ItalicFeature } from '../../../features/format/italic/feature.server.js'\nimport { StrikethroughFeature } from '../../../features/format/strikethrough/feature.server.js'\nimport { SubscriptFeature } from '../../../features/format/subscript/feature.server.js'\nimport { SuperscriptFeature } from '../../../features/format/superscript/feature.server.js'\nimport { UnderlineFeature } from '../../../features/format/underline/feature.server.js'\nimport { HeadingFeature } from '../../../features/heading/feature.server.js'\nimport { HorizontalRuleFeature } from '../../../features/horizontalRule/feature.server.js'\nimport { IndentFeature } from '../../../features/indent/feature.server.js'\nimport { LinkFeature } from '../../../features/link/feature.server.js'\nimport { ChecklistFeature } from '../../../features/lists/checklist/feature.server.js'\nimport { OrderedListFeature } from '../../../features/lists/orderedList/feature.server.js'\nimport { UnorderedListFeature } from '../../../features/lists/unorderedList/feature.server.js'\nimport { ParagraphFeature } from '../../../features/paragraph/feature.server.js'\nimport { RelationshipFeature } from '../../../features/relationship/feature.server.js'\nimport { InlineToolbarFeature } from '../../../features/toolbars/inline/feature.server.js'\nimport { UploadFeature } from '../../../features/upload/feature.server.js'\nimport { LexicalEditorTheme } from '../../theme/EditorTheme.js'\n\nexport const defaultEditorLexicalConfig: LexicalEditorConfig = {\n namespace: 'lexical',\n theme: LexicalEditorTheme,\n}\n\nexport const defaultEditorFeatures: FeatureProviderServer<any, any, any>[] = [\n BoldFeature(),\n ItalicFeature(),\n UnderlineFeature(),\n StrikethroughFeature(),\n SubscriptFeature(),\n SuperscriptFeature(),\n InlineCodeFeature(),\n ParagraphFeature(),\n HeadingFeature(),\n AlignFeature(),\n IndentFeature(),\n UnorderedListFeature(),\n OrderedListFeature(),\n ChecklistFeature(),\n LinkFeature(),\n RelationshipFeature(),\n BlockquoteFeature(),\n UploadFeature(),\n HorizontalRuleFeature(),\n InlineToolbarFeature(),\n]\n\nexport const defaultEditorConfig: ServerEditorConfig = {\n features: defaultEditorFeatures,\n lexical: defaultEditorLexicalConfig,\n}\n"],"names":["AlignFeature","BlockquoteFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","ChecklistFeature","OrderedListFeature","UnorderedListFeature","ParagraphFeature","RelationshipFeature","InlineToolbarFeature","UploadFeature","LexicalEditorTheme","defaultEditorLexicalConfig","namespace","theme","defaultEditorFeatures","defaultEditorConfig","features","lexical"],"mappings":"AAKA,SAASA,YAAY,QAAQ,4CAA2C;AACxE,SAASC,iBAAiB,QAAQ,iDAAgD;AAClF,SAASC,WAAW,QAAQ,kDAAiD;AAC7E,SAASC,iBAAiB,QAAQ,wDAAuD;AACzF,SAASC,aAAa,QAAQ,oDAAmD;AACjF,SAASC,oBAAoB,QAAQ,2DAA0D;AAC/F,SAASC,gBAAgB,QAAQ,uDAAsD;AACvF,SAASC,kBAAkB,QAAQ,yDAAwD;AAC3F,SAASC,gBAAgB,QAAQ,uDAAsD;AACvF,SAASC,cAAc,QAAQ,8CAA6C;AAC5E,SAASC,qBAAqB,QAAQ,qDAAoD;AAC1F,SAASC,aAAa,QAAQ,6CAA4C;AAC1E,SAASC,WAAW,QAAQ,2CAA0C;AACtE,SAASC,gBAAgB,QAAQ,sDAAqD;AACtF,SAASC,kBAAkB,QAAQ,wDAAuD;AAC1F,SAASC,oBAAoB,QAAQ,0DAAyD;AAC9F,SAASC,gBAAgB,QAAQ,gDAA+C;AAChF,SAASC,mBAAmB,QAAQ,mDAAkD;AACtF,SAASC,oBAAoB,QAAQ,sDAAqD;AAC1F,SAASC,aAAa,QAAQ,6CAA4C;AAC1E,SAASC,kBAAkB,QAAQ,6BAA4B;AAE/D,OAAO,MAAMC,6BAAkD;IAC7DC,WAAW;IACXC,OAAOH;AACT,EAAC;AAED,OAAO,MAAMI,wBAAgE;IAC3EtB;IACAE;IACAI;IACAH;IACAC;IACAC;IACAJ;IACAa;IACAP;IACAT;IACAW;IACAI;IACAD;IACAD;IACAD;IACAK;IACAhB;IACAkB;IACAT;IACAQ;CACD,CAAA;AAED,OAAO,MAAMO,sBAA0C;IACrDC,UAAUF;IACVG,SAASN;AACX,EAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { SanitizedConfig } from 'payload';
2
- import type { FeatureProviderServer, ResolvedServerFeatureMap } from '../../../features/types.js';
2
+ import type { FeatureProviderServer, ResolvedServerFeatureMap } from '../../../features/typesServer.js';
3
3
  import type { ServerEditorConfig } from '../types.js';
4
4
  export declare function sortFeaturesForOptimalLoading(featureProviders: FeatureProviderServer<unknown, unknown, unknown>[]): FeatureProviderServer<unknown, unknown, unknown>[];
5
5
  export declare function loadFeatures({ config, isRoot, unSanitizedEditorConfig, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/server/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EAEzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AA8FrD,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,GACnE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAEpD;AAED,wBAAsB,YAAY,CAAC,EACjC,MAAM,EACN,MAAM,EACN,uBAAuB,GACxB,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,uBAAuB,EAAE,kBAAkB,CAAA;CAC5C,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAmFpC"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/server/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EAEzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AA8FrD,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,GACnE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAEpD;AAED,wBAAsB,YAAY,CAAC,EACjC,MAAM,EACN,MAAM,EACN,uBAAuB,GACxB,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,uBAAuB,EAAE,kBAAkB,CAAA;CAC5C,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAmFpC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/server/loader.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n ServerFeatureProviderMap,\n} from '../../../features/types.js'\nimport type { ServerEditorConfig } from '../types.js'\n\ntype DependencyGraph = {\n [key: string]: {\n dependencies: string[]\n dependenciesPriority: string[]\n dependenciesSoft: string[]\n featureProvider: FeatureProviderServer<unknown, unknown, unknown>\n }\n}\n\nfunction createDependencyGraph(\n featureProviders: FeatureProviderServer<unknown, unknown, unknown>[],\n): DependencyGraph {\n const graph: DependencyGraph = {}\n for (const fp of featureProviders) {\n graph[fp.key] = {\n dependencies: fp.dependencies || [],\n dependenciesPriority: fp.dependenciesPriority || [],\n dependenciesSoft: fp.dependenciesSoft || [],\n featureProvider: fp,\n }\n }\n return graph\n}\n\nfunction topologicallySortFeatures(\n featureProviders: FeatureProviderServer<unknown, unknown, unknown>[],\n): FeatureProviderServer<unknown, unknown, unknown>[] {\n const graph = createDependencyGraph(featureProviders)\n const visited: { [key: string]: boolean } = {}\n const stack: FeatureProviderServer<unknown, unknown, unknown>[] = []\n\n for (const key in graph) {\n if (!visited[key]) {\n visit(graph, key, visited, stack)\n }\n }\n\n return stack.reverse()\n}\n\nfunction visit(\n graph: DependencyGraph,\n key: string,\n visited: { [key: string]: boolean },\n stack: FeatureProviderServer<unknown, unknown, unknown>[],\n currentPath: string[] = [],\n) {\n if (!graph[key]) {\n throw new Error(`Feature key ${key} is not present in the dependency graph.`)\n }\n\n if (currentPath.includes(key)) {\n throw new Error(`Circular dependency detected: ${currentPath.join(' -> ')} -> ${key}`)\n }\n\n if (visited[key]) {\n return\n }\n\n visited[key] = true\n currentPath.push(key)\n\n // First process the hard priority dependencies\n for (const dep of graph[key].dependenciesPriority) {\n if (!visited[dep]) {\n visit(graph, dep, visited, stack, currentPath)\n }\n }\n\n // Then process the normal dependencies, but make sure to not violate hard dependencies\n for (const dep of graph[key].dependencies) {\n if (!visited[dep] && !graph[key].dependenciesPriority.includes(dep)) {\n visit(graph, dep, visited, stack, currentPath)\n }\n }\n\n // Then process the soft dependencies. Make sure to not violate hard and normal dependencies.\n for (const dep of graph[key].dependenciesSoft) {\n if (\n graph[dep] &&\n !visited[dep] &&\n !graph[key].dependenciesPriority.includes(dep) &&\n !graph[key].dependencies.includes(dep)\n ) {\n visit(graph, dep, visited, stack, currentPath)\n }\n }\n\n stack.push(graph[key].featureProvider)\n currentPath.pop()\n}\n\nexport function sortFeaturesForOptimalLoading(\n featureProviders: FeatureProviderServer<unknown, unknown, unknown>[],\n): FeatureProviderServer<unknown, unknown, unknown>[] {\n return topologicallySortFeatures(featureProviders)\n}\n\nexport async function loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig,\n}: {\n config: SanitizedConfig\n isRoot?: boolean\n unSanitizedEditorConfig: ServerEditorConfig\n}): Promise<ResolvedServerFeatureMap> {\n // First remove all duplicate features. The LAST feature with a given key wins.\n unSanitizedEditorConfig.features = unSanitizedEditorConfig.features\n .reverse()\n .filter((f, i, arr) => {\n const firstIndex = arr.findIndex((f2) => f2.key === f.key)\n return firstIndex === i\n })\n .reverse()\n\n unSanitizedEditorConfig.features = sortFeaturesForOptimalLoading(unSanitizedEditorConfig.features)\n\n const featureProviderMap: ServerFeatureProviderMap = new Map(\n unSanitizedEditorConfig.features.map(\n (f) => [f.key, f] as [string, FeatureProviderServer<unknown, unknown, unknown>],\n ),\n )\n\n const resolvedFeatures: ResolvedServerFeatureMap = 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 if (!featureProvider.key) {\n throw new Error(\n `A Feature you've added does not have a key. Please add a key to the feature. This is used to uniquely identify the feature.`,\n )\n }\n if (featureProvider.dependencies?.length) {\n for (const dependencyKey of featureProvider.dependencies) {\n const found = unSanitizedEditorConfig.features.find((f) => f.key === dependencyKey)\n if (!found) {\n throw new Error(\n `Feature ${featureProvider.key} has a dependency ${dependencyKey} which does not exist.`,\n )\n }\n }\n }\n\n if (featureProvider.dependenciesPriority?.length) {\n for (const priorityDependencyKey of featureProvider.dependenciesPriority) {\n // look in the resolved features instead of the editorConfig.features, as a dependency requires the feature to be loaded before it, contrary to a soft-dependency\n const found = resolvedFeatures.get(priorityDependencyKey)\n if (!found) {\n const existsInEditorConfig = unSanitizedEditorConfig.features.find(\n (f) => f.key === priorityDependencyKey,\n )\n if (!existsInEditorConfig) {\n throw new Error(\n `Feature ${featureProvider.key} has a priority dependency ${priorityDependencyKey} which does not exist.`,\n )\n } else {\n throw new Error(\n `Feature ${featureProvider.key} has a priority dependency ${priorityDependencyKey} which is not loaded before it.`,\n )\n }\n }\n }\n }\n\n const feature =\n typeof featureProvider.feature === 'function'\n ? await featureProvider.feature({\n config,\n featureProviderMap,\n isRoot,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n : featureProvider.feature\n resolvedFeatures.set(featureProvider.key, {\n ...feature,\n dependencies: featureProvider.dependencies,\n dependenciesPriority: featureProvider.dependenciesPriority,\n dependenciesSoft: featureProvider.dependenciesSoft,\n key: featureProvider.key,\n order: loaded,\n })\n\n loaded++\n }\n\n return resolvedFeatures\n}\n"],"names":["createDependencyGraph","featureProviders","graph","fp","key","dependencies","dependenciesPriority","dependenciesSoft","featureProvider","topologicallySortFeatures","visited","stack","visit","reverse","currentPath","Error","includes","join","push","dep","pop","sortFeaturesForOptimalLoading","loadFeatures","config","isRoot","unSanitizedEditorConfig","features","filter","f","i","arr","firstIndex","findIndex","f2","featureProviderMap","Map","map","resolvedFeatures","loaded","length","dependencyKey","found","find","priorityDependencyKey","get","existsInEditorConfig","feature","set","order"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAkBA,SAASA,sBACPC,gBAAoE;IAEpE,MAAMC,QAAyB,CAAC;IAChC,KAAK,MAAMC,MAAMF,iBAAkB;QACjCC,KAAK,CAACC,GAAGC,GAAG,CAAC,GAAG;YACdC,cAAcF,GAAGE,YAAY,IAAI,EAAE;YACnCC,sBAAsBH,GAAGG,oBAAoB,IAAI,EAAE;YACnDC,kBAAkBJ,GAAGI,gBAAgB,IAAI,EAAE;YAC3CC,iBAAiBL;QACnB;IACF;IACA,OAAOD;AACT;AAEA,SAASO,0BACPR,gBAAoE;IAEpE,MAAMC,QAAQF,sBAAsBC;IACpC,MAAMS,UAAsC,CAAC;IAC7C,MAA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,MACR,CAAC,QAAQ,EAAEP,gBAAgBJ,GAAG,CAAC,kBAAkB,EAAEoC,cAAc,sBAAsB,CAAC;gBAE5F;YACF;QACF;QAEA,IAAIhC,gBAAgBF,oBAAoB,EAAEiC,QAAQ;YAChD,KAAK,MAAMI,yBAAyBnC,gBAAgBF,oBAAoB,CAAE;gBACxE,iKAAiK;gBACjK,MAAMmC,QAAQJ,iBAAiBO,GAAG,CAACD;gBACnC,IAAI,CAACF,OAAO;oBACV,MAAMI,uBAAuBpB,wBAAwBC,QAAQ,CAACgB,IAAI,CAChE,CAACd,IAAMA,EAAExB,GAAG,KAAKuC;oBAEnB,IAAI,CAACE,sBAAsB;wBACzB,MAAM,IAAI9B,MACR,CAAC,QAAQ,EAAEP,gBAAgBJ,GAAG,CAAC,2BAA2B,EAAEuC,sBAAsB,sBAAsB,CAAC;oBAE7G,OAAO;wBACL,MAAM,IAAI5B,MACR,CAAC,QAAQ,EAAEP,gBAAgBJ,GAAG,CAAC,2BAA2B,EAAEuC,sBAAsB,+BAA+B,CAAC;oBAEtH;gBACF;YACF;QACF;QAEA,MAAMG,UACJ,OAAOtC,gBAAgBsC,OAAO,KAAK,aAC/B,MAAMtC,gBAAgBsC,OAAO,CAAC;YAC5BvB;YACAW;YACAV;YACAa;YACAZ;QACF,KACAjB,gBAAgBsC,OAAO;QAC7BT,iBAAiBU,GAAG,CAACvC,gBAAgBJ,GAAG,EAAE;YACxC,GAAG0C,OAAO;YACVzC,cAAcG,gBAAgBH,YAAY;YAC1CC,sBAAsBE,gBAAgBF,oBAAoB;YAC1DC,kBAAkBC,gBAAgBD,gBAAgB;YAClDH,KAAKI,gBAAgBJ,GAAG;YACxB4C,OAAOV;QACT;QAEAA;IACF;IAEA,OAAOD;AACT"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/server/loader.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n ServerFeatureProviderMap,\n} from '../../../features/typesServer.js'\nimport type { ServerEditorConfig } from '../types.js'\n\ntype DependencyGraph = {\n [key: string]: {\n dependencies: string[]\n dependenciesPriority: string[]\n dependenciesSoft: string[]\n featureProvider: FeatureProviderServer<unknown, unknown, unknown>\n }\n}\n\nfunction createDependencyGraph(\n featureProviders: FeatureProviderServer<unknown, unknown, unknown>[],\n): DependencyGraph {\n const graph: DependencyGraph = {}\n for (const fp of featureProviders) {\n graph[fp.key] = {\n dependencies: fp.dependencies || [],\n dependenciesPriority: fp.dependenciesPriority || [],\n dependenciesSoft: fp.dependenciesSoft || [],\n featureProvider: fp,\n }\n }\n return graph\n}\n\nfunction topologicallySortFeatures(\n featureProviders: FeatureProviderServer<unknown, unknown, unknown>[],\n): FeatureProviderServer<unknown, unknown, unknown>[] {\n const graph = createDependencyGraph(featureProviders)\n const visited: { [key: string]: boolean } = {}\n const stack: FeatureProviderServer<unknown, unknown, unknown>[] = []\n\n for (const key in graph) {\n if (!visited[key]) {\n visit(graph, key, visited, stack)\n }\n }\n\n return stack.reverse()\n}\n\nfunction visit(\n graph: DependencyGraph,\n key: string,\n visited: { [key: string]: boolean },\n stack: FeatureProviderServer<unknown, unknown, unknown>[],\n currentPath: string[] = [],\n) {\n if (!graph[key]) {\n throw new Error(`Feature key ${key} is not present in the dependency graph.`)\n }\n\n if (currentPath.includes(key)) {\n throw new Error(`Circular dependency detected: ${currentPath.join(' -> ')} -> ${key}`)\n }\n\n if (visited[key]) {\n return\n }\n\n visited[key] = true\n currentPath.push(key)\n\n // First process the hard priority dependencies\n for (const dep of graph[key].dependenciesPriority) {\n if (!visited[dep]) {\n visit(graph, dep, visited, stack, currentPath)\n }\n }\n\n // Then process the normal dependencies, but make sure to not violate hard dependencies\n for (const dep of graph[key].dependencies) {\n if (!visited[dep] && !graph[key].dependenciesPriority.includes(dep)) {\n visit(graph, dep, visited, stack, currentPath)\n }\n }\n\n // Then process the soft dependencies. Make sure to not violate hard and normal dependencies.\n for (const dep of graph[key].dependenciesSoft) {\n if (\n graph[dep] &&\n !visited[dep] &&\n !graph[key].dependenciesPriority.includes(dep) &&\n !graph[key].dependencies.includes(dep)\n ) {\n visit(graph, dep, visited, stack, currentPath)\n }\n }\n\n stack.push(graph[key].featureProvider)\n currentPath.pop()\n}\n\nexport function sortFeaturesForOptimalLoading(\n featureProviders: FeatureProviderServer<unknown, unknown, unknown>[],\n): FeatureProviderServer<unknown, unknown, unknown>[] {\n return topologicallySortFeatures(featureProviders)\n}\n\nexport async function loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig,\n}: {\n config: SanitizedConfig\n isRoot?: boolean\n unSanitizedEditorConfig: ServerEditorConfig\n}): Promise<ResolvedServerFeatureMap> {\n // First remove all duplicate features. The LAST feature with a given key wins.\n unSanitizedEditorConfig.features = unSanitizedEditorConfig.features\n .reverse()\n .filter((f, i, arr) => {\n const firstIndex = arr.findIndex((f2) => f2.key === f.key)\n return firstIndex === i\n })\n .reverse()\n\n unSanitizedEditorConfig.features = sortFeaturesForOptimalLoading(unSanitizedEditorConfig.features)\n\n const featureProviderMap: ServerFeatureProviderMap = new Map(\n unSanitizedEditorConfig.features.map(\n (f) => [f.key, f] as [string, FeatureProviderServer<unknown, unknown, unknown>],\n ),\n )\n\n const resolvedFeatures: ResolvedServerFeatureMap = 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 if (!featureProvider.key) {\n throw new Error(\n `A Feature you've added does not have a key. Please add a key to the feature. This is used to uniquely identify the feature.`,\n )\n }\n if (featureProvider.dependencies?.length) {\n for (const dependencyKey of featureProvider.dependencies) {\n const found = unSanitizedEditorConfig.features.find((f) => f.key === dependencyKey)\n if (!found) {\n throw new Error(\n `Feature ${featureProvider.key} has a dependency ${dependencyKey} which does not exist.`,\n )\n }\n }\n }\n\n if (featureProvider.dependenciesPriority?.length) {\n for (const priorityDependencyKey of featureProvider.dependenciesPriority) {\n // look in the resolved features instead of the editorConfig.features, as a dependency requires the feature to be loaded before it, contrary to a soft-dependency\n const found = resolvedFeatures.get(priorityDependencyKey)\n if (!found) {\n const existsInEditorConfig = unSanitizedEditorConfig.features.find(\n (f) => f.key === priorityDependencyKey,\n )\n if (!existsInEditorConfig) {\n throw new Error(\n `Feature ${featureProvider.key} has a priority dependency ${priorityDependencyKey} which does not exist.`,\n )\n } else {\n throw new Error(\n `Feature ${featureProvider.key} has a priority dependency ${priorityDependencyKey} which is not loaded before it.`,\n )\n }\n }\n }\n }\n\n const feature =\n typeof featureProvider.feature === 'function'\n ? await featureProvider.feature({\n config,\n featureProviderMap,\n isRoot,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n : featureProvider.feature\n resolvedFeatures.set(featureProvider.key, {\n ...feature,\n dependencies: featureProvider.dependencies,\n dependenciesPriority: featureProvider.dependenciesPriority,\n dependenciesSoft: featureProvider.dependenciesSoft,\n key: featureProvider.key,\n order: loaded,\n })\n\n loaded++\n }\n\n return resolvedFeatures\n}\n"],"names":["createDependencyGraph","featureProviders","graph","fp","key","dependencies","dependenciesPriority","dependenciesSoft","featureProvider","topologicallySortFeatures","visited","stack","visit","reverse","currentPath","Error","includes","join","push","dep","pop","sortFeaturesForOptimalLoading","loadFeatures","config","isRoot","unSanitizedEditorConfig","features","filter","f","i","arr","firstIndex","findIndex","f2","featureProviderMap","Map","map","resolvedFeatures","loaded","length","dependencyKey","found","find","priorityDependencyKey","get","existsInEditorConfig","feature","set","order"],"mappings":"AAkBA,SAASA,sBACPC,gBAAoE;IAEpE,MAAMC,QAAyB,CAAC;IAChC,KAAK,MAAMC,MAAMF,iBAAkB;QACjCC,KAAK,CAACC,GAAGC,GAAG,CAAC,GAAG;YACdC,cAAcF,GAAGE,YAAY,IAAI,EAAE;YACnCC,sBAAsBH,GAAGG,oBAAoB,IAAI,EAAE;YACnDC,kBAAkBJ,GAAGI,gBAAgB,IAAI,EAAE;YAC3CC,iBAAiBL;QACnB;IACF;IACA,OAAOD;AACT;AAEA,SAASO,0B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erFeatureMap, SanitizedServerFeatures } from '../../../features/types.js';
2
+ import type { ResolvedServerFeatureMap, SanitizedServerFeatures } from '../../../features/typesServer.js';
3
3
  import type { SanitizedServerEditorConfig, ServerEditorConfig } from '../types.js';
4
4
  export declare const sanitizeServerFeatures: (features: ResolvedServerFeatureMap) => SanitizedServerFeatures;
5
5
  export declare function sanitizeServerEditorConfig(editorConfig: ServerEditorConfig, config: SanitizedConfig): Promise<SanitizedServerEditorConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/server/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AACnG,OAAO,KAAK,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIlF,eAAO,MAAM,sBAAsB,aACvB,wBAAwB,KACjC,uBAyFF,CAAA;AAED,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,kBAAkB,EAChC,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,2BAA2B,CAAC,CAWtC"}
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/server/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIlF,eAAO,MAAM,sBAAsB,aACvB,wBAAwB,KACjC,uBAyFF,CAAA;AAED,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,kBAAkB,EAChC,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,2BAA2B,CAAC,CAWtC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/config/server/sanitize.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type { ResolvedServerFeatureMap, SanitizedServerFeatures } from '../../../features/types.js'\nimport type { SanitizedServerEditorConfig, ServerEditorConfig } from '../types.js'\n\nimport { loadFeatures } from './loader.js'\n\nexport const sanitizeServerFeatures = (\n features: ResolvedServerFeatureMap,\n): SanitizedServerFeatures => {\n const sanitized: SanitizedServerFeatures = {\n converters: {\n html: [],\n },\n enabledFeatures: [],\n generatedTypes: {\n modifyOutputSchemas: [],\n },\n getSubFields: new Map(),\n getSubFieldsData: new Map(),\n graphQLPopulationPromises: new Map(),\n hooks: {\n afterChange: new Map(),\n afterRead: new Map(),\n beforeChange: new Map(),\n beforeValidate: new Map(),\n },\n i18n: {},\n markdownTransformers: [],\n nodes: [],\n\n validations: new Map(),\n }\n\n if (!features?.size) {\n return sanitized\n }\n\n features.forEach((feature) => {\n if (feature?.generatedTypes?.modifyOutputSchema) {\n sanitized.generatedTypes.modifyOutputSchemas.push(feature.generatedTypes.modifyOutputSchema)\n }\n\n if (feature?.i18n) {\n for (const lang in feature.i18n) {\n if (!sanitized.i18n[lang]) {\n sanitized.i18n[lang] = {\n lexical: {},\n }\n }\n sanitized.i18n[lang].lexical[feature.key] = feature.i18n[lang]\n }\n }\n\n if (feature.nodes?.length) {\n sanitized.nodes = sanitized.nodes.concat(feature.nodes)\n feature.nodes.forEach((node) => {\n const nodeType = 'with' in node.node ? node.node.replace.getType() : node.node.getType() // TODO: Idk if this works for node replacements\n if (node?.graphQLPopulationPromises?.length) {\n sanitized.graphQLPopulationPromises.set(nodeType, node.graphQLPopulationPromises)\n }\n if (node?.validations?.length) {\n sanitized.validations.set(nodeType, node.validations)\n }\n if (node?.converters?.html) {\n sanitized.converters.html.push(node.converters.html)\n }\n if (node?.hooks?.afterChange) {\n sanitized.hooks.afterChange.set(nodeType, node.hooks.afterChange)\n }\n if (node?.hooks?.afterRead) {\n sanitized.hooks.afterRead.set(nodeType, node.hooks.afterRead)\n }\n if (node?.hooks?.beforeChange) {\n sanitized.hooks.beforeChange.set(nodeType, node.hooks.beforeChange)\n }\n if (node?.hooks?.beforeValidate) {\n sanitized.hooks.beforeValidate.set(nodeType, node.hooks.beforeValidate)\n }\n if (node?.getSubFields) {\n sanitized.getSubFields.set(nodeType, node.getSubFields)\n }\n if (node?.getSubFieldsData) {\n sanitized.getSubFieldsData.set(nodeType, node.getSubFieldsData)\n }\n })\n }\n\n if (feature.markdownTransformers?.length) {\n sanitized.markdownTransformers = sanitized.markdownTransformers.concat(\n feature.markdownTransformers,\n )\n }\n\n sanitized.enabledFeatures.push(feature.key)\n })\n\n return sanitized\n}\n\nexport async function sanitizeServerEditorConfig(\n editorConfig: ServerEditorConfig,\n config: SanitizedConfig,\n): Promise<SanitizedServerEditorConfig> {\n const resolvedFeatureMap = await loadFeatures({\n config,\n unSanitizedEditorConfig: editorConfig,\n })\n\n return {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: editorConfig.lexical,\n resolvedFeatureMap,\n }\n}\n"],"names":["loadFeatures","sanitizeServerFeatures","features","sanitized","converters","html","enabledFeatures","generatedTypes","modifyOutputSchemas","getSubFields","Map","getSubFieldsData","graphQLPopulationPromises","hooks","afterChange","afterRead","beforeChange","beforeValidate","i18n","markdownTransformers","nodes","validations","size","forEach","feature","modifyOutputSchema","push","lang","lexical","key","length","concat","node","nodeType","replace","getType","set","sanitizeServerEditorConfig","editorConfig","config","resolvedFeatureMap","unSanitizedEditorConfig"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAKA,SAASA,YAAY,QAAQ,cAAa;AAE1C,OAAO,MAAMC,yBAAyB,CACpCC;IAEA,MAAMC,YAAqC;QACzCC,YAAY;YACVC,MAAM,EAAE;QACV;QACAC,iBAAiB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C,2BACpBC,YAAgC,EAChCC,MAAuB;IAEvB,MAAMC,qBAAqB,MAAMxC,aAAa;QAC5CuC;QACAE,yBAAyBH;IAC3B;IAEA,OAAO;QACLpC,UAAUD,uBAAuBuC;QACjCZ,SAASU,aAAaV,OAAO;QAC7BY;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../src/lexical/config/server/sanitize.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n} from '../../../features/typesServer.js'\nimport type { SanitizedServerEditorConfig, ServerEditorConfig } from '../types.js'\n\nimport { loadFeatures } from './loader.js'\n\nexport const sanitizeServerFeatures = (\n features: ResolvedServerFeatureMap,\n): SanitizedServerFeatures => {\n const sanitized: SanitizedServerFeatures = {\n converters: {\n html: [],\n },\n enabledFeatures: [],\n generatedTypes: {\n modifyOutputSchemas: [],\n },\n getSubFields: new Map(),\n getSubFieldsData: new Map(),\n graphQLPopulationPromises: new Map(),\n hooks: {\n afterChange: new Map(),\n afterRead: new Map(),\n beforeChange: new Map(),\n beforeValidate: new Map(),\n },\n i18n: {},\n markdownTransformers: [],\n nodes: [],\n\n validations: new Map(),\n }\n\n if (!features?.size) {\n return sanitized\n }\n\n features.forEach((feature) => {\n if (feature?.generatedTypes?.modifyOutputSchema) {\n sanitized.generatedTypes.modifyOutputSchemas.push(feature.generatedTypes.modifyOutputSchema)\n }\n\n if (feature?.i18n) {\n for (const lang in feature.i18n) {\n if (!sanitized.i18n[lang]) {\n sanitized.i18n[lang] = {\n lexical: {},\n }\n }\n sanitized.i18n[lang].lexical[feature.key] = feature.i18n[lang]\n }\n }\n\n if (feature.nodes?.length) {\n sanitized.nodes = sanitized.nodes.concat(feature.nodes)\n feature.nodes.forEach((node) => {\n const nodeType = 'with' in node.node ? node.node.replace.getType() : node.node.getType() // TODO: Idk if this works for node replacements\n if (node?.graphQLPopulationPromises?.length) {\n sanitized.graphQLPopulationPromises.set(nodeType, node.graphQLPopulationPromises)\n }\n if (node?.validations?.length) {\n sanitized.validations.set(nodeType, node.validations)\n }\n if (node?.converters?.html) {\n sanitized.converters.html.push(node.converters.html)\n }\n if (node?.hooks?.afterChange) {\n sanitized.hooks.afterChange.set(nodeType, node.hooks.afterChange)\n }\n if (node?.hooks?.afterRead) {\n sanitized.hooks.afterRead.set(nodeType, node.hooks.afterRead)\n }\n if (node?.hooks?.beforeChange) {\n sanitized.hooks.beforeChange.set(nodeType, node.hooks.beforeChange)\n }\n if (node?.hooks?.beforeValidate) {\n sanitized.hooks.beforeValidate.set(nodeType, node.hooks.beforeValidate)\n }\n if (node?.getSubFields) {\n sanitized.getSubFields.set(nodeType, node.getSubFields)\n }\n if (node?.getSubFieldsData) {\n sanitized.getSubFieldsData.set(nodeType, node.getSubFieldsData)\n }\n })\n }\n\n if (feature.markdownTransformers?.length) {\n sanitized.markdownTransformers = sanitized.markdownTransformers.concat(\n feature.markdownTransformers,\n )\n }\n\n sanitized.enabledFeatures.push(feature.key)\n })\n\n return sanitized\n}\n\nexport async function sanitizeServerEditorConfig(\n editorConfig: ServerEditorConfig,\n config: SanitizedConfig,\n): Promise<SanitizedServerEditorConfig> {\n const resolvedFeatureMap = await loadFeatures({\n config,\n unSanitizedEditorConfig: editorConfig,\n })\n\n return {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: editorConfig.lexical,\n resolvedFeatureMap,\n }\n}\n"],"names":["loadFeatures","sanitizeServerFeatures","features","sanitized","converters","html","enabledFeatures","generatedTypes","modifyOutputSchemas","getSubFields","Map","getSubFieldsData","graphQLPopulationPromises","hooks","afterChange","afterRead","beforeChange","beforeValidate","i18n","markdownTransformers","nodes","validations","size","forEach","feature","modifyOutputSchema","push","lang","lexical","key","length","concat","node","nodeType","replace","getType","set","sanitizeServerEditorConfig","editorConfig","config","resolvedFeatureMap","unSanitizedEditorConfig"],"mappings":"AAQA,SAASA,YAAY,QAAQ,cAAa;AAE1C,OAAO,MAAMC,yBAAyB,CACpCC;I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,CAACF,QAAQK,GAAG;IAC5C;IAEA,OAAO1B;AACT,EAAC;AAED,OAAO,eAAekC,2BACpBC,YAAgC,EAChCC,MAAuB;IAEvB,MAAMC,qBAAqB,MAAMxC,aAAa;QAC5CuC;QACAE,yBAAyBH;IAC3B;IAEA,OAAO;QACLpC,UAAUD,uBAAuBuC;QACjCZ,SAASU,aAAaV,OAAO;QAC7BY;IACF;AACF"}
@@ -1,8 +1,9 @@
1
1
  import type { EditorConfig as LexicalEditorConfig } from 'lexical';
2
- import type { FeatureProviderClient, FeatureProviderServer, ResolvedClientFeatureMap, ResolvedServerFeatureMap, SanitizedClientFeatures, SanitizedServerFeatures } from '../../features/types.js';
2
+ import type { FeatureProviderClient, ResolvedClientFeatureMap, SanitizedClientFeatures } from '../../features/typesClient.js';
3
+ import type { FeatureProviderServer, ResolvedServerFeatureMap, SanitizedServerFeatures } from '../../features/typesServer.js';
3
4
  import type { LexicalFieldAdminProps } from '../../types.js';
4
5
  export type ServerEditorConfig = {
5
- features: FeatureProviderServer<unknown, unknown, unknown>[];
6
+ features: FeatureProviderServer<any, any, any>[];
6
7
  lexical?: LexicalEditorConfig;
7
8
  };
8
9
  export type SanitizedServerEditorConfig = {
@@ -11,7 +12,7 @@ export type SanitizedServerEditorConfig = {
11
12
  resolvedFeatureMap: ResolvedServerFeatureMap;
12
13
  };
13
14
  export type ClientEditorConfig = {
14
- features: FeatureProviderClient<unknown, unknown>[];
15
+ features: FeatureProviderClient<any, any>[];
15
16
  lexical?: LexicalEditorConfig;
16
17
  };
17
18
  export type SanitizedClientEditorConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lexical/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,u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EAAE,CAAA;IAChD,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,uBAAuB,CAAA;IACjC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;IAC3C,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,QAAQ,EAAE,uBAAuB,CAAA;IACjC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lexical/config/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type {\n FeatureProviderClient,\n FeatureProviderServer,\n ResolvedClientFeatureMap,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedServerFeatures,\n} from '../../features/types.js'\nimport type { LexicalFieldAdminProps } from '../../types.js'\n\nexport type ServerEditorConfig = {\n features: FeatureProviderServer<unknown, unknown, unknown>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type SanitizedServerEditorConfig = {\n features: SanitizedServerFeatures\n lexical: LexicalEditorConfig\n resolvedFeatureMap: ResolvedServerFeatureMap\n}\n\nexport type ClientEditorConfig = {\n features: FeatureProviderClient<unknown, unknown>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type SanitizedClientEditorConfig = {\n admin?: LexicalFieldAdminProps\n features: SanitizedClientFeatures\n lexical: LexicalEditorConfig\n resolvedFeatureMap: ResolvedClientFeatureMap\n}\n"],"names":[],"rangeMappings":"","mappings":"AA4BA,WAKC"}
1
+ {"version":3,"sources":["../../../src/lexical/config/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport type {\n FeatureProviderClient,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n} from '../../features/typesClient.js'\nimport type {\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n} from '../../features/typesServer.js'\nimport type { LexicalFieldAdminProps } from '../../types.js'\n\nexport type ServerEditorConfig = {\n features: FeatureProviderServer<any, any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type SanitizedServerEditorConfig = {\n features: SanitizedServerFeatures\n lexical: LexicalEditorConfig\n resolvedFeatureMap: ResolvedServerFeatureMap\n}\n\nexport type ClientEditorConfig = {\n features: FeatureProviderClient<any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type SanitizedClientEditorConfig = {\n admin?: LexicalFieldAdminProps\n features: SanitizedClientFeatures\n lexical: LexicalEditorConfig\n resolvedFeatureMap: ResolvedClientFeatureMap\n}\n"],"names":[],"mappings":"AA8BA,WAKC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lexical/nodes/index.ts"],"sourcesContent":["import type { Klass, LexicalNode, LexicalNodeReplacement } from 'lexical'\n\nimport type { SanitizedClientEditorConfig, SanitizedServerEditorConfig } from '../config/types.js'\n\nexport function getEnabledNodes({\n editorConfig,\n}: {\n editorConfig: SanitizedClientEditorConfig | SanitizedServerEditorConfig\n}): Array<Klass<LexicalNode> | LexicalNodeReplacement> {\n return editorConfig.features.nodes.map((node) => {\n if ('node' in node) {\n return node.node\n }\n return node\n })\n}\n"],"names":["getEnabledNodes","editorConfig","features","nodes","map","node"],"rangeMappings":";;;;;;;","mappings":"AAIA,OAAO,SAASA,gBAAgB,EAC9BC,YAAY,EAGb;IACC,OAAOA,aAAaC,QAAQ,CAACC,KAAK,CAACC,GAAG,CAAC,CAACC;QACtC,IAAI,UAAUA,MAAM;YAClB,OAAOA,KAAKA,IAAI;QAClB;QACA,OAAOA;IACT;AACF"}
1
+ {"version":3,"sources":["../../../src/lexical/nodes/index.ts"],"sourcesContent":["import type { Klass, LexicalNode, LexicalNodeReplacement } from 'lexical'\n\nimport type { SanitizedClientEditorConfig, SanitizedServerEditorConfig } from '../config/types.js'\n\nexport function getEnabledNodes({\n editorConfig,\n}: {\n editorConfig: SanitizedClientEditorConfig | SanitizedServerEditorConfig\n}): Array<Klass<LexicalNode> | LexicalNodeReplacement> {\n return editorConfig.features.nodes.map((node) => {\n if ('node' in node) {\n return node.node\n }\n return node\n })\n}\n"],"names":["getEnabledNodes","editorConfig","features","nodes","map","node"],"mappings":"AAIA,OAAO,SAASA,gBAAgB,EAC9BC,YAAY,EAGb;IACC,OAAOA,aAAaC,QAAQ,CAACC,KAAK,CAACC,GAAG,CAAC,CAACC;QACtC,IAAI,UAAUA,MAAM;YAClB,OAAOA,KAAKA,IAAI;QAClB;QACA,OAAOA;IACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lexical/plugins/MarkdownShortcut/index.tsx"],"sourcesContent":["'use client'\n\nimport { MarkdownShortcutPlugin as LexicalMarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin.js'\nimport * as React from 'react'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\n\nexport const MarkdownShortcutPlugin: React.FC = () => {\n const { editorConfig } = useEditorConfigContext()\n\n return <LexicalMarkdownShortcutPlugin transformers={editorConfig.features.markdownTransformers} />\n}\n"],"names":["MarkdownShortcutPlugin","LexicalMarkdownShortcutPlugin","React","useEditorConfigContext","editorConfig","transformers","features","markdownTransformers"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AAEA,SAASA,0BAA0BC,6BAA6B,QAAQ,kDAAiD;AACzH,YAAYC,WAAW,QAAO;AAE9B,SAASC,sBAAsB,QAAQ,8CAA6C;AAEpF,OAAO,MAAMH,yBAAmC;IAC9C,MAAM,EAAEI,YAAY,EAAE,GAAGD;IAEzB,qBAAO,KAACF;QAA8BI,cAAcD,aAAaE,QAAQ,CAACC,oBAAoB;;AAChG,EAAC"}
1
+ {"version":3,"sources":["../../../../src/lexical/plugins/MarkdownShortcut/index.tsx"],"sourcesContent":["'use client'\n\nimport { MarkdownShortcutPlugin as LexicalMarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin.js'\nimport * as React from 'react'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\n\nexport const MarkdownShortcutPlugin: React.FC = () => {\n const { editorConfig } = useEditorConfigContext()\n\n return <LexicalMarkdownShortcutPlugin transformers={editorConfig.features.markdownTransformers} />\n}\n"],"names":["MarkdownShortcutPlugin","LexicalMarkdownShortcutPlugin","React","useEditorConfigContext","editorConfig","transformers","features","markdownTransformers"],"mappings":"AAAA;;AAEA,SAASA,0BAA0BC,6BAA6B,QAAQ,kDAAiD;AACzH,YAAYC,WAAW,QAAO;AAE9B,SAASC,sBAAsB,QAAQ,8CAA6C;AAEpF,OAAO,MAAMH,yBAAmC;IAC9C,MAAM,EAAEI,YAAY,EAAE,GAAGD;IAEzB,qBAAO,KAACF;QAA8BI,cAAcD,aAAaE,QAAQ,CAACC,oBAAoB;;AAChG,EAAC"}
@@ -1,12 +1,12 @@
1
1
  import type { LexicalCommand, LexicalEditor, TextNode } from 'lexical';
2
- import type { JSX, MutableRefObject, ReactPortal } from 'react';
2
+ import type { JSX, ReactPortal, RefObject } from 'react';
3
3
  import type { MenuTextMatch } from '../useMenuTriggerMatch.js';
4
4
  import type { SlashMenuGroupInternal, SlashMenuItem, SlashMenuItemInternal } from './types.js';
5
5
  export type MenuResolution = {
6
6
  getRect: () => DOMRect;
7
7
  match?: MenuTextMatch;
8
8
  };
9
- export type MenuRenderFn = (anchorElementRef: MutableRefObject<HTMLElement | null>, itemProps: {
9
+ export type MenuRenderFn = (anchorElementRef: RefObject<HTMLElement | null>, itemProps: {
10
10
  groups: Array<SlashMenuGroupInternal>;
11
11
  selectItemAndCleanUp: (selectedItem: SlashMenuItem) => void;
12
12
  selectedItemKey: null | string;
@@ -19,7 +19,7 @@ export declare const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{
19
19
  item: SlashMenuItemInternal;
20
20
  }>;
21
21
  export declare function LexicalMenu({ anchorElementRef, close, editor, groups, menuRenderFn, onSelectItem, resolution, shouldSplitNodeWithQuery, }: {
22
- anchorElementRef: MutableRefObject<HTMLElement>;
22
+ anchorElementRef: RefObject<HTMLElement>;
23
23
  close: () => void;
24
24
  editor: LexicalEditor;
25
25
  groups: Array<SlashMenuGroupInternal>;
@@ -28,5 +28,5 @@ export declare function LexicalMenu({ anchorElementRef, close, editor, groups, m
28
28
  resolution: MenuResolution;
29
29
  shouldSplitNodeWithQuery?: boolean;
30
30
  }): JSX.Element | null;
31
- export declare function useMenuAnchorRef(anchorElem: HTMLElement, resolution: MenuResolution | null, setResolution: (r: MenuResolution | null) => void, className?: string): MutableRefObject<HTMLElement>;
31
+ export declare function useMenuAnchorRef(anchorElem: HTMLElement, resolution: MenuResolution | null, setResolution: (r: MenuResolution | null) => void, className?: string): RefObject<HTMLElement>;
32
32
  //# sourceMappingURL=LexicalMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalMenu.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAiB/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAE9F,MAAM,MAAM,cAAc,GAAG;IAC3B,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,OAAO,CAAA;CACnC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAgNrB;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,cAAc,GAAG,IAAI,EACjC,aAAa,EAAE,CAAC,CAAC,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,EACjD,SAAS,CAAC,EAAE,MAAM,GACjB,SAAS,CAAC,WAAW,CAAC,CA6FxB"}
@@ -52,9 +52,7 @@ const scrollIntoViewIfNeeded = (target)=>{
52
52
  }
53
53
  const selectionOffset = anchor.offset;
54
54
  const textContent = anchorNode.getTextContent().slice(0, selectionOffset);
55
- // eslint-disable-next-line react/destructuring-assignment
56
55
  const characterOffset = match.replaceableString.length;
57
- // eslint-disable-next-line react/destructuring-assignment
58
56
  const queryOffset = getFullMatchOffset(textContent, match.matchingString, characterOffset);
59
57
  const startOffset = selectionOffset - queryOffset;
60
58
  if (startOffset < 0) {