@payloadcms/richtext-lexical 3.0.0-canary.95fcd13 → 3.0.0-canary.98cbdb9

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 (1212) 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 +5 -5
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/client/Field-BYB3WX7J.js +2 -0
  6. package/dist/exports/client/Field-BYB3WX7J.js.map +7 -0
  7. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +2 -0
  8. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +7 -0
  9. package/dist/exports/client/bundled.css +1 -1
  10. package/dist/exports/client/chunk-4EX7W4UX.js +2 -0
  11. package/dist/exports/client/chunk-4EX7W4UX.js.map +7 -0
  12. package/dist/exports/client/chunk-E4HH5PS6.js +2 -0
  13. package/dist/exports/client/chunk-E4HH5PS6.js.map +7 -0
  14. package/dist/exports/client/chunk-LTR7V74A.js +2 -0
  15. package/dist/exports/client/chunk-LTR7V74A.js.map +7 -0
  16. package/dist/exports/client/chunk-SQHN3N6E.js +2 -0
  17. package/dist/exports/client/chunk-SQHN3N6E.js.map +7 -0
  18. package/dist/exports/client/chunk-VMCQSR3T.js +3 -0
  19. package/dist/exports/client/chunk-VMCQSR3T.js.map +7 -0
  20. package/dist/exports/client/component-6C5JERGA.js +2 -0
  21. package/dist/exports/client/component-6C5JERGA.js.map +7 -0
  22. package/dist/exports/client/component-GUWIGB77.js +2 -0
  23. package/dist/exports/client/component-GUWIGB77.js.map +7 -0
  24. package/dist/exports/client/component-UQ2BKD5X.js +2 -0
  25. package/dist/exports/client/component-UQ2BKD5X.js.map +7 -0
  26. package/dist/exports/client/componentInline-C2XIK5VZ.js +2 -0
  27. package/dist/exports/client/componentInline-C2XIK5VZ.js.map +7 -0
  28. package/dist/exports/client/index.d.ts +21 -22
  29. package/dist/exports/client/index.d.ts.map +1 -1
  30. package/dist/exports/client/index.js +12 -12
  31. package/dist/exports/client/index.js.map +4 -4
  32. package/dist/exports/server/migrate.d.ts +16 -0
  33. package/dist/exports/server/migrate.d.ts.map +1 -0
  34. package/dist/exports/server/migrate.js +17 -0
  35. package/dist/exports/server/migrate.js.map +1 -0
  36. package/dist/features/align/client/index.d.ts +5 -0
  37. package/dist/features/align/client/index.d.ts.map +1 -0
  38. package/dist/features/align/client/index.js +146 -0
  39. package/dist/features/align/client/index.js.map +1 -0
  40. package/dist/features/align/client/toolbarAlignGroup.d.ts +3 -0
  41. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -0
  42. package/dist/features/align/client/toolbarAlignGroup.js +12 -0
  43. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -0
  44. package/dist/features/align/server/i18n.d.ts.map +1 -0
  45. package/dist/features/align/server/i18n.js.map +1 -0
  46. package/dist/features/align/server/index.d.ts +2 -0
  47. package/dist/features/align/server/index.d.ts.map +1 -0
  48. package/dist/features/align/server/index.js +11 -0
  49. package/dist/features/align/server/index.js.map +1 -0
  50. package/dist/features/blockquote/client/index.d.ts +5 -0
  51. package/dist/features/blockquote/client/index.d.ts.map +1 -0
  52. package/dist/features/blockquote/client/index.js +77 -0
  53. package/dist/features/blockquote/client/index.js.map +1 -0
  54. package/dist/features/blockquote/server/i18n.d.ts.map +1 -0
  55. package/dist/features/blockquote/server/i18n.js.map +1 -0
  56. package/dist/features/blockquote/server/index.d.ts +7 -0
  57. package/dist/features/blockquote/server/index.d.ts.map +1 -0
  58. package/dist/features/blockquote/server/index.js +46 -0
  59. package/dist/features/blockquote/server/index.js.map +1 -0
  60. package/dist/features/blocks/client/component/BlockContent.d.ts +22 -0
  61. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -0
  62. package/dist/features/blocks/client/component/BlockContent.js +198 -0
  63. package/dist/features/blocks/client/component/BlockContent.js.map +1 -0
  64. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -0
  65. package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -0
  66. package/dist/features/blocks/client/component/index.d.ts +11 -0
  67. package/dist/features/blocks/client/component/index.d.ts.map +1 -0
  68. package/dist/features/blocks/client/component/index.js +157 -0
  69. package/dist/features/blocks/client/component/index.js.map +1 -0
  70. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -0
  71. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -0
  72. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -0
  73. package/dist/features/blocks/client/componentInline/index.js +138 -0
  74. package/dist/features/blocks/client/componentInline/index.js.map +1 -0
  75. package/dist/features/blocks/client/index.d.ts +9 -0
  76. package/dist/features/blocks/client/index.d.ts.map +1 -0
  77. package/dist/features/blocks/client/index.js +152 -0
  78. package/dist/features/blocks/client/index.js.map +1 -0
  79. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +14 -0
  80. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -0
  81. package/dist/features/blocks/client/nodes/BlocksNode.js +52 -0
  82. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -0
  83. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +25 -0
  84. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -0
  85. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +41 -0
  86. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -0
  87. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -0
  88. package/dist/features/blocks/client/plugin/commands.js.map +1 -0
  89. package/dist/features/blocks/client/plugin/index.d.ts +6 -0
  90. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -0
  91. package/dist/features/blocks/client/plugin/index.js +129 -0
  92. package/dist/features/blocks/client/plugin/index.js.map +1 -0
  93. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +6 -0
  94. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -0
  95. package/dist/features/blocks/server/graphQLPopulationPromise.js +31 -0
  96. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -0
  97. package/dist/features/blocks/server/i18n.d.ts.map +1 -0
  98. package/dist/features/blocks/server/i18n.js.map +1 -0
  99. package/dist/features/blocks/server/index.d.ts +8 -0
  100. package/dist/features/blocks/server/index.d.ts.map +1 -0
  101. package/dist/features/blocks/server/index.js +162 -0
  102. package/dist/features/blocks/server/index.js.map +1 -0
  103. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +38 -0
  104. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -0
  105. package/dist/features/blocks/server/nodes/BlocksNode.js +84 -0
  106. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -0
  107. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +40 -0
  108. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -0
  109. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +86 -0
  110. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -0
  111. package/dist/features/blocks/server/validate.d.ts +6 -0
  112. package/dist/features/blocks/server/validate.d.ts.map +1 -0
  113. package/dist/features/blocks/server/validate.js.map +1 -0
  114. package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
  115. package/dist/features/converters/html/converter/converters/paragraph.js +5 -2
  116. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  117. package/dist/features/converters/html/converter/index.d.ts +8 -2
  118. package/dist/features/converters/html/converter/index.d.ts.map +1 -1
  119. package/dist/features/converters/html/converter/index.js +14 -5
  120. package/dist/features/converters/html/converter/index.js.map +1 -1
  121. package/dist/features/converters/html/converter/types.d.ts +5 -2
  122. package/dist/features/converters/html/converter/types.d.ts.map +1 -1
  123. package/dist/features/converters/html/converter/types.js.map +1 -1
  124. package/dist/features/converters/html/field/index.d.ts.map +1 -1
  125. package/dist/features/converters/html/field/index.js +5 -2
  126. package/dist/features/converters/html/field/index.js.map +1 -1
  127. package/dist/features/converters/html/index.d.ts +8 -0
  128. package/dist/features/converters/html/index.d.ts.map +1 -0
  129. package/dist/features/converters/html/index.js +8 -0
  130. package/dist/features/converters/html/index.js.map +1 -0
  131. package/dist/features/createClientComponent.d.ts +3 -3
  132. package/dist/features/createClientComponent.d.ts.map +1 -1
  133. package/dist/features/createClientComponent.js.map +1 -1
  134. package/dist/features/createFeaturePropComponent.js +1 -1
  135. package/dist/features/createFeaturePropComponent.js.map +1 -1
  136. package/dist/features/debug/testRecorder/client/index.d.ts +5 -0
  137. package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -0
  138. package/dist/features/debug/testRecorder/client/index.js +13 -0
  139. package/dist/features/debug/testRecorder/client/index.js.map +1 -0
  140. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +5 -0
  141. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -0
  142. package/dist/features/debug/testRecorder/client/plugin/index.js +471 -0
  143. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -0
  144. package/dist/features/debug/testRecorder/server/index.d.ts +2 -0
  145. package/dist/features/debug/testRecorder/server/index.d.ts.map +1 -0
  146. package/dist/features/debug/testRecorder/server/index.js +9 -0
  147. package/dist/features/debug/testRecorder/server/index.js.map +1 -0
  148. package/dist/features/debug/treeView/client/index.d.ts +5 -0
  149. package/dist/features/debug/treeView/client/index.d.ts.map +1 -0
  150. package/dist/features/debug/treeView/client/index.js +13 -0
  151. package/dist/features/debug/treeView/client/index.js.map +1 -0
  152. package/dist/features/debug/treeView/client/plugin/index.d.ts +4 -0
  153. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -0
  154. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -0
  155. package/dist/features/debug/treeView/server/index.d.ts +2 -0
  156. package/dist/features/debug/treeView/server/index.d.ts.map +1 -0
  157. package/dist/features/debug/treeView/server/index.js +9 -0
  158. package/dist/features/debug/treeView/server/index.js.map +1 -0
  159. package/dist/features/experimental_table/client/index.d.ts +2 -0
  160. package/dist/features/experimental_table/client/index.d.ts.map +1 -0
  161. package/dist/features/experimental_table/client/index.js +71 -0
  162. package/dist/features/experimental_table/client/index.js.map +1 -0
  163. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +4 -0
  164. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  165. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +605 -0
  166. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  167. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +3 -0
  168. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  169. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +327 -0
  170. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  171. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +12 -0
  172. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  173. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +181 -0
  174. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  175. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +24 -0
  176. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  177. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +103 -0
  178. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -0
  179. package/dist/features/experimental_table/client/utils/debounce.d.ts +61 -0
  180. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -0
  181. package/dist/features/experimental_table/client/utils/debounce.js +202 -0
  182. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -0
  183. package/dist/features/experimental_table/client/utils/useDebounce.d.ts +6 -0
  184. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -0
  185. package/dist/features/experimental_table/client/utils/useDebounce.js +18 -0
  186. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -0
  187. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +12 -0
  188. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  189. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +181 -0
  190. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  191. package/dist/features/experimental_table/server/index.d.ts +13 -0
  192. package/dist/features/experimental_table/server/index.d.ts.map +1 -0
  193. package/dist/features/experimental_table/server/index.js +123 -0
  194. package/dist/features/experimental_table/server/index.js.map +1 -0
  195. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  196. package/dist/features/format/bold/feature.server.js +1 -3
  197. package/dist/features/format/bold/feature.server.js.map +1 -1
  198. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  199. package/dist/features/format/inlineCode/feature.server.js +1 -3
  200. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  201. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  202. package/dist/features/format/italic/feature.server.js +1 -3
  203. package/dist/features/format/italic/feature.server.js.map +1 -1
  204. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  205. package/dist/features/format/strikethrough/feature.server.js +1 -3
  206. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  207. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  208. package/dist/features/format/subscript/feature.server.js +1 -3
  209. package/dist/features/format/subscript/feature.server.js.map +1 -1
  210. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  211. package/dist/features/format/superscript/feature.server.js +1 -3
  212. package/dist/features/format/superscript/feature.server.js.map +1 -1
  213. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  214. package/dist/features/format/underline/feature.server.js +1 -3
  215. package/dist/features/format/underline/feature.server.js.map +1 -1
  216. package/dist/features/heading/client/index.d.ts +6 -0
  217. package/dist/features/heading/client/index.d.ts.map +1 -0
  218. package/dist/features/heading/client/index.js +112 -0
  219. package/dist/features/heading/client/index.js.map +1 -0
  220. package/dist/features/heading/server/i18n.d.ts.map +1 -0
  221. package/dist/features/heading/server/i18n.js.map +1 -0
  222. package/dist/features/heading/server/index.d.ts +10 -0
  223. package/dist/features/heading/server/index.d.ts.map +1 -0
  224. package/dist/features/heading/server/index.js +60 -0
  225. package/dist/features/heading/server/index.js.map +1 -0
  226. package/dist/features/horizontalRule/client/component/index.d.ts.map +1 -0
  227. package/dist/features/horizontalRule/client/component/index.js.map +1 -0
  228. package/dist/features/horizontalRule/client/index.d.ts +5 -0
  229. package/dist/features/horizontalRule/client/index.d.ts.map +1 -0
  230. package/dist/features/horizontalRule/client/index.js +71 -0
  231. package/dist/features/horizontalRule/client/index.js.map +1 -0
  232. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -0
  233. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -0
  234. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +20 -0
  235. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -0
  236. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +43 -0
  237. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -0
  238. package/dist/features/horizontalRule/client/plugin/index.d.ts +7 -0
  239. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -0
  240. package/dist/features/horizontalRule/client/plugin/index.js +31 -0
  241. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -0
  242. package/dist/features/horizontalRule/server/i18n.d.ts.map +1 -0
  243. package/dist/features/horizontalRule/server/i18n.js.map +1 -0
  244. package/dist/features/horizontalRule/server/index.d.ts +2 -0
  245. package/dist/features/horizontalRule/server/index.d.ts.map +1 -0
  246. package/dist/features/horizontalRule/server/index.js +32 -0
  247. package/dist/features/horizontalRule/server/index.js.map +1 -0
  248. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +3 -0
  249. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -0
  250. package/dist/features/horizontalRule/server/markdownTransformer.js +23 -0
  251. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -0
  252. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +53 -0
  253. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -0
  254. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +83 -0
  255. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -0
  256. package/dist/features/indent/client/index.d.ts +5 -0
  257. package/dist/features/indent/client/index.d.ts.map +1 -0
  258. package/dist/features/indent/client/index.js +56 -0
  259. package/dist/features/indent/client/index.js.map +1 -0
  260. package/dist/features/indent/client/toolbarIndentGroup.d.ts +3 -0
  261. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -0
  262. package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -0
  263. package/dist/features/indent/server/i18n.d.ts.map +1 -0
  264. package/dist/features/indent/server/i18n.js.map +1 -0
  265. package/dist/features/indent/server/index.d.ts +2 -0
  266. package/dist/features/indent/server/index.d.ts.map +1 -0
  267. package/dist/features/indent/server/index.js +11 -0
  268. package/dist/features/indent/server/index.js.map +1 -0
  269. package/dist/features/link/client/index.d.ts +16 -0
  270. package/dist/features/link/client/index.d.ts.map +1 -0
  271. package/dist/features/link/client/index.js +101 -0
  272. package/dist/features/link/client/index.js.map +1 -0
  273. package/dist/features/link/client/plugins/autoLink/index.d.ts +20 -0
  274. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -0
  275. package/dist/features/link/client/plugins/autoLink/index.js +335 -0
  276. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -0
  277. package/dist/features/link/client/plugins/clickableLink/index.d.ts +4 -0
  278. package/dist/features/link/client/plugins/clickableLink/index.d.ts.map +1 -0
  279. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -0
  280. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
  281. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -0
  282. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
  283. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +299 -0
  284. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -0
  285. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +5 -0
  286. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -0
  287. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -0
  288. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +15 -0
  289. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -0
  290. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -0
  291. package/dist/features/link/client/plugins/link/index.d.ts +4 -0
  292. package/dist/features/link/client/plugins/link/index.d.ts.map +1 -0
  293. package/dist/features/link/client/plugins/link/index.js +51 -0
  294. package/dist/features/link/client/plugins/link/index.js.map +1 -0
  295. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  296. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  297. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  298. package/dist/features/link/server/baseFields.d.ts.map +1 -0
  299. package/dist/features/link/server/baseFields.js.map +1 -0
  300. package/dist/features/link/server/graphQLPopulationPromise.d.ts +5 -0
  301. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -0
  302. package/dist/features/link/server/graphQLPopulationPromise.js +31 -0
  303. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -0
  304. package/dist/features/link/server/i18n.d.ts.map +1 -0
  305. package/dist/features/link/server/i18n.js.map +1 -0
  306. package/dist/features/link/server/index.d.ts +35 -0
  307. package/dist/features/link/server/index.d.ts.map +1 -0
  308. package/dist/features/link/server/index.js +132 -0
  309. package/dist/features/link/server/index.js.map +1 -0
  310. package/dist/features/link/server/transformExtraFields.d.ts +9 -0
  311. package/dist/features/link/server/transformExtraFields.d.ts.map +1 -0
  312. package/dist/features/link/server/transformExtraFields.js +20 -0
  313. package/dist/features/link/server/transformExtraFields.js.map +1 -0
  314. package/dist/features/link/server/validate.d.ts +6 -0
  315. package/dist/features/link/server/validate.d.ts.map +1 -0
  316. package/dist/features/link/server/validate.js.map +1 -0
  317. package/dist/features/lists/checklist/client/index.d.ts +5 -0
  318. package/dist/features/lists/checklist/client/index.d.ts.map +1 -0
  319. package/dist/features/lists/checklist/client/index.js +100 -0
  320. package/dist/features/lists/checklist/client/index.js.map +1 -0
  321. package/dist/features/lists/checklist/client/plugin/index.d.ts +3 -0
  322. package/dist/features/lists/checklist/client/plugin/index.d.ts.map +1 -0
  323. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -0
  324. package/dist/features/lists/checklist/server/i18n.d.ts.map +1 -0
  325. package/dist/features/lists/checklist/server/i18n.js.map +1 -0
  326. package/dist/features/lists/checklist/server/index.d.ts +2 -0
  327. package/dist/features/lists/checklist/server/index.d.ts.map +1 -0
  328. package/dist/features/lists/checklist/server/index.js +34 -0
  329. package/dist/features/lists/checklist/server/index.js.map +1 -0
  330. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  331. package/dist/features/lists/htmlConverter.js +10 -4
  332. package/dist/features/lists/htmlConverter.js.map +1 -1
  333. package/dist/features/lists/orderedList/client/index.d.ts +5 -0
  334. package/dist/features/lists/orderedList/client/index.d.ts.map +1 -0
  335. package/dist/features/lists/orderedList/client/index.js +90 -0
  336. package/dist/features/lists/orderedList/client/index.js.map +1 -0
  337. package/dist/features/lists/orderedList/server/i18n.d.ts.map +1 -0
  338. package/dist/features/lists/orderedList/server/i18n.js.map +1 -0
  339. package/dist/features/lists/orderedList/server/index.d.ts +2 -0
  340. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -0
  341. package/dist/features/lists/orderedList/server/index.js +34 -0
  342. package/dist/features/lists/orderedList/server/index.js.map +1 -0
  343. package/dist/features/lists/unorderedList/client/index.d.ts +5 -0
  344. package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -0
  345. package/dist/features/lists/unorderedList/client/index.js +88 -0
  346. package/dist/features/lists/unorderedList/client/index.js.map +1 -0
  347. package/dist/features/lists/unorderedList/server/i18n.d.ts.map +1 -0
  348. package/dist/features/lists/unorderedList/server/i18n.js.map +1 -0
  349. package/dist/features/lists/unorderedList/server/index.d.ts +2 -0
  350. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -0
  351. package/dist/features/lists/unorderedList/server/index.js +32 -0
  352. package/dist/features/lists/unorderedList/server/index.js.map +1 -0
  353. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +1 -1
  354. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -1
  355. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +4 -3
  356. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  357. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +1 -1
  358. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -1
  359. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +4 -3
  360. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  361. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +1 -1
  362. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
  363. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +4 -3
  364. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  365. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +1 -1
  366. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  367. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +4 -3
  368. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  369. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +1 -1
  370. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
  371. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +4 -3
  372. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  373. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +1 -1
  374. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -1
  375. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +4 -3
  376. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  377. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +1 -1
  378. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  379. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +1 -1
  380. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  381. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +2 -2
  382. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -1
  383. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +7 -7
  384. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  385. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +5 -3
  386. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -1
  387. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +15 -9
  388. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  389. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -9
  390. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -1
  391. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  392. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  393. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +1 -16
  394. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  395. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +4 -3
  396. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  397. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +16 -11
  398. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  399. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +1 -1
  400. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
  401. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +1 -1
  402. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  403. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +1 -1
  404. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -1
  405. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +1 -1
  406. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  407. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +1 -1
  408. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -1
  409. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +1 -1
  410. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  411. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +1 -1
  412. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -1
  413. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +1 -1
  414. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  415. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +1 -1
  416. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  417. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +1 -1
  418. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  419. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +1 -1
  420. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
  421. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +1 -1
  422. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  423. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +1 -1
  424. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  425. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +1 -1
  426. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  427. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +1 -1
  428. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -1
  429. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +1 -1
  430. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  431. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +1 -1
  432. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
  433. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +1 -1
  434. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  435. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +1 -1
  436. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  437. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +1 -1
  438. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  439. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +2 -2
  440. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -1
  441. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +10 -10
  442. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  443. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  444. package/dist/features/migrations/slateToLexical/converter/index.js +1 -0
  445. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  446. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -9
  447. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +1 -1
  448. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  449. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  450. package/dist/features/migrations/slateToLexical/feature.client.js +0 -15
  451. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  452. package/dist/features/migrations/slateToLexical/feature.server.d.ts +5 -5
  453. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  454. package/dist/features/migrations/slateToLexical/feature.server.js +15 -11
  455. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  456. package/dist/features/paragraph/client/index.d.ts +5 -0
  457. package/dist/features/paragraph/client/index.d.ts.map +1 -0
  458. package/dist/features/paragraph/client/index.js +71 -0
  459. package/dist/features/paragraph/client/index.js.map +1 -0
  460. package/dist/features/paragraph/server/i18n.d.ts.map +1 -0
  461. package/dist/features/paragraph/server/i18n.js.map +1 -0
  462. package/dist/features/paragraph/server/index.d.ts +2 -0
  463. package/dist/features/paragraph/server/index.d.ts.map +1 -0
  464. package/dist/features/paragraph/server/index.js +12 -0
  465. package/dist/features/paragraph/server/index.js.map +1 -0
  466. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +13 -0
  467. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -0
  468. package/dist/features/relationship/client/components/RelationshipComponent.js +171 -0
  469. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -0
  470. package/dist/features/relationship/client/drawer/commands.d.ts.map +1 -0
  471. package/dist/features/relationship/client/drawer/commands.js.map +1 -0
  472. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -0
  473. package/dist/features/relationship/client/drawer/index.js.map +1 -0
  474. package/dist/features/relationship/client/index.d.ts +18 -0
  475. package/dist/features/relationship/client/index.d.ts.map +1 -0
  476. package/dist/features/relationship/client/index.js +72 -0
  477. package/dist/features/relationship/client/index.js.map +1 -0
  478. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +15 -0
  479. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -0
  480. package/dist/features/relationship/client/nodes/RelationshipNode.js +74 -0
  481. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -0
  482. package/dist/features/relationship/client/plugins/index.d.ts +7 -0
  483. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -0
  484. package/dist/features/relationship/client/plugins/index.js +50 -0
  485. package/dist/features/relationship/client/plugins/index.js.map +1 -0
  486. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
  487. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +33 -0
  488. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -0
  489. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +5 -0
  490. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -0
  491. package/dist/features/relationship/server/graphQLPopulationPromise.js +29 -0
  492. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -0
  493. package/dist/features/relationship/server/i18n.d.ts.map +1 -0
  494. package/dist/features/relationship/server/i18n.js.map +1 -0
  495. package/dist/features/relationship/server/index.d.ts +27 -0
  496. package/dist/features/relationship/server/index.d.ts.map +1 -0
  497. package/dist/features/relationship/server/index.js +53 -0
  498. package/dist/features/relationship/server/index.js.map +1 -0
  499. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +35 -0
  500. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -0
  501. package/dist/features/relationship/server/nodes/RelationshipNode.js +101 -0
  502. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -0
  503. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +5 -0
  504. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -0
  505. package/dist/features/toolbars/fixed/client/Toolbar/index.js +209 -0
  506. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -0
  507. package/dist/features/toolbars/fixed/client/index.d.ts +6 -0
  508. package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -0
  509. package/dist/features/toolbars/fixed/client/index.js +13 -0
  510. package/dist/features/toolbars/fixed/client/index.js.map +1 -0
  511. package/dist/features/toolbars/fixed/server/index.d.ts +18 -0
  512. package/dist/features/toolbars/fixed/server/index.d.ts.map +1 -0
  513. package/dist/features/toolbars/fixed/server/index.js +17 -0
  514. package/dist/features/toolbars/fixed/server/index.js.map +1 -0
  515. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +4 -0
  516. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -0
  517. package/dist/features/toolbars/inline/client/Toolbar/index.js +319 -0
  518. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -0
  519. package/dist/features/toolbars/inline/client/index.d.ts +5 -0
  520. package/dist/features/toolbars/inline/client/index.d.ts.map +1 -0
  521. package/dist/features/toolbars/inline/client/index.js +13 -0
  522. package/dist/features/toolbars/inline/client/index.js.map +1 -0
  523. package/dist/features/toolbars/inline/server/index.d.ts +2 -0
  524. package/dist/features/toolbars/inline/server/index.d.ts.map +1 -0
  525. package/dist/features/toolbars/inline/server/index.js +9 -0
  526. package/dist/features/toolbars/inline/server/index.js.map +1 -0
  527. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  528. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +3 -1
  529. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  530. package/dist/features/toolbars/types.d.ts +2 -1
  531. package/dist/features/toolbars/types.d.ts.map +1 -1
  532. package/dist/features/toolbars/types.js.map +1 -1
  533. package/dist/features/typesServer.d.ts +18 -13
  534. package/dist/features/typesServer.d.ts.map +1 -1
  535. package/dist/features/typesServer.js.map +1 -1
  536. package/dist/features/upload/client/component/index.d.ts +9 -0
  537. package/dist/features/upload/client/component/index.d.ts.map +1 -0
  538. package/dist/features/upload/client/component/index.js +248 -0
  539. package/dist/features/upload/client/component/index.js.map +1 -0
  540. package/dist/features/upload/client/drawer/commands.d.ts.map +1 -0
  541. package/dist/features/upload/client/drawer/commands.js.map +1 -0
  542. package/dist/features/upload/client/drawer/index.d.ts.map +1 -0
  543. package/dist/features/upload/client/drawer/index.js +77 -0
  544. package/dist/features/upload/client/drawer/index.js.map +1 -0
  545. package/dist/features/upload/client/feature.client.d.ts.map +1 -0
  546. package/dist/features/upload/client/feature.client.js +74 -0
  547. package/dist/features/upload/client/feature.client.js.map +1 -0
  548. package/dist/features/upload/client/nodes/UploadNode.d.ts +22 -0
  549. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -0
  550. package/dist/features/upload/client/nodes/UploadNode.js +91 -0
  551. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -0
  552. package/dist/features/upload/client/plugin/index.d.ts +8 -0
  553. package/dist/features/upload/client/plugin/index.d.ts.map +1 -0
  554. package/dist/features/upload/client/plugin/index.js +53 -0
  555. package/dist/features/upload/client/plugin/index.js.map +1 -0
  556. package/dist/features/upload/server/feature.server.d.ts +18 -0
  557. package/dist/features/upload/server/feature.server.d.ts.map +1 -0
  558. package/dist/features/upload/server/feature.server.js +189 -0
  559. package/dist/features/upload/server/feature.server.js.map +1 -0
  560. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +5 -0
  561. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -0
  562. package/dist/features/upload/server/graphQLPopulationPromise.js +52 -0
  563. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -0
  564. package/dist/features/upload/server/i18n.d.ts.map +1 -0
  565. package/dist/features/upload/server/i18n.js.map +1 -0
  566. package/dist/features/upload/server/nodes/UploadNode.d.ts +40 -0
  567. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -0
  568. package/dist/features/upload/server/nodes/UploadNode.js +128 -0
  569. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -0
  570. package/dist/features/upload/server/validate.d.ts +5 -0
  571. package/dist/features/upload/server/validate.d.ts.map +1 -0
  572. package/dist/features/upload/server/validate.js.map +1 -0
  573. package/dist/field/Field.d.ts +7 -7
  574. package/dist/field/Field.d.ts.map +1 -1
  575. package/dist/field/Field.js +8 -6
  576. package/dist/field/Field.js.map +1 -1
  577. package/dist/field/index.d.ts +2 -9
  578. package/dist/field/index.d.ts.map +1 -1
  579. package/dist/field/index.js +8 -8
  580. package/dist/field/index.js.map +1 -1
  581. package/dist/index.d.ts +23 -38
  582. package/dist/index.d.ts.map +1 -1
  583. package/dist/index.js +85 -70
  584. package/dist/index.js.map +1 -1
  585. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  586. package/dist/lexical/LexicalEditor.js +0 -6
  587. package/dist/lexical/LexicalEditor.js.map +1 -1
  588. package/dist/lexical/LexicalProvider.d.ts +2 -6
  589. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  590. package/dist/lexical/LexicalProvider.js +2 -2
  591. package/dist/lexical/LexicalProvider.js.map +1 -1
  592. package/dist/lexical/config/client/EditorConfigProvider.d.ts +4 -12
  593. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  594. package/dist/lexical/config/client/EditorConfigProvider.js +3 -3
  595. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  596. package/dist/lexical/config/server/default.js +13 -13
  597. package/dist/lexical/config/server/default.js.map +1 -1
  598. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  599. package/dist/lexical/config/server/sanitize.js +24 -6
  600. package/dist/lexical/config/server/sanitize.js.map +1 -1
  601. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +6 -2
  602. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  603. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  604. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  605. package/dist/lexical/plugins/SlashMenu/index.js +14 -4
  606. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  607. package/dist/lexical/theme/EditorTheme.d.ts +0 -1
  608. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  609. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  610. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  611. package/dist/lexical/ui/ContentEditable.js +8 -1
  612. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  613. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  614. package/dist/lexical/ui/icons/Table/index.js +1 -0
  615. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  616. package/dist/lexical/ui/icons/Upload/index.js +1 -1
  617. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  618. package/dist/nodeTypes.d.ts +9 -7
  619. package/dist/nodeTypes.d.ts.map +1 -1
  620. package/dist/nodeTypes.js.map +1 -1
  621. package/dist/populateGraphQL/defaultValue.d.ts.map +1 -1
  622. package/dist/populateGraphQL/defaultValue.js +1 -0
  623. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  624. package/dist/types.d.ts +6 -8
  625. package/dist/types.d.ts.map +1 -1
  626. package/dist/types.js.map +1 -1
  627. package/dist/utilities/fieldsDrawer/Drawer.d.ts +10 -8
  628. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  629. package/dist/utilities/fieldsDrawer/Drawer.js +3 -1
  630. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  631. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  632. package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -6
  633. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  634. package/dist/utilities/generateComponentMap.d.ts +2 -2
  635. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  636. package/dist/utilities/generateComponentMap.js +39 -27
  637. package/dist/utilities/generateComponentMap.js.map +1 -1
  638. package/dist/utilities/generateImportMap.d.ts +6 -0
  639. package/dist/utilities/generateImportMap.d.ts.map +1 -0
  640. package/dist/utilities/generateImportMap.js +50 -0
  641. package/dist/utilities/generateImportMap.js.map +1 -0
  642. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  643. package/dist/utilities/generateSchemaMap.js +2 -1
  644. package/dist/utilities/generateSchemaMap.js.map +1 -1
  645. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -1
  646. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +1 -5
  647. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  648. package/dist/utilities/useLexicalFeature.js +1 -1
  649. package/dist/utilities/useLexicalFeature.js.map +1 -1
  650. package/package.json +45 -35
  651. package/dist/exports/client/Field-VT4YC32B.js +0 -2
  652. package/dist/exports/client/Field-VT4YC32B.js.map +0 -7
  653. package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js +0 -2
  654. package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js.map +0 -7
  655. package/dist/exports/client/chunk-6QXGZYUK.js +0 -2
  656. package/dist/exports/client/chunk-6QXGZYUK.js.map +0 -7
  657. package/dist/exports/client/chunk-IPCJ5EVK.js +0 -2
  658. package/dist/exports/client/chunk-IPCJ5EVK.js.map +0 -7
  659. package/dist/exports/client/chunk-IWZVO3AI.js +0 -2
  660. package/dist/exports/client/chunk-IWZVO3AI.js.map +0 -7
  661. package/dist/exports/client/chunk-Q5DYR7MH.js +0 -3
  662. package/dist/exports/client/chunk-Q5DYR7MH.js.map +0 -7
  663. package/dist/exports/client/chunk-VUVXZJJR.js +0 -2
  664. package/dist/exports/client/chunk-VUVXZJJR.js.map +0 -7
  665. package/dist/exports/client/component-D4GWDXK5.js +0 -2
  666. package/dist/exports/client/component-D4GWDXK5.js.map +0 -7
  667. package/dist/exports/client/component-KA7FDRMA.js +0 -2
  668. package/dist/exports/client/component-KA7FDRMA.js.map +0 -7
  669. package/dist/exports/client/component-VM36FRT2.js +0 -2
  670. package/dist/exports/client/component-VM36FRT2.js.map +0 -7
  671. package/dist/exports/client/componentInline-6EKPZSCV.js +0 -2
  672. package/dist/exports/client/componentInline-6EKPZSCV.js.map +0 -7
  673. package/dist/features/align/feature.client.d.ts +0 -5
  674. package/dist/features/align/feature.client.d.ts.map +0 -1
  675. package/dist/features/align/feature.client.js +0 -146
  676. package/dist/features/align/feature.client.js.map +0 -1
  677. package/dist/features/align/feature.server.d.ts +0 -2
  678. package/dist/features/align/feature.server.d.ts.map +0 -1
  679. package/dist/features/align/feature.server.js +0 -13
  680. package/dist/features/align/feature.server.js.map +0 -1
  681. package/dist/features/align/i18n.d.ts.map +0 -1
  682. package/dist/features/align/i18n.js.map +0 -1
  683. package/dist/features/align/toolbarAlignGroup.d.ts +0 -3
  684. package/dist/features/align/toolbarAlignGroup.d.ts.map +0 -1
  685. package/dist/features/align/toolbarAlignGroup.js +0 -12
  686. package/dist/features/align/toolbarAlignGroup.js.map +0 -1
  687. package/dist/features/blockquote/feature.client.d.ts +0 -5
  688. package/dist/features/blockquote/feature.client.d.ts.map +0 -1
  689. package/dist/features/blockquote/feature.client.js +0 -77
  690. package/dist/features/blockquote/feature.client.js.map +0 -1
  691. package/dist/features/blockquote/feature.server.d.ts +0 -7
  692. package/dist/features/blockquote/feature.server.d.ts.map +0 -1
  693. package/dist/features/blockquote/feature.server.js +0 -45
  694. package/dist/features/blockquote/feature.server.js.map +0 -1
  695. package/dist/features/blockquote/i18n.d.ts.map +0 -1
  696. package/dist/features/blockquote/i18n.js.map +0 -1
  697. package/dist/features/blocks/component/BlockContent.d.ts +0 -27
  698. package/dist/features/blocks/component/BlockContent.d.ts.map +0 -1
  699. package/dist/features/blocks/component/BlockContent.js +0 -196
  700. package/dist/features/blocks/component/BlockContent.js.map +0 -1
  701. package/dist/features/blocks/component/FormSavePlugin.d.ts.map +0 -1
  702. package/dist/features/blocks/component/FormSavePlugin.js.map +0 -1
  703. package/dist/features/blocks/component/index.d.ts +0 -11
  704. package/dist/features/blocks/component/index.d.ts.map +0 -1
  705. package/dist/features/blocks/component/index.js +0 -162
  706. package/dist/features/blocks/component/index.js.map +0 -1
  707. package/dist/features/blocks/component/removeEmptyArrayValues.d.ts.map +0 -1
  708. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +0 -1
  709. package/dist/features/blocks/componentInline/index.d.ts.map +0 -1
  710. package/dist/features/blocks/componentInline/index.js +0 -133
  711. package/dist/features/blocks/componentInline/index.js.map +0 -1
  712. package/dist/features/blocks/feature.client.d.ts +0 -13
  713. package/dist/features/blocks/feature.client.d.ts.map +0 -1
  714. package/dist/features/blocks/feature.client.js +0 -148
  715. package/dist/features/blocks/feature.client.js.map +0 -1
  716. package/dist/features/blocks/feature.server.d.ts +0 -8
  717. package/dist/features/blocks/feature.server.d.ts.map +0 -1
  718. package/dist/features/blocks/feature.server.js +0 -160
  719. package/dist/features/blocks/feature.server.js.map +0 -1
  720. package/dist/features/blocks/graphQLPopulationPromise.d.ts +0 -6
  721. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +0 -1
  722. package/dist/features/blocks/graphQLPopulationPromise.js +0 -31
  723. package/dist/features/blocks/graphQLPopulationPromise.js.map +0 -1
  724. package/dist/features/blocks/i18n.d.ts.map +0 -1
  725. package/dist/features/blocks/i18n.js.map +0 -1
  726. package/dist/features/blocks/nodes/BlocksNode.d.ts +0 -38
  727. package/dist/features/blocks/nodes/BlocksNode.d.ts.map +0 -1
  728. package/dist/features/blocks/nodes/BlocksNode.js +0 -92
  729. package/dist/features/blocks/nodes/BlocksNode.js.map +0 -1
  730. package/dist/features/blocks/nodes/InlineBlocksNode.d.ts +0 -39
  731. package/dist/features/blocks/nodes/InlineBlocksNode.d.ts.map +0 -1
  732. package/dist/features/blocks/nodes/InlineBlocksNode.js +0 -94
  733. package/dist/features/blocks/nodes/InlineBlocksNode.js.map +0 -1
  734. package/dist/features/blocks/plugin/commands.d.ts.map +0 -1
  735. package/dist/features/blocks/plugin/commands.js.map +0 -1
  736. package/dist/features/blocks/plugin/index.d.ts +0 -6
  737. package/dist/features/blocks/plugin/index.d.ts.map +0 -1
  738. package/dist/features/blocks/plugin/index.js +0 -111
  739. package/dist/features/blocks/plugin/index.js.map +0 -1
  740. package/dist/features/blocks/validate.d.ts +0 -6
  741. package/dist/features/blocks/validate.d.ts.map +0 -1
  742. package/dist/features/blocks/validate.js.map +0 -1
  743. package/dist/features/converters/html/feature.server.d.ts +0 -8
  744. package/dist/features/converters/html/feature.server.d.ts.map +0 -1
  745. package/dist/features/converters/html/feature.server.js +0 -8
  746. package/dist/features/converters/html/feature.server.js.map +0 -1
  747. package/dist/features/debug/testRecorder/feature.client.d.ts +0 -5
  748. package/dist/features/debug/testRecorder/feature.client.d.ts.map +0 -1
  749. package/dist/features/debug/testRecorder/feature.client.js +0 -13
  750. package/dist/features/debug/testRecorder/feature.client.js.map +0 -1
  751. package/dist/features/debug/testRecorder/feature.server.d.ts +0 -2
  752. package/dist/features/debug/testRecorder/feature.server.d.ts.map +0 -1
  753. package/dist/features/debug/testRecorder/feature.server.js +0 -11
  754. package/dist/features/debug/testRecorder/feature.server.js.map +0 -1
  755. package/dist/features/debug/testRecorder/plugin/index.d.ts +0 -5
  756. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +0 -1
  757. package/dist/features/debug/testRecorder/plugin/index.js +0 -471
  758. package/dist/features/debug/testRecorder/plugin/index.js.map +0 -1
  759. package/dist/features/debug/treeView/feature.client.d.ts +0 -5
  760. package/dist/features/debug/treeView/feature.client.d.ts.map +0 -1
  761. package/dist/features/debug/treeView/feature.client.js +0 -13
  762. package/dist/features/debug/treeView/feature.client.js.map +0 -1
  763. package/dist/features/debug/treeView/feature.server.d.ts +0 -2
  764. package/dist/features/debug/treeView/feature.server.d.ts.map +0 -1
  765. package/dist/features/debug/treeView/feature.server.js +0 -11
  766. package/dist/features/debug/treeView/feature.server.js.map +0 -1
  767. package/dist/features/debug/treeView/plugin/index.d.ts +0 -4
  768. package/dist/features/debug/treeView/plugin/index.d.ts.map +0 -1
  769. package/dist/features/debug/treeView/plugin/index.js.map +0 -1
  770. package/dist/features/experimental_table/feature.client.d.ts +0 -2
  771. package/dist/features/experimental_table/feature.client.d.ts.map +0 -1
  772. package/dist/features/experimental_table/feature.client.js +0 -66
  773. package/dist/features/experimental_table/feature.client.js.map +0 -1
  774. package/dist/features/experimental_table/feature.server.d.ts +0 -2
  775. package/dist/features/experimental_table/feature.server.d.ts.map +0 -1
  776. package/dist/features/experimental_table/feature.server.js +0 -52
  777. package/dist/features/experimental_table/feature.server.js.map +0 -1
  778. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts +0 -4
  779. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  780. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js +0 -602
  781. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js.map +0 -1
  782. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts +0 -4
  783. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  784. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js +0 -322
  785. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js.map +0 -1
  786. package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts +0 -24
  787. package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts.map +0 -1
  788. package/dist/features/experimental_table/plugins/TablePlugin/index.js +0 -98
  789. package/dist/features/experimental_table/plugins/TablePlugin/index.js.map +0 -1
  790. package/dist/features/heading/feature.client.d.ts +0 -6
  791. package/dist/features/heading/feature.client.d.ts.map +0 -1
  792. package/dist/features/heading/feature.client.js +0 -112
  793. package/dist/features/heading/feature.client.js.map +0 -1
  794. package/dist/features/heading/feature.server.d.ts +0 -10
  795. package/dist/features/heading/feature.server.d.ts.map +0 -1
  796. package/dist/features/heading/feature.server.js +0 -59
  797. package/dist/features/heading/feature.server.js.map +0 -1
  798. package/dist/features/heading/i18n.d.ts.map +0 -1
  799. package/dist/features/heading/i18n.js.map +0 -1
  800. package/dist/features/horizontalRule/component/index.d.ts.map +0 -1
  801. package/dist/features/horizontalRule/component/index.js.map +0 -1
  802. package/dist/features/horizontalRule/feature.client.d.ts +0 -5
  803. package/dist/features/horizontalRule/feature.client.d.ts.map +0 -1
  804. package/dist/features/horizontalRule/feature.client.js +0 -70
  805. package/dist/features/horizontalRule/feature.client.js.map +0 -1
  806. package/dist/features/horizontalRule/feature.server.d.ts +0 -2
  807. package/dist/features/horizontalRule/feature.server.d.ts.map +0 -1
  808. package/dist/features/horizontalRule/feature.server.js +0 -34
  809. package/dist/features/horizontalRule/feature.server.js.map +0 -1
  810. package/dist/features/horizontalRule/i18n.d.ts.map +0 -1
  811. package/dist/features/horizontalRule/i18n.js.map +0 -1
  812. package/dist/features/horizontalRule/markdownTransformer.d.ts.map +0 -1
  813. package/dist/features/horizontalRule/markdownTransformer.js.map +0 -1
  814. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +0 -56
  815. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +0 -1
  816. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js +0 -92
  817. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +0 -1
  818. package/dist/features/horizontalRule/plugin/index.d.ts +0 -7
  819. package/dist/features/horizontalRule/plugin/index.d.ts.map +0 -1
  820. package/dist/features/horizontalRule/plugin/index.js +0 -30
  821. package/dist/features/horizontalRule/plugin/index.js.map +0 -1
  822. package/dist/features/indent/feature.client.d.ts +0 -5
  823. package/dist/features/indent/feature.client.d.ts.map +0 -1
  824. package/dist/features/indent/feature.client.js +0 -56
  825. package/dist/features/indent/feature.client.js.map +0 -1
  826. package/dist/features/indent/feature.server.d.ts +0 -2
  827. package/dist/features/indent/feature.server.d.ts.map +0 -1
  828. package/dist/features/indent/feature.server.js +0 -13
  829. package/dist/features/indent/feature.server.js.map +0 -1
  830. package/dist/features/indent/i18n.d.ts.map +0 -1
  831. package/dist/features/indent/i18n.js.map +0 -1
  832. package/dist/features/indent/toolbarIndentGroup.d.ts +0 -3
  833. package/dist/features/indent/toolbarIndentGroup.d.ts.map +0 -1
  834. package/dist/features/indent/toolbarIndentGroup.js.map +0 -1
  835. package/dist/features/link/drawer/baseFields.d.ts.map +0 -1
  836. package/dist/features/link/drawer/baseFields.js.map +0 -1
  837. package/dist/features/link/feature.client.d.ts +0 -16
  838. package/dist/features/link/feature.client.d.ts.map +0 -1
  839. package/dist/features/link/feature.client.js +0 -101
  840. package/dist/features/link/feature.client.js.map +0 -1
  841. package/dist/features/link/feature.server.d.ts +0 -35
  842. package/dist/features/link/feature.server.d.ts.map +0 -1
  843. package/dist/features/link/feature.server.js +0 -128
  844. package/dist/features/link/feature.server.js.map +0 -1
  845. package/dist/features/link/graphQLPopulationPromise.d.ts +0 -5
  846. package/dist/features/link/graphQLPopulationPromise.d.ts.map +0 -1
  847. package/dist/features/link/graphQLPopulationPromise.js +0 -31
  848. package/dist/features/link/graphQLPopulationPromise.js.map +0 -1
  849. package/dist/features/link/i18n.d.ts.map +0 -1
  850. package/dist/features/link/i18n.js.map +0 -1
  851. package/dist/features/link/plugins/autoLink/index.d.ts +0 -20
  852. package/dist/features/link/plugins/autoLink/index.d.ts.map +0 -1
  853. package/dist/features/link/plugins/autoLink/index.js +0 -323
  854. package/dist/features/link/plugins/autoLink/index.js.map +0 -1
  855. package/dist/features/link/plugins/clickableLink/index.d.ts +0 -4
  856. package/dist/features/link/plugins/clickableLink/index.d.ts.map +0 -1
  857. package/dist/features/link/plugins/clickableLink/index.js.map +0 -1
  858. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +0 -1
  859. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +0 -1
  860. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +0 -1
  861. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +0 -299
  862. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +0 -1
  863. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +0 -5
  864. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +0 -1
  865. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +0 -1
  866. package/dist/features/link/plugins/floatingLinkEditor/types.d.ts +0 -15
  867. package/dist/features/link/plugins/floatingLinkEditor/types.d.ts.map +0 -1
  868. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +0 -1
  869. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +0 -9
  870. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +0 -1
  871. package/dist/features/link/plugins/floatingLinkEditor/utilities.js +0 -20
  872. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +0 -1
  873. package/dist/features/link/plugins/link/index.d.ts +0 -4
  874. package/dist/features/link/plugins/link/index.d.ts.map +0 -1
  875. package/dist/features/link/plugins/link/index.js +0 -53
  876. package/dist/features/link/plugins/link/index.js.map +0 -1
  877. package/dist/features/link/validate.d.ts +0 -6
  878. package/dist/features/link/validate.d.ts.map +0 -1
  879. package/dist/features/link/validate.js.map +0 -1
  880. package/dist/features/lists/checklist/feature.client.d.ts +0 -5
  881. package/dist/features/lists/checklist/feature.client.d.ts.map +0 -1
  882. package/dist/features/lists/checklist/feature.client.js +0 -100
  883. package/dist/features/lists/checklist/feature.client.js.map +0 -1
  884. package/dist/features/lists/checklist/feature.server.d.ts +0 -2
  885. package/dist/features/lists/checklist/feature.server.d.ts.map +0 -1
  886. package/dist/features/lists/checklist/feature.server.js +0 -36
  887. package/dist/features/lists/checklist/feature.server.js.map +0 -1
  888. package/dist/features/lists/checklist/i18n.d.ts.map +0 -1
  889. package/dist/features/lists/checklist/i18n.js.map +0 -1
  890. package/dist/features/lists/checklist/plugin/index.d.ts +0 -3
  891. package/dist/features/lists/checklist/plugin/index.d.ts.map +0 -1
  892. package/dist/features/lists/checklist/plugin/index.js.map +0 -1
  893. package/dist/features/lists/orderedList/feature.client.d.ts +0 -5
  894. package/dist/features/lists/orderedList/feature.client.d.ts.map +0 -1
  895. package/dist/features/lists/orderedList/feature.client.js +0 -90
  896. package/dist/features/lists/orderedList/feature.client.js.map +0 -1
  897. package/dist/features/lists/orderedList/feature.server.d.ts +0 -2
  898. package/dist/features/lists/orderedList/feature.server.d.ts.map +0 -1
  899. package/dist/features/lists/orderedList/feature.server.js +0 -36
  900. package/dist/features/lists/orderedList/feature.server.js.map +0 -1
  901. package/dist/features/lists/orderedList/i18n.d.ts.map +0 -1
  902. package/dist/features/lists/orderedList/i18n.js.map +0 -1
  903. package/dist/features/lists/unorderedList/feature.client.d.ts +0 -5
  904. package/dist/features/lists/unorderedList/feature.client.d.ts.map +0 -1
  905. package/dist/features/lists/unorderedList/feature.client.js +0 -88
  906. package/dist/features/lists/unorderedList/feature.client.js.map +0 -1
  907. package/dist/features/lists/unorderedList/feature.server.d.ts +0 -2
  908. package/dist/features/lists/unorderedList/feature.server.d.ts.map +0 -1
  909. package/dist/features/lists/unorderedList/feature.server.js +0 -34
  910. package/dist/features/lists/unorderedList/feature.server.js.map +0 -1
  911. package/dist/features/lists/unorderedList/i18n.d.ts.map +0 -1
  912. package/dist/features/lists/unorderedList/i18n.js.map +0 -1
  913. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -5
  914. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +0 -1
  915. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js +0 -6
  916. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +0 -1
  917. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts +0 -3
  918. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +0 -1
  919. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +0 -8
  920. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +0 -1
  921. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -5
  922. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +0 -1
  923. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js +0 -6
  924. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +0 -1
  925. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts +0 -3
  926. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +0 -1
  927. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +0 -8
  928. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +0 -1
  929. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -5
  930. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +0 -1
  931. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js +0 -6
  932. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +0 -1
  933. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts +0 -3
  934. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +0 -1
  935. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +0 -8
  936. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +0 -1
  937. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -5
  938. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +0 -1
  939. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js +0 -6
  940. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +0 -1
  941. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts +0 -3
  942. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +0 -1
  943. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +0 -8
  944. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +0 -1
  945. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -5
  946. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +0 -1
  947. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js +0 -6
  948. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +0 -1
  949. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts +0 -3
  950. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +0 -1
  951. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +0 -8
  952. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +0 -1
  953. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -5
  954. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +0 -1
  955. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js +0 -6
  956. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +0 -1
  957. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts +0 -3
  958. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +0 -1
  959. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +0 -8
  960. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +0 -1
  961. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -5
  962. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +0 -1
  963. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js +0 -6
  964. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +0 -1
  965. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts +0 -3
  966. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +0 -1
  967. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +0 -8
  968. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +0 -1
  969. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -5
  970. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +0 -1
  971. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js +0 -6
  972. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +0 -1
  973. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts +0 -3
  974. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +0 -1
  975. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +0 -8
  976. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +0 -1
  977. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -5
  978. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +0 -1
  979. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js +0 -6
  980. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +0 -1
  981. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts +0 -3
  982. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +0 -1
  983. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +0 -8
  984. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +0 -1
  985. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -5
  986. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +0 -1
  987. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js +0 -6
  988. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +0 -1
  989. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts +0 -3
  990. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +0 -1
  991. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +0 -8
  992. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +0 -1
  993. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -5
  994. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +0 -1
  995. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js +0 -6
  996. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +0 -1
  997. package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts +0 -3
  998. package/dist/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +0 -1
  999. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +0 -8
  1000. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +0 -1
  1001. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -5
  1002. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +0 -1
  1003. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js +0 -6
  1004. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +0 -1
  1005. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts +0 -3
  1006. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +0 -1
  1007. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +0 -8
  1008. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +0 -1
  1009. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -5
  1010. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +0 -1
  1011. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js +0 -6
  1012. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +0 -1
  1013. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts +0 -3
  1014. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +0 -1
  1015. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +0 -8
  1016. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +0 -1
  1017. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -5
  1018. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +0 -1
  1019. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js +0 -6
  1020. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +0 -1
  1021. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts +0 -3
  1022. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +0 -1
  1023. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +0 -8
  1024. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +0 -1
  1025. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -5
  1026. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +0 -1
  1027. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js +0 -6
  1028. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +0 -1
  1029. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts +0 -3
  1030. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +0 -1
  1031. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +0 -8
  1032. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +0 -1
  1033. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -5
  1034. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +0 -1
  1035. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js +0 -6
  1036. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +0 -1
  1037. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts +0 -3
  1038. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +0 -1
  1039. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +0 -8
  1040. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +0 -1
  1041. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -5
  1042. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +0 -1
  1043. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js +0 -6
  1044. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +0 -1
  1045. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts +0 -3
  1046. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +0 -1
  1047. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +0 -8
  1048. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +0 -1
  1049. package/dist/features/paragraph/feature.client.d.ts +0 -5
  1050. package/dist/features/paragraph/feature.client.d.ts.map +0 -1
  1051. package/dist/features/paragraph/feature.client.js +0 -71
  1052. package/dist/features/paragraph/feature.client.js.map +0 -1
  1053. package/dist/features/paragraph/feature.server.d.ts +0 -2
  1054. package/dist/features/paragraph/feature.server.d.ts.map +0 -1
  1055. package/dist/features/paragraph/feature.server.js +0 -14
  1056. package/dist/features/paragraph/feature.server.js.map +0 -1
  1057. package/dist/features/paragraph/i18n.d.ts.map +0 -1
  1058. package/dist/features/paragraph/i18n.js.map +0 -1
  1059. package/dist/features/relationship/drawer/commands.d.ts.map +0 -1
  1060. package/dist/features/relationship/drawer/commands.js.map +0 -1
  1061. package/dist/features/relationship/drawer/index.d.ts.map +0 -1
  1062. package/dist/features/relationship/drawer/index.js.map +0 -1
  1063. package/dist/features/relationship/feature.client.d.ts +0 -18
  1064. package/dist/features/relationship/feature.client.d.ts.map +0 -1
  1065. package/dist/features/relationship/feature.client.js +0 -72
  1066. package/dist/features/relationship/feature.client.js.map +0 -1
  1067. package/dist/features/relationship/feature.server.d.ts +0 -27
  1068. package/dist/features/relationship/feature.server.d.ts.map +0 -1
  1069. package/dist/features/relationship/feature.server.js +0 -55
  1070. package/dist/features/relationship/feature.server.js.map +0 -1
  1071. package/dist/features/relationship/graphQLPopulationPromise.d.ts +0 -5
  1072. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +0 -1
  1073. package/dist/features/relationship/graphQLPopulationPromise.js +0 -29
  1074. package/dist/features/relationship/graphQLPopulationPromise.js.map +0 -1
  1075. package/dist/features/relationship/i18n.d.ts.map +0 -1
  1076. package/dist/features/relationship/i18n.js.map +0 -1
  1077. package/dist/features/relationship/nodes/RelationshipNode.d.ts +0 -35
  1078. package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +0 -1
  1079. package/dist/features/relationship/nodes/RelationshipNode.js +0 -111
  1080. package/dist/features/relationship/nodes/RelationshipNode.js.map +0 -1
  1081. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts +0 -13
  1082. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +0 -1
  1083. package/dist/features/relationship/nodes/components/RelationshipComponent.js +0 -171
  1084. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +0 -1
  1085. package/dist/features/relationship/plugins/index.d.ts +0 -7
  1086. package/dist/features/relationship/plugins/index.d.ts.map +0 -1
  1087. package/dist/features/relationship/plugins/index.js +0 -50
  1088. package/dist/features/relationship/plugins/index.js.map +0 -1
  1089. package/dist/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +0 -1
  1090. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js +0 -33
  1091. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +0 -1
  1092. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +0 -5
  1093. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +0 -1
  1094. package/dist/features/toolbars/fixed/Toolbar/index.js +0 -207
  1095. package/dist/features/toolbars/fixed/Toolbar/index.js.map +0 -1
  1096. package/dist/features/toolbars/fixed/feature.client.d.ts +0 -6
  1097. package/dist/features/toolbars/fixed/feature.client.d.ts.map +0 -1
  1098. package/dist/features/toolbars/fixed/feature.client.js +0 -13
  1099. package/dist/features/toolbars/fixed/feature.client.js.map +0 -1
  1100. package/dist/features/toolbars/fixed/feature.server.d.ts +0 -18
  1101. package/dist/features/toolbars/fixed/feature.server.d.ts.map +0 -1
  1102. package/dist/features/toolbars/fixed/feature.server.js +0 -19
  1103. package/dist/features/toolbars/fixed/feature.server.js.map +0 -1
  1104. package/dist/features/toolbars/inline/Toolbar/index.d.ts +0 -4
  1105. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +0 -1
  1106. package/dist/features/toolbars/inline/Toolbar/index.js +0 -319
  1107. package/dist/features/toolbars/inline/Toolbar/index.js.map +0 -1
  1108. package/dist/features/toolbars/inline/feature.client.d.ts +0 -5
  1109. package/dist/features/toolbars/inline/feature.client.d.ts.map +0 -1
  1110. package/dist/features/toolbars/inline/feature.client.js +0 -13
  1111. package/dist/features/toolbars/inline/feature.client.js.map +0 -1
  1112. package/dist/features/toolbars/inline/feature.server.d.ts +0 -2
  1113. package/dist/features/toolbars/inline/feature.server.d.ts.map +0 -1
  1114. package/dist/features/toolbars/inline/feature.server.js +0 -11
  1115. package/dist/features/toolbars/inline/feature.server.js.map +0 -1
  1116. package/dist/features/upload/component/index.d.ts +0 -9
  1117. package/dist/features/upload/component/index.d.ts.map +0 -1
  1118. package/dist/features/upload/component/index.js +0 -242
  1119. package/dist/features/upload/component/index.js.map +0 -1
  1120. package/dist/features/upload/drawer/commands.d.ts.map +0 -1
  1121. package/dist/features/upload/drawer/commands.js.map +0 -1
  1122. package/dist/features/upload/drawer/index.d.ts.map +0 -1
  1123. package/dist/features/upload/drawer/index.js +0 -77
  1124. package/dist/features/upload/drawer/index.js.map +0 -1
  1125. package/dist/features/upload/feature.client.d.ts.map +0 -1
  1126. package/dist/features/upload/feature.client.js +0 -74
  1127. package/dist/features/upload/feature.client.js.map +0 -1
  1128. package/dist/features/upload/feature.server.d.ts +0 -18
  1129. package/dist/features/upload/feature.server.d.ts.map +0 -1
  1130. package/dist/features/upload/feature.server.js +0 -184
  1131. package/dist/features/upload/feature.server.js.map +0 -1
  1132. package/dist/features/upload/graphQLPopulationPromise.d.ts +0 -5
  1133. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +0 -1
  1134. package/dist/features/upload/graphQLPopulationPromise.js +0 -52
  1135. package/dist/features/upload/graphQLPopulationPromise.js.map +0 -1
  1136. package/dist/features/upload/i18n.d.ts.map +0 -1
  1137. package/dist/features/upload/i18n.js.map +0 -1
  1138. package/dist/features/upload/nodes/UploadNode.d.ts +0 -39
  1139. package/dist/features/upload/nodes/UploadNode.d.ts.map +0 -1
  1140. package/dist/features/upload/nodes/UploadNode.js +0 -131
  1141. package/dist/features/upload/nodes/UploadNode.js.map +0 -1
  1142. package/dist/features/upload/plugin/index.d.ts +0 -8
  1143. package/dist/features/upload/plugin/index.d.ts.map +0 -1
  1144. package/dist/features/upload/plugin/index.js +0 -53
  1145. package/dist/features/upload/plugin/index.js.map +0 -1
  1146. package/dist/features/upload/validate.d.ts +0 -5
  1147. package/dist/features/upload/validate.d.ts.map +0 -1
  1148. package/dist/features/upload/validate.js.map +0 -1
  1149. package/dist/lexical/utils/invariant.d.ts +0 -2
  1150. package/dist/lexical/utils/invariant.d.ts.map +0 -1
  1151. package/dist/lexical/utils/invariant.js +0 -12
  1152. package/dist/lexical/utils/invariant.js.map +0 -1
  1153. /package/dist/features/align/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1154. /package/dist/features/align/{i18n.js → server/i18n.js} +0 -0
  1155. /package/dist/features/blockquote/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1156. /package/dist/features/blockquote/{i18n.js → server/i18n.js} +0 -0
  1157. /package/dist/features/blocks/{component → client/component}/FormSavePlugin.d.ts +0 -0
  1158. /package/dist/features/blocks/{component → client/component}/FormSavePlugin.js +0 -0
  1159. /package/dist/features/blocks/{component → client/component}/removeEmptyArrayValues.d.ts +0 -0
  1160. /package/dist/features/blocks/{component → client/component}/removeEmptyArrayValues.js +0 -0
  1161. /package/dist/features/blocks/{componentInline → client/componentInline}/index.d.ts +0 -0
  1162. /package/dist/features/blocks/{plugin → client/plugin}/commands.d.ts +0 -0
  1163. /package/dist/features/blocks/{plugin → client/plugin}/commands.js +0 -0
  1164. /package/dist/features/blocks/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1165. /package/dist/features/blocks/{i18n.js → server/i18n.js} +0 -0
  1166. /package/dist/features/blocks/{validate.js → server/validate.js} +0 -0
  1167. /package/dist/features/debug/treeView/{plugin → client/plugin}/index.js +0 -0
  1168. /package/dist/features/heading/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1169. /package/dist/features/heading/{i18n.js → server/i18n.js} +0 -0
  1170. /package/dist/features/horizontalRule/{component → client/component}/index.d.ts +0 -0
  1171. /package/dist/features/horizontalRule/{component → client/component}/index.js +0 -0
  1172. /package/dist/features/horizontalRule/{markdownTransformer.d.ts → client/markdownTransformer.d.ts} +0 -0
  1173. /package/dist/features/horizontalRule/{markdownTransformer.js → client/markdownTransformer.js} +0 -0
  1174. /package/dist/features/horizontalRule/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1175. /package/dist/features/horizontalRule/{i18n.js → server/i18n.js} +0 -0
  1176. /package/dist/features/indent/{toolbarIndentGroup.js → client/toolbarIndentGroup.js} +0 -0
  1177. /package/dist/features/indent/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1178. /package/dist/features/indent/{i18n.js → server/i18n.js} +0 -0
  1179. /package/dist/features/link/{plugins → client/plugins}/clickableLink/index.js +0 -0
  1180. /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/commands.d.ts +0 -0
  1181. /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/commands.js +0 -0
  1182. /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/LinkEditor/index.d.ts +0 -0
  1183. /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/index.js +0 -0
  1184. /package/dist/features/link/{plugins → client/plugins}/floatingLinkEditor/types.js +0 -0
  1185. /package/dist/features/link/{drawer → server}/baseFields.d.ts +0 -0
  1186. /package/dist/features/link/{drawer → server}/baseFields.js +0 -0
  1187. /package/dist/features/link/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1188. /package/dist/features/link/{i18n.js → server/i18n.js} +0 -0
  1189. /package/dist/features/link/{validate.js → server/validate.js} +0 -0
  1190. /package/dist/features/lists/checklist/{plugin → client/plugin}/index.js +0 -0
  1191. /package/dist/features/lists/checklist/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1192. /package/dist/features/lists/checklist/{i18n.js → server/i18n.js} +0 -0
  1193. /package/dist/features/lists/orderedList/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1194. /package/dist/features/lists/orderedList/{i18n.js → server/i18n.js} +0 -0
  1195. /package/dist/features/lists/unorderedList/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1196. /package/dist/features/lists/unorderedList/{i18n.js → server/i18n.js} +0 -0
  1197. /package/dist/features/paragraph/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1198. /package/dist/features/paragraph/{i18n.js → server/i18n.js} +0 -0
  1199. /package/dist/features/relationship/{drawer → client/drawer}/commands.d.ts +0 -0
  1200. /package/dist/features/relationship/{drawer → client/drawer}/commands.js +0 -0
  1201. /package/dist/features/relationship/{drawer → client/drawer}/index.d.ts +0 -0
  1202. /package/dist/features/relationship/{drawer → client/drawer}/index.js +0 -0
  1203. /package/dist/features/relationship/{utils → client/utils}/EnabledRelationshipsCondition.d.ts +0 -0
  1204. /package/dist/features/relationship/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1205. /package/dist/features/relationship/{i18n.js → server/i18n.js} +0 -0
  1206. /package/dist/features/upload/{drawer → client/drawer}/commands.d.ts +0 -0
  1207. /package/dist/features/upload/{drawer → client/drawer}/commands.js +0 -0
  1208. /package/dist/features/upload/{drawer → client/drawer}/index.d.ts +0 -0
  1209. /package/dist/features/upload/{feature.client.d.ts → client/feature.client.d.ts} +0 -0
  1210. /package/dist/features/upload/{i18n.d.ts → server/i18n.d.ts} +0 -0
  1211. /package/dist/features/upload/{i18n.js → server/i18n.js} +0 -0
  1212. /package/dist/features/upload/{validate.js → server/validate.js} +0 -0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n EditorConfig as LexicalEditorConfig,\n SerializedEditorState,\n SerializedLexicalNode,\n} from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/shared'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n deepCopyObject,\n getDependencies,\n withNullableJSONSchemaType,\n} from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from './lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { RichTextCell, RichTextField } from './exports/client/index.js'\nimport { i18n } from './i18n.js'\nimport { defaultEditorConfig, defaultEditorFeatures } from './lexical/config/server/default.js'\nimport { loadFeatures } from './lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { getGenerateComponentMap } from './utilities/generateComponentMap.js'\nimport { getGenerateSchemaMap } from './utilities/generateSchemaMap.js'\nimport { recurseNodeTree } from './utilities/recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n if (process.env.NODE_ENV !== 'production') {\n const resolvedDependencies = await getDependencies(dirname, [\n 'lexical',\n '@lexical/headless',\n '@lexical/link',\n '@lexical/list',\n '@lexical/mark',\n '@lexical/markdown',\n '@lexical/react',\n '@lexical/rich-text',\n '@lexical/selection',\n '@lexical/utils',\n ])\n\n // Go through each resolved dependency. If any dependency has a mismatching version, throw an error\n const foundVersions: {\n [version: string]: string\n } = {}\n for (const [_pkg, { version }] of resolvedDependencies.resolved) {\n if (!Object.keys(foundVersions).includes(version)) {\n foundVersions[version] = _pkg\n }\n }\n if (Object.keys(foundVersions).length > 1) {\n const formattedVersionsWithPackageNameString = Object.entries(foundVersions)\n .map(([version, pkg]) => `${pkg}@${version}`)\n .join(', ')\n\n throw new Error(\n `Mismatching lexical dependency versions found: ${formattedVersionsWithPackageNameString}. All lexical and @lexical/* packages must have the same version. This is an error with your set-up, caused by you, not a bug in payload. Please go to your package.json and ensure all lexical and @lexical/* packages have the same version.`,\n )\n }\n }\n\n let features: FeatureProviderServer<any, any, any>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n features = deepCopyObject(defaultEditorFeatures)\n }\n\n finalSanitizedEditorConfig = deepCopyObject(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const rootEditor = config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n\n features =\n props.features && typeof props.features === 'function'\n ? props.features({\n defaultFeatures: deepCopyObject(defaultEditorFeatures),\n rootFeatures: rootEditorFeatures,\n })\n : (props.features as FeatureProviderServer<unknown, unknown, unknown>[])\n if (!features) {\n features = deepCopyObject(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n const featureI18n = finalSanitizedEditorConfig.features.i18n\n for (const lang in i18n) {\n if (!featureI18n[lang]) {\n featureI18n[lang] = {\n lexical: {},\n }\n }\n\n featureI18n[lang].lexical.general = i18n[lang]\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n }),\n editorConfig: finalSanitizedEditorConfig,\n features,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth: currentDepth ?? 0,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterChange: [\n async ({\n collection,\n context: _context,\n global,\n operation,\n path,\n req,\n schemaPath,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(afterChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await afterChangeTraverseFields({\n collection,\n context,\n data: originalData,\n doc: data,\n fields: subFields,\n global,\n operation,\n path,\n previousDoc: data,\n previousSiblingDoc: { ...data },\n req,\n schemaPath,\n siblingData: originalData || {},\n siblingDoc: { ...data },\n })\n }\n }\n }\n return value\n },\n ],\n afterRead: [\n /**\n * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.\n */\n async ({\n collection,\n context: context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.afterRead.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const flattenedNodes: SerializedLexicalNode[] = []\n\n recurseNodeTree({\n flattenedNodes,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n for (let node of flattenedNodes) {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({\n context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n locale,\n node,\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populationPromises,\n req,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n\n if (subFields?.length) {\n afterReadTraverseFields({\n collection,\n context,\n currentDepth,\n depth,\n doc: data,\n draft,\n fallbackLocale,\n fieldPromises,\n fields: subFields,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n siblingDoc: data,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n }\n\n return value\n },\n ],\n beforeChange: [\n async ({\n collection,\n context: _context,\n duplicate,\n errors,\n field,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData,\n siblingDocWithLocales,\n skipValidation,\n value,\n }) => {\n if (\n !finalSanitizedEditorConfig.features.hooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n const originalNodeWithLocalesIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (siblingDocWithLocales?.[field.name]) {\n recurseNodeTree({\n nodeIDMap: originalNodeWithLocalesIDMap,\n nodes:\n (siblingDocWithLocales[field.name] as SerializedEditorState)?.root\n ?.children ?? [],\n })\n }\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n duplicate,\n errors,\n mergeLocaleActions,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n skipValidation,\n })\n }\n }\n\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n const originalDataWithLocales =\n subFieldDataFn({\n node: originalNodeWithLocalesIDMap[id],\n req,\n }) ?? {}\n\n if (subFields?.length) {\n await beforeChangeTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n docWithLocales: originalDataWithLocales ?? {},\n duplicate,\n errors,\n fields: subFields,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n siblingDocWithLocales: originalDataWithLocales ?? {},\n skipValidation,\n })\n }\n }\n }\n\n /**\n * within the beforeChange hook, id's may be re-generated.\n * Example:\n * 1. Seed data contains IDs for block feature blocks.\n * 2. Those are used in beforeValidate\n * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning\n * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.\n * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,\n * and in beforeChange, which is where modifications to the provided IDs can occur.\n */\n const newOriginalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousValue = siblingData[field.name]\n\n recurseNodeTree({\n nodeIDMap: newOriginalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!context.internal.richText) {\n context.internal.richText = {}\n }\n context.internal.richText[path.join('.')] = {\n originalNodeIDMap: newOriginalNodeIDMap,\n }\n\n return value\n },\n ],\n beforeValidate: [\n async ({\n collection,\n context,\n global,\n operation,\n overrideAccess,\n path,\n previousValue,\n req,\n schemaPath,\n value,\n }) => {\n // return value if there are NO hooks\n if (\n !finalSanitizedEditorConfig.features.hooks.beforeValidate.size &&\n !finalSanitizedEditorConfig.features.hooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.hooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n /**\n * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.\n *\n */\n\n /**\n * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:\n * - afterRead\n *\n * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and\n * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with\n * an ID.\n */\n //const flattenedNodes: SerializedLexicalNode[] = []\n\n /**\n * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:\n * - afterChange\n * - beforeChange\n * - beforeValidate\n * - beforeDuplicate\n *\n * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.\n */\n\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap: originalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!(context as any).internal.richText) {\n ;(context as any).internal.richText = {}\n }\n ;(context as any).internal.richText[path.join('.')] = {\n originalNodeIDMap,\n }\n\n /**\n * Now that the maps for all hooks are set up, we can run the validate hook\n */\n if (!finalSanitizedEditorConfig.features.hooks.beforeValidate.size) {\n return value\n }\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n recurseNodeTree({\n //flattenedNodes,\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeValidate) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await beforeValidateTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n fields: subFields,\n global,\n operation,\n overrideAccess,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n })\n }\n }\n }\n\n return value\n },\n ],\n },\n i18n: featureI18n,\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './features/align/feature.server.js'\nexport { BlockquoteFeature } from './features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './features/blocks/feature.server.js'\nexport { type BlockFields, BlockNode } from './features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './features/converters/html/converter/converters/paragraph.js'\n\nexport { TextHTMLConverter } from './features/converters/html/converter/converters/text.js'\nexport { defaultHTMLConverters } from './features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './features/converters/html/converter/index.js'\n\nexport type { HTMLConverter } from './features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './features/converters/html/feature.server.js'\nexport { consolidateHTMLConverters, lexicalHTML } from './features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './features/debug/treeView/feature.server.js'\nexport { EXPERIMENTAL_TableFeature } from './features/experimental_table/feature.server.js'\nexport { BoldFeature } from './features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './features/format/inlineCode/feature.server.js'\nexport { ItalicFeature } from './features/format/italic/feature.server.js'\n\nexport { StrikethroughFeature } from './features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './features/format/underline/feature.server.js'\nexport { HeadingFeature, type HeadingFeatureProps } from './features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './features/horizontalRule/feature.server.js'\nexport { IndentFeature } from './features/indent/feature.server.js'\n\nexport { LinkFeature, type LinkFeatureServerProps } from './features/link/feature.server.js'\n\nexport { AutoLinkNode } from './features/link/nodes/AutoLinkNode.js'\nexport { LinkNode } from './features/link/nodes/LinkNode.js'\nexport type { LinkFields } from './features/link/nodes/types.js'\nexport { ChecklistFeature } from './features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './features/relationship/feature.server.js'\nexport {\n type RelationshipData,\n RelationshipNode,\n} from './features/relationship/nodes/RelationshipNode.js'\n\nexport { FixedToolbarFeature } from './features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './features/toolbars/types.js'\nexport { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n PluginComponent,\n PluginComponentWithAnchor,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n} from './features/typesClient.js'\n\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './features/typesServer.js'\n\nexport { UploadFeature } from './features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './features/upload/feature.server.js'\nexport { type UploadData, UploadNode } from './features/upload/nodes/UploadNode.js'\n\nexport type { EditorConfigContextType } from './lexical/config/client/EditorConfigProvider.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './lexical/config/server/default.js'\n\nexport { loadFeatures, sortFeaturesForOptimalLoading } from './lexical/config/server/loader.js'\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\n\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './lexical/config/types.js'\nexport { getEnabledNodes } from './lexical/nodes/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './lexical/utils/nodeFormat.js'\nexport { sanitizeUrl, validateUrl } from './lexical/utils/url.js'\n\nexport type * from './nodeTypes.js'\n\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\nexport { createServerFeature } from './utilities/createServerFeature.js'\nexport type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js'\n\nexport { migrateSlateToLexical } from './utilities/migrateSlateToLexical/index.js'\n\nexport { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js'\n"],"names":["withMergedProps","fileURLToPath","path","afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","deepCopyObject","getDependencies","withNullableJSONSchemaType","RichTextCell","RichTextField","i18n","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","populateLexicalPopulationPromises","getGenerateComponentMap","getGenerateSchemaMap","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","filename","url","dirname","lexicalEditor","props","config","isRoot","process","env","NODE_ENV","resolvedDependencies","foundVersions","_pkg","version","resolved","Object","keys","includes","length","formattedVersionsWithPackageNameString","entries","map","pkg","join","Error","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","Component","toMergeIntoProps","admin","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","hooks","afterChange","collection","_context","global","operation","schemaPath","value","getSubFields","nodeIDMap","originalNodeIDMap","internal","richText","nodes","root","children","id","node","afterChangeHooks","has","type","hook","get","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","data","originalData","doc","fields","previousDoc","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","beforeChange","duplicate","errors","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","name","beforeChangeHooks","originalNodeWithLocales","originalDataWithLocales","docWithLocales","newOriginalNodeIDMap","previousValue","beforeValidate","beforeValidateHooks","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","BlocksFeature","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","EXPERIMENTAL_TableFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","AutoLinkNode","LinkNode","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","RelationshipNode","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","UploadNode","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","defaultRichTextValue","createServerFeature","migrateSlateToLexical","upgradeLexicalData"],"mappings":"AAOA,SAASA,eAAe,QAAQ,wBAAuB;AACvD,SAASC,aAAa,QAAQ,WAAU;AACxC,OAAOC,UAAU,OAAM;AACvB,SACEC,yBAAyB,EACzBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,cAAc,EACdC,eAAe,EACfC,0BAA0B,QACrB,UAAS;AAWhB,+DAA+D;AAC/D,SAASC,YAAY,EAAEC,aAAa,QAAQ,4BAA2B;AACvE,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qCAAoC;AAC/F,SAASC,YAAY,QAAQ,oCAAmC;AAChE,SACEC,0BAA0B,EAC1BC,sBAAsB,QACjB,sCAAqC;AAC5C,SAASC,iCAAiC,QAAQ,yDAAwD;AAC1G,SAASC,uBAAuB,QAAQ,sCAAqC;AAC7E,SAASC,oBAAoB,QAAQ,mCAAkC;AACvE,SAASC,eAAe,QAAQ,iCAAgC;AAChE,SAASC,mBAAmB,QAAQ,sBAAqB;AAEzD,IAAIC,qCAAkE;AAEtE,MAAMC,WAAWvB,cAAc,YAAYwB,GAAG;AAC9C,MAAMC,UAAUxB,KAAKwB,OAAO,CAACF;AAE7B,OAAO,SAASG,cAAcC,KAA0B;IACtD,OAAO,OAAO,EAAEC,MAAM,EAAEC,MAAM,EAAE;QAC9B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,MAAMC,uBAAuB,MAAM1B,gBAAgBkB,SAAS;gBAC1D;gBACA;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AE1D,SAASC,mBAAmB,QAAQ,8CAA6C;AACjF,SAASC,oBAAoB,QAAQ,+CAA8C;AAGnF,SAASC,UAAU,QAAQ,8BAA6B,CAAC,mCAAmC;AAqC5F,SAASC,aAAa,QAAQ,sCAAqC;AAGnE,SAA0BC,UAAU,QAAQ,wCAAuC;AAGnF,SACEhN,mBAAmB,EACnBC,qBAAqB,EACrBgN,0BAA0B,QACrB,qCAAoC;AAE3C,SAAS/M,YAAY,EAAEgN,6BAA6B,QAAQ,oCAAmC;AAC/F,SACE/M,0BAA0B,EAC1BC,sBAAsB,QACjB,sCAAqC;AAQ5C,SAAS+M,eAAe,QAAQ,2BAA0B;AAQ1D,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,gCAA+B;AACtC,SAASC,WAAW,EAAEC,WAAW,QAAQ,yBAAwB;AAIjE,SAASC,oBAAoB,QAAQ,oCAAmC;AAGxE,SAASC,mBAAmB,QAAQ,qCAAoC;AAGxE,SAASC,qBAAqB,QAAQ,6CAA4C;AAElF,SAASC,kBAAkB,QAAQ,0CAAyC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n EditorConfig as LexicalEditorConfig,\n SerializedEditorState,\n SerializedLexicalNode,\n} from 'lexical'\n\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n deepCopyObject,\n deepCopyObjectSimple,\n getDependencies,\n withNullableJSONSchemaType,\n} from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from './lexical/config/types.js'\nimport type {\n AdapterProps,\n LexicalEditorProps,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from './types.js'\n\nimport { i18n } from './i18n.js'\nimport { defaultEditorConfig, defaultEditorFeatures } from './lexical/config/server/default.js'\nimport { loadFeatures } from './lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\nimport { populateLexicalPopulationPromises } from './populateGraphQL/populateLexicalPopulationPromises.js'\nimport { getGenerateImportMap } from './utilities/generateImportMap.js'\nimport { getGenerateSchemaMap } from './utilities/generateSchemaMap.js'\nimport { recurseNodeTree } from './utilities/recurseNodeTree.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true'\n ) {\n const resolvedDependencies = await getDependencies(dirname, [\n 'lexical',\n '@lexical/headless',\n '@lexical/link',\n '@lexical/list',\n '@lexical/mark',\n '@lexical/markdown',\n '@lexical/react',\n '@lexical/rich-text',\n '@lexical/selection',\n '@lexical/utils',\n ])\n\n // Go through each resolved dependency. If any dependency has a mismatching version, throw an error\n const foundVersions: {\n [version: string]: string\n } = {}\n for (const [_pkg, { version }] of resolvedDependencies.resolved) {\n if (!Object.keys(foundVersions).includes(version)) {\n foundVersions[version] = _pkg\n }\n }\n if (Object.keys(foundVersions).length > 1) {\n const formattedVersionsWithPackageNameString = Object.entries(foundVersions)\n .map(([version, pkg]) => `${pkg}@${version}`)\n .join(', ')\n\n throw new Error(\n `Mismatching lexical dependency versions found: ${formattedVersionsWithPackageNameString}. All lexical and @lexical/* packages must have the same version. This is an error with your set-up, caused by you, not a bug in payload. Please go to your package.json and ensure all lexical and @lexical/* packages have the same version.`,\n )\n }\n }\n\n let features: FeatureProviderServer<any, any, any>[] = []\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n features = deepCopyObject(defaultEditorFeatures)\n }\n\n finalSanitizedEditorConfig = deepCopyObject(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n const rootEditor = config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n\n features =\n props.features && typeof props.features === 'function'\n ? props.features({\n defaultFeatures: deepCopyObject(defaultEditorFeatures),\n rootFeatures: rootEditorFeatures,\n })\n : (props.features as FeatureProviderServer<unknown, unknown, unknown>[])\n if (!features) {\n features = deepCopyObject(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig =\n props.lexical ?? deepCopyObjectSimple(defaultEditorConfig.lexical)\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical,\n resolvedFeatureMap,\n }\n }\n\n const featureI18n = finalSanitizedEditorConfig.features.i18n\n for (const lang in i18n) {\n if (!featureI18n[lang]) {\n featureI18n[lang] = {\n lexical: {},\n }\n }\n\n featureI18n[lang].lexical.general = i18n[lang]\n }\n\n return {\n CellComponent: {\n clientProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n path: '@payloadcms/richtext-lexical/client#RichTextCell',\n },\n FieldComponent: {\n clientProps: {\n admin: props?.admin,\n lexicalEditorConfig: finalSanitizedEditorConfig.lexical,\n },\n path: '@payloadcms/richtext-lexical/client#RichTextField',\n },\n editorConfig: finalSanitizedEditorConfig,\n features,\n generateComponentMap: {\n path: '@payloadcms/richtext-lexical/generateComponentMap#getGenerateComponentMap',\n serverProps: {\n resolvedFeatureMap,\n },\n },\n generateImportMap: getGenerateImportMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.graphQLPopulationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth: currentDepth ?? 0,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.graphQLPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterChange: [\n async (args) => {\n const { collection, context: _context, global, operation, path, req, schemaPath } = args\n let { value } = args\n if (finalSanitizedEditorConfig?.features?.hooks?.afterChange?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.afterChange) {\n value = await hook(args)\n }\n }\n if (\n !finalSanitizedEditorConfig.features.nodeHooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const afterChangeHooks = finalSanitizedEditorConfig.features.nodeHooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(afterChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await afterChangeTraverseFields({\n collection,\n context,\n data: originalData,\n doc: data,\n fields: subFields,\n global,\n operation,\n path,\n previousDoc: data,\n previousSiblingDoc: { ...data },\n req,\n schemaPath,\n siblingData: originalData || {},\n siblingDoc: { ...data },\n })\n }\n }\n }\n return value\n },\n ],\n afterRead: [\n /**\n * afterRead hooks do not receive the originalNode. Thus, they can run on all nodes, not just nodes with an ID.\n */\n async (args) => {\n const {\n collection,\n context: context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n } = args\n let { value } = args\n\n if (finalSanitizedEditorConfig?.features?.hooks?.afterRead?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.afterRead) {\n value = await hook(args)\n }\n }\n\n if (\n !finalSanitizedEditorConfig.features.nodeHooks.afterRead.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n const flattenedNodes: SerializedLexicalNode[] = []\n\n recurseNodeTree({\n flattenedNodes,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n for (let node of flattenedNodes) {\n const afterReadHooks = finalSanitizedEditorConfig.features.nodeHooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({\n context,\n currentDepth,\n depth,\n draft,\n fallbackLocale,\n fieldPromises,\n findMany,\n flattenLocales,\n locale,\n node,\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populationPromises,\n req,\n showHiddenFields,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n\n if (subFields?.length) {\n afterReadTraverseFields({\n collection,\n context,\n currentDepth,\n depth,\n doc: data,\n draft,\n fallbackLocale,\n fieldPromises,\n fields: subFields,\n findMany,\n flattenLocales,\n global,\n locale,\n overrideAccess,\n path,\n populationPromises,\n req,\n schemaPath,\n showHiddenFields,\n siblingDoc: data,\n triggerAccessControl,\n triggerHooks,\n })\n }\n }\n }\n\n return value\n },\n ],\n beforeChange: [\n async (args) => {\n const {\n collection,\n context: _context,\n duplicate,\n errors,\n field,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData,\n siblingDocWithLocales,\n skipValidation,\n } = args\n let { value } = args\n\n if (finalSanitizedEditorConfig?.features?.hooks?.beforeChange?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.beforeChange) {\n value = await hook(args)\n }\n }\n\n if (\n !finalSanitizedEditorConfig.features.nodeHooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n const context: any = _context\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n /**\n * Get the originalNodeIDMap from the beforeValidate hook, which is always run before this hook.\n */\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = context?.internal?.richText?.[path.join('.')]?.originalNodeIDMap\n\n if (!originalNodeIDMap || !Object.keys(originalNodeIDMap).length || !value) {\n return value\n }\n\n const originalNodeWithLocalesIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (siblingDocWithLocales?.[field.name]) {\n recurseNodeTree({\n nodeIDMap: originalNodeWithLocalesIDMap,\n nodes:\n (siblingDocWithLocales[field.name] as SerializedEditorState)?.root?.children ??\n [],\n })\n }\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.nodeHooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeChange) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n duplicate,\n errors,\n mergeLocaleActions,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n skipValidation,\n })\n }\n }\n\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n const originalDataWithLocales =\n subFieldDataFn({\n node: originalNodeWithLocalesIDMap[id],\n req,\n }) ?? {}\n\n if (subFields?.length) {\n await beforeChangeTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n docWithLocales: originalDataWithLocales ?? {},\n duplicate,\n errors,\n fields: subFields,\n global,\n mergeLocaleActions,\n operation,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n siblingDocWithLocales: originalDataWithLocales ?? {},\n skipValidation,\n })\n }\n }\n }\n\n /**\n * within the beforeChange hook, id's may be re-generated.\n * Example:\n * 1. Seed data contains IDs for block feature blocks.\n * 2. Those are used in beforeValidate\n * 3. in beforeChange, those IDs are regenerated, because you cannot provide IDs during document creation. See baseIDField beforeChange hook for reasoning\n * 4. Thus, in order for all post-beforeChange hooks to receive the correct ID, we need to update the originalNodeIDMap with the new ID's, by regenerating the nodeIDMap.\n * The reason this is not generated for every hook, is to save on performance. We know we only really have to generate it in beforeValidate, which is the first hook,\n * and in beforeChange, which is where modifications to the provided IDs can occur.\n */\n const newOriginalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n const previousValue = siblingData[field.name]\n\n recurseNodeTree({\n nodeIDMap: newOriginalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!context.internal.richText) {\n context.internal.richText = {}\n }\n context.internal.richText[path.join('.')] = {\n originalNodeIDMap: newOriginalNodeIDMap,\n }\n\n return value\n },\n ],\n beforeValidate: [\n async (args) => {\n const {\n collection,\n context,\n global,\n operation,\n overrideAccess,\n path,\n previousValue,\n req,\n schemaPath,\n } = args\n let { value } = args\n if (finalSanitizedEditorConfig?.features?.hooks?.beforeValidate?.length) {\n for (const hook of finalSanitizedEditorConfig.features.hooks.beforeValidate) {\n value = await hook(args)\n }\n }\n\n // return value if there are NO hooks\n if (\n !finalSanitizedEditorConfig.features.nodeHooks.beforeValidate.size &&\n !finalSanitizedEditorConfig.features.nodeHooks.afterChange.size &&\n !finalSanitizedEditorConfig.features.nodeHooks.beforeChange.size &&\n !finalSanitizedEditorConfig.features.getSubFields.size\n ) {\n return value\n }\n\n /**\n * beforeValidate is the first field hook which runs. This is where we can create the node map, which can then be used in the other hooks.\n *\n */\n\n /**\n * flattenedNodes contains all nodes in the editor, in the order they appear in the editor. They will be used for the following hooks:\n * - afterRead\n *\n * The other hooks require nodes to have IDs, which is why those are ran only from the nodeIDMap. They require IDs because they have both doc/siblingDoc and data/siblingData, and\n * thus require a reliable way to match new node data to old node data. Given that node positions can change in between hooks, this is only reliably possible for nodes which are saved with\n * an ID.\n */\n //const flattenedNodes: SerializedLexicalNode[] = []\n\n /**\n * Only nodes with id's (so, nodes with hooks added to them) will be added to the nodeIDMap. They will be used for the following hooks:\n * - afterChange\n * - beforeChange\n * - beforeValidate\n * - beforeDuplicate\n *\n * Other hooks are handled by the flattenedNodes. All nodes in the nodeIDMap are part of flattenedNodes.\n */\n\n const originalNodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n\n recurseNodeTree({\n nodeIDMap: originalNodeIDMap,\n nodes: (previousValue as SerializedEditorState)?.root?.children ?? [],\n })\n\n if (!context.internal) {\n // Add to context, for other hooks to use\n context.internal = {}\n }\n if (!(context as any).internal.richText) {\n ;(context as any).internal.richText = {}\n }\n ;(context as any).internal.richText[path.join('.')] = {\n originalNodeIDMap,\n }\n\n /**\n * Now that the maps for all hooks are set up, we can run the validate hook\n */\n if (!finalSanitizedEditorConfig.features.nodeHooks.beforeValidate.size) {\n return value\n }\n const nodeIDMap: {\n [key: string]: SerializedLexicalNode\n } = {}\n recurseNodeTree({\n //flattenedNodes,\n nodeIDMap,\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n // eslint-disable-next-line prefer-const\n for (let [id, node] of Object.entries(nodeIDMap)) {\n const beforeValidateHooks =\n finalSanitizedEditorConfig.features.nodeHooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n if (!originalNodeIDMap[id]) {\n console.warn(\n '(beforeValidate) No original node found for node with id',\n id,\n 'node:',\n node,\n 'path',\n path.join('.'),\n )\n continue\n }\n node = await hook({\n context,\n node,\n operation,\n originalNode: originalNodeIDMap[id],\n overrideAccess,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n })\n }\n }\n const subFieldFn = finalSanitizedEditorConfig.features.getSubFields.get(node.type)\n const subFieldDataFn = finalSanitizedEditorConfig.features.getSubFieldsData.get(\n node.type,\n )\n\n if (subFieldFn) {\n const subFields = subFieldFn({ node, req })\n const data = subFieldDataFn({ node, req }) ?? {}\n const originalData = subFieldDataFn({ node: originalNodeIDMap[id], req }) ?? {}\n\n if (subFields?.length) {\n await beforeValidateTraverseFields({\n id,\n collection,\n context,\n data,\n doc: originalData,\n fields: subFields,\n global,\n operation,\n overrideAccess,\n path,\n req,\n schemaPath,\n siblingData: data,\n siblingDoc: originalData,\n })\n }\n }\n }\n\n return value\n },\n ],\n },\n i18n: featureI18n,\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './features/align/server/index.js'\nexport { BlockquoteFeature } from './features/blockquote/server/index.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './features/blocks/server/index.js'\nexport { type BlockFields } from './features/blocks/server/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './features/converters/html/converter/converters/paragraph.js'\n\nexport { TextHTMLConverter } from './features/converters/html/converter/converters/text.js'\nexport { defaultHTMLConverters } from './features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './features/converters/html/converter/index.js'\n\nexport type { HTMLConverter } from './features/converters/html/converter/types.js'\nexport { consolidateHTMLConverters, lexicalHTML } from './features/converters/html/field/index.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './features/converters/html/index.js'\nexport { TestRecorderFeature } from './features/debug/testRecorder/server/index.js'\nexport { TreeViewFeature } from './features/debug/treeView/server/index.js'\nexport { EXPERIMENTAL_TableFeature } from './features/experimental_table/server/index.js'\nexport { BoldFeature } from './features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './features/format/inlineCode/feature.server.js'\nexport { ItalicFeature } from './features/format/italic/feature.server.js'\n\nexport { StrikethroughFeature } from './features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './features/format/underline/feature.server.js'\nexport { HeadingFeature, type HeadingFeatureProps } from './features/heading/server/index.js'\nexport { HorizontalRuleFeature } from './features/horizontalRule/server/index.js'\nexport { IndentFeature } from './features/indent/server/index.js'\n\nexport { AutoLinkNode } from './features/link/nodes/AutoLinkNode.js'\n\nexport { LinkNode } from './features/link/nodes/LinkNode.js'\nexport type { LinkFields } from './features/link/nodes/types.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './features/link/server/index.js'\nexport { ChecklistFeature } from './features/lists/checklist/server/index.js'\nexport { OrderedListFeature } from './features/lists/orderedList/server/index.js'\nexport { UnorderedListFeature } from './features/lists/unorderedList/server/index.js'\n\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './features/migrations/slateToLexical/converter/types.js'\n\nexport { ParagraphFeature } from './features/paragraph/server/index.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './features/relationship/server/index.js'\nexport {\n type RelationshipData,\n RelationshipServerNode,\n} from './features/relationship/server/nodes/RelationshipNode.js'\n\nexport { FixedToolbarFeature } from './features/toolbars/fixed/server/index.js'\nexport { InlineToolbarFeature } from './features/toolbars/inline/server/index.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './features/toolbars/types.js'\nexport { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n PluginComponent,\n PluginComponentWithAnchor,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n} from './features/typesClient.js'\n\nexport type {\n AfterChangeNodeHook,\n AfterChangeNodeHookArgs,\n AfterReadNodeHook,\n AfterReadNodeHookArgs,\n BaseNodeHookArgs,\n BeforeChangeNodeHook,\n BeforeChangeNodeHookArgs,\n BeforeValidateNodeHook,\n BeforeValidateNodeHookArgs,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './features/typesServer.js'\n\nexport { UploadFeature } from './features/upload/server/feature.server.js'\n\nexport type { UploadFeatureProps } from './features/upload/server/feature.server.js'\nexport { type UploadData, UploadServerNode } from './features/upload/server/nodes/UploadNode.js'\n\nexport type { EditorConfigContextType } from './lexical/config/client/EditorConfigProvider.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './lexical/config/server/default.js'\n\nexport { loadFeatures, sortFeaturesForOptimalLoading } from './lexical/config/server/loader.js'\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './lexical/config/server/sanitize.js'\n\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './lexical/config/types.js'\nexport { getEnabledNodes } from './lexical/nodes/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\n\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './lexical/utils/nodeFormat.js'\nexport { sanitizeUrl, validateUrl } from './lexical/utils/url.js'\n\nexport type * from './nodeTypes.js'\n\nexport { defaultRichTextValue } from './populateGraphQL/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\nexport { createServerFeature } from './utilities/createServerFeature.js'\nexport type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js'\n\nexport { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js'\n"],"names":["fileURLToPath","path","afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","deepCopyObject","deepCopyObjectSimple","getDependencies","withNullableJSONSchemaType","i18n","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","populateLexicalPopulationPromises","getGenerateImportMap","getGenerateSchemaMap","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","filename","url","dirname","lexicalEditor","props","config","isRoot","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","resolvedDependencies","foundVersions","_pkg","version","resolved","Object","keys","includes","length","formattedVersionsWithPackageNameString","entries","map","pkg","join","Error","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","clientProps","admin","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","serverProps","generateImportMap","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","hooks","afterChange","args","collection","_context","global","operation","schemaPath","value","hook","nodeHooks","getSubFields","nodeIDMap","originalNodeIDMap","internal","richText","nodes","root","children","id","node","afterChangeHooks","has","type","get","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","data","originalData","doc","fields","previousDoc","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","beforeChange","duplicate","errors","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","name","beforeChangeHooks","originalNodeWithLocales","originalDataWithLocales","docWithLocales","newOriginalNodeIDMap","previousValue","beforeValidate","beforeValidateHooks","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","validate","AlignFeature","BlockquoteFeature","BlocksFeature","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","consolidateHTMLConverters","lexicalHTML","HTMLConverterFeature","TestRecorderFeature","TreeViewFeature","EXPERIMENTAL_TableFeature","BoldFeature","InlineCodeFeature","ItalicFeature","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","AutoLinkNode","LinkNode","LinkFeature","ChecklistFeature","OrderedListFeature","UnorderedListFeature","ParagraphFeature","RelationshipFeature","RelationshipServerNode","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","UploadServerNode","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","defaultRichTextValue","createServerFeature","upgradeLexicalData"],"mappings":"AAOA,SAASA,aAAa,QAAQ,WAAU;AACxC,OAAOC,UAAU,OAAM;AACvB,SACEC,yBAAyB,EACzBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,0BAA0B,QACrB,UAAS;AAWhB,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,mBAAmB,EAAEC,q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,SAASnM,YAAY,EAAEoM,6BAA6B,QAAQ,oCAAmC;AAC/F,SACEnM,0BAA0B,EAC1BC,sBAAsB,QACjB,sCAAqC;AAQ5C,SAASmM,eAAe,QAAQ,2BAA0B;AAQ1D,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ,gCAA+B;AACtC,SAASC,WAAW,EAAEC,WAAW,QAAQ,yBAAwB;AAIjE,SAASC,oBAAoB,QAAQ,oCAAmC;AAGxE,SAASC,mBAAmB,QAAQ,qCAAoC;AAGxE,SAASC,kBAAkB,QAAQ,0CAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../src/lexical/LexicalEditor.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,sBAAsB,CAAA;AAQ7B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC;IACE,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;CACpD,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,CA4K5D,CAAA"}
1
+ {"version":3,"file":"LexicalEditor.d.ts","sourceRoot":"","sources":["../../src/lexical/LexicalEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,OAAO,sBAAsB,CAAA;AAQ7B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC;IACE,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;CACpD,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,CA0K5D,CAAA"}
@@ -6,7 +6,6 @@ import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin.js';
6
6
  import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin.js';
7
7
  import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js';
8
8
  import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin.js';
9
- import { useTranslation } from '@payloadcms/ui';
10
9
  import { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical';
11
10
  import * as React from 'react';
12
11
  import { useEffect, useState } from 'react';
@@ -21,7 +20,6 @@ export const LexicalEditor = (props)=>{
21
20
  const { editorConfig, editorContainerRef, onChange } = props;
22
21
  const editorConfigContext = useEditorConfigContext();
23
22
  const [editor] = useLexicalComposerContext();
24
- const { t } = useTranslation();
25
23
  const [floatingAnchorElem, setFloatingAnchorElem] = useState(null);
26
24
  const onRef = (_floatingAnchorElem)=>{
27
25
  if (_floatingAnchorElem !== null) {
@@ -106,10 +104,6 @@ export const LexicalEditor = (props)=>{
106
104
  ref: onRef,
107
105
  children: /*#__PURE__*/ _jsx(LexicalContentEditable, {})
108
106
  })
109
- }),
110
- placeholder: /*#__PURE__*/ _jsx("p", {
111
- className: "editor-placeholder",
112
- children: t('lexical:general:placeholder')
113
107
  })
114
108
  }),
115
109
  /*#__PURE__*/ _jsx(OnChangePlugin, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lexical/LexicalEditor.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary.js'\nimport { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin.js'\nimport { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin.js'\nimport { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js'\nimport { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin.js'\nimport { useTranslation } from '@payloadcms/ui'\nimport { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\n\nimport type { LexicalProviderProps } from './LexicalProvider.js'\n\nimport { EditorPlugin } from './EditorPlugin.js'\nimport './LexicalEditor.scss'\nimport { useEditorConfigContext } from './config/client/EditorConfigProvider.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<\n {\n editorContainerRef: React.RefObject<HTMLDivElement>\n } & Pick<LexicalProviderProps, 'editorConfig' | 'onChange'>\n> = (props) => {\n const { editorConfig, editorContainerRef, onChange } = props\n const editorConfigContext = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n const { t } = useTranslation<{}, string>()\n\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem)\n }\n }\n\n useEffect(() => {\n if (!editorConfigContext?.uuid) {\n console.error('Lexical Editor must be used within an EditorConfigProvider')\n return\n }\n if (editorConfigContext?.parentEditor?.uuid) {\n editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext)\n }\n\n const handleFocus = () => {\n editorConfigContext.focusEditor(editorConfigContext)\n }\n\n const handleBlur = () => {\n editorConfigContext.blurEditor(editorConfigContext)\n }\n\n const unregisterFocus = editor.registerCommand<MouseEvent>(\n FOCUS_COMMAND,\n () => {\n handleFocus()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n const unregisterBlur = editor.registerCommand<MouseEvent>(\n BLUR_COMMAND,\n () => {\n handleBlur()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n return () => {\n unregisterFocus()\n unregisterBlur()\n editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid)\n }\n }, [editor, editorConfigContext])\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n return (\n <React.Fragment>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'aboveContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n <div className=\"editor-container\" ref={editorContainerRef}>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'top') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n <RichTextPlugin\n ErrorBoundary={LexicalErrorBoundary}\n contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable />\n </div>\n </div>\n }\n placeholder={<p className=\"editor-placeholder\">{t('lexical:general:placeholder')}</p>}\n />\n <OnChangePlugin\n // Selection changes can be ignored here, reducing the\n // frequency that the FieldComponent and Payload receive updates.\n // Selection changes are only needed if you are saving selection state\n ignoreSelectionChange\n onChange={(editorState, editor, tags) => {\n // Ignore any onChange event triggered by focus only\n if (!tags.has('focus') || tags.size > 1) {\n if (onChange != null) onChange(editorState, editor, tags)\n }\n }}\n />\n {floatingAnchorElem && (\n <React.Fragment>\n {!isSmallWidthViewport && editor.isEditable() && (\n <React.Fragment>\n <DraggableBlockPlugin anchorElem={floatingAnchorElem} />\n <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n {editorConfig.features.plugins.map((plugin) => {\n if (\n plugin.position === 'floatingAnchorElem' &&\n !(plugin.desktopOnly === true && isSmallWidthViewport)\n ) {\n return (\n <EditorPlugin\n anchorElem={floatingAnchorElem}\n clientProps={plugin.clientProps}\n key={plugin.key}\n plugin={plugin}\n />\n )\n }\n })}\n {editor.isEditable() && (\n <React.Fragment>\n <SlashMenuPlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n </React.Fragment>\n )}\n {editor.isEditable() && (\n <React.Fragment>\n <HistoryPlugin />\n {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}\n </React.Fragment>\n )}\n\n <TabIndentationPlugin />\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'normal') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'bottom') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n </div>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'belowContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","LexicalErrorBoundary","HistoryPlugin","OnChangePlugin","RichTextPlugin","TabIndentationPlugin","useTranslation","BLUR_COMMAND","COMMAND_PRIORITY_LOW","FOCUS_COMMAND","React","useEffect","useState","EditorPlugin","useEditorConfigContext","MarkdownShortcutPlugin","SlashMenuPlugin","AddBlockHandlePlugin","DraggableBlockPlugin","LexicalContentEditable","LexicalEditor","props","editorConfig","editorContainerRef","onChange","editorConfigContext","editor","t","floatingAnchorElem","setFloatingAnchorElem","onRef","_floatingAnchorElem","uuid","console","error","parentEditor","registerChild","handleFocus","focusEditor","handleBlur","blurEditor","unregisterFocus","registerCommand","unregisterBlur","unregisterChild","isSmallWidthViewport","setIsSmallWidthViewport","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","Fragment","features","plugins","map","plugin","position","clientProps","key","div","className","ref","ErrorBoundary","contentEditable","placeholder","p","ignoreSelectionChange","editorState","tags","has","size","isEditable","anchorElem","desktopOnly","markdownTransformers","length"],"mappings":"AAAA;;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,oBAAoB,QAAQ,yCAAwC;AAC7E,SAASC,aAAa,QAAQ,yCAAwC;AACtE,SAASC,cAAc,QAAQ,0CAAyC;AACxE,SAASC,cAAc,QAAQ,0CAAyC;AACxE,SAASC,oBAAoB,QAAQ,gDAA+C;AACpF,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,SAASC,YAAY,EAAEC,oBAAoB,EAAEC,aAAa,QAAQ,UAAS;AAC3E,YAAYC,WAAW,QAAO;AAC9B,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAI3C,SAASC,YAAY,QAAQ,oBAAmB;AAEhD,SAASC,sBAAsB,QAAQ,0CAAyC;AAChF,SAASC,sBAAsB,QAAQ,sCAAqC;AAC5E,SAASC,eAAe,QAAQ,+BAA8B;AAC9D,SAASC,oBAAoB,QAAQ,kDAAiD;AACtF,SAASC,oBAAoB,QAAQ,kDAAiD;AACtF,SAASC,sBAAsB,QAAQ,0BAAyB;AAEhE,OAAO,MAAMC,gBAIT,CAACC;IACH,MAAM,EAAEC,YAAY,EAAEC,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACvD,MAAMI,sBAAsBX;IAC5B,MAAM,CAACY,OAAO,GAAG1B;IACjB,MAAM,EAAE2B,CAAC,EAAE,GAAGrB;IAEd,MAAM,CAACsB,oBAAoBC,sB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,KAAChE,MAAM4C,QAAQ;0CACb,cAAA,KAACtC;oCAAgB2D,YAAY/C;;;;;oBAKpCF,OAAOgD,UAAU,oBAChB,MAAChE,MAAM4C,QAAQ;;0CACb,KAACpD;4BACAoB,cAAciC,UAAUsB,sBAAsBC,SAAS,mBAAK,KAAC/D;;;kCAIlE,KAACV;oBACAiB,aAAaiC,QAAQ,CAACC,OAAO,CAACC,GAAG,CAAC,CAACC;wBAClC,IAAIA,OAAOC,QAAQ,KAAK,UAAU;4BAChC,qBACE,KAAC9C;gCAAa+C,aAAaF,OAAOE,WAAW;gCAAmBF,QAAQA;+BAApBA,OAAOG,GAAG;wBAElE;oBACF;oBACCvC,aAAaiC,QAAQ,CAACC,OAAO,CAACC,GAAG,CAAC,CAACC;wBAClC,IAAIA,OAAOC,QAAQ,KAAK,UAAU;4BAChC,qBACE,KAAC9C;gCAAa+C,aAAaF,OAAOE,WAAW;gCAAmBF,QAAQA;+BAApBA,OAAOG,GAAG;wBAElE;oBACF;;;YAEDvC,aAAaiC,QAAQ,CAACC,OAAO,CAACC,GAAG,CAAC,CAACC;gBAClC,IAAIA,OAAOC,QAAQ,KAAK,kBAAkB;oBACxC,qBAAO,KAAC9C;wBAAa+C,aAAaF,OAAOE,WAAW;wBAAmBF,QAAQA;uBAApBA,OAAOG,GAAG;gBACvE;YACF;;;AAGN,EAAC"}
1
+ {"version":3,"sources":["../../src/lexical/LexicalEditor.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary.js'\nimport { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin.js'\nimport { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin.js'\nimport { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin.js'\nimport { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin.js'\nimport { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\n\nimport type { LexicalProviderProps } from './LexicalProvider.js'\n\nimport { EditorPlugin } from './EditorPlugin.js'\nimport './LexicalEditor.scss'\nimport { useEditorConfigContext } from './config/client/EditorConfigProvider.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<\n {\n editorContainerRef: React.RefObject<HTMLDivElement>\n } & Pick<LexicalProviderProps, 'editorConfig' | 'onChange'>\n> = (props) => {\n const { editorConfig, editorContainerRef, onChange } = props\n const editorConfigContext = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem)\n }\n }\n\n useEffect(() => {\n if (!editorConfigContext?.uuid) {\n console.error('Lexical Editor must be used within an EditorConfigProvider')\n return\n }\n if (editorConfigContext?.parentEditor?.uuid) {\n editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext)\n }\n\n const handleFocus = () => {\n editorConfigContext.focusEditor(editorConfigContext)\n }\n\n const handleBlur = () => {\n editorConfigContext.blurEditor(editorConfigContext)\n }\n\n const unregisterFocus = editor.registerCommand<MouseEvent>(\n FOCUS_COMMAND,\n () => {\n handleFocus()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n const unregisterBlur = editor.registerCommand<MouseEvent>(\n BLUR_COMMAND,\n () => {\n handleBlur()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n return () => {\n unregisterFocus()\n unregisterBlur()\n editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid)\n }\n }, [editor, editorConfigContext])\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n return (\n <React.Fragment>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'aboveContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n <div className=\"editor-container\" ref={editorContainerRef}>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'top') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n <RichTextPlugin\n ErrorBoundary={LexicalErrorBoundary}\n contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable />\n </div>\n </div>\n }\n />\n <OnChangePlugin\n // Selection changes can be ignored here, reducing the\n // frequency that the FieldComponent and Payload receive updates.\n // Selection changes are only needed if you are saving selection state\n ignoreSelectionChange\n onChange={(editorState, editor, tags) => {\n // Ignore any onChange event triggered by focus only\n if (!tags.has('focus') || tags.size > 1) {\n if (onChange != null) onChange(editorState, editor, tags)\n }\n }}\n />\n {floatingAnchorElem && (\n <React.Fragment>\n {!isSmallWidthViewport && editor.isEditable() && (\n <React.Fragment>\n <DraggableBlockPlugin anchorElem={floatingAnchorElem} />\n <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n {editorConfig.features.plugins.map((plugin) => {\n if (\n plugin.position === 'floatingAnchorElem' &&\n !(plugin.desktopOnly === true && isSmallWidthViewport)\n ) {\n return (\n <EditorPlugin\n anchorElem={floatingAnchorElem}\n clientProps={plugin.clientProps}\n key={plugin.key}\n plugin={plugin}\n />\n )\n }\n })}\n {editor.isEditable() && (\n <React.Fragment>\n <SlashMenuPlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n </React.Fragment>\n )}\n {editor.isEditable() && (\n <React.Fragment>\n <HistoryPlugin />\n {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}\n </React.Fragment>\n )}\n\n <TabIndentationPlugin />\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'normal') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'bottom') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n </div>\n {editorConfig.features.plugins.map((plugin) => {\n if (plugin.position === 'belowContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","LexicalErrorBoundary","HistoryPlugin","OnChangePlugin","RichTextPlugin","TabIndentationPlugin","BLUR_COMMAND","COMMAND_PRIORITY_LOW","FOCUS_COMMAND","React","useEffect","useState","EditorPlugin","useEditorConfigContext","MarkdownShortcutPlugin","SlashMenuPlugin","AddBlockHandlePlugin","DraggableBlockPlugin","LexicalContentEditable","LexicalEditor","props","editorConfig","editorContainerRef","onChange","editorConfigContext","editor","floatingAnchorElem","setFloatingAnchorElem","onRef","_floatingAnchorElem","uuid","console","error","parentEditor","registerChild","handleFocus","focusEditor","handleBlur","blurEditor","unregisterFocus","registerCommand","unregisterBlur","unregisterChild","isSmallWidthViewport","setIsSmallWidthViewport","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","Fragment","features","plugins","map","plugin","position","clientProps","key","div","className","ref","ErrorBoundary","contentEditable","ignoreSelectionChange","editorState","tags","has","size","isEditable","anchorElem","desktopOnly","markdownTransformers","length"],"mappings":"AAAA;;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,oBAAoB,QAAQ,yCAAwC;AAC7E,SAASC,aAAa,QAAQ,yCAAwC;AACtE,SAASC,cAAc,QAAQ,0CAAyC;AACxE,SAASC,cAAc,QAAQ,0CAAyC;AACxE,SAASC,oBAAoB,QAAQ,gDAA+C;AACpF,SAASC,YAAY,EAAEC,oBAAoB,EAAEC,aAAa,QAAQ,UAAS;AAC3E,YAAYC,WAAW,QAAO;AAC9B,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAI3C,SAASC,YAAY,QAAQ,oBAAmB;AAEhD,SAASC,sBAAsB,QAAQ,0CAAyC;AAChF,SAASC,sBAAsB,QAAQ,sCAAqC;AAC5E,SAASC,eAAe,QAAQ,+BAA8B;AAC9D,SAASC,oBAAoB,QAAQ,kDAAiD;AACtF,SAASC,oBAAoB,QAAQ,kDAAiD;AACtF,SAASC,sBAAsB,QAAQ,0BAAyB;AAEhE,OAAO,MAAMC,gBAIT,CAACC;IACH,MAAM,EAAEC,YAAY,EAAEC,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACvD,MAAMI,sBAAsBX;IAC5B,MAAM,CAACY,OAAO,GAAGzB;IAEjB,MAAM,CAAC0B,oBAAoBC,sBAAsB,GAAGhB,SAAgC;IACpF,MAAMiB,QAAQ,CAACC;QACb,IAAIA,wBAAwB,MAAM;YAChCF,sBAAsBE;QACxB;IACF;IAEAnB,UAAU;QACR,IAAI,CAACc,qBAAqBM,MAAM;YAC9BC,QAAQC,KAAK,CAAC;YACd;QACF;QACA,IAAIR,qBAAqBS,cAAcH,MAAM;YAC3CN,oBAAoBS,YAAY,EAAEC,cAAcV,oBAAoBM,IAAI,EAAEN;QAC5E;QAEA,MAAMW,cAAc;YAClBX,o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;+BAApBA,OAAOG,GAAG;wBAElE;oBACF;oBACCtC,aAAagC,QAAQ,CAACC,OAAO,CAACC,GAAG,CAAC,CAACC;wBAClC,IAAIA,OAAOC,QAAQ,KAAK,UAAU;4BAChC,qBACE,KAAC7C;gCAAa8C,aAAaF,OAAOE,WAAW;gCAAmBF,QAAQA;+BAApBA,OAAOG,GAAG;wBAElE;oBACF;;;YAEDtC,aAAagC,QAAQ,CAACC,OAAO,CAACC,GAAG,CAAC,CAACC;gBAClC,IAAIA,OAAOC,QAAQ,KAAK,kBAAkB;oBACxC,qBAAO,KAAC7C;wBAAa8C,aAAaF,OAAOE,WAAW;wBAAmBF,QAAQA;uBAApBA,OAAOG,GAAG;gBACvE;YACF;;;AAGN,EAAC"}
@@ -1,14 +1,10 @@
1
1
  import type { EditorState, LexicalEditor, SerializedEditorState } from 'lexical';
2
- import type { FormFieldBase } from 'payload';
3
2
  import * as React from 'react';
3
+ import type { LexicalRichTextFieldProps } from '../types.js';
4
4
  import type { SanitizedClientEditorConfig } from './config/types.js';
5
5
  export type LexicalProviderProps = {
6
6
  editorConfig: SanitizedClientEditorConfig;
7
- fieldProps: {
8
- editorConfig: SanitizedClientEditorConfig;
9
- name: string;
10
- richTextComponentMap: Map<string, React.ReactNode>;
11
- } & FormFieldBase;
7
+ field: LexicalRichTextFieldProps['field'];
12
8
  onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void;
13
9
  path: string;
14
10
  readOnly: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalProvider.d.ts","sourceRoot":"","sources":["../../src/lexical/LexicalProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAA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B,CAAA;CAC7B,CAAA;AAiBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwE1D,CAAA"}
@@ -24,7 +24,7 @@ const NestProviders = ({ children, providers })=>{
24
24
  });
25
25
  };
26
26
  export const LexicalProvider = (props)=>{
27
- const { editorConfig, fieldProps, onChange, path, readOnly, value } = props;
27
+ const { editorConfig, field, onChange, path, readOnly, value } = props;
28
28
  const parentContext = useEditorConfigContext();
29
29
  const editorContainerRef = React.useRef(null);
30
30
  const processedValue = useMemo(()=>{
@@ -81,7 +81,7 @@ export const LexicalProvider = (props)=>{
81
81
  children: /*#__PURE__*/ _jsx(EditorConfigProvider, {
82
82
  editorConfig: editorConfig,
83
83
  editorContainerRef: editorContainerRef,
84
- fieldProps: fieldProps,
84
+ field: field,
85
85
  parentContext: parentContext,
86
86
  children: /*#__PURE__*/ _jsx(NestProviders, {
87
87
  providers: editorConfig.features.providers,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lexical/LexicalProvider.tsx"],"sourcesContent":["'use client'\nimport type { InitialConfigType } from '@lexical/react/LexicalComposer.js'\nimport type { EditorState, LexicalEditor, SerializedEditorState } from 'lexical'\nimport type { FormFieldBase } from 'payload'\n\nimport { LexicalComposer } from '@lexical/react/LexicalComposer.js'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { SanitizedClientEditorConfig } from './config/types.js'\n\nimport { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js'\nimport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './config/client/EditorConfigProvider.js'\nimport { getEnabledNodes } from './nodes/index.js'\n\nexport type LexicalProviderProps = {\n editorConfig: SanitizedClientEditorConfig\n fieldProps: {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n } & FormFieldBase\n onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void\n path: string\n readOnly: boolean\n value: SerializedEditorState\n}\n\nconst NestProviders = ({ children, providers }) => {\n if (!providers?.length) {\n return children\n }\n const Component = providers[0]\n if (providers.length > 1) {\n return (\n <Component>\n <NestProviders providers={providers.slice(1)}>{children}</NestProviders>\n </Component>\n )\n }\n return <Component>{children}</Component>\n}\n\nexport const LexicalProvider: React.FC<LexicalProviderProps> = (props) => {\n const { editorConfig, fieldProps, onChange, path, readOnly, value } = props\n\n const parentContext = useEditorConfigContext()\n\n const editorContainerRef = React.useRef<HTMLDivElement>(null)\n\n const processedValue = useMemo(() => {\n let processed = value\n if (editorConfig?.features?.hooks?.load?.length) {\n editorConfig.features.hooks.load.forEach((hook) => {\n processed = hook({ incomingEditorState: processed })\n })\n }\n return processed\n }, [editorConfig, value])\n\n // useMemo for the initialConfig that depends on readOnly and processedValue\n const initialConfig = useMemo<InitialConfigType>(() => {\n if (processedValue && typeof processedValue !== 'object') {\n throw new Error(\n 'The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: ' +\n JSON.stringify(processedValue),\n )\n }\n\n if (processedValue && Array.isArray(processedValue) && !('root' in processedValue)) {\n throw new Error(\n 'You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/beta/lexical/migration#migration-via-migration-script-recommended',\n )\n }\n\n if (processedValue && 'jsonContent' in processedValue) {\n throw new Error(\n 'You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/beta/lexical/migration#migrating-from-payload-plugin-lexical',\n )\n }\n\n return {\n editable: readOnly !== true,\n editorState: processedValue != null ? JSON.stringify(processedValue) : undefined,\n namespace: editorConfig.lexical.namespace,\n nodes: [...getEnabledNodes({ editorConfig })],\n onError: (error: Error) => {\n throw error\n },\n theme: editorConfig.lexical.theme,\n }\n }, [editorConfig, processedValue, readOnly])\n\n if (!initialConfig) {\n return <p>Loading...</p>\n }\n\n return (\n <LexicalComposer initialConfig={initialConfig} key={path}>\n <EditorConfigProvider\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n fieldProps={fieldProps}\n parentContext={parentContext}\n >\n <NestProviders providers={editorConfig.features.providers}>\n <LexicalEditorComponent\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n onChange={onChange}\n />\n </NestProviders>\n </EditorConfigProvider>\n </LexicalComposer>\n )\n}\n"],"names":["LexicalComposer","React","useMemo","LexicalEditor","LexicalEditorComponent","EditorConfigProvider","useEditorConfigContext","getEnabledNodes","NestProviders","children","providers","length","Component","slice","LexicalProvider","props","editorConfig","fieldProps","onChange","path","readOnly","value","parentContext","editorContainerRef","useRef","processedValue","processed","features","hooks","load","forEach","hook","incomingEditorState","initialConfig","Error","JSON","stringify","Array","isArray","editable","editorState","undefined","namespace","lexical","nodes","onError","error","theme","p"],"mappings":"AAAA;;AAKA,SAASA,eAAe,QAAQ,oCAAmC;AACnE,YAAYC,WAAW,QAAO;AAC9B,SAASC,OAAO,QAAQ,QAAO;AAI/B,SAASC,iBAAiBC,sBAAsB,QAAQ,qBAAoB;AAC5E,SACEC,oBAAoB,EACpBC,sBAAsB,QACjB,0CAAyC;AAChD,SAASC,eAAe,QAAQ,mBAAkB;AAelD,MAAMC,gBAAgB,CAAC,EAAEC,QAAQ,EAAEC,SAAS,EAAE;IAC5C,IAAI,CAACA,WAAWC,QAAQ;QACtB,OAAOF;IACT;IACA,MAAMG,YAAYF,SAAS,CAAC,EAAE;IAC9B,IAAIA,UAAUC,MAAM,GAAG,GAAG;QACxB,qBACE,KAACC;sBACC,cAAA,KAACJ;gBAAcE,WAAWA,UAAUG,KAAK,CAAC;0BAAKJ;;;IAGrD;IACA,qBAAO,KAACG;kBAAWH;;AACrB;AAEA,OAAO,MAAMK,kBAAkD,CAACC;IAC9D,MAAM,EAAEC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGN;I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;0BACvD,cAAA,KAACN;oBACCY,cAAcA;oBACdO,oBAAoBA;oBACpBL,UAAUA;;;;OAXkCC;AAiBxD,EAAC"}
1
+ {"version":3,"sources":["../../src/lexical/LexicalProvider.tsx"],"sourcesContent":["'use client'\nimport type { InitialConfigType } from '@lexical/react/LexicalComposer.js'\nimport type { EditorState, LexicalEditor, SerializedEditorState } from 'lexical'\n\nimport { LexicalComposer } from '@lexical/react/LexicalComposer.js'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { LexicalRichTextFieldProps } from '../types.js'\nimport type { SanitizedClientEditorConfig } from './config/types.js'\n\nimport { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js'\nimport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './config/client/EditorConfigProvider.js'\nimport { getEnabledNodes } from './nodes/index.js'\n\nexport type LexicalProviderProps = {\n editorConfig: SanitizedClientEditorConfig\n field: LexicalRichTextFieldProps['field']\n onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void\n path: string\n readOnly: boolean\n value: SerializedEditorState\n}\n\nconst NestProviders = ({ children, providers }) => {\n if (!providers?.length) {\n return children\n }\n const Component = providers[0]\n if (providers.length > 1) {\n return (\n <Component>\n <NestProviders providers={providers.slice(1)}>{children}</NestProviders>\n </Component>\n )\n }\n return <Component>{children}</Component>\n}\n\nexport const LexicalProvider: React.FC<LexicalProviderProps> = (props) => {\n const { editorConfig, field, onChange, path, readOnly, value } = props\n\n const parentContext = useEditorConfigContext()\n\n const editorContainerRef = React.useRef<HTMLDivElement>(null)\n\n const processedValue = useMemo(() => {\n let processed = value\n if (editorConfig?.features?.hooks?.load?.length) {\n editorConfig.features.hooks.load.forEach((hook) => {\n processed = hook({ incomingEditorState: processed })\n })\n }\n return processed\n }, [editorConfig, value])\n\n // useMemo for the initialConfig that depends on readOnly and processedValue\n const initialConfig = useMemo<InitialConfigType>(() => {\n if (processedValue && typeof processedValue !== 'object') {\n throw new Error(\n 'The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: ' +\n JSON.stringify(processedValue),\n )\n }\n\n if (processedValue && Array.isArray(processedValue) && !('root' in processedValue)) {\n throw new Error(\n 'You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/beta/lexical/migration#migration-via-migration-script-recommended',\n )\n }\n\n if (processedValue && 'jsonContent' in processedValue) {\n throw new Error(\n 'You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/beta/lexical/migration#migrating-from-payload-plugin-lexical',\n )\n }\n\n return {\n editable: readOnly !== true,\n editorState: processedValue != null ? JSON.stringify(processedValue) : undefined,\n namespace: editorConfig.lexical.namespace,\n nodes: [...getEnabledNodes({ editorConfig })],\n onError: (error: Error) => {\n throw error\n },\n theme: editorConfig.lexical.theme,\n }\n }, [editorConfig, processedValue, readOnly])\n\n if (!initialConfig) {\n return <p>Loading...</p>\n }\n\n return (\n <LexicalComposer initialConfig={initialConfig} key={path}>\n <EditorConfigProvider\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n field={field}\n parentContext={parentContext}\n >\n <NestProviders providers={editorConfig.features.providers}>\n <LexicalEditorComponent\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n onChange={onChange}\n />\n </NestProviders>\n </EditorConfigProvider>\n </LexicalComposer>\n )\n}\n"],"names":["LexicalComposer","React","useMemo","LexicalEditor","LexicalEditorComponent","EditorConfigProvider","useEditorConfigContext","getEnabledNodes","NestProviders","children","providers","length","Component","slice","LexicalProvider","props","editorConfig","field","onChange","path","readOnly","value","parentContext","editorContainerRef","useRef","processedValue","processed","features","hooks","load","forEach","hook","incomingEditorState","initialConfig","Error","JSON","stringify","Array","isArray","editable","editorState","undefined","namespace","lexical","nodes","onError","error","theme","p"],"mappings":"AAAA;;AAIA,SAASA,eAAe,QAAQ,oCAAmC;AAC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MAAM,IAAIS,MACR;QAEJ;QAEA,IAAIT,kBAAkB,iBAAiBA,gBAAgB;YACrD,MAAM,IAAIS,MACR;QAEJ;QAEA,OAAO;YACLK,UAAUnB,aAAa;YACvBoB,aAAaf,kBAAkB,OAAOU,KAAKC,SAAS,CAACX,kBAAkBgB;YACvEC,WAAW1B,aAAa2B,OAAO,CAACD,SAAS;YACzCE,OAAO;mBAAIrC,gBAAgB;oBAAES;gBAAa;aAAG;YAC7C6B,SAAS,CAACC;gBACR,MAAMA;YACR;YACAC,OAAO/B,aAAa2B,OAAO,CAACI,KAAK;QACnC;IACF,GAAG;QAAC/B;QAAcS;QAAgBL;KAAS;IAE3C,IAAI,CAACa,eAAe;QAClB,qBAAO,KAACe;sBAAE;;IACZ;IAEA,qBACE,KAAChD;QAAgBiC,eAAeA;kBAC9B,cAAA,KAAC5B;YACCW,cAAcA;YACdO,oBAAoBA;YACpBN,OAAOA;YACPK,eAAeA;sBAEf,cAAA,KAACd;gBAAcE,WAAWM,aAAaW,QAAQ,CAACjB,SAAS;0BACvD,cAAA,KAACN;oBACCY,cAAcA;oBACdO,oBAAoBA;oBACpBL,UAAUA;;;;OAXkCC;AAiBxD,EAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { LexicalEditor } from 'lexical';
2
- import type { FormFieldBase } from 'payload';
3
2
  import * as React from 'react';
3
+ import type { LexicalRichTextFieldProps } from '../../../types.js';
4
4
  import type { SanitizedClientEditorConfig } from '../types.js';
5
5
  export interface EditorConfigContextType {
6
6
  blurEditor: (editorContext: EditorConfigContextType) => void;
@@ -8,11 +8,7 @@ export interface EditorConfigContextType {
8
8
  editor: LexicalEditor;
9
9
  editorConfig: SanitizedClientEditorConfig;
10
10
  editorContainerRef: React.RefObject<HTMLDivElement>;
11
- field: {
12
- editorConfig: SanitizedClientEditorConfig;
13
- name: string;
14
- richTextComponentMap: Map<string, React.ReactNode>;
15
- } & FormFieldBase;
11
+ field: LexicalRichTextFieldProps['field'];
16
12
  focusEditor: (editorContext: EditorConfigContextType) => void;
17
13
  focusedEditor: EditorConfigContextType | null;
18
14
  parentEditor: EditorConfigContextType;
@@ -20,15 +16,11 @@ export interface EditorConfigContextType {
20
16
  unregisterChild?: (uuid: string) => void;
21
17
  uuid: string;
22
18
  }
23
- export declare const EditorConfigProvider: ({ children, editorConfig, editorContainerRef, fieldProps, parentContext, }: {
19
+ export declare const EditorConfigProvider: ({ children, editorConfig, editorContainerRef, field, parentContext, }: {
24
20
  children: React.ReactNode;
25
21
  editorConfig: SanitizedClientEditorConfig;
26
22
  editorContainerRef: React.RefObject<HTMLDivElement>;
27
- fieldProps: {
28
- editorConfig: SanitizedClientEditorConfig;
29
- name: string;
30
- richTextComponentMap: Map<string, React.ReactNode>;
31
- } & FormFieldBase;
23
+ field: LexicalRichTextFieldProps["field"];
32
24
  parentContext?: EditorConfigContextType;
33
25
  }) => React.ReactNode;
34
26
  export declare const useEditorConfigContext: () => EditorConfigContextType;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorConfigProvider.d.ts","sourceRoot":"","sources":["../../../../src/lexical/config/client/EditorConfigProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAO9D,MAAM,WAAW,uBAAuB;IAEtC,UAAU,EAAE,CAAC,aAAa,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC5D,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAA;IACtE,MAAM,EAAE,aAAa,CAAA;IACrB,YAAY,EAAE,2BAA2B,CAAA;IACzC,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IACnD,KA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AAClE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAO9D,MAAM,WAAW,uBAAuB;IAEtC,UAAU,EAAE,CAAC,aAAa,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC5D,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAA;IACtE,MAAM,EAAE,aAAa,CAAA;IACrB,YAAY,EAAE,2BAA2B,CAAA;IACzC,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IACnD,KAAK,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAA;IAEzC,WAAW,EAAE,CAAC,aAAa,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC7D,aAAa,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC7C,YAAY,EAAE,uBAAuB,CAAA;IACrC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC7E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,IAAI,EAAE,MAAM,CAAA;CACb;AAQD,eAAO,MAAM,oBAAoB,0EAM9B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,EAAE,2BAA2B,CAAA;IACzC,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IACnD,KAAK,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAA;IACzC,aAAa,CAAC,EAAE,uBAAuB,CAAA;CACxC,KAAG,KAAK,CAAC,SA2ET,CAAA;AAED,eAAO,MAAM,sBAAsB,QAAO,uBAMzC,CAAA"}
@@ -12,7 +12,7 @@ const Context = /*#__PURE__*/ createContext({
12
12
  field: null,
13
13
  uuid: null
14
14
  });
15
- export const EditorConfigProvider = ({ children, editorConfig, editorContainerRef, fieldProps, parentContext })=>{
15
+ export const EditorConfigProvider = ({ children, editorConfig, editorContainerRef, field, parentContext })=>{
16
16
  const [editor] = useLexicalComposerContext();
17
17
  // State to store the UUID
18
18
  const [uuid] = useState(generateQuickGuid());
@@ -29,7 +29,7 @@ export const EditorConfigProvider = ({ children, editorConfig, editorContainerRe
29
29
  editor,
30
30
  editorConfig,
31
31
  editorContainerRef,
32
- field: fieldProps,
32
+ field,
33
33
  focusEditor: (editorContext)=>{
34
34
  const editorUUID = editorContext.uuid;
35
35
  // Avoid recursion by checking if this editor is already focused in this cycle
@@ -70,7 +70,7 @@ export const EditorConfigProvider = ({ children, editorConfig, editorContainerRe
70
70
  childrenEditors,
71
71
  editorConfig,
72
72
  editorContainerRef,
73
- fieldProps,
73
+ field,
74
74
  focusedEditor,
75
75
  parentContext,
76
76
  uuid
@@ -1 +1 @@
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,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GY;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 { RichTextFieldClient } 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 { LexicalRichTextFieldProps } from '../../../types.js'\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: LexicalRichTextFieldProps['field']\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 field,\n parentContext,\n}: {\n children: React.ReactNode\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement>\n field: LexicalRichTextFieldProps['field']\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,\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 field,\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","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;AAK5E,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;AAmBA,MAAMC,wBAAkDV,cAAc;IACpEW,cAAc;IACdC,OAAO;IACPC,MAAM;AACR;AAEA,OAAO,MAAMC,uBAAuB,CAAC,EACnCC,QAAQ,EACRJ,YAAY,EACZK,kBAAkB,EAClBJ,KAAK,EACLK,aAAa,EAOd;IACC,MAAM,CAACC,OAAO,GAAGpB;IACjB,0BAA0B;IAC1B,MAAM,CAACe,KAAK,GAAGT,SAASC;IAExB,MAAMc,kBAAkBhB,OAA6C,IAAIiB;IACzE,MAAM,CAACC,eAAeC,iBAAiB,GAAGlB,SAAyC;IACnF,MAAMmB,eAAepB,OAAoB,IAAIqB;IAE7C,MAAMC,gBAAgBvB,QACpB,IACG,CAAA;YACCwB,YAAY,CAACD;gBACX,gDAAgD;gBAChDF,aAAaI,OAAO,CAACC,KAAK,GAAG,yCAAyC;;Y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