@payloadcms/richtext-lexical 3.0.0-canary.ff8c8fd → 3.0.0

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 (821) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts +12 -0
  3. package/dist/cell/rscEntry.d.ts.map +1 -0
  4. package/dist/cell/rscEntry.js +82 -0
  5. package/dist/cell/rscEntry.js.map +1 -0
  6. package/dist/exports/client/Field-KKSJXHR7.js +2 -0
  7. package/dist/exports/client/Field-KKSJXHR7.js.map +7 -0
  8. package/dist/exports/client/RelationshipComponent-2RT3YXUT.js +2 -0
  9. package/dist/exports/client/RelationshipComponent-2RT3YXUT.js.map +7 -0
  10. package/dist/exports/client/bundled.css +1 -1
  11. package/dist/exports/client/chunk-2CYU43GM.js +2 -0
  12. package/dist/exports/client/chunk-2CYU43GM.js.map +7 -0
  13. package/dist/exports/client/chunk-5PBXL4HT.js +2 -0
  14. package/dist/exports/client/chunk-5PBXL4HT.js.map +7 -0
  15. package/dist/exports/client/chunk-C7S3V4EB.js +2 -0
  16. package/dist/exports/client/chunk-C7S3V4EB.js.map +7 -0
  17. package/dist/exports/client/chunk-CUIBIFW2.js +2 -0
  18. package/dist/exports/client/chunk-CUIBIFW2.js.map +7 -0
  19. package/dist/exports/client/{chunk-UJDWBQ2K.js → chunk-MI5HS4QX.js} +2 -2
  20. package/dist/exports/client/{chunk-UJDWBQ2K.js.map → chunk-MI5HS4QX.js.map} +2 -2
  21. package/dist/exports/client/chunk-QPPOQTHD.js +2 -0
  22. package/dist/exports/client/chunk-QPPOQTHD.js.map +7 -0
  23. package/dist/exports/client/chunk-U7O7EYCP.js +2 -0
  24. package/dist/exports/client/chunk-U7O7EYCP.js.map +7 -0
  25. package/dist/exports/client/{chunk-V2LKLT2F.js → chunk-XCEM47RI.js} +3 -3
  26. package/dist/exports/client/{chunk-V2LKLT2F.js.map → chunk-XCEM47RI.js.map} +3 -3
  27. package/dist/exports/client/component-ANB7VZLA.js +2 -0
  28. package/dist/exports/client/component-ANB7VZLA.js.map +7 -0
  29. package/dist/exports/client/component-H3EYQ5KG.js +2 -0
  30. package/dist/exports/client/component-H3EYQ5KG.js.map +7 -0
  31. package/dist/exports/client/componentInline-ZGO3K4TA.js +2 -0
  32. package/dist/exports/client/componentInline-ZGO3K4TA.js.map +7 -0
  33. package/dist/exports/client/index.d.ts +10 -4
  34. package/dist/exports/client/index.d.ts.map +1 -1
  35. package/dist/exports/client/index.js +10 -8
  36. package/dist/exports/client/index.js.map +4 -4
  37. package/dist/exports/server/ast/mdx.d.ts +7 -0
  38. package/dist/exports/server/ast/mdx.d.ts.map +1 -0
  39. package/dist/exports/server/ast/mdx.js +37 -0
  40. package/dist/exports/server/ast/mdx.js.map +1 -0
  41. package/dist/exports/server/rsc.d.ts +3 -0
  42. package/dist/exports/server/rsc.d.ts.map +1 -0
  43. package/dist/exports/server/rsc.js +3 -0
  44. package/dist/exports/server/rsc.js.map +1 -0
  45. package/dist/exports/shared.d.ts +4 -0
  46. package/dist/exports/shared.d.ts.map +1 -0
  47. package/dist/exports/shared.js +4 -0
  48. package/dist/exports/shared.js.map +1 -0
  49. package/dist/features/align/client/index.d.ts +1 -4
  50. package/dist/features/align/client/index.d.ts.map +1 -1
  51. package/dist/features/blockquote/client/index.d.ts +1 -4
  52. package/dist/features/blockquote/client/index.d.ts.map +1 -1
  53. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  54. package/dist/features/blockquote/server/index.d.ts +1 -1
  55. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  56. package/dist/features/blockquote/server/index.js +5 -1
  57. package/dist/features/blockquote/server/index.js.map +1 -1
  58. package/dist/features/blocks/client/component/BlockContent.d.ts +34 -8
  59. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  60. package/dist/features/blocks/client/component/BlockContent.js +66 -170
  61. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  62. package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts +11 -0
  63. package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts.map +1 -0
  64. package/dist/features/blocks/client/component/components/BlockCollapsible.js +37 -0
  65. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -0
  66. package/dist/features/blocks/client/component/components/BlockEditButton.d.ts +3 -0
  67. package/dist/features/blocks/client/component/components/BlockEditButton.d.ts.map +1 -0
  68. package/dist/features/blocks/client/component/components/BlockEditButton.js +22 -0
  69. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -0
  70. package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts +3 -0
  71. package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts.map +1 -0
  72. package/dist/features/blocks/client/component/components/BlockRemoveButton.js +22 -0
  73. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -0
  74. package/dist/features/blocks/client/component/index.d.ts +1 -1
  75. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  76. package/dist/features/blocks/client/component/index.js +294 -93
  77. package/dist/features/blocks/client/component/index.js.map +1 -1
  78. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts +5 -0
  79. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -0
  80. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +28 -0
  81. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -0
  82. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts +3 -0
  83. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts.map +1 -0
  84. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +22 -0
  85. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -0
  86. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts +3 -0
  87. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts.map +1 -0
  88. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +22 -0
  89. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -0
  90. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts +3 -0
  91. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts.map +1 -0
  92. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +22 -0
  93. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -0
  94. package/dist/features/blocks/client/componentInline/index.d.ts +14 -2
  95. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  96. package/dist/features/blocks/client/componentInline/index.js +237 -63
  97. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  98. package/dist/features/blocks/client/index.d.ts +1 -8
  99. package/dist/features/blocks/client/index.d.ts.map +1 -1
  100. package/dist/features/blocks/client/index.js +140 -147
  101. package/dist/features/blocks/client/index.js.map +1 -1
  102. package/dist/features/blocks/client/markdownTransformer.d.ts +16 -0
  103. package/dist/features/blocks/client/markdownTransformer.d.ts.map +1 -0
  104. package/dist/features/blocks/client/markdownTransformer.js +144 -0
  105. package/dist/features/blocks/client/markdownTransformer.js.map +1 -0
  106. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  107. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  108. package/dist/features/blocks/client/nodes/BlocksNode.js +1 -3
  109. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  110. package/dist/features/blocks/client/plugin/commands.d.ts +0 -4
  111. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
  112. package/dist/features/blocks/client/plugin/commands.js +0 -1
  113. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  114. package/dist/features/blocks/client/plugin/index.d.ts +3 -4
  115. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  116. package/dist/features/blocks/client/plugin/index.js +25 -129
  117. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  118. package/dist/features/blocks/server/index.d.ts +1 -2
  119. package/dist/features/blocks/server/index.d.ts.map +1 -1
  120. package/dist/features/blocks/server/index.js +72 -35
  121. package/dist/features/blocks/server/index.js.map +1 -1
  122. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.d.ts +22 -0
  123. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.d.ts.map +1 -0
  124. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.js +136 -0
  125. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.js.map +1 -0
  126. package/dist/features/blocks/server/markdownTransformer.d.ts +22 -0
  127. package/dist/features/blocks/server/markdownTransformer.d.ts.map +1 -0
  128. package/dist/features/blocks/server/markdownTransformer.js +400 -0
  129. package/dist/features/blocks/server/markdownTransformer.js.map +1 -0
  130. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +11 -5
  131. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  132. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  133. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +3 -3
  134. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  135. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  136. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  137. package/dist/features/blocks/server/validate.js +8 -5
  138. package/dist/features/blocks/server/validate.js.map +1 -1
  139. package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
  140. package/dist/features/converters/html/converter/converters/paragraph.js +4 -0
  141. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  142. package/dist/features/converters/html/converter/converters/text.d.ts.map +1 -1
  143. package/dist/features/converters/html/converter/converters/text.js +2 -1
  144. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  145. package/dist/features/converters/html/converter/index.d.ts +11 -7
  146. package/dist/features/converters/html/converter/index.d.ts.map +1 -1
  147. package/dist/features/converters/html/converter/index.js +17 -1
  148. package/dist/features/converters/html/converter/index.js.map +1 -1
  149. package/dist/features/converters/html/converter/types.d.ts +3 -1
  150. package/dist/features/converters/html/converter/types.d.ts.map +1 -1
  151. package/dist/features/converters/html/converter/types.js.map +1 -1
  152. package/dist/features/converters/html/field/index.d.ts.map +1 -1
  153. package/dist/features/converters/html/field/index.js +7 -1
  154. package/dist/features/converters/html/field/index.js.map +1 -1
  155. package/dist/features/debug/testRecorder/client/index.d.ts +1 -4
  156. package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -1
  157. package/dist/features/debug/testRecorder/client/plugin/index.js +25 -14
  158. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  159. package/dist/features/debug/treeView/client/index.d.ts +1 -4
  160. package/dist/features/debug/treeView/client/index.d.ts.map +1 -1
  161. package/dist/features/experimental_table/client/index.d.ts +1 -1
  162. package/dist/features/experimental_table/client/index.d.ts.map +1 -1
  163. package/dist/features/experimental_table/client/index.js +2 -0
  164. package/dist/features/experimental_table/client/index.js.map +1 -1
  165. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  166. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +49 -51
  167. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  168. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  169. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +55 -42
  170. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  171. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +1 -1
  172. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  173. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +58 -19
  174. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  175. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  176. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +52 -50
  177. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  178. package/dist/features/experimental_table/client/utils/debounce.js +4 -4
  179. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  180. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  181. package/dist/features/experimental_table/markdownTransformer.d.ts +5 -0
  182. package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -0
  183. package/dist/features/experimental_table/markdownTransformer.js +127 -0
  184. package/dist/features/experimental_table/markdownTransformer.js.map +1 -0
  185. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  186. package/dist/features/experimental_table/server/index.js +22 -4
  187. package/dist/features/experimental_table/server/index.js.map +1 -1
  188. package/dist/features/format/bold/feature.client.d.ts +1 -4
  189. package/dist/features/format/bold/feature.client.d.ts.map +1 -1
  190. package/dist/features/format/bold/feature.client.js +2 -1
  191. package/dist/features/format/bold/feature.client.js.map +1 -1
  192. package/dist/features/format/inlineCode/feature.client.d.ts +1 -4
  193. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
  194. package/dist/features/format/inlineCode/feature.client.js +2 -1
  195. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  196. package/dist/features/format/italic/feature.client.d.ts +1 -4
  197. package/dist/features/format/italic/feature.client.d.ts.map +1 -1
  198. package/dist/features/format/italic/feature.client.js +2 -1
  199. package/dist/features/format/italic/feature.client.js.map +1 -1
  200. package/dist/features/format/strikethrough/feature.client.d.ts +1 -4
  201. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
  202. package/dist/features/format/strikethrough/feature.client.js +2 -1
  203. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  204. package/dist/features/format/subscript/feature.client.d.ts +1 -4
  205. package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
  206. package/dist/features/format/subscript/feature.client.js +2 -1
  207. package/dist/features/format/subscript/feature.client.js.map +1 -1
  208. package/dist/features/format/superscript/feature.client.d.ts +1 -4
  209. package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
  210. package/dist/features/format/superscript/feature.client.js +2 -1
  211. package/dist/features/format/superscript/feature.client.js.map +1 -1
  212. package/dist/features/format/underline/feature.client.d.ts +1 -4
  213. package/dist/features/format/underline/feature.client.d.ts.map +1 -1
  214. package/dist/features/format/underline/feature.client.js +2 -1
  215. package/dist/features/format/underline/feature.client.js.map +1 -1
  216. package/dist/features/heading/client/index.d.ts +1 -4
  217. package/dist/features/heading/client/index.d.ts.map +1 -1
  218. package/dist/features/heading/server/index.d.ts.map +1 -1
  219. package/dist/features/heading/server/index.js +4 -0
  220. package/dist/features/heading/server/index.js.map +1 -1
  221. package/dist/features/horizontalRule/client/component/index.d.ts +1 -1
  222. package/dist/features/horizontalRule/client/component/index.d.ts.map +1 -1
  223. package/dist/features/horizontalRule/client/component/index.js +12 -9
  224. package/dist/features/horizontalRule/client/component/index.js.map +1 -1
  225. package/dist/features/horizontalRule/client/index.d.ts +1 -4
  226. package/dist/features/horizontalRule/client/index.d.ts.map +1 -1
  227. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -2
  228. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  229. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  230. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  231. package/dist/features/indent/client/index.d.ts +1 -4
  232. package/dist/features/indent/client/index.d.ts.map +1 -1
  233. package/dist/features/indent/client/index.js +2 -1
  234. package/dist/features/indent/client/index.js.map +1 -1
  235. package/dist/features/link/client/index.d.ts +1 -13
  236. package/dist/features/link/client/index.d.ts.map +1 -1
  237. package/dist/features/link/client/index.js +2 -2
  238. package/dist/features/link/client/index.js.map +1 -1
  239. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  240. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  241. package/dist/features/link/client/plugins/autoLink/index.js +3 -1
  242. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  243. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  244. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +78 -40
  245. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  246. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  247. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -1
  248. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  249. package/dist/features/link/nodes/AutoLinkNode.js +2 -2
  250. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  251. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  252. package/dist/features/link/nodes/LinkNode.js +12 -7
  253. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  254. package/dist/features/link/nodes/types.d.ts +3 -3
  255. package/dist/features/link/nodes/types.d.ts.map +1 -1
  256. package/dist/features/link/nodes/types.js.map +1 -1
  257. package/dist/features/link/server/baseFields.d.ts +1 -1
  258. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  259. package/dist/features/link/server/baseFields.js +15 -3
  260. package/dist/features/link/server/baseFields.js.map +1 -1
  261. package/dist/features/link/server/i18n.d.ts.map +1 -1
  262. package/dist/features/link/server/i18n.js +64 -32
  263. package/dist/features/link/server/i18n.js.map +1 -1
  264. package/dist/features/link/server/index.d.ts.map +1 -1
  265. package/dist/features/link/server/index.js +17 -4
  266. package/dist/features/link/server/index.js.map +1 -1
  267. package/dist/features/link/server/transformExtraFields.d.ts +1 -1
  268. package/dist/features/link/server/transformExtraFields.d.ts.map +1 -1
  269. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  270. package/dist/features/link/server/validate.d.ts.map +1 -1
  271. package/dist/features/link/server/validate.js +8 -5
  272. package/dist/features/link/server/validate.js.map +1 -1
  273. package/dist/features/lists/checklist/client/index.d.ts +1 -4
  274. package/dist/features/lists/checklist/client/index.d.ts.map +1 -1
  275. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  276. package/dist/features/lists/htmlConverter.js +8 -0
  277. package/dist/features/lists/htmlConverter.js.map +1 -1
  278. package/dist/features/lists/orderedList/client/index.d.ts +1 -4
  279. package/dist/features/lists/orderedList/client/index.d.ts.map +1 -1
  280. package/dist/features/lists/shared/markdown.js.map +1 -1
  281. package/dist/features/lists/unorderedList/client/index.d.ts +1 -4
  282. package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -1
  283. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -1
  284. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +1 -0
  285. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  286. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -4
  287. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  288. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
  289. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  290. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  291. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  292. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  293. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  294. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  295. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  296. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  297. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  298. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  299. package/dist/features/migrations/slateToLexical/converter/index.js +1 -0
  300. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  301. package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -4
  302. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  303. package/dist/features/migrations/slateToLexical/feature.client.js +1 -3
  304. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  305. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
  306. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  307. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  308. package/dist/features/paragraph/client/index.d.ts +1 -4
  309. package/dist/features/paragraph/client/index.d.ts.map +1 -1
  310. package/dist/features/paragraph/server/index.d.ts +1 -1
  311. package/dist/features/paragraph/server/index.d.ts.map +1 -1
  312. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  313. package/dist/features/relationship/client/components/RelationshipComponent.js +34 -24
  314. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  315. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  316. package/dist/features/relationship/client/drawer/index.js +27 -26
  317. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  318. package/dist/features/relationship/client/index.d.ts +2 -17
  319. package/dist/features/relationship/client/index.d.ts.map +1 -1
  320. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  321. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  322. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  323. package/dist/features/relationship/client/plugins/index.js +1 -1
  324. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  325. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +1 -1
  326. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
  327. package/dist/features/relationship/server/index.d.ts +1 -1
  328. package/dist/features/relationship/server/index.d.ts.map +1 -1
  329. package/dist/features/relationship/server/index.js +50 -40
  330. package/dist/features/relationship/server/index.js.map +1 -1
  331. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +2 -2
  332. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  333. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  334. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  335. package/dist/features/toolbars/fixed/client/Toolbar/index.js +93 -66
  336. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  337. package/dist/features/toolbars/fixed/client/index.d.ts +1 -4
  338. package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -1
  339. package/dist/features/toolbars/inline/client/Toolbar/index.js +135 -97
  340. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  341. package/dist/features/toolbars/inline/client/index.d.ts +1 -4
  342. package/dist/features/toolbars/inline/client/index.d.ts.map +1 -1
  343. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  344. package/dist/features/toolbars/shared/ToolbarButton/index.js +5 -2
  345. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  346. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +5 -4
  347. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  348. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +24 -10
  349. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  350. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +4 -5
  351. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  352. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +127 -127
  353. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  354. package/dist/features/toolbars/types.d.ts +23 -11
  355. package/dist/features/toolbars/types.d.ts.map +1 -1
  356. package/dist/features/toolbars/types.js.map +1 -1
  357. package/dist/features/typesClient.d.ts +22 -30
  358. package/dist/features/typesClient.d.ts.map +1 -1
  359. package/dist/features/typesClient.js.map +1 -1
  360. package/dist/features/typesServer.d.ts +23 -28
  361. package/dist/features/typesServer.d.ts.map +1 -1
  362. package/dist/features/typesServer.js.map +1 -1
  363. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  364. package/dist/features/upload/client/component/index.js +66 -58
  365. package/dist/features/upload/client/component/index.js.map +1 -1
  366. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  367. package/dist/features/upload/client/drawer/index.js +34 -32
  368. package/dist/features/upload/client/drawer/index.js.map +1 -1
  369. package/dist/features/upload/client/feature.client.d.ts +1 -4
  370. package/dist/features/upload/client/feature.client.d.ts.map +1 -1
  371. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  372. package/dist/features/upload/client/nodes/UploadNode.js +1 -1
  373. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  374. package/dist/features/upload/client/plugin/index.js +1 -1
  375. package/dist/features/upload/client/plugin/index.js.map +1 -1
  376. package/dist/features/upload/server/feature.server.d.ts.map +1 -1
  377. package/dist/features/upload/server/feature.server.js +17 -8
  378. package/dist/features/upload/server/feature.server.js.map +1 -1
  379. package/dist/features/upload/server/validate.d.ts.map +1 -1
  380. package/dist/features/upload/server/validate.js +7 -4
  381. package/dist/features/upload/server/validate.js.map +1 -1
  382. package/dist/field/Field.d.ts.map +1 -1
  383. package/dist/field/Field.js +39 -65
  384. package/dist/field/Field.js.map +1 -1
  385. package/dist/field/bundled.css +1 -1
  386. package/dist/field/index.d.ts.map +1 -1
  387. package/dist/field/index.js +74 -74
  388. package/dist/field/index.js.map +1 -1
  389. package/dist/field/rscEntry.d.ts +9 -0
  390. package/dist/field/rscEntry.d.ts.map +1 -0
  391. package/dist/field/rscEntry.js +56 -0
  392. package/dist/field/rscEntry.js.map +1 -0
  393. package/dist/index.d.ts +8 -4
  394. package/dist/index.d.ts.map +1 -1
  395. package/dist/index.js +101 -105
  396. package/dist/index.js.map +1 -1
  397. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  398. package/dist/lexical/EditorPlugin.js +2 -1
  399. package/dist/lexical/EditorPlugin.js.map +1 -1
  400. package/dist/lexical/LexicalEditor.d.ts +1 -1
  401. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  402. package/dist/lexical/LexicalEditor.js +10 -10
  403. package/dist/lexical/LexicalEditor.js.map +1 -1
  404. package/dist/lexical/LexicalProvider.d.ts +2 -2
  405. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  406. package/dist/lexical/LexicalProvider.js +18 -25
  407. package/dist/lexical/LexicalProvider.js.map +1 -1
  408. package/dist/lexical/config/client/EditorConfigProvider.d.ts +6 -5
  409. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  410. package/dist/lexical/config/client/EditorConfigProvider.js +14 -13
  411. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  412. package/dist/lexical/config/client/loader.d.ts +5 -2
  413. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  414. package/dist/lexical/config/client/loader.js +12 -18
  415. package/dist/lexical/config/client/loader.js.map +1 -1
  416. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  417. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  418. package/dist/lexical/config/client/sanitize.js +19 -18
  419. package/dist/lexical/config/client/sanitize.js.map +1 -1
  420. package/dist/lexical/config/server/loader.d.ts +2 -1
  421. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  422. package/dist/lexical/config/server/loader.js +2 -0
  423. package/dist/lexical/config/server/loader.js.map +1 -1
  424. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  425. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  426. package/dist/lexical/config/server/sanitize.js +27 -13
  427. package/dist/lexical/config/server/sanitize.js.map +1 -1
  428. package/dist/lexical/config/types.d.ts +2 -2
  429. package/dist/lexical/config/types.d.ts.map +1 -1
  430. package/dist/lexical/config/types.js.map +1 -1
  431. package/dist/lexical/nodes/index.d.ts +4 -0
  432. package/dist/lexical/nodes/index.d.ts.map +1 -1
  433. package/dist/lexical/nodes/index.js +8 -1
  434. package/dist/lexical/nodes/index.js.map +1 -1
  435. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +6 -6
  436. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  437. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +19 -8
  438. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  439. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
  440. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  441. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +7 -7
  442. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  443. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +3 -2
  444. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  445. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  446. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  447. package/dist/lexical/plugins/SlashMenu/index.js +24 -30
  448. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  449. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  450. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +11 -9
  451. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  452. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts +1 -1
  453. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  454. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +1 -1
  455. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  456. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +1 -1
  457. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  458. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  459. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  460. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  461. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  462. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +9 -7
  463. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  464. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
  465. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +3 -1
  466. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  467. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
  468. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +3 -4
  469. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  470. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  471. package/dist/lexical/theme/EditorTheme.js +1 -2
  472. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  473. package/dist/lexical/utils/nodeFormat.d.ts +2 -2
  474. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  475. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  476. package/dist/lexical/utils/rect.d.ts +4 -4
  477. package/dist/lexical/utils/rect.d.ts.map +1 -1
  478. package/dist/lexical/utils/rect.js.map +1 -1
  479. package/dist/lexical/utils/setFloatingElemPosition.d.ts +1 -1
  480. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  481. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  482. package/dist/lexical/utils/url.d.ts +5 -0
  483. package/dist/lexical/utils/url.d.ts.map +1 -1
  484. package/dist/lexical/utils/url.js +25 -5
  485. package/dist/lexical/utils/url.js.map +1 -1
  486. package/dist/lexical-proxy/@lexical-headless.d.ts +2 -0
  487. package/dist/lexical-proxy/@lexical-headless.d.ts.map +1 -0
  488. package/dist/lexical-proxy/@lexical-headless.js +2 -0
  489. package/dist/lexical-proxy/@lexical-headless.js.map +1 -0
  490. package/dist/lexical-proxy/@lexical-link.d.ts +2 -0
  491. package/dist/lexical-proxy/@lexical-link.d.ts.map +1 -0
  492. package/dist/lexical-proxy/@lexical-link.js +2 -0
  493. package/dist/lexical-proxy/@lexical-link.js.map +1 -0
  494. package/dist/lexical-proxy/@lexical-list.d.ts +2 -0
  495. package/dist/lexical-proxy/@lexical-list.d.ts.map +1 -0
  496. package/dist/lexical-proxy/@lexical-list.js +2 -0
  497. package/dist/lexical-proxy/@lexical-list.js.map +1 -0
  498. package/dist/lexical-proxy/@lexical-mark.d.ts +2 -0
  499. package/dist/lexical-proxy/@lexical-mark.d.ts.map +1 -0
  500. package/dist/lexical-proxy/@lexical-mark.js +2 -0
  501. package/dist/lexical-proxy/@lexical-mark.js.map +1 -0
  502. package/dist/lexical-proxy/@lexical-markdown.d.ts +2 -0
  503. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -0
  504. package/dist/lexical-proxy/@lexical-markdown.js +2 -0
  505. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -0
  506. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts +2 -0
  507. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts.map +1 -0
  508. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js +2 -0
  509. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js.map +1 -0
  510. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts +2 -0
  511. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts.map +1 -0
  512. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js +2 -0
  513. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js.map +1 -0
  514. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts +2 -0
  515. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts.map +1 -0
  516. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js +2 -0
  517. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js.map +1 -0
  518. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts +2 -0
  519. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts.map +1 -0
  520. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js +2 -0
  521. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js.map +1 -0
  522. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts +2 -0
  523. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts.map +1 -0
  524. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js +2 -0
  525. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js.map +1 -0
  526. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts +2 -0
  527. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts.map +1 -0
  528. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js +2 -0
  529. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js.map +1 -0
  530. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts +2 -0
  531. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts.map +1 -0
  532. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js +2 -0
  533. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js.map +1 -0
  534. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts +2 -0
  535. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts.map +1 -0
  536. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js +2 -0
  537. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js.map +1 -0
  538. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts +2 -0
  539. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts.map +1 -0
  540. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js +2 -0
  541. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js.map +1 -0
  542. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts +2 -0
  543. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts.map +1 -0
  544. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js +2 -0
  545. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js.map +1 -0
  546. package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts +2 -0
  547. package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts.map +1 -0
  548. package/dist/lexical-proxy/@lexical-react/LexicalComposer.js +2 -0
  549. package/dist/lexical-proxy/@lexical-react/LexicalComposer.js.map +1 -0
  550. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts +2 -0
  551. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts.map +1 -0
  552. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js +2 -0
  553. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js.map +1 -0
  554. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts +2 -0
  555. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts.map +1 -0
  556. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js +2 -0
  557. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js.map +1 -0
  558. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +2 -0
  559. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +1 -0
  560. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +2 -0
  561. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +1 -0
  562. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts +2 -0
  563. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts.map +1 -0
  564. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js +2 -0
  565. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js.map +1 -0
  566. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts +2 -0
  567. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts.map +1 -0
  568. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js +2 -0
  569. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js.map +1 -0
  570. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts +2 -0
  571. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts.map +1 -0
  572. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js +2 -0
  573. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js.map +1 -0
  574. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts +2 -0
  575. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts.map +1 -0
  576. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js +2 -0
  577. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js.map +1 -0
  578. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts +2 -0
  579. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts.map +1 -0
  580. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js +2 -0
  581. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js.map +1 -0
  582. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts +2 -0
  583. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts.map +1 -0
  584. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js +2 -0
  585. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js.map +1 -0
  586. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts +2 -0
  587. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts.map +1 -0
  588. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js +2 -0
  589. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js.map +1 -0
  590. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts +2 -0
  591. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts.map +1 -0
  592. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js +2 -0
  593. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js.map +1 -0
  594. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts +2 -0
  595. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts.map +1 -0
  596. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js +2 -0
  597. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js.map +1 -0
  598. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts +2 -0
  599. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts.map +1 -0
  600. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js +2 -0
  601. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js.map +1 -0
  602. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts +2 -0
  603. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts.map +1 -0
  604. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js +2 -0
  605. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js.map +1 -0
  606. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts +2 -0
  607. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts.map +1 -0
  608. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js +2 -0
  609. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js.map +1 -0
  610. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts +2 -0
  611. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts.map +1 -0
  612. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js +2 -0
  613. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js.map +1 -0
  614. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts +2 -0
  615. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts.map +1 -0
  616. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js +2 -0
  617. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js.map +1 -0
  618. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts +2 -0
  619. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts.map +1 -0
  620. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js +2 -0
  621. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js.map +1 -0
  622. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts +2 -0
  623. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts.map +1 -0
  624. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js +2 -0
  625. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js.map +1 -0
  626. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts +2 -0
  627. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts.map +1 -0
  628. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js +2 -0
  629. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js.map +1 -0
  630. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts +2 -0
  631. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts.map +1 -0
  632. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js +2 -0
  633. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js.map +1 -0
  634. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.d.ts +2 -0
  635. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.d.ts.map +1 -0
  636. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.js +2 -0
  637. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.js.map +1 -0
  638. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts +2 -0
  639. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts.map +1 -0
  640. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js +2 -0
  641. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js.map +1 -0
  642. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts +2 -0
  643. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts.map +1 -0
  644. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js +2 -0
  645. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js.map +1 -0
  646. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts +2 -0
  647. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts.map +1 -0
  648. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js +2 -0
  649. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js.map +1 -0
  650. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts +2 -0
  651. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts.map +1 -0
  652. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js +2 -0
  653. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js.map +1 -0
  654. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts +2 -0
  655. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts.map +1 -0
  656. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js +2 -0
  657. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js.map +1 -0
  658. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts +2 -0
  659. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts.map +1 -0
  660. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js +2 -0
  661. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js.map +1 -0
  662. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts +2 -0
  663. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts.map +1 -0
  664. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js +2 -0
  665. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js.map +1 -0
  666. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts +2 -0
  667. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts.map +1 -0
  668. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js +2 -0
  669. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js.map +1 -0
  670. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts +2 -0
  671. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts.map +1 -0
  672. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js +2 -0
  673. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js.map +1 -0
  674. package/dist/lexical-proxy/@lexical-rich-text.d.ts +2 -0
  675. package/dist/lexical-proxy/@lexical-rich-text.d.ts.map +1 -0
  676. package/dist/lexical-proxy/@lexical-rich-text.js +2 -0
  677. package/dist/lexical-proxy/@lexical-rich-text.js.map +1 -0
  678. package/dist/lexical-proxy/@lexical-selection.d.ts +2 -0
  679. package/dist/lexical-proxy/@lexical-selection.d.ts.map +1 -0
  680. package/dist/lexical-proxy/@lexical-selection.js +2 -0
  681. package/dist/lexical-proxy/@lexical-selection.js.map +1 -0
  682. package/dist/lexical-proxy/@lexical-utils.d.ts +2 -0
  683. package/dist/lexical-proxy/@lexical-utils.d.ts.map +1 -0
  684. package/dist/lexical-proxy/@lexical-utils.js +2 -0
  685. package/dist/lexical-proxy/@lexical-utils.js.map +1 -0
  686. package/dist/lexical-proxy/lexical.d.ts +2 -0
  687. package/dist/lexical-proxy/lexical.d.ts.map +1 -0
  688. package/dist/lexical-proxy/lexical.js +2 -0
  689. package/dist/lexical-proxy/lexical.js.map +1 -0
  690. package/dist/populateGraphQL/populate.d.ts +3 -2
  691. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  692. package/dist/populateGraphQL/populate.js +3 -1
  693. package/dist/populateGraphQL/populate.js.map +1 -1
  694. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  695. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  696. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +5 -4
  697. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  698. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  699. package/dist/types.d.ts +23 -8
  700. package/dist/types.d.ts.map +1 -1
  701. package/dist/types.js.map +1 -1
  702. package/dist/utilities/buildInitialState.d.ts +27 -0
  703. package/dist/utilities/buildInitialState.d.ts.map +1 -0
  704. package/dist/utilities/buildInitialState.js +53 -0
  705. package/dist/utilities/buildInitialState.js.map +1 -0
  706. package/dist/utilities/createClientFeature.d.ts +8 -5
  707. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  708. package/dist/utilities/createClientFeature.js +7 -4
  709. package/dist/utilities/createClientFeature.js.map +1 -1
  710. package/dist/utilities/createServerFeature.d.ts +1 -0
  711. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  712. package/dist/utilities/createServerFeature.js +2 -0
  713. package/dist/utilities/createServerFeature.js.map +1 -1
  714. package/dist/utilities/fieldsDrawer/Drawer.d.ts +1 -0
  715. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  716. package/dist/utilities/fieldsDrawer/Drawer.js +68 -27
  717. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  718. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  719. package/dist/utilities/fieldsDrawer/DrawerContent.js +102 -138
  720. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  721. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +13 -0
  722. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -0
  723. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +129 -0
  724. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -0
  725. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts +10 -0
  726. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -0
  727. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +136 -0
  728. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -0
  729. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts +16 -0
  730. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -0
  731. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +144 -0
  732. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -0
  733. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  734. package/dist/utilities/generateImportMap.js +2 -3
  735. package/dist/utilities/generateImportMap.js.map +1 -1
  736. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  737. package/dist/utilities/generateSchemaMap.js +13 -10
  738. package/dist/utilities/generateSchemaMap.js.map +1 -1
  739. package/dist/utilities/initLexicalFeatures.d.ts +18 -0
  740. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -0
  741. package/dist/utilities/initLexicalFeatures.js +96 -0
  742. package/dist/utilities/initLexicalFeatures.js.map +1 -0
  743. package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts +52 -0
  744. package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts.map +1 -0
  745. package/dist/utilities/jsx/collectTopLevelJSXInLines.js +79 -0
  746. package/dist/utilities/jsx/collectTopLevelJSXInLines.js.map +1 -0
  747. package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts +12 -0
  748. package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts.map +1 -0
  749. package/dist/utilities/jsx/extractPropsFromJSXPropsString.js +125 -0
  750. package/dist/utilities/jsx/extractPropsFromJSXPropsString.js.map +1 -0
  751. package/dist/utilities/jsx/jsx.d.ts +26 -0
  752. package/dist/utilities/jsx/jsx.d.ts.map +1 -0
  753. package/dist/utilities/jsx/jsx.js +105 -0
  754. package/dist/utilities/jsx/jsx.js.map +1 -0
  755. package/dist/utilities/jsx/jsx.spec.d.ts +2 -0
  756. package/dist/utilities/jsx/jsx.spec.d.ts.map +1 -0
  757. package/dist/utilities/jsx/jsx.spec.js +142 -0
  758. package/dist/utilities/jsx/jsx.spec.js.map +1 -0
  759. package/dist/utilities/jsx/lexicalMarkdownCopy.d.ts +11 -0
  760. package/dist/utilities/jsx/lexicalMarkdownCopy.d.ts.map +1 -0
  761. package/dist/utilities/jsx/lexicalMarkdownCopy.js +61 -0
  762. package/dist/utilities/jsx/lexicalMarkdownCopy.js.map +1 -0
  763. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +1 -1
  764. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -1
  765. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +1 -1
  766. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  767. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +1 -1
  768. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  769. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +5 -1
  770. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  771. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  772. package/dist/utilities/useLexicalFeature.js +12 -4
  773. package/dist/utilities/useLexicalFeature.js.map +1 -1
  774. package/dist/validate/index.d.ts.map +1 -1
  775. package/dist/validate/index.js +2 -2
  776. package/dist/validate/index.js.map +1 -1
  777. package/dist/validate/validateNodes.d.ts +2 -2
  778. package/dist/validate/validateNodes.d.ts.map +1 -1
  779. package/dist/validate/validateNodes.js +4 -4
  780. package/dist/validate/validateNodes.js.map +1 -1
  781. package/package.json +332 -46
  782. package/dist/cell/index.d.ts +0 -9
  783. package/dist/cell/index.d.ts.map +0 -1
  784. package/dist/cell/index.js +0 -135
  785. package/dist/cell/index.js.map +0 -1
  786. package/dist/exports/client/Field-SUWHJ4HF.js +0 -2
  787. package/dist/exports/client/Field-SUWHJ4HF.js.map +0 -7
  788. package/dist/exports/client/RelationshipComponent-EZORSGUZ.js +0 -2
  789. package/dist/exports/client/RelationshipComponent-EZORSGUZ.js.map +0 -7
  790. package/dist/exports/client/chunk-OLSILJA6.js +0 -2
  791. package/dist/exports/client/chunk-OLSILJA6.js.map +0 -7
  792. package/dist/exports/client/chunk-TD7O23AB.js +0 -2
  793. package/dist/exports/client/chunk-TD7O23AB.js.map +0 -7
  794. package/dist/exports/client/chunk-YL453UOS.js +0 -2
  795. package/dist/exports/client/chunk-YL453UOS.js.map +0 -7
  796. package/dist/exports/client/chunk-YSI2QILQ.js +0 -2
  797. package/dist/exports/client/chunk-YSI2QILQ.js.map +0 -7
  798. package/dist/exports/client/component-2YLEVOFH.js +0 -2
  799. package/dist/exports/client/component-2YLEVOFH.js.map +0 -7
  800. package/dist/exports/client/component-7RAP75FW.js +0 -2
  801. package/dist/exports/client/component-7RAP75FW.js.map +0 -7
  802. package/dist/exports/client/component-LLWMZU6K.js +0 -2
  803. package/dist/exports/client/component-LLWMZU6K.js.map +0 -7
  804. package/dist/exports/client/componentInline-YSHGRL2J.js +0 -2
  805. package/dist/exports/client/componentInline-YSHGRL2J.js.map +0 -7
  806. package/dist/features/blocks/client/component/FormSavePlugin.d.ts +0 -11
  807. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +0 -1
  808. package/dist/features/blocks/client/component/FormSavePlugin.js +0 -53
  809. package/dist/features/blocks/client/component/FormSavePlugin.js.map +0 -1
  810. package/dist/features/createClientComponent.d.ts +0 -7
  811. package/dist/features/createClientComponent.d.ts.map +0 -1
  812. package/dist/features/createClientComponent.js +0 -13
  813. package/dist/features/createClientComponent.js.map +0 -1
  814. package/dist/features/createFeaturePropComponent.d.ts +0 -6
  815. package/dist/features/createFeaturePropComponent.d.ts.map +0 -1
  816. package/dist/features/createFeaturePropComponent.js +0 -19
  817. package/dist/features/createFeaturePropComponent.js.map +0 -1
  818. package/dist/utilities/generateComponentMap.d.ts +0 -6
  819. package/dist/utilities/generateComponentMap.d.ts.map +0 -1
  820. package/dist/utilities/generateComponentMap.js +0 -99
  821. package/dist/utilities/generateComponentMap.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["fileURLToPath","path","afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","deepCopyObject","deepCopyObjectSimple","getDependencies","withNullableJSONSchemaType","i18n","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","populateLexicalPopulationPromises","getGenerateImportMap","getGenerateSchemaMap","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","filename","import","meta","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"],"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"],"mappings":"AAOA,SAASA,aAAa,QAAQ;AAC9B,OAAOC,IAAA,MAAU;AACjB,SACEC,yBAAyB,EACzBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,0BAA0B,QACrB;AAWP,SAASC,IAAI,QAAQ;AACrB,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SACEC,0BAA0B,EAC1BC,sBAAsB,QACjB;AACP,SAASC,iCAAiC,QAAQ;AAClD,SAASC,oBAAoB,QAAQ;AACrC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,eAAe,QAAQ;AAChC,SAASC,mBAAmB,QAAQ;AAEpC,IAAIC,kCAAA,GAAkE;AAEtE,MAAMC,QAAA,GAAWtB,aAAA,CAAcuB,MAAA,CAAAC,IAAA,CAAYC,GAAG;AAC9C,MAAMC,OAAA,GAAUzB,IAAA,CAAKyB,OAAO,CAACJ,QAAA;AAE7B,OAAO,SAASK,cAAcC,KAA0B;EACtD,OAAO,OAAO;IAAEC,MAAM;IAAEC;EAAM,CAAE;IAC9B,IACEC,OAAA,CAAQC,GAAG,CAACC,QAAQ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,kBAAkB,EAClBC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ;AACP,SAASC,WAAW,EAAEC,WAAW,QAAQ;AAIzC,SAASC,oBAAoB,QAAQ;AAGrC,SAASC,mBAAmB,QAAQ;AAGpC,SAASC,kBAAkB,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["afterChangeTraverseFields","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","checkDependencies","deepCopyObject","deepCopyObjectSimple","withNullableJSONSchemaType","i18n","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","populateLexicalPopulationPromises","getGenerateImportMap","getGenerateSchemaMap","recurseNodeTree","richTextValidateHOC","defaultSanitizedServerEditorConfig","checkedDependencies","lexicalEditor","props","config","isRoot","parentIsLocalized","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","dependencyGroups","name","dependencies","targetVersion","features","resolvedFeatureMap","finalSanitizedEditorConfig","lexical","rootEditor","editor","rootEditorFeatures","defaultFeatures","rootFeatures","unSanitizedEditorConfig","featureI18n","lang","general","CellComponent","path","serverProps","admin","sanitizedEditorConfig","editorConfig","FieldComponent","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","length","hook","nodeHooks","getSubFields","nodeIDMap","originalNodeIDMap","internal","richText","join","Object","keys","nodes","root","children","id","node","entries","afterChangeHooks","afterChangeHooksForNode","get","type","console","warn","originalNode","parentRichTextFieldPath","parentRichTextFieldSchemaPath","subFieldFn","subFieldDataFn","getSubFieldsData","subFields","data","originalData","doc","fields","previousDoc","previousSiblingDoc","siblingData","afterRead","fallbackLocale","locale","populate","triggerAccessControl","triggerHooks","flattenedNodes","afterReadHooks","afterReadHooksForNode","populateArg","beforeChange","errors","mergeLocaleActions","siblingDocWithLocales","skipValidation","originalNodeWithLocalesIDMap","beforeChangeHooks","beforeChangeHooksForNode","originalNodeWithLocales","originalDataWithLocales","docWithLocales","newOriginalNodeIDMap","previousValue","beforeValidate","beforeValidateHooks","beforeValidateHooksForNode","outputSchema","collectionIDFieldTypes","interfaceNameDefinitions","isRequired","properties","additionalProperties","items","version","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","getEnabledNodesFromServerNodes","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NodeFormat","NON_BREAKING_SPACE","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","sanitizeUrl","validateUrl","defaultRichTextValue","createServerFeature","extractPropsFromJSXPropsString","extractFrontmatter","frontmatterToObject","objectToFrontmatter","propsToJSXString","$convertFromMarkdownString","upgradeLexicalData"],"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nimport {\n afterChangeTraverseFields,\n afterReadTraverseFields,\n beforeChangeTraverseFields,\n beforeValidateTraverseFields,\n checkDependencies,\n deepCopyObject,\n deepCopyObjectSimple,\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: null | SanitizedServerEditorConfig = null\nlet checkedDependencies = false\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot, parentIsLocalized }) => {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n await checkDependencies({\n dependencyGroups: [\n {\n name: 'lexical',\n dependencies: [\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 targetVersion: '0.20.0',\n },\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 parentIsLocalized,\n )\n features = deepCopyObject(defaultEditorFeatures)\n }\n\n finalSanitizedEditorConfig = deepCopyObject(defaultSanitizedServerEditorConfig)\n\n delete finalSanitizedEditorConfig.lexical // We don't want to send the default lexical editor config to the client\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 = props.lexical ?? deepCopyObjectSimple(defaultEditorConfig.lexical)!\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n parentIsLocalized,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: props.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 path: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell',\n serverProps: {\n admin: props?.admin,\n sanitizedEditorConfig: finalSanitizedEditorConfig,\n },\n },\n editorConfig: finalSanitizedEditorConfig,\n features,\n FieldComponent: {\n path: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalField',\n serverProps: {\n admin: props?.admin,\n sanitizedEditorConfig: finalSanitizedEditorConfig,\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 const afterChangeHooksForNode = afterChangeHooks?.get(node.type)\n if (afterChangeHooksForNode) {\n for (const hook of afterChangeHooksForNode) {\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 && subFieldDataFn) {\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 populate,\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 const afterReadHooksForNode = afterReadHooks?.get(node.type)\n if (afterReadHooksForNode) {\n for (const hook of afterReadHooksForNode) {\n node = await hook({\n context,\n currentDepth: currentDepth!,\n depth: depth!,\n draft: draft!,\n fallbackLocale: fallbackLocale!,\n fieldPromises: fieldPromises!,\n findMany: findMany!,\n flattenLocales: flattenLocales!,\n locale: locale!,\n node,\n overrideAccess: overrideAccess!,\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n populateArg: populate,\n populationPromises: populationPromises!,\n req,\n showHiddenFields: showHiddenFields!,\n triggerAccessControl: triggerAccessControl!,\n triggerHooks: 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 && subFieldDataFn) {\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: currentDepth!,\n depth: depth!,\n doc: data,\n draft: draft!,\n fallbackLocale: fallbackLocale!,\n fieldPromises: fieldPromises!,\n fields: subFields,\n findMany: findMany!,\n flattenLocales: flattenLocales!,\n global,\n locale: locale!,\n overrideAccess: overrideAccess!,\n path,\n populate,\n populationPromises: populationPromises!,\n req,\n schemaPath,\n showHiddenFields: 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 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 (field.name && 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 const beforeChangeHooksForNode = beforeChangeHooks?.get(node.type)\n if (beforeChangeHooksForNode) {\n for (const hook of beforeChangeHooksForNode) {\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 errors: errors!,\n mergeLocaleActions: mergeLocaleActions!,\n node,\n operation: operation!,\n originalNode: originalNodeIDMap[id],\n originalNodeWithLocales: originalNodeWithLocalesIDMap[id],\n parentRichTextFieldPath: path,\n parentRichTextFieldSchemaPath: schemaPath,\n req,\n skipValidation: 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 && subFieldDataFn) {\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 errors: errors!,\n fields: subFields,\n global,\n mergeLocaleActions: mergeLocaleActions!,\n operation: 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 *\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 const beforeValidateHooksForNode = beforeValidateHooks?.get(node.type)\n if (beforeValidateHooksForNode) {\n for (const hook of beforeValidateHooksForNode) {\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: 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 && subFieldDataFn) {\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: 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 type {\n BaseClientFeatureProps,\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'\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 { createNode } from './features/typeUtilities.js' // Only useful in feature.server.ts\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, getEnabledNodesFromServerNodes } 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 NodeFormat,\n NON_BREAKING_SPACE,\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 { populate } from './populateGraphQL/populate.js'\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\nexport { createServerFeature } from './utilities/createServerFeature.js'\n\nexport type { FieldsDrawerProps } from './utilities/fieldsDrawer/Drawer.js'\n\nexport { extractPropsFromJSXPropsString } from './utilities/jsx/extractPropsFromJSXPropsString.js'\nexport {\n extractFrontmatter,\n frontmatterToObject,\n objectToFrontmatter,\n propsToJSXString,\n} from './utilities/jsx/jsx.js'\nexport { $convertFromMarkdownString } from './utilities/jsx/lexicalMarkdownCopy.js'\nexport { upgradeLexicalData } from './utilities/upgradeLexicalData/index.js'\n"],"mappings":"AAGA,SACEA,yBAAyB,EACzBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,iBAAiB,EACjBC,cAAc,EACdC,oBAAoB,EACpBC,0BAA0B,QACrB;AAWP,SAASC,IAAI,QAAQ;AACrB,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SACEC,0BAA0B,EAC1BC,sBAAsB,QACjB;AACP,SAASC,iCAAiC,QAAQ;AAClD,SAASC,oBAAoB,QAAQ;AACrC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,eAAe,QAAQ;AAChC,SAASC,mBAAmB,QAAQ;AAEpC,IAAIC,kCAAA,GAAyE;AAC7E,IAAIC,mBAAA,GAAsB;AAE1B,OAAO,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EACnBC,qBAAqB,EACrBgM,0BAA0B,QACrB;AAEP,SAAS/L,YAAY,EAAEgM,6BAA6B,QAAQ;AAC5D,SACE/L,0BAA0B,EAC1BC,sBAAsB,QACjB;AAQP,SAAS+L,eAAe,EAAEC,8BAA8B,QAAQ;AAQhE,SACEC,qBAAqB,EACrBC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,EACtBC,iBAAiB,EACjBC,SAAS,EACTC,UAAU,EACVC,kBAAkB,EAClBC,SAAS,EACTC,iBAAiB,EACjBC,mBAAmB,EACnBC,iBAAiB,QACZ;AACP,SAASC,WAAW,EAAEC,WAAW,QAAQ;AAIzC,SAASC,oBAAoB,QAAQ;AAErC,SAASnG,QAAQ,QAAQ;AAEzB,SAASoG,mBAAmB,QAAQ;AAIpC,SAASC,8BAA8B,QAAQ;AAC/C,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,QACX;AACP,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,kBAAkB,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"EditorPlugin.d.ts","sourceRoot":"","sources":["../../src/lexical/EditorPlugin.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,eAAe,CAAA;CACxB,CAQA,CAAA"}
1
+ {"version":3,"file":"EditorPlugin.d.ts","sourceRoot":"","sources":["../../src/lexical/EditorPlugin.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,eAAe,CAAA;CACxB,CASA,CAAA"}
@@ -7,12 +7,13 @@ export const EditorPlugin = ({
7
7
  clientProps,
8
8
  plugin
9
9
  }) => {
10
- if (plugin.position === 'floatingAnchorElem') {
10
+ if (plugin.position === 'floatingAnchorElem' && anchorElem) {
11
11
  return plugin.Component && /*#__PURE__*/_jsx(plugin.Component, {
12
12
  anchorElem: anchorElem,
13
13
  clientProps: clientProps
14
14
  });
15
15
  }
16
+ // @ts-expect-error - ts is not able to infer that plugin.Component is of type PluginComponent
16
17
  return plugin.Component && /*#__PURE__*/_jsx(plugin.Component, {
17
18
  clientProps: clientProps
18
19
  });
@@ -1 +1 @@
1
- {"version":3,"file":"EditorPlugin.js","names":["React","EditorPlugin","anchorElem","clientProps","plugin","position","Component","_jsx"],"sources":["../../src/lexical/EditorPlugin.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport type { SanitizedPlugin } from '../features/typesClient.js'\n\nexport const EditorPlugin: React.FC<{\n anchorElem?: HTMLDivElement\n clientProps: unknown\n plugin: SanitizedPlugin\n}> = ({ anchorElem, clientProps, plugin }) => {\n if (plugin.position === 'floatingAnchorElem') {\n return (\n plugin.Component && <plugin.Component anchorElem={anchorElem} clientProps={clientProps} />\n )\n }\n\n return plugin.Component && <plugin.Component clientProps={clientProps} />\n}\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAIlB,OAAO,MAAMC,YAAA,GAIRA,CAAC;EAAEC,UAAU;EAAEC,WAAW;EAAEC;AAAM,CAAE;EACvC,IAAIA,MAAA,CAAOC,QAAQ,KAAK,sBAAsB;IAC5C,OACED,MAAA,CAAOE,SAAS,iBAAIC,IAAA,CAACH,MAAA,CAAOE,SAAS;MAACJ,UAAA,EAAYA,UAAA;MAAYC,WAAA,EAAaA;;EAE/E;EAEA,OAAOC,MAAA,CAAOE,SAAS,iBAAIC,IAAA,CAACH,MAAA,CAAOE,SAAS;IAACH,WAAA,EAAaA;;AAC5D","ignoreList":[]}
1
+ {"version":3,"file":"EditorPlugin.js","names":["React","EditorPlugin","anchorElem","clientProps","plugin","position","Component","_jsx"],"sources":["../../src/lexical/EditorPlugin.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport type { SanitizedPlugin } from '../features/typesClient.js'\n\nexport const EditorPlugin: React.FC<{\n anchorElem?: HTMLDivElement\n clientProps: unknown\n plugin: SanitizedPlugin\n}> = ({ anchorElem, clientProps, plugin }) => {\n if (plugin.position === 'floatingAnchorElem' && anchorElem) {\n return (\n plugin.Component && <plugin.Component anchorElem={anchorElem} clientProps={clientProps} />\n )\n }\n\n // @ts-expect-error - ts is not able to infer that plugin.Component is of type PluginComponent\n return plugin.Component && <plugin.Component clientProps={clientProps} />\n}\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAIlB,OAAO,MAAMC,YAAA,GAIRA,CAAC;EAAEC,UAAU;EAAEC,WAAW;EAAEC;AAAM,CAAE;EACvC,IAAIA,MAAA,CAAOC,QAAQ,KAAK,wBAAwBH,UAAA,EAAY;IAC1D,OACEE,MAAA,CAAOE,SAAS,iBAAIC,IAAA,CAACH,MAAA,CAAOE,SAAS;MAACJ,UAAA,EAAYA,UAAA;MAAYC,WAAA,EAAaA;;EAE/E;EAEA;EACA,OAAOC,MAAA,CAAOE,SAAS,iBAAIC,IAAA,CAACH,MAAA,CAAOE,SAAS;IAACH,WAAA,EAAaA;;AAC5D","ignoreList":[]}
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
  import type { LexicalProviderProps } from './LexicalProvider.js';
3
3
  import './LexicalEditor.scss';
4
4
  export declare const LexicalEditor: React.FC<{
5
- editorContainerRef: React.RefObject<HTMLDivElement>;
5
+ editorContainerRef: React.RefObject<HTMLDivElement | null>;
6
6
  } & Pick<LexicalProviderProps, 'editorConfig' | 'onChange'>>;
7
7
  //# sourceMappingURL=LexicalEditor.d.ts.map
@@ -1 +1 @@
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"}
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;AAIhE,OAAO,sBAAsB,CAAA;AAO7B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC;IACE,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;CAC3D,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,CA4K5D,CAAA"}
@@ -11,12 +11,12 @@ import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin
11
11
  import { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical';
12
12
  import * as React from 'react';
13
13
  import { useEffect, useState } from 'react';
14
- import { EditorPlugin } from './EditorPlugin.js';
15
14
  import { useEditorConfigContext } from './config/client/EditorConfigProvider.js';
16
- import { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js';
17
- import { SlashMenuPlugin } from './plugins/SlashMenu/index.js';
15
+ import { EditorPlugin } from './EditorPlugin.js';
18
16
  import { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js';
19
17
  import { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js';
18
+ import { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js';
19
+ import { SlashMenuPlugin } from './plugins/SlashMenu/index.js';
20
20
  import { LexicalContentEditable } from './ui/ContentEditable.js';
21
21
  export const LexicalEditor = props => {
22
22
  const $ = _c(22);
@@ -132,7 +132,7 @@ export const LexicalEditor = props => {
132
132
  }), _jsx(AddBlockHandlePlugin, {
133
133
  anchorElem: floatingAnchorElem
134
134
  })]
135
- }), editorConfig.features.plugins.map(plugin_1 => {
135
+ }), editorConfig.features.plugins?.map(plugin_1 => {
136
136
  if (plugin_1.position === "floatingAnchorElem" && !(plugin_1.desktopOnly === true && isSmallWidthViewport)) {
137
137
  return _jsx(EditorPlugin, {
138
138
  anchorElem: floatingAnchorElem,
@@ -155,11 +155,10 @@ export const LexicalEditor = props => {
155
155
  t7 = $[21];
156
156
  }
157
157
  t5 = _jsxs(React.Fragment, {
158
- children: [editorConfig.features.plugins.map(_temp), _jsxs("div", {
158
+ children: [editorConfig.features.plugins?.map(_temp), _jsxs("div", {
159
159
  className: "editor-container",
160
160
  ref: editorContainerRef,
161
- children: [editorConfig.features.plugins.map(_temp2), _jsx(RichTextPlugin, {
162
- ErrorBoundary: LexicalErrorBoundary,
161
+ children: [editorConfig.features.plugins?.map(_temp2), _jsx(RichTextPlugin, {
163
162
  contentEditable: _jsx("div", {
164
163
  className: "editor-scroller",
165
164
  children: _jsx("div", {
@@ -167,14 +166,15 @@ export const LexicalEditor = props => {
167
166
  ref: onRef,
168
167
  children: _jsx(LexicalContentEditable, {})
169
168
  })
170
- })
169
+ }),
170
+ ErrorBoundary: LexicalErrorBoundary
171
171
  }), _jsx(OnChangePlugin, {
172
172
  ignoreSelectionChange: true,
173
173
  onChange: t6
174
174
  }), t7, editor.isEditable() && _jsxs(React.Fragment, {
175
175
  children: [_jsx(HistoryPlugin, {}), editorConfig?.features?.markdownTransformers?.length > 0 && _jsx(MarkdownShortcutPlugin, {})]
176
- }), _jsx(TabIndentationPlugin, {}), editorConfig.features.plugins.map(_temp3), editorConfig.features.plugins.map(_temp4)]
177
- }), editorConfig.features.plugins.map(_temp5)]
176
+ }), _jsx(TabIndentationPlugin, {}), editorConfig.features.plugins?.map(_temp3), editorConfig.features.plugins?.map(_temp4)]
177
+ }), editorConfig.features.plugins?.map(_temp5)]
178
178
  });
179
179
  $[8] = editorConfig.features;
180
180
  $[9] = onChange;
@@ -1 +1 @@
1
- {"version":3,"file":"LexicalEditor.js","names":["c","_c","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","t0","Symbol","for","_floatingAnchorElem","onRef","t1","t2","uuid","console","error","parentEditor","registerChild","handleFocus","focusEditor","handleBlur","blurEditor","unregisterFocus","registerCommand","unregisterBlur","unregisterChild","isSmallWidthViewport","setIsSmallWidthViewport","t3","t4","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","t5","features","t6","editorState","editor_0","tags","has","size","t7","_jsxs","Fragment","children","isEditable","_jsx","anchorElem","plugins","map","plugin_1","plugin","position","desktopOnly","clientProps","key","_temp","className","ref","_temp2","ErrorBoundary","contentEditable","ignoreSelectionChange","markdownTransformers","length","_temp3","_temp4","_temp5","plugin_0","plugin_2","plugin_3","plugin_4"],"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"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,SAAS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CA;IAAA,GAApBA,QAAA,CAAAI,GAAU;EAAA;AAAA;AA7JxE,SAAAY,OAAAI,QAAA;EAAA,IAmKQpB,QAAA,CAAAC,QAAA,KAAoB;IAAA,OACfN,IAAA,CAAA7D,YAAA;MAAAqE,WAAA,EAA2BH,QAAA,CAAAG,WAAA;MAAAH,MAAA,EAA6CA;IAAA,GAApBA,QAAA,CAAAI,GAAU;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"LexicalEditor.js","names":["c","_c","useLexicalComposerContext","LexicalErrorBoundary","HistoryPlugin","OnChangePlugin","RichTextPlugin","TabIndentationPlugin","BLUR_COMMAND","COMMAND_PRIORITY_LOW","FOCUS_COMMAND","React","useEffect","useState","useEditorConfigContext","EditorPlugin","AddBlockHandlePlugin","DraggableBlockPlugin","MarkdownShortcutPlugin","SlashMenuPlugin","LexicalContentEditable","LexicalEditor","props","$","editorConfig","editorContainerRef","onChange","editorConfigContext","editor","floatingAnchorElem","setFloatingAnchorElem","t0","Symbol","for","_floatingAnchorElem","onRef","t1","t2","uuid","console","error","parentEditor","registerChild","handleFocus","focusEditor","handleBlur","blurEditor","unregisterFocus","registerCommand","unregisterBlur","unregisterChild","isSmallWidthViewport","setIsSmallWidthViewport","t3","t4","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","t5","features","t6","editorState","editor_0","tags","has","size","t7","_jsxs","Fragment","children","isEditable","_jsx","anchorElem","plugins","map","plugin_1","plugin","position","desktopOnly","clientProps","key","_temp","className","ref","_temp2","contentEditable","ignoreSelectionChange","markdownTransformers","length","_temp3","_temp4","_temp5","plugin_0","plugin_2","plugin_3","plugin_4"],"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 { useEditorConfigContext } from './config/client/EditorConfigProvider.js'\nimport { EditorPlugin } from './EditorPlugin.js'\nimport './LexicalEditor.scss'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<\n {\n editorContainerRef: React.RefObject<HTMLDivElement | null>\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 contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable />\n </div>\n </div>\n }\n ErrorBoundary={LexicalErrorBoundary}\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) {\n onChange(editorState, editor, tags)\n }\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"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ;AACrC,SAASC,YAAY,EAAEC,oBAAoB,EAAEC,aAAa,QAAQ;AAClE,YAAYC,KAAA,MAAW;AACvB,SAASC,SAAS,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AAA;MAAAoE,WAAA,EAA2BH,QAAA,CAAAG,WAAA;MAAAH,MAAA,EAA6CA;IAAA,GAApBA,QAAA,CAAAI,GAAU;EAAA;AAAA","ignoreList":[]}
@@ -3,10 +3,10 @@ import * as React from 'react';
3
3
  import type { LexicalRichTextFieldProps } from '../types.js';
4
4
  import type { SanitizedClientEditorConfig } from './config/types.js';
5
5
  export type LexicalProviderProps = {
6
+ composerKey: string;
6
7
  editorConfig: SanitizedClientEditorConfig;
7
- field: LexicalRichTextFieldProps['field'];
8
+ fieldProps: LexicalRichTextFieldProps;
8
9
  onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void;
9
- path: string;
10
10
  readOnly: boolean;
11
11
  value: SerializedEditorState;
12
12
  };
@@ -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;AAGhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AASpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,2BAA2B,CAAA;IACzC,KAAK,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAA;IACzC,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,qBAAqB,CAAA;CAC7B,CAAA;AAiBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwE1D,CAAA"}
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;AAIhF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AASpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,2BAA2B,CAAA;IACzC,UAAU,EAAE,yBAAyB,CAAA;IACrC,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IACtF,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,qBAAqB,CAAA;CAC7B,CAAA;AAiBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAkE1D,CAAA"}
@@ -4,8 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { LexicalComposer } from '@lexical/react/LexicalComposer.js';
5
5
  import * as React from 'react';
6
6
  import { useMemo } from 'react';
7
- import { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js';
8
7
  import { EditorConfigProvider, useEditorConfigContext } from './config/client/EditorConfigProvider.js';
8
+ import { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js';
9
9
  import { getEnabledNodes } from './nodes/index.js';
10
10
  const NestProviders = ({
11
11
  children,
@@ -29,61 +29,54 @@ const NestProviders = ({
29
29
  };
30
30
  export const LexicalProvider = props => {
31
31
  const {
32
+ composerKey,
32
33
  editorConfig,
33
- field,
34
+ fieldProps,
34
35
  onChange,
35
- path,
36
36
  readOnly,
37
37
  value
38
38
  } = props;
39
39
  const parentContext = useEditorConfigContext();
40
40
  const editorContainerRef = React.useRef(null);
41
- const processedValue = useMemo(() => {
42
- let processed = value;
43
- if (editorConfig?.features?.hooks?.load?.length) {
44
- editorConfig.features.hooks.load.forEach(hook => {
45
- processed = hook({
46
- incomingEditorState: processed
47
- });
48
- });
49
- }
50
- return processed;
51
- }, [editorConfig, value]);
52
- // useMemo for the initialConfig that depends on readOnly and processedValue
41
+ // useMemo for the initialConfig that depends on readOnly and value
53
42
  const initialConfig = useMemo(() => {
54
- if (processedValue && typeof processedValue !== 'object') {
55
- throw new Error('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: ' + JSON.stringify(processedValue));
43
+ if (value && typeof value !== 'object') {
44
+ throw new Error('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: ' + JSON.stringify(value));
56
45
  }
57
- if (processedValue && Array.isArray(processedValue) && !('root' in processedValue)) {
46
+ if (value && Array.isArray(value) && !('root' in value)) {
58
47
  throw new Error('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');
59
48
  }
60
- if (processedValue && 'jsonContent' in processedValue) {
49
+ if (value && 'jsonContent' in value) {
61
50
  throw new Error('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');
62
51
  }
63
52
  return {
64
53
  editable: readOnly !== true,
65
- editorState: processedValue != null ? JSON.stringify(processedValue) : undefined,
54
+ editorState: value != null ? JSON.stringify(value) : undefined,
66
55
  namespace: editorConfig.lexical.namespace,
67
- nodes: [...getEnabledNodes({
56
+ nodes: getEnabledNodes({
68
57
  editorConfig
69
- })],
58
+ }),
70
59
  onError: error => {
71
60
  throw error;
72
61
  },
73
62
  theme: editorConfig.lexical.theme
74
63
  };
75
- }, [editorConfig, processedValue, readOnly]);
64
+ // Important: do not add readOnly and value to the dependencies array. This will cause the entire lexical editor to re-render if the document is saved, which will
65
+ // cause the editor to lose focus.
66
+ }, [editorConfig]);
76
67
  if (!initialConfig) {
77
68
  return /*#__PURE__*/_jsx("p", {
78
69
  children: "Loading..."
79
70
  });
80
71
  }
72
+ // We need to add initialConfig.editable to the key to force a re-render when the readOnly prop changes.
73
+ // Without it, there were cases where lexical editors inside drawers turn readOnly initially - a few miliseconds later they turn editable, but the editor does not re-render and stays readOnly.
81
74
  return /*#__PURE__*/_jsx(LexicalComposer, {
82
75
  initialConfig: initialConfig,
83
76
  children: /*#__PURE__*/_jsx(EditorConfigProvider, {
84
77
  editorConfig: editorConfig,
85
78
  editorContainerRef: editorContainerRef,
86
- field: field,
79
+ fieldProps: fieldProps,
87
80
  parentContext: parentContext,
88
81
  children: /*#__PURE__*/_jsx(NestProviders, {
89
82
  providers: editorConfig.features.providers,
@@ -94,6 +87,6 @@ export const LexicalProvider = props => {
94
87
  })
95
88
  })
96
89
  })
97
- }, path);
90
+ }, composerKey + initialConfig.editable);
98
91
  };
99
92
  //# sourceMappingURL=LexicalProvider.js.map