@payloadcms/richtext-lexical 3.71.0-canary.3 → 3.71.0-internal-debug.dea9d74

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 (1047) hide show
  1. package/dist/cell/rscEntry.js +74 -72
  2. package/dist/cell/rscEntry.js.map +1 -1
  3. package/dist/dependencyChecker.spec.js +8 -7
  4. package/dist/dependencyChecker.spec.js.map +1 -1
  5. package/dist/exports/client/index.js +85 -65
  6. package/dist/exports/client/index.js.map +1 -7
  7. package/dist/exports/cssEntry.js +1 -0
  8. package/dist/exports/cssEntry.js.map +1 -1
  9. package/dist/exports/html/index.js +1 -0
  10. package/dist/exports/html/index.js.map +1 -1
  11. package/dist/exports/html-async/index.js +1 -0
  12. package/dist/exports/html-async/index.js.map +1 -1
  13. package/dist/exports/plaintext/index.js +1 -0
  14. package/dist/exports/plaintext/index.js.map +1 -1
  15. package/dist/exports/react/index.js +1 -0
  16. package/dist/exports/react/index.js.map +1 -1
  17. package/dist/exports/server/ast/mdx.js +37 -35
  18. package/dist/exports/server/ast/mdx.js.map +1 -1
  19. package/dist/exports/server/migrate.js +1 -0
  20. package/dist/exports/server/migrate.js.map +1 -1
  21. package/dist/exports/server/rsc.js +1 -0
  22. package/dist/exports/server/rsc.js.map +1 -1
  23. package/dist/exports/shared.js +1 -0
  24. package/dist/exports/shared.js.map +1 -1
  25. package/dist/features/align/client/index.js +168 -195
  26. package/dist/features/align/client/index.js.map +1 -1
  27. package/dist/features/align/client/toolbarAlignGroup.js +9 -9
  28. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  29. package/dist/features/align/server/i18n.js +223 -222
  30. package/dist/features/align/server/i18n.js.map +1 -1
  31. package/dist/features/align/server/index.js +6 -5
  32. package/dist/features/align/server/index.js.map +1 -1
  33. package/dist/features/blockquote/client/index.js +65 -60
  34. package/dist/features/blockquote/client/index.js.map +1 -1
  35. package/dist/features/blockquote/markdownTransformer.js +33 -28
  36. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  37. package/dist/features/blockquote/server/i18n.js +112 -111
  38. package/dist/features/blockquote/server/i18n.js.map +1 -1
  39. package/dist/features/blockquote/server/index.js +47 -48
  40. package/dist/features/blockquote/server/index.js.map +1 -1
  41. package/dist/features/blocks/client/component/BlockContent.js +95 -69
  42. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  43. package/dist/features/blocks/client/component/components/BlockCollapsible.js +13 -14
  44. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  45. package/dist/features/blocks/client/component/components/BlockEditButton.js +9 -17
  46. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  47. package/dist/features/blocks/client/component/components/BlockRemoveButton.js +9 -17
  48. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  49. package/dist/features/blocks/client/component/index.js +553 -410
  50. package/dist/features/blocks/client/component/index.js.map +1 -1
  51. package/dist/features/blocks/client/component/index.scss +188 -0
  52. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +8 -11
  53. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
  54. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +11 -23
  55. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  56. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +9 -17
  57. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  58. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +9 -17
  59. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  60. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +9 -17
  61. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  62. package/dist/features/blocks/client/componentInline/index.js +468 -340
  63. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  64. package/dist/features/blocks/client/componentInline/index.scss +100 -0
  65. package/dist/features/blocks/client/getBlockImageComponent.js +17 -12
  66. package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
  67. package/dist/features/blocks/client/index.js +141 -146
  68. package/dist/features/blocks/client/index.js.map +1 -1
  69. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +18 -18
  70. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  71. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +14 -15
  72. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  73. package/dist/features/blocks/client/markdown/markdownTransformer.js +328 -330
  74. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  75. package/dist/features/blocks/client/nodes/BlocksNode.js +44 -40
  76. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  77. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +37 -33
  78. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  79. package/dist/features/blocks/client/plugin/commands.js +1 -1
  80. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  81. package/dist/features/blocks/client/plugin/index.js +59 -87
  82. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  83. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +158 -101
  84. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  85. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +119 -93
  86. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  87. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +19 -11
  88. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  89. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.scss +6 -0
  90. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +32 -20
  91. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  92. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.scss +29 -0
  93. package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.js +84 -83
  94. package/dist/features/blocks/premade/CodeBlock/Component/defaultLanguages.js.map +1 -1
  95. package/dist/features/blocks/premade/CodeBlock/Component/index.scss +97 -0
  96. package/dist/features/blocks/premade/CodeBlock/converter.js +36 -40
  97. package/dist/features/blocks/premade/CodeBlock/converter.js.map +1 -1
  98. package/dist/features/blocks/premade/CodeBlock/converterClient.js +1 -1
  99. package/dist/features/blocks/premade/CodeBlock/converterClient.js.map +1 -1
  100. package/dist/features/blocks/premade/CodeBlock/index.js +49 -49
  101. package/dist/features/blocks/premade/CodeBlock/index.js.map +1 -1
  102. package/dist/features/blocks/server/graphQLPopulationPromise.js +29 -44
  103. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  104. package/dist/features/blocks/server/i18n.js +334 -333
  105. package/dist/features/blocks/server/i18n.js.map +1 -1
  106. package/dist/features/blocks/server/index.js +238 -218
  107. package/dist/features/blocks/server/index.js.map +1 -1
  108. package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.js +123 -122
  109. package/dist/features/blocks/server/markdown/linesFromMatchToContentAndPropsString.js.map +1 -1
  110. package/dist/features/blocks/server/markdown/markdownTransformer.js +347 -349
  111. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  112. package/dist/features/blocks/server/nodes/BlocksNode.js +86 -90
  113. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  114. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +84 -87
  115. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  116. package/dist/features/blocks/server/validate.js +42 -55
  117. package/dist/features/blocks/server/validate.js.map +1 -1
  118. package/dist/features/converters/htmlToLexical/index.js +21 -24
  119. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js +7 -10
  121. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +7 -10
  123. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js +2 -1
  125. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js +2 -1
  127. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/converters/link.js +28 -37
  129. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/converters/list.js +18 -26
  131. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  132. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js +9 -12
  133. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  134. package/dist/features/converters/lexicalToHtml/async/converters/tab.js +2 -1
  135. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/async/converters/table.js +27 -38
  137. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  138. package/dist/features/converters/lexicalToHtml/async/converters/text.js +25 -26
  139. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  140. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +41 -44
  141. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js +12 -11
  143. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  144. package/dist/features/converters/lexicalToHtml/async/field/index.js +56 -56
  145. package/dist/features/converters/lexicalToHtml/async/field/index.js.map +1 -1
  146. package/dist/features/converters/lexicalToHtml/async/index.js +87 -97
  147. package/dist/features/converters/lexicalToHtml/async/index.js.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/async/types.js +4 -1
  149. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +57 -62
  151. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  152. package/dist/features/converters/lexicalToHtml/shared/types.js +2 -1
  153. package/dist/features/converters/lexicalToHtml/shared/types.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js +7 -10
  155. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +7 -10
  157. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js +2 -1
  159. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js +2 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/link.js +27 -35
  163. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +18 -26
  165. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js +9 -12
  167. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js +2 -1
  169. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  170. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +27 -38
  171. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/converters/text.js +25 -26
  173. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  174. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +35 -37
  175. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  176. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js +12 -11
  177. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  178. package/dist/features/converters/lexicalToHtml/sync/index.js +84 -92
  179. package/dist/features/converters/lexicalToHtml/sync/index.js.map +1 -1
  180. package/dist/features/converters/lexicalToHtml/sync/types.js +4 -1
  181. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  182. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +7 -4
  183. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +1 -1
  184. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +29 -34
  185. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +1 -1
  186. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +7 -6
  187. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +1 -1
  188. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +29 -28
  189. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +1 -1
  190. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +7 -2
  191. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +1 -1
  192. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +84 -84
  193. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +1 -1
  194. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +6 -1
  195. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +1 -1
  196. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +107 -107
  197. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +1 -1
  198. package/dist/features/converters/lexicalToHtml_deprecated/index.js +4 -4
  199. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +1 -1
  200. package/dist/features/converters/lexicalToJSX/Component/index.js +46 -36
  201. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  202. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +14 -12
  203. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  204. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +15 -13
  205. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +7 -2
  207. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +7 -2
  209. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/converters/link.js +49 -47
  211. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +78 -56
  213. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +26 -16
  215. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  216. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js +2 -1
  217. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  218. package/dist/features/converters/lexicalToJSX/converter/converters/table.js +73 -59
  219. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  220. package/dist/features/converters/lexicalToJSX/converter/converters/text.js +74 -47
  221. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  222. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +77 -61
  223. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  224. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js +12 -11
  225. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  226. package/dist/features/converters/lexicalToJSX/converter/index.js +123 -128
  227. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  228. package/dist/features/converters/lexicalToJSX/converter/types.js +4 -1
  229. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  230. package/dist/features/converters/lexicalToMarkdown/index.js +17 -19
  231. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  232. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +223 -146
  233. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  234. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js +11 -13
  235. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  236. package/dist/features/converters/lexicalToPlaintext/shared/types.js +2 -1
  237. package/dist/features/converters/lexicalToPlaintext/shared/types.js.map +1 -1
  238. package/dist/features/converters/lexicalToPlaintext/sync/index.js +83 -82
  239. package/dist/features/converters/lexicalToPlaintext/sync/index.js.map +1 -1
  240. package/dist/features/converters/lexicalToPlaintext/sync/types.js +3 -1
  241. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  242. package/dist/features/converters/markdownToLexical/index.js +14 -16
  243. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  244. package/dist/features/converters/utilities/payloadPopulateFn.js +37 -38
  245. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  246. package/dist/features/converters/utilities/restPopulateFn.js +24 -30
  247. package/dist/features/converters/utilities/restPopulateFn.js.map +1 -1
  248. package/dist/features/debug/jsxConverter/client/index.js +7 -5
  249. package/dist/features/debug/jsxConverter/client/index.js.map +1 -1
  250. package/dist/features/debug/jsxConverter/client/plugin/index.js +27 -47
  251. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  252. package/dist/features/debug/jsxConverter/client/plugin/style.scss +12 -0
  253. package/dist/features/debug/jsxConverter/server/index.js +5 -4
  254. package/dist/features/debug/jsxConverter/server/index.js.map +1 -1
  255. package/dist/features/debug/testRecorder/client/index.js +7 -5
  256. package/dist/features/debug/testRecorder/client/index.js.map +1 -1
  257. package/dist/features/debug/testRecorder/client/plugin/index.js +456 -365
  258. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  259. package/dist/features/debug/testRecorder/client/plugin/index.scss +53 -0
  260. package/dist/features/debug/testRecorder/server/index.js +5 -4
  261. package/dist/features/debug/testRecorder/server/index.js.map +1 -1
  262. package/dist/features/debug/treeView/client/index.js +7 -5
  263. package/dist/features/debug/treeView/client/index.js.map +1 -1
  264. package/dist/features/debug/treeView/client/plugin/index.js +18 -23
  265. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  266. package/dist/features/debug/treeView/client/plugin/index.scss +80 -0
  267. package/dist/features/debug/treeView/server/index.js +5 -4
  268. package/dist/features/debug/treeView/server/index.js.map +1 -1
  269. package/dist/features/experimental_table/client/index.js +61 -42
  270. package/dist/features/experimental_table/client/index.js.map +1 -1
  271. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +752 -517
  272. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  273. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.scss +87 -0
  274. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +350 -316
  275. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  276. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.scss +11 -0
  277. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +215 -225
  278. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  279. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +104 -133
  280. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  281. package/dist/features/experimental_table/client/plugins/TablePlugin/index.scss +233 -0
  282. package/dist/features/experimental_table/client/utils/debounce.js +89 -107
  283. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  284. package/dist/features/experimental_table/client/utils/useDebounce.js +21 -39
  285. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  286. package/dist/features/experimental_table/markdownTransformer.js +123 -118
  287. package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
  288. package/dist/features/experimental_table/server/index.js +125 -143
  289. package/dist/features/experimental_table/server/index.js.map +1 -1
  290. package/dist/features/format/bold/feature.client.js +38 -35
  291. package/dist/features/format/bold/feature.client.js.map +1 -1
  292. package/dist/features/format/bold/feature.server.js +18 -14
  293. package/dist/features/format/bold/feature.server.js.map +1 -1
  294. package/dist/features/format/bold/markdownTransformers.js +25 -14
  295. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  296. package/dist/features/format/inlineCode/feature.client.js +31 -27
  297. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  298. package/dist/features/format/inlineCode/feature.server.js +8 -5
  299. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  300. package/dist/features/format/inlineCode/markdownTransformers.js +6 -3
  301. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  302. package/dist/features/format/italic/feature.client.js +32 -27
  303. package/dist/features/format/italic/feature.client.js.map +1 -1
  304. package/dist/features/format/italic/feature.server.js +9 -5
  305. package/dist/features/format/italic/feature.server.js.map +1 -1
  306. package/dist/features/format/italic/markdownTransformers.js +12 -7
  307. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  308. package/dist/features/format/shared/toolbarFormatGroup.js +8 -8
  309. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  310. package/dist/features/format/strikethrough/feature.client.js +31 -27
  311. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  312. package/dist/features/format/strikethrough/feature.server.js +8 -5
  313. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  314. package/dist/features/format/strikethrough/markdownTransformers.js +6 -3
  315. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  316. package/dist/features/format/subscript/feature.client.js +28 -26
  317. package/dist/features/format/subscript/feature.client.js.map +1 -1
  318. package/dist/features/format/subscript/feature.server.js +5 -4
  319. package/dist/features/format/subscript/feature.server.js.map +1 -1
  320. package/dist/features/format/superscript/feature.client.js +28 -26
  321. package/dist/features/format/superscript/feature.client.js.map +1 -1
  322. package/dist/features/format/superscript/feature.server.js +5 -4
  323. package/dist/features/format/superscript/feature.server.js.map +1 -1
  324. package/dist/features/format/underline/feature.client.js +28 -26
  325. package/dist/features/format/underline/feature.client.js.map +1 -1
  326. package/dist/features/format/underline/feature.server.js +5 -4
  327. package/dist/features/format/underline/feature.server.js.map +1 -1
  328. package/dist/features/heading/client/index.js +121 -142
  329. package/dist/features/heading/client/index.js.map +1 -1
  330. package/dist/features/heading/markdownTransformer.js +25 -22
  331. package/dist/features/heading/markdownTransformer.js.map +1 -1
  332. package/dist/features/heading/server/i18n.js +112 -111
  333. package/dist/features/heading/server/i18n.js.map +1 -1
  334. package/dist/features/heading/server/index.js +62 -60
  335. package/dist/features/heading/server/index.js.map +1 -1
  336. package/dist/features/horizontalRule/client/index.js +57 -48
  337. package/dist/features/horizontalRule/client/index.js.map +1 -1
  338. package/dist/features/horizontalRule/client/markdownTransformer.js +18 -15
  339. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  340. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +25 -27
  341. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  342. package/dist/features/horizontalRule/client/plugin/index.js +21 -32
  343. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  344. package/dist/features/horizontalRule/client/plugin/index.scss +23 -0
  345. package/dist/features/horizontalRule/server/i18n.js +112 -111
  346. package/dist/features/horizontalRule/server/i18n.js.map +1 -1
  347. package/dist/features/horizontalRule/server/index.js +24 -17
  348. package/dist/features/horizontalRule/server/index.js.map +1 -1
  349. package/dist/features/horizontalRule/server/markdownTransformer.js +18 -15
  350. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  351. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +69 -72
  352. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  353. package/dist/features/indent/client/IndentPlugin.js +78 -78
  354. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  355. package/dist/features/indent/client/index.js +68 -77
  356. package/dist/features/indent/client/index.js.map +1 -1
  357. package/dist/features/indent/client/toolbarIndentGroup.js +8 -8
  358. package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
  359. package/dist/features/indent/server/i18n.js +149 -148
  360. package/dist/features/indent/server/i18n.js.map +1 -1
  361. package/dist/features/indent/server/index.js +18 -11
  362. package/dist/features/indent/server/index.js.map +1 -1
  363. package/dist/features/link/client/index.js +83 -80
  364. package/dist/features/link/client/index.js.map +1 -1
  365. package/dist/features/link/client/plugins/autoLink/index.js +280 -273
  366. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  367. package/dist/features/link/client/plugins/clickableLink/index.js +8 -4
  368. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  369. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -1
  370. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  371. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +378 -297
  372. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  373. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +12 -9
  374. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  375. package/dist/features/link/client/plugins/floatingLinkEditor/index.scss +92 -0
  376. package/dist/features/link/client/plugins/floatingLinkEditor/types.js +6 -1
  377. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  378. package/dist/features/link/client/plugins/link/index.js +53 -68
  379. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  380. package/dist/features/link/markdownTransformer.js +34 -33
  381. package/dist/features/link/markdownTransformer.js.map +1 -1
  382. package/dist/features/link/nodes/AutoLinkNode.js +56 -58
  383. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  384. package/dist/features/link/nodes/LinkNode.js +286 -288
  385. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  386. package/dist/features/link/nodes/types.js +6 -1
  387. package/dist/features/link/nodes/types.js.map +1 -1
  388. package/dist/features/link/server/baseFields.js +115 -140
  389. package/dist/features/link/server/baseFields.js.map +1 -1
  390. package/dist/features/link/server/graphQLPopulationPromise.js +29 -45
  391. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  392. package/dist/features/link/server/i18n.js +149 -148
  393. package/dist/features/link/server/i18n.js.map +1 -1
  394. package/dist/features/link/server/index.js +156 -143
  395. package/dist/features/link/server/index.js.map +1 -1
  396. package/dist/features/link/server/transformExtraFields.js +15 -15
  397. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  398. package/dist/features/link/server/validate.js +35 -46
  399. package/dist/features/link/server/validate.js.map +1 -1
  400. package/dist/features/lists/checklist/client/index.js +86 -78
  401. package/dist/features/lists/checklist/client/index.js.map +1 -1
  402. package/dist/features/lists/checklist/client/plugin/index.js +8 -4
  403. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  404. package/dist/features/lists/checklist/markdownTransformers.js +11 -7
  405. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  406. package/dist/features/lists/checklist/server/i18n.js +112 -111
  407. package/dist/features/lists/checklist/server/i18n.js.map +1 -1
  408. package/dist/features/lists/checklist/server/index.js +26 -21
  409. package/dist/features/lists/checklist/server/index.js.map +1 -1
  410. package/dist/features/lists/htmlConverter.js +47 -62
  411. package/dist/features/lists/htmlConverter.js.map +1 -1
  412. package/dist/features/lists/orderedList/client/index.js +78 -72
  413. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  414. package/dist/features/lists/orderedList/markdownTransformer.js +11 -7
  415. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  416. package/dist/features/lists/orderedList/server/i18n.js +112 -111
  417. package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
  418. package/dist/features/lists/orderedList/server/index.js +26 -21
  419. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  420. package/dist/features/lists/plugin/index.js +8 -4
  421. package/dist/features/lists/plugin/index.js.map +1 -1
  422. package/dist/features/lists/shared/markdown.js +49 -48
  423. package/dist/features/lists/shared/markdown.js.map +1 -1
  424. package/dist/features/lists/shared/shouldRegisterListBaseNodes.js +10 -9
  425. package/dist/features/lists/shared/shouldRegisterListBaseNodes.js.map +1 -1
  426. package/dist/features/lists/shared/slashMenuListGroup.js +8 -9
  427. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  428. package/dist/features/lists/unorderedList/client/index.js +76 -68
  429. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  430. package/dist/features/lists/unorderedList/markdownTransformer.js +11 -7
  431. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  432. package/dist/features/lists/unorderedList/server/i18n.js +112 -111
  433. package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
  434. package/dist/features/lists/unorderedList/server/index.js +24 -17
  435. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  436. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +17 -18
  437. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  438. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +29 -30
  439. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  440. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +20 -21
  441. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  442. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +19 -21
  443. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  444. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +17 -18
  445. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  446. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +23 -24
  447. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  448. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +21 -20
  449. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  450. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +10 -1
  451. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  452. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +64 -70
  453. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  454. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +2 -1
  455. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  456. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +7 -5
  457. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  458. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +43 -42
  459. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  460. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +21 -11
  461. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  462. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +65 -66
  463. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  464. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +16 -0
  465. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
  466. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  467. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +26 -20
  468. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  469. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +30 -28
  470. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  471. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +27 -26
  472. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  473. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +21 -22
  474. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  475. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
  476. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  477. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +13 -12
  478. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  479. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
  480. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  481. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
  482. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  483. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +16 -15
  484. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  485. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +13 -1
  486. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  487. package/dist/features/migrations/slateToLexical/converter/index.js +110 -117
  488. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  489. package/dist/features/migrations/slateToLexical/converter/types.js +2 -1
  490. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  491. package/dist/features/migrations/slateToLexical/feature.client.js +7 -5
  492. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  493. package/dist/features/migrations/slateToLexical/feature.server.js +54 -45
  494. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  495. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +21 -11
  496. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  497. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +65 -66
  498. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  499. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +16 -0
  500. package/dist/features/paragraph/client/index.js +61 -58
  501. package/dist/features/paragraph/client/index.js.map +1 -1
  502. package/dist/features/paragraph/server/i18n.js +149 -148
  503. package/dist/features/paragraph/server/i18n.js.map +1 -1
  504. package/dist/features/paragraph/server/index.js +7 -6
  505. package/dist/features/paragraph/server/index.js.map +1 -1
  506. package/dist/features/relationship/client/components/RelationshipComponent.js +147 -118
  507. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  508. package/dist/features/relationship/client/components/index.scss +95 -0
  509. package/dist/features/relationship/client/drawer/commands.js +1 -0
  510. package/dist/features/relationship/client/drawer/commands.js.map +1 -1
  511. package/dist/features/relationship/client/drawer/index.js +81 -132
  512. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  513. package/dist/features/relationship/client/index.js +59 -53
  514. package/dist/features/relationship/client/index.js.map +1 -1
  515. package/dist/features/relationship/client/nodes/RelationshipNode.js +64 -60
  516. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  517. package/dist/features/relationship/client/plugins/index.js +39 -69
  518. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  519. package/dist/features/relationship/client/utils/useEnabledRelationships.js +48 -58
  520. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  521. package/dist/features/relationship/server/graphQLPopulationPromise.js +26 -34
  522. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  523. package/dist/features/relationship/server/i18n.js +112 -111
  524. package/dist/features/relationship/server/i18n.js.map +1 -1
  525. package/dist/features/relationship/server/index.js +64 -59
  526. package/dist/features/relationship/server/index.js.map +1 -1
  527. package/dist/features/relationship/server/nodes/RelationshipNode.js +92 -95
  528. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  529. package/dist/features/shared/slashMenu/basicGroup.js +8 -9
  530. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  531. package/dist/features/shared/toolbar/addDropdownGroup.js +9 -8
  532. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  533. package/dist/features/shared/toolbar/featureButtonsGroup.js +8 -7
  534. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  535. package/dist/features/shared/toolbar/textDropdownGroup.js +9 -8
  536. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  537. package/dist/features/textState/defaultColors.js +370 -370
  538. package/dist/features/textState/defaultColors.js.map +1 -1
  539. package/dist/features/textState/feature.client.js +77 -64
  540. package/dist/features/textState/feature.client.js.map +1 -1
  541. package/dist/features/textState/feature.server.js +46 -14
  542. package/dist/features/textState/feature.server.js.map +1 -1
  543. package/dist/features/textState/i18n.js +112 -111
  544. package/dist/features/textState/i18n.js.map +1 -1
  545. package/dist/features/textState/textState.js +64 -62
  546. package/dist/features/textState/textState.js.map +1 -1
  547. package/dist/features/toolbars/fixed/client/Toolbar/index.js +263 -297
  548. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  549. package/dist/features/toolbars/fixed/client/Toolbar/index.scss +113 -0
  550. package/dist/features/toolbars/fixed/client/index.js +7 -5
  551. package/dist/features/toolbars/fixed/client/index.js.map +1 -1
  552. package/dist/features/toolbars/fixed/server/index.js +32 -16
  553. package/dist/features/toolbars/fixed/server/index.js.map +1 -1
  554. package/dist/features/toolbars/inline/client/Toolbar/index.js +343 -366
  555. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  556. package/dist/features/toolbars/inline/client/Toolbar/index.scss +58 -0
  557. package/dist/features/toolbars/inline/client/index.js +7 -5
  558. package/dist/features/toolbars/inline/client/index.js.map +1 -1
  559. package/dist/features/toolbars/inline/server/index.js +5 -4
  560. package/dist/features/toolbars/inline/server/index.js.map +1 -1
  561. package/dist/features/toolbars/shared/ToolbarButton/index.js +103 -145
  562. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  563. package/dist/features/toolbars/shared/ToolbarButton/index.scss +46 -0
  564. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +264 -208
  565. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  566. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +172 -176
  567. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  568. package/dist/features/toolbars/shared/ToolbarDropdown/index.scss +129 -0
  569. package/dist/features/toolbars/types.js +29 -1
  570. package/dist/features/toolbars/types.js.map +1 -1
  571. package/dist/features/typeUtilities.js +3 -2
  572. package/dist/features/typeUtilities.js.map +1 -1
  573. package/dist/features/typesClient.js +61 -1
  574. package/dist/features/typesClient.js.map +1 -1
  575. package/dist/features/typesServer.js +90 -1
  576. package/dist/features/typesServer.js.map +1 -1
  577. package/dist/features/upload/client/component/index.js +242 -189
  578. package/dist/features/upload/client/component/index.js.map +1 -1
  579. package/dist/features/upload/client/component/index.scss +191 -0
  580. package/dist/features/upload/client/component/pending/index.js +19 -10
  581. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  582. package/dist/features/upload/client/drawer/commands.js +1 -1
  583. package/dist/features/upload/client/drawer/commands.js.map +1 -1
  584. package/dist/features/upload/client/drawer/index.js +83 -132
  585. package/dist/features/upload/client/drawer/index.js.map +1 -1
  586. package/dist/features/upload/client/index.js +61 -51
  587. package/dist/features/upload/client/index.js.map +1 -1
  588. package/dist/features/upload/client/nodes/UploadNode.js +67 -61
  589. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  590. package/dist/features/upload/client/plugin/index.js +290 -331
  591. package/dist/features/upload/client/plugin/index.js.map +1 -1
  592. package/dist/features/upload/server/graphQLPopulationPromise.js +48 -63
  593. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  594. package/dist/features/upload/server/i18n.js +112 -111
  595. package/dist/features/upload/server/i18n.js.map +1 -1
  596. package/dist/features/upload/server/index.js +197 -207
  597. package/dist/features/upload/server/index.js.map +1 -1
  598. package/dist/features/upload/server/nodes/UploadNode.js +115 -99
  599. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  600. package/dist/features/upload/server/nodes/conversions.js +41 -40
  601. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  602. package/dist/features/upload/server/validate.js +48 -62
  603. package/dist/features/upload/server/validate.js.map +1 -1
  604. package/dist/field/Diff/converters/link.js +32 -41
  605. package/dist/field/Diff/converters/link.js.map +1 -1
  606. package/dist/field/Diff/converters/listitem/index.js +75 -55
  607. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  608. package/dist/field/Diff/converters/listitem/index.scss +47 -0
  609. package/dist/field/Diff/converters/relationship/index.js +85 -63
  610. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  611. package/dist/field/Diff/converters/relationship/index.scss +73 -0
  612. package/dist/field/Diff/converters/unknown/index.js +64 -41
  613. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  614. package/dist/field/Diff/converters/unknown/index.scss +40 -0
  615. package/dist/field/Diff/converters/upload/index.js +122 -66
  616. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  617. package/dist/field/Diff/converters/upload/index.scss +115 -0
  618. package/dist/field/Diff/index.js +59 -66
  619. package/dist/field/Diff/index.js.map +1 -1
  620. package/dist/field/Diff/index.scss +102 -0
  621. package/dist/field/Field.js +226 -167
  622. package/dist/field/Field.js.map +1 -1
  623. package/dist/field/RenderLexical/index.js +123 -119
  624. package/dist/field/RenderLexical/index.js.map +1 -1
  625. package/dist/field/bundled.css +0 -1
  626. package/dist/field/index.js +61 -97
  627. package/dist/field/index.js.map +1 -1
  628. package/dist/field/index.scss +41 -0
  629. package/dist/field/rscEntry.js +86 -84
  630. package/dist/field/rscEntry.js.map +1 -1
  631. package/dist/i18n.js +223 -222
  632. package/dist/i18n.js.map +1 -1
  633. package/dist/index.js +639 -704
  634. package/dist/index.js.map +1 -1
  635. package/dist/lexical/EditorPlugin.js +21 -17
  636. package/dist/lexical/EditorPlugin.js.map +1 -1
  637. package/dist/lexical/LexicalEditor.js +274 -171
  638. package/dist/lexical/LexicalEditor.js.map +1 -1
  639. package/dist/lexical/LexicalEditor.scss +54 -0
  640. package/dist/lexical/LexicalProvider.js +109 -86
  641. package/dist/lexical/LexicalProvider.js.map +1 -1
  642. package/dist/lexical/config/client/EditorConfigProvider.js +94 -81
  643. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  644. package/dist/lexical/config/client/default.js +3 -3
  645. package/dist/lexical/config/client/default.js.map +1 -1
  646. package/dist/lexical/config/client/loader.js +30 -38
  647. package/dist/lexical/config/client/loader.js.map +1 -1
  648. package/dist/lexical/config/client/sanitize.js +188 -187
  649. package/dist/lexical/config/client/sanitize.js.map +1 -1
  650. package/dist/lexical/config/server/default.js +27 -5
  651. package/dist/lexical/config/server/default.js.map +1 -1
  652. package/dist/lexical/config/server/loader.js +105 -106
  653. package/dist/lexical/config/server/loader.js.map +1 -1
  654. package/dist/lexical/config/server/sanitize.js +114 -113
  655. package/dist/lexical/config/server/sanitize.js.map +1 -1
  656. package/dist/lexical/config/types.js +4 -1
  657. package/dist/lexical/config/types.js.map +1 -1
  658. package/dist/lexical/nodes/index.js +12 -15
  659. package/dist/lexical/nodes/index.js.map +1 -1
  660. package/dist/lexical/plugins/ClipboardPlugin/index.js +66 -70
  661. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  662. package/dist/lexical/plugins/DecoratorPlugin/index.js +208 -225
  663. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  664. package/dist/lexical/plugins/DecoratorPlugin/index.scss +13 -0
  665. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +42 -41
  666. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  667. package/dist/lexical/plugins/InsertParagraphAtEnd/index.scss +54 -0
  668. package/dist/lexical/plugins/MarkdownShortcut/index.js +11 -23
  669. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  670. package/dist/lexical/plugins/NormalizeSelection/index.js +21 -19
  671. package/dist/lexical/plugins/NormalizeSelection/index.js.map +1 -1
  672. package/dist/lexical/plugins/SelectAllPlugin/index.js +19 -17
  673. package/dist/lexical/plugins/SelectAllPlugin/index.js.map +1 -1
  674. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +399 -420
  675. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  676. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +164 -155
  677. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  678. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +10 -1
  679. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  680. package/dist/lexical/plugins/SlashMenu/index.js +204 -181
  681. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  682. package/dist/lexical/plugins/SlashMenu/index.scss +68 -0
  683. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +28 -41
  684. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  685. package/dist/lexical/plugins/TextPlugin/index.js +27 -42
  686. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  687. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +145 -130
  688. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  689. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +35 -0
  690. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +10 -10
  691. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  692. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +10 -10
  693. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  694. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +23 -26
  695. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  696. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +325 -317
  697. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  698. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.scss +80 -0
  699. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +86 -98
  700. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  701. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +16 -22
  702. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  703. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +29 -19
  704. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  705. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +11 -14
  706. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  707. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +122 -133
  708. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  709. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +2 -2
  710. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  711. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +2 -2
  712. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  713. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +29 -24
  714. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  715. package/dist/lexical/theme/EditorTheme.js +72 -65
  716. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  717. package/dist/lexical/theme/EditorTheme.scss +357 -0
  718. package/dist/lexical/ui/ContentEditable.js +22 -35
  719. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  720. package/dist/lexical/ui/ContentEditable.scss +105 -0
  721. package/dist/lexical/ui/icons/AI/index.js +58 -31
  722. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  723. package/dist/lexical/ui/icons/Add/index.js +31 -16
  724. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  725. package/dist/lexical/ui/icons/AlignCenter/index.js +45 -25
  726. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  727. package/dist/lexical/ui/icons/AlignJustify/index.js +45 -25
  728. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  729. package/dist/lexical/ui/icons/AlignLeft/index.js +45 -25
  730. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  731. package/dist/lexical/ui/icons/AlignRight/index.js +45 -25
  732. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  733. package/dist/lexical/ui/icons/Block/index.js +54 -34
  734. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  735. package/dist/lexical/ui/icons/Blockquote/index.js +24 -16
  736. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  737. package/dist/lexical/ui/icons/Bold/index.js +24 -16
  738. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  739. package/dist/lexical/ui/icons/Checklist/index.js +39 -24
  740. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  741. package/dist/lexical/ui/icons/Code/index.js +34 -19
  742. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  743. package/dist/lexical/ui/icons/CodeBlock/index.js +22 -14
  744. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  745. package/dist/lexical/ui/icons/Collapse/index.js +23 -15
  746. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  747. package/dist/lexical/ui/icons/H1/index.js +24 -16
  748. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  749. package/dist/lexical/ui/icons/H2/index.js +24 -16
  750. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  751. package/dist/lexical/ui/icons/H3/index.js +24 -16
  752. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  753. package/dist/lexical/ui/icons/H4/index.js +24 -16
  754. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  755. package/dist/lexical/ui/icons/H5/index.js +24 -16
  756. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  757. package/dist/lexical/ui/icons/H6/index.js +24 -16
  758. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  759. package/dist/lexical/ui/icons/HorizontalRule/index.js +27 -19
  760. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  761. package/dist/lexical/ui/icons/IndentDecrease/index.js +53 -28
  762. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  763. package/dist/lexical/ui/icons/IndentIncrease/index.js +53 -28
  764. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  765. package/dist/lexical/ui/icons/InlineBlocks/index.js +26 -18
  766. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  767. package/dist/lexical/ui/icons/Italic/index.js +24 -16
  768. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  769. package/dist/lexical/ui/icons/Link/index.js +25 -17
  770. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  771. package/dist/lexical/ui/icons/Meatballs/index.js +39 -19
  772. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  773. package/dist/lexical/ui/icons/OrderedList/index.js +61 -31
  774. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  775. package/dist/lexical/ui/icons/Relationship/index.js +58 -31
  776. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  777. package/dist/lexical/ui/icons/Strikethrough/index.js +34 -19
  778. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  779. package/dist/lexical/ui/icons/Subscript/index.js +24 -16
  780. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  781. package/dist/lexical/ui/icons/Superscript/index.js +24 -16
  782. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  783. package/dist/lexical/ui/icons/Table/index.js +25 -17
  784. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  785. package/dist/lexical/ui/icons/Text/index.js +24 -16
  786. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  787. package/dist/lexical/ui/icons/TextState/index.js +25 -19
  788. package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
  789. package/dist/lexical/ui/icons/Underline/index.js +34 -19
  790. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  791. package/dist/lexical/ui/icons/UnorderedList/index.js +81 -46
  792. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  793. package/dist/lexical/ui/icons/Upload/index.js +48 -28
  794. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  795. package/dist/lexical/utils/canUseDOM.js +1 -1
  796. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  797. package/dist/lexical/utils/environment.js +1 -1
  798. package/dist/lexical/utils/environment.js.map +1 -1
  799. package/dist/lexical/utils/getDOMRangeRect.js +12 -12
  800. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  801. package/dist/lexical/utils/getSelectedNode.js +13 -17
  802. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  803. package/dist/lexical/utils/guard.js +3 -4
  804. package/dist/lexical/utils/guard.js.map +1 -1
  805. package/dist/lexical/utils/joinClasses.js +2 -2
  806. package/dist/lexical/utils/joinClasses.js.map +1 -1
  807. package/dist/lexical/utils/markdown/createBlockNode.js +10 -9
  808. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  809. package/dist/lexical/utils/nodeFormat.js +59 -58
  810. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  811. package/dist/lexical/utils/point.js +32 -39
  812. package/dist/lexical/utils/point.js.map +1 -1
  813. package/dist/lexical/utils/rect.js +136 -166
  814. package/dist/lexical/utils/rect.js.map +1 -1
  815. package/dist/lexical/utils/setFloatingElemPosition.js +48 -56
  816. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  817. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +22 -22
  818. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  819. package/dist/lexical/utils/swipe.js +83 -81
  820. package/dist/lexical/utils/swipe.js.map +1 -1
  821. package/dist/lexical/utils/url.js +53 -53
  822. package/dist/lexical/utils/url.js.map +1 -1
  823. package/dist/lexical/utils/url.spec.js +214 -98
  824. package/dist/lexical/utils/url.spec.js.map +1 -1
  825. package/dist/lexical-proxy/@lexical-headless.js +1 -0
  826. package/dist/lexical-proxy/@lexical-headless.js.map +1 -1
  827. package/dist/lexical-proxy/@lexical-html.js +1 -0
  828. package/dist/lexical-proxy/@lexical-html.js.map +1 -1
  829. package/dist/lexical-proxy/@lexical-link.js +1 -0
  830. package/dist/lexical-proxy/@lexical-link.js.map +1 -1
  831. package/dist/lexical-proxy/@lexical-list.js +1 -0
  832. package/dist/lexical-proxy/@lexical-list.js.map +1 -1
  833. package/dist/lexical-proxy/@lexical-mark.js +1 -0
  834. package/dist/lexical-proxy/@lexical-mark.js.map +1 -1
  835. package/dist/lexical-proxy/@lexical-markdown.js +1 -0
  836. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  837. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js +1 -0
  838. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js.map +1 -1
  839. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js +1 -0
  840. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js.map +1 -1
  841. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js +1 -0
  842. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js.map +1 -1
  843. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js +1 -0
  844. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js.map +1 -1
  845. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js +1 -0
  846. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js.map +1 -1
  847. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js +1 -0
  848. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js.map +1 -1
  849. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js +1 -0
  850. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js.map +1 -1
  851. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js +1 -0
  852. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js.map +1 -1
  853. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js +1 -0
  854. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js.map +1 -1
  855. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js +1 -0
  856. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js.map +1 -1
  857. package/dist/lexical-proxy/@lexical-react/LexicalComposer.js +1 -0
  858. package/dist/lexical-proxy/@lexical-react/LexicalComposer.js.map +1 -1
  859. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js +1 -0
  860. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js.map +1 -1
  861. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js +1 -0
  862. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js.map +1 -1
  863. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +1 -0
  864. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +1 -1
  865. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js +1 -0
  866. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js.map +1 -1
  867. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js +1 -0
  868. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js.map +1 -1
  869. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js +1 -0
  870. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js.map +1 -1
  871. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js +1 -0
  872. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js.map +1 -1
  873. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js +1 -0
  874. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js.map +1 -1
  875. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js +1 -0
  876. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js.map +1 -1
  877. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js +1 -0
  878. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js.map +1 -1
  879. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js +1 -0
  880. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js.map +1 -1
  881. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js +1 -0
  882. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js.map +1 -1
  883. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js +1 -0
  884. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js.map +1 -1
  885. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js +1 -0
  886. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js.map +1 -1
  887. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js +1 -0
  888. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js.map +1 -1
  889. package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js +1 -0
  890. package/dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js.map +1 -1
  891. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js +1 -0
  892. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js.map +1 -1
  893. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js +1 -0
  894. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js.map +1 -1
  895. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js +1 -0
  896. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js.map +1 -1
  897. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js +1 -0
  898. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js.map +1 -1
  899. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js +1 -0
  900. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js.map +1 -1
  901. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js +1 -0
  902. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js.map +1 -1
  903. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js +1 -0
  904. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js.map +1 -1
  905. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js +1 -0
  906. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js.map +1 -1
  907. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js +1 -0
  908. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js.map +1 -1
  909. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js +1 -0
  910. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js.map +1 -1
  911. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js +1 -0
  912. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js.map +1 -1
  913. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js +1 -0
  914. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js.map +1 -1
  915. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js +1 -0
  916. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js.map +1 -1
  917. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js +1 -0
  918. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js.map +1 -1
  919. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js +1 -0
  920. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js.map +1 -1
  921. package/dist/lexical-proxy/@lexical-rich-text.js +1 -0
  922. package/dist/lexical-proxy/@lexical-rich-text.js.map +1 -1
  923. package/dist/lexical-proxy/@lexical-selection.js +1 -0
  924. package/dist/lexical-proxy/@lexical-selection.js.map +1 -1
  925. package/dist/lexical-proxy/@lexical-utils.js +1 -0
  926. package/dist/lexical-proxy/@lexical-utils.js.map +1 -1
  927. package/dist/lexical-proxy/lexical.js +1 -0
  928. package/dist/lexical-proxy/lexical.js.map +1 -1
  929. package/dist/nodeTypes.js +35 -1
  930. package/dist/nodeTypes.js.map +1 -1
  931. package/dist/packages/@lexical/markdown/MarkdownExport.js +184 -179
  932. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +1 -1
  933. package/dist/packages/@lexical/markdown/MarkdownImport.js +174 -169
  934. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +1 -1
  935. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +258 -268
  936. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +1 -1
  937. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +305 -209
  938. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +1 -1
  939. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +76 -73
  940. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +1 -1
  941. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +59 -48
  942. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +1 -1
  943. package/dist/packages/@lexical/markdown/importTextTransformers.js +51 -45
  944. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +1 -1
  945. package/dist/packages/@lexical/markdown/index.js +33 -14
  946. package/dist/packages/@lexical/markdown/index.js.map +1 -1
  947. package/dist/packages/@lexical/markdown/utils.js +217 -185
  948. package/dist/packages/@lexical/markdown/utils.js.map +1 -1
  949. package/dist/populateGraphQL/defaultValue.js +29 -24
  950. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  951. package/dist/populateGraphQL/populate.js +26 -37
  952. package/dist/populateGraphQL/populate.js.map +1 -1
  953. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +34 -50
  954. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  955. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +35 -42
  956. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  957. package/dist/types.js +40 -1
  958. package/dist/types.js.map +1 -1
  959. package/dist/utilities/applyBaseFilterToFields.js +81 -84
  960. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  961. package/dist/utilities/buildEditorState.js +39 -40
  962. package/dist/utilities/buildEditorState.js.map +1 -1
  963. package/dist/utilities/buildInitialState.js +51 -52
  964. package/dist/utilities/buildInitialState.js.map +1 -1
  965. package/dist/utilities/createClientFeature.js +42 -48
  966. package/dist/utilities/createClientFeature.js.map +1 -1
  967. package/dist/utilities/createServerFeature.js +38 -48
  968. package/dist/utilities/createServerFeature.js.map +1 -1
  969. package/dist/utilities/editorConfigFactory.js +78 -79
  970. package/dist/utilities/editorConfigFactory.js.map +1 -1
  971. package/dist/utilities/fieldsDrawer/Drawer.js +45 -70
  972. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  973. package/dist/utilities/fieldsDrawer/DrawerContent.js +130 -120
  974. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  975. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +64 -115
  976. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  977. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +76 -121
  978. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  979. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +79 -141
  980. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  981. package/dist/utilities/forEachNodeRecursively.js +19 -24
  982. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  983. package/dist/utilities/generateImportMap.js +43 -49
  984. package/dist/utilities/generateImportMap.js.map +1 -1
  985. package/dist/utilities/generateSchemaMap.js +32 -37
  986. package/dist/utilities/generateSchemaMap.js.map +1 -1
  987. package/dist/utilities/getDefaultSanitizedEditorConfig.js +12 -14
  988. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  989. package/dist/utilities/initLexicalFeatures.js +68 -65
  990. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  991. package/dist/utilities/jsx/collectTopLevelJSXInLines.js +26 -29
  992. package/dist/utilities/jsx/collectTopLevelJSXInLines.js.map +1 -1
  993. package/dist/utilities/jsx/declare.d.js.map +1 -1
  994. package/dist/utilities/jsx/extractPropsFromJSXPropsString.js +100 -102
  995. package/dist/utilities/jsx/extractPropsFromJSXPropsString.js.map +1 -1
  996. package/dist/utilities/jsx/jsx.js +76 -80
  997. package/dist/utilities/jsx/jsx.js.map +1 -1
  998. package/dist/utilities/jsx/jsx.spec.js +225 -171
  999. package/dist/utilities/jsx/jsx.spec.js.map +1 -1
  1000. package/dist/utilities/migrateSlateToLexical/index.js +112 -128
  1001. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
  1002. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +74 -78
  1003. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  1004. package/dist/utilities/recurseNodeTree.js +22 -25
  1005. package/dist/utilities/recurseNodeTree.js.map +1 -1
  1006. package/dist/utilities/upgradeLexicalData/index.js +88 -102
  1007. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  1008. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +78 -80
  1009. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  1010. package/dist/utilities/useLexicalFeature.js +14 -16
  1011. package/dist/utilities/useLexicalFeature.js.map +1 -1
  1012. package/dist/utilities/useRunDeprioritized.js +41 -37
  1013. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  1014. package/dist/validate/hasText.js +21 -20
  1015. package/dist/validate/hasText.js.map +1 -1
  1016. package/dist/validate/index.js +22 -28
  1017. package/dist/validate/index.js.map +1 -1
  1018. package/dist/validate/validateNodes.js +28 -31
  1019. package/dist/validate/validateNodes.js.map +1 -1
  1020. package/package.json +6 -6
  1021. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  1022. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  1023. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  1024. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  1025. package/dist/exports/client/Field-2A2VQXKP.js +0 -2
  1026. package/dist/exports/client/Field-2A2VQXKP.js.map +0 -7
  1027. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  1028. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  1029. package/dist/exports/client/bundled.css +0 -1
  1030. package/dist/exports/client/chunk-AFXLIYGL.js +0 -12
  1031. package/dist/exports/client/chunk-AFXLIYGL.js.map +0 -7
  1032. package/dist/exports/client/chunk-BZZVLW4U.js +0 -2
  1033. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  1034. package/dist/exports/client/chunk-DBWINSQN.js +0 -2
  1035. package/dist/exports/client/chunk-DBWINSQN.js.map +0 -7
  1036. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  1037. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  1038. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  1039. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  1040. package/dist/exports/client/chunk-O6XRT2H3.js +0 -2
  1041. package/dist/exports/client/chunk-O6XRT2H3.js.map +0 -7
  1042. package/dist/exports/client/chunk-TRHFMZ3F.js +0 -2
  1043. package/dist/exports/client/chunk-TRHFMZ3F.js.map +0 -7
  1044. package/dist/exports/client/component-YQ22OGQW.js +0 -2
  1045. package/dist/exports/client/component-YQ22OGQW.js.map +0 -7
  1046. package/dist/exports/client/componentInline-5OVPQNQH.js +0 -2
  1047. package/dist/exports/client/componentInline-5OVPQNQH.js.map +0 -7
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/field/Field.tsx", "../../../src/lexical/LexicalProvider.tsx", "../../../src/lexical/LexicalEditor.tsx", "../../../src/lexical/EditorPlugin.tsx", "../../../src/lexical/plugins/ClipboardPlugin/index.tsx", "../../../src/lexical/plugins/DecoratorPlugin/index.tsx", "../../../src/lexical/plugins/handles/AddBlockHandlePlugin/index.tsx", "../../../src/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.ts", "../../../src/lexical/plugins/handles/utils/getNodeCloseToPoint.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.ts", "../../../src/lexical/plugins/handles/utils/getCollapsedMargins.ts", "../../../src/lexical/plugins/handles/utils/getTopLevelNodeKeys.ts", "../../../src/lexical/plugins/handles/utils/isOnHandleElement.ts", "../../../src/lexical/plugins/handles/utils/doesLineHeightAffectElement.ts", "../../../src/lexical/plugins/handles/utils/setHandlePosition.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/index.tsx", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts", "../../../src/lexical/plugins/InsertParagraphAtEnd/index.tsx", "../../../src/lexical/plugins/MarkdownShortcut/index.tsx", "../../../src/lexical/plugins/NormalizeSelection/index.tsx", "../../../src/lexical/plugins/SelectAllPlugin/index.tsx", "../../../src/lexical/plugins/SlashMenu/index.tsx", "../../../src/lexical/plugins/SlashMenu/useMenuTriggerMatch.ts", "../../../src/lexical/plugins/TextPlugin/index.tsx", "../../../src/lexical/ui/ContentEditable.tsx"],
4
- "sourcesContent": ["'use client'\nimport type { EditorState, SerializedEditorState } from 'lexical'\n\nimport {\n BulkUploadProvider,\n FieldDescription,\n FieldError,\n FieldLabel,\n RenderCustomComponent,\n useEditDepth,\n useEffectEvent,\n useField,\n} from '@payloadcms/ui'\nimport { mergeFieldStyles } from '@payloadcms/ui/shared'\nimport { dequal } from 'dequal/lite'\nimport { type Validate } from 'payload'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\n\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\n\nimport '../lexical/theme/EditorTheme.scss'\nimport './bundled.css'\nimport './index.scss'\n\nimport type { LexicalRichTextFieldProps } from '../types.js'\n\nimport { LexicalProvider } from '../lexical/LexicalProvider.js'\nimport { useRunDeprioritized } from '../utilities/useRunDeprioritized.js'\n\nconst baseClass = 'rich-text-lexical'\n\nconst RichTextComponent: React.FC<\n {\n readonly editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n } & LexicalRichTextFieldProps\n> = (props) => {\n const {\n editorConfig,\n field,\n field: {\n admin: { className, description, readOnly: readOnlyFromAdmin } = {},\n label,\n localized,\n required,\n },\n path: pathFromProps,\n readOnly: readOnlyFromTopLevelProps,\n validate, // Users can pass in client side validation if they WANT to, but it's not required anymore\n } = props\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const editDepth = useEditDepth()\n\n const memoizedValidate = useCallback<Validate>(\n (value, validationOptions) => {\n if (typeof validate === 'function') {\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return validate(value, { ...validationOptions, required })\n }\n return true\n },\n // Important: do not add props to the dependencies array.\n // This would cause an infinite loop and endless re-rendering.\n // Removing props from the dependencies array fixed this issue: https://github.com/payloadcms/payload/issues/3709\n [validate, required],\n )\n\n const {\n customComponents: { AfterInput, BeforeInput, Description, Error, Label } = {},\n disabled: disabledFromField,\n initialValue,\n path,\n setValue,\n showError,\n value,\n } = useField<SerializedEditorState>({\n potentiallyStalePath: pathFromProps,\n validate: memoizedValidate,\n })\n\n const disabled = readOnlyFromProps || disabledFromField\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n const [rerenderProviderKey, setRerenderProviderKey] = useState<Date>()\n\n const prevInitialValueRef = React.useRef<SerializedEditorState | undefined>(initialValue)\n const prevValueRef = React.useRef<SerializedEditorState | undefined>(value)\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 const classes = [\n baseClass,\n 'field-type',\n className,\n showError && 'error',\n disabled && `${baseClass}--read-only`,\n editorConfig?.admin?.hideGutter !== true && !isSmallWidthViewport\n ? `${baseClass}--show-gutter`\n : null,\n ]\n .filter(Boolean)\n .join(' ')\n\n const pathWithEditDepth = `${path}.${editDepth}`\n\n const runDeprioritized = useRunDeprioritized() // defaults to 500 ms timeout\n\n const handleChange = useCallback(\n (editorState: EditorState) => {\n // Capture `editorState` in the closure so we can safely run later.\n const updateFieldValue = () => {\n const newState = editorState.toJSON()\n prevValueRef.current = newState\n setValue(newState)\n }\n\n // Queue the update for the browser’s idle time (or Safari shim)\n // and let the hook handle debouncing/cancellation.\n void runDeprioritized(updateFieldValue)\n },\n [setValue, runDeprioritized], // `runDeprioritized` is stable (useCallback inside hook)\n )\n\n const styles = useMemo(() => mergeFieldStyles(field), [field])\n\n const handleInitialValueChange = useEffectEvent(\n (initialValue: SerializedEditorState | undefined) => {\n // Object deep equality check here, as re-mounting the editor if\n // the new value is the same as the old one is not necessary.\n // In postgres, the order of keys in JSON objects is not guaranteed to be preserved,\n // so we need to do a deep equality check here that does not care about key order => we use dequal.\n // If we used JSON.stringify, the editor would re-mount every time you save the document, as the order of keys changes => change detected => re-mount.\n if (\n prevValueRef.current !== value &&\n !dequal(\n prevValueRef.current != null\n ? JSON.parse(JSON.stringify(prevValueRef.current))\n : prevValueRef.current,\n value,\n )\n ) {\n prevInitialValueRef.current = initialValue\n prevValueRef.current = value\n setRerenderProviderKey(new Date())\n }\n },\n )\n\n useEffect(() => {\n // Needs to trigger for object reference changes - otherwise,\n // reacting to the same initial value change twice will cause\n // the second change to be ignored, even though the value has changed.\n // That's because initialValue is not kept up-to-date\n if (!Object.is(initialValue, prevInitialValueRef.current)) {\n handleInitialValueChange(initialValue)\n }\n }, [initialValue])\n\n return (\n <div className={classes} key={pathWithEditDepth} style={styles}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n {Label || <FieldLabel label={label} localized={localized} path={path} required={required} />}\n <div className={`${baseClass}__wrap`}>\n <ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>\n {BeforeInput}\n {/* Lexical may be in a drawer. We need to define another BulkUploadProvider to ensure that the bulk upload drawer\n is rendered in the correct depth (not displayed *behind* the current drawer)*/}\n <BulkUploadProvider drawerSlugPrefix={path}>\n <LexicalProvider\n composerKey={pathWithEditDepth}\n editorConfig={editorConfig}\n fieldProps={props}\n isSmallWidthViewport={isSmallWidthViewport}\n key={JSON.stringify({ path, rerenderProviderKey })} // makes sure lexical is completely re-rendered when initialValue changes, bypassing the lexical-internal value memoization. That way, external changes to the form will update the editor. More infos in PR description (https://github.com/payloadcms/payload/pull/5010)\n onChange={handleChange}\n readOnly={disabled}\n value={value}\n />\n </BulkUploadProvider>\n {AfterInput}\n </ErrorBoundary>\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n\nfunction fallbackRender({ error }: { error: Error }) {\n // Call resetErrorBoundary() to reset the error boundary and retry the render.\n\n return (\n <div className=\"errorBoundary\" role=\"alert\">\n <p>Something went wrong:</p>\n <pre style={{ color: 'red' }}>{error.message}</pre>\n </div>\n )\n}\n\nexport const RichText: typeof RichTextComponent = RichTextComponent\n", "'use client'\nimport type { InitialConfigType } from '@lexical/react/LexicalComposer.js'\nimport type { EditorState, LexicalEditor, SerializedEditorState } from 'lexical'\n\nimport { LexicalComposer } from '@lexical/react/LexicalComposer.js'\nimport { useEditDepth } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { LexicalRichTextFieldProps } from '../types.js'\nimport type { SanitizedClientEditorConfig } from './config/types.js'\n\nimport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './config/client/EditorConfigProvider.js'\nimport { LexicalEditor as LexicalEditorComponent } from './LexicalEditor.js'\nimport { getEnabledNodes } from './nodes/index.js'\n\nexport type LexicalProviderProps = {\n composerKey: string\n editorConfig: SanitizedClientEditorConfig\n fieldProps: LexicalRichTextFieldProps\n isSmallWidthViewport: boolean\n onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void\n readOnly: boolean\n value: SerializedEditorState\n}\n\nconst NestProviders = ({\n children,\n providers,\n}: {\n children: React.ReactNode\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n providers: any[]\n}) => {\n if (!providers?.length) {\n return children\n }\n const Component = providers[0]\n if (providers.length > 1) {\n return (\n <Component>\n <NestProviders providers={providers.slice(1)}>{children}</NestProviders>\n </Component>\n )\n }\n return <Component>{children}</Component>\n}\n\nexport const LexicalProvider: React.FC<LexicalProviderProps> = (props) => {\n const { composerKey, editorConfig, fieldProps, isSmallWidthViewport, onChange, readOnly, value } =\n props\n\n const parentContext = useEditorConfigContext()\n\n const editDepth = useEditDepth()\n\n const editorContainerRef = React.useRef<HTMLDivElement>(null)\n\n // useMemo for the initialConfig that depends on readOnly and value\n const initialConfig = useMemo<InitialConfigType>(() => {\n if (value && typeof value !== 'object') {\n throw new Error(\n 'The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: ' +\n JSON.stringify(value),\n )\n }\n\n if (value && Array.isArray(value) && !('root' in value)) {\n throw new Error(\n 'You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended',\n )\n }\n\n if (value && 'jsonContent' in value) {\n throw new Error(\n 'You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical',\n )\n }\n\n return {\n editable: readOnly !== true,\n editorState: value != null ? JSON.stringify(value) : undefined,\n namespace: editorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig }),\n onError: (error: Error) => {\n throw error\n },\n theme: editorConfig.lexical.theme,\n }\n // 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\n // cause the editor to lose focus.\n }, [editorConfig])\n\n if (!initialConfig) {\n return <p>Loading...</p>\n }\n\n // We need to add initialConfig.editable to the key to force a re-render when the readOnly prop changes.\n // 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.\n return (\n <LexicalComposer initialConfig={initialConfig} key={composerKey + initialConfig.editable}>\n <EditorConfigProvider\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n fieldProps={fieldProps}\n /**\n * Parent editor is not truly the parent editor, if the current editor is part of a drawer and the parent editor is the main editor.\n */\n parentContext={parentContext?.editDepth === editDepth ? parentContext : undefined}\n >\n <NestProviders providers={editorConfig.features.providers}>\n <LexicalEditorComponent\n editorConfig={editorConfig}\n editorContainerRef={editorContainerRef}\n isSmallWidthViewport={isSmallWidthViewport}\n onChange={onChange}\n />\n </NestProviders>\n </EditorConfigProvider>\n </LexicalComposer>\n )\n}\n", "'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 { useLexicalEditable } from '@lexical/react/useLexicalEditable'\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 './LexicalEditor.scss'\nimport { EditorPlugin } from './EditorPlugin.js'\nimport { ClipboardPlugin } from './plugins/ClipboardPlugin/index.js'\nimport { DecoratorPlugin } from './plugins/DecoratorPlugin/index.js'\nimport { AddBlockHandlePlugin } from './plugins/handles/AddBlockHandlePlugin/index.js'\nimport { DraggableBlockPlugin } from './plugins/handles/DraggableBlockPlugin/index.js'\nimport { InsertParagraphAtEndPlugin } from './plugins/InsertParagraphAtEnd/index.js'\nimport { MarkdownShortcutPlugin } from './plugins/MarkdownShortcut/index.js'\nimport { NormalizeSelectionPlugin } from './plugins/NormalizeSelection/index.js'\nimport { SelectAllPlugin } from './plugins/SelectAllPlugin/index.js'\nimport { SlashMenuPlugin } from './plugins/SlashMenu/index.js'\nimport { TextPlugin } from './plugins/TextPlugin/index.js'\nimport { LexicalContentEditable } from './ui/ContentEditable.js'\n\nexport const LexicalEditor: React.FC<\n {\n editorContainerRef: React.RefObject<HTMLDivElement | null>\n isSmallWidthViewport: boolean\n } & Pick<LexicalProviderProps, 'editorConfig' | 'onChange'>\n> = (props) => {\n const { editorConfig, editorContainerRef, isSmallWidthViewport, onChange } = props\n const editorConfigContext = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\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 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 editorConfig={editorConfig} />\n </div>\n </div>\n }\n ErrorBoundary={LexicalErrorBoundary}\n />\n <NormalizeSelectionPlugin />\n {isEditable && <InsertParagraphAtEndPlugin />}\n <DecoratorPlugin />\n <ClipboardPlugin />\n <TextPlugin features={editorConfig.features} />\n <SelectAllPlugin />\n {isEditable && (\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 )}\n {floatingAnchorElem && (\n <React.Fragment>\n {!isSmallWidthViewport && isEditable && (\n <React.Fragment>\n {editorConfig.admin?.hideDraggableBlockElement ? null : (\n <DraggableBlockPlugin anchorElem={floatingAnchorElem} />\n )}\n {editorConfig.admin?.hideAddBlockButton ? null : (\n <AddBlockHandlePlugin anchorElem={floatingAnchorElem} />\n )}\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 {isEditable && (\n <React.Fragment>\n <SlashMenuPlugin anchorElem={floatingAnchorElem} />\n </React.Fragment>\n )}\n </React.Fragment>\n )}\n {isEditable && (\n <React.Fragment>\n <HistoryPlugin />\n {editorConfig?.features?.markdownTransformers?.length > 0 && <MarkdownShortcutPlugin />}\n </React.Fragment>\n )}\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", "'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", "'use client'\n\nimport { copyToClipboard } from '@lexical/clipboard'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { objectKlassEquals } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport { $getSelection, $isNodeSelection, COMMAND_PRIORITY_LOW, COPY_COMMAND } from 'lexical'\nimport { useEffect } from 'react'\n\ntype SerializedUnknownLexicalNode = {\n children?: SerializedUnknownLexicalNode[]\n type: string\n}\n\ntype LexicalClipboardData = {\n namespace: string\n nodes: SerializedUnknownLexicalNode[]\n}\n\nconst changeIds = (node: SerializedUnknownLexicalNode) => {\n if (\n 'fields' in node &&\n typeof node.fields === 'object' &&\n node.fields !== null &&\n 'id' in node.fields\n ) {\n node.fields.id = new ObjectID.default().toHexString()\n } else if ('id' in node) {\n node.id = new ObjectID.default().toHexString()\n }\n\n if (node.children) {\n for (const child of node.children) {\n changeIds(child)\n }\n }\n}\n\nexport function ClipboardPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n // Remove duplicated ids from clipboard. We do it here because:\n // 1. Browsers do not allow setting the clipboardData in paste event for security reasons.\n // 2. If you cut instead of paste, the id will be kept, which is a good thing.\n return editor.registerCommand(\n COPY_COMMAND,\n (event) => {\n // Handle decorator node case\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n const node = selection.getNodes()[0]\n\n const serializedNode = node?.exportJSON() as SerializedUnknownLexicalNode\n const deepCloneSerializedNode = JSON.parse(JSON.stringify(serializedNode))\n changeIds(deepCloneSerializedNode)\n\n const lexicalClipboardData: LexicalClipboardData = {\n namespace: editor._config.namespace,\n nodes: [deepCloneSerializedNode],\n }\n\n const stringifiedLexicalClipboardData = JSON.stringify(lexicalClipboardData)\n\n copyToClipboard(editor, null, {\n 'application/x-lexical-editor': stringifiedLexicalClipboardData,\n 'text/plain': '',\n }).catch((error) => {\n throw error\n })\n return true\n }\n\n // Handle range selection case\n copyToClipboard(editor, objectKlassEquals(event, ClipboardEvent) ? event : null)\n .then(() => {\n if (!(event instanceof ClipboardEvent) || !event.clipboardData) {\n throw new Error('No clipboard event')\n }\n const lexicalStringified = event.clipboardData.getData('application/x-lexical-editor')\n if (!lexicalStringified) {\n return true\n }\n\n const lexical = JSON.parse(lexicalStringified) as {\n nodes: SerializedUnknownLexicalNode[]\n }\n\n for (const node of lexical.nodes) {\n changeIds(node)\n }\n const stringified = JSON.stringify(lexical)\n event.clipboardData.setData('application/x-lexical-editor', stringified)\n })\n .catch((error) => {\n if (event instanceof ClipboardEvent) {\n event.clipboardData?.setData('application/x-lexical-editor', '')\n }\n throw error\n })\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\n\nimport type { DecoratorNode, ElementNode, LexicalNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport {\n $createNodeSelection,\n $getEditor,\n $getNearestNodeFromDOMNode,\n $getSelection,\n $isDecoratorNode,\n $isElementNode,\n $isLineBreakNode,\n $isNodeSelection,\n $isRangeSelection,\n $isRootOrShadowRoot,\n $isTextNode,\n $setSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_LOW,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_BACKSPACE_COMMAND,\n KEY_DELETE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport './index.scss'\n\n// TODO: This should ideally be fixed in Lexical. See\n// https://github.com/facebook/lexical/pull/7072\nexport function DecoratorPlugin() {\n const [editor] = useLexicalComposerContext()\n\n const $onDelete = (event: KeyboardEvent) => {\n const selection = $getSelection()\n if (!$isNodeSelection(selection)) {\n return false\n }\n event.preventDefault()\n selection.getNodes().forEach((node) => {\n node.remove()\n })\n return true\n }\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n CLICK_COMMAND,\n (event) => {\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n const decorator = $getDecoratorByMouseEvent(event)\n if (!decorator) {\n return true\n }\n const { target } = event\n const isInteractive =\n !(target instanceof HTMLElement) ||\n target.isContentEditable ||\n target.closest(\n 'button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role=\"button\"]',\n )\n if (isInteractive) {\n $setSelection(null)\n } else {\n $selectDecorator(decorator)\n }\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(KEY_DELETE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(KEY_BACKSPACE_COMMAND, $onDelete, COMMAND_PRIORITY_LOW),\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n const decorator = $getSelectedDecorator()\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n if (decorator) {\n decorator.element?.classList.add('decorator-selected')\n return true\n }\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ARROW_UP_COMMAND,\n (event) => {\n // CASE 1: Node selection\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n const prevSibling = selection.getNodes()[0]?.getPreviousSibling()\n if ($isDecoratorNode(prevSibling)) {\n const element = $getEditor().getElementByKey(prevSibling.getKey())\n if (element) {\n $selectDecorator({ element, node: prevSibling })\n event.preventDefault()\n return true\n }\n return false\n }\n if (!$isElementNode(prevSibling)) {\n return false\n }\n const lastDescendant = prevSibling.getLastDescendant() ?? prevSibling\n if (!lastDescendant) {\n return false\n }\n const block = $findMatchingParent(lastDescendant, INTERNAL_$isBlock)\n block?.selectStart()\n event.preventDefault()\n return true\n }\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n // CASE 2: Range selection\n // Get first selected block\n const firstPoint = selection.isBackward() ? selection.anchor : selection.focus\n const firstNode = firstPoint.getNode()\n const firstSelectedBlock = $findMatchingParent(firstNode, (node) => {\n return findFirstSiblingBlock(node) !== null\n })\n const prevBlock = firstSelectedBlock?.getPreviousSibling()\n if (!firstSelectedBlock || prevBlock !== findFirstSiblingBlock(firstSelectedBlock)) {\n return false\n }\n\n if ($isDecoratorNode(prevBlock)) {\n const prevBlockElement = $getEditor().getElementByKey(prevBlock.getKey())\n if (prevBlockElement) {\n $selectDecorator({ element: prevBlockElement, node: prevBlock })\n event.preventDefault()\n return true\n }\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ARROW_DOWN_COMMAND,\n (event) => {\n // CASE 1: Node selection\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n event.preventDefault()\n const nextSibling = selection.getNodes()[0]?.getNextSibling()\n if ($isDecoratorNode(nextSibling)) {\n const element = $getEditor().getElementByKey(nextSibling.getKey())\n if (element) {\n $selectDecorator({ element, node: nextSibling })\n }\n return true\n }\n if (!$isElementNode(nextSibling)) {\n return true\n }\n const firstDescendant = nextSibling.getFirstDescendant() ?? nextSibling\n if (!firstDescendant) {\n return true\n }\n const block = $findMatchingParent(firstDescendant, INTERNAL_$isBlock)\n block?.selectEnd()\n event.preventDefault()\n return true\n }\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n // CASE 2: Range selection\n // Get last selected block\n const lastPoint = selection.isBackward() ? selection.anchor : selection.focus\n const lastNode = lastPoint.getNode()\n const lastSelectedBlock = $findMatchingParent(lastNode, (node) => {\n return findLaterSiblingBlock(node) !== null\n })\n const nextBlock = lastSelectedBlock?.getNextSibling()\n if (!lastSelectedBlock || nextBlock !== findLaterSiblingBlock(lastSelectedBlock)) {\n return false\n }\n\n if ($isDecoratorNode(nextBlock)) {\n const nextBlockElement = $getEditor().getElementByKey(nextBlock.getKey())\n if (nextBlockElement) {\n $selectDecorator({ element: nextBlockElement, node: nextBlock })\n event.preventDefault()\n return true\n }\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor])\n\n return null\n}\n\nfunction $getDecoratorByMouseEvent(\n event: MouseEvent,\n): { element: HTMLElement; node: DecoratorNode<unknown> } | undefined {\n if (!(event.target instanceof HTMLElement)) {\n return undefined\n }\n const element = event.target.closest('[data-lexical-decorator=\"true\"]')\n if (!(element instanceof HTMLElement)) {\n return undefined\n }\n const node = $getNearestNodeFromDOMNode(element)\n return $isDecoratorNode(node) ? { element, node } : undefined\n}\n\nfunction $getSelectedDecorator() {\n const selection = $getSelection()\n if (!$isNodeSelection(selection)) {\n return undefined\n }\n const nodes = selection.getNodes()\n if (nodes.length !== 1) {\n return undefined\n }\n const node = nodes[0]\n return $isDecoratorNode(node)\n ? {\n decorator: node,\n element: $getEditor().getElementByKey(node.getKey()),\n }\n : undefined\n}\n\nfunction $selectDecorator({\n element,\n node,\n}: {\n element: HTMLElement\n node: DecoratorNode<unknown>\n}) {\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n const selection = $createNodeSelection()\n selection.add(node.getKey())\n $setSelection(selection)\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n element.classList.add('decorator-selected')\n}\n\n/**\n * Copied from https://github.com/facebook/lexical/blob/main/packages/lexical/src/LexicalUtils.ts\n *\n * This function returns true for a DecoratorNode that is not inline OR\n * an ElementNode that is:\n * - not a root or shadow root\n * - not inline\n * - can't be empty\n * - has no children or an inline first child\n */\nexport function INTERNAL_$isBlock(node: LexicalNode): node is DecoratorNode<unknown> | ElementNode {\n if ($isDecoratorNode(node) && !node.isInline()) {\n return true\n }\n if (!$isElementNode(node) || $isRootOrShadowRoot(node)) {\n return false\n }\n\n const firstChild = node.getFirstChild()\n const isLeafElement =\n firstChild === null ||\n $isLineBreakNode(firstChild) ||\n $isTextNode(firstChild) ||\n firstChild.isInline()\n\n return !node.isInline() && node.canBeEmpty() !== false && isLeafElement\n}\n\nfunction findLaterSiblingBlock(node: LexicalNode): LexicalNode | null {\n let current = node.getNextSibling()\n while (current !== null) {\n if (INTERNAL_$isBlock(current)) {\n return current\n }\n current = current.getNextSibling()\n }\n return null\n}\n\nfunction findFirstSiblingBlock(node: LexicalNode): LexicalNode | null {\n let current = node.getPreviousSibling()\n while (current !== null) {\n if (INTERNAL_$isBlock(current)) {\n return current\n }\n current = current.getPreviousSibling()\n }\n return null\n}\n", "'use client'\nimport type { LexicalEditor, LexicalNode, ParagraphNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { Point } from '../../../utils/point.js'\nimport { ENABLE_SLASH_MENU_COMMAND } from '../../SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport './index.scss'\n\nconst ADD_BLOCK_MENU_CLASSNAME = 'add-block-menu'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction useAddBlockHandle(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const { editorConfig } = useEditorConfigContext()\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -24 : 12\n\n const menuRef = useRef<HTMLButtonElement>(null)\n const [hoveredElement, setHoveredElement] = useState<{\n elem: HTMLElement\n node: LexicalNode\n } | null>(null)\n\n useEffect(() => {\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n\n if (distanceFromScrollerElem === -1) {\n setHoveredElement(null)\n return\n }\n\n if (isOnHandleElement(target, ADD_BLOCK_MENU_CLASSNAME)) {\n return\n }\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _emptyBlockElem,\n blockNode,\n foundAtIndex,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n returnEmptyParagraphs: true,\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n })\n\n prevIndex = foundAtIndex\n\n if (!_emptyBlockElem) {\n return\n }\n if (\n blockNode &&\n (hoveredElement?.node !== blockNode || hoveredElement?.elem !== _emptyBlockElem)\n ) {\n setHoveredElement({\n elem: _emptyBlockElem,\n node: blockNode,\n })\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, hoveredElement])\n\n useEffect(() => {\n if (menuRef.current && hoveredElement?.node) {\n setHandlePosition(\n hoveredElement?.elem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, hoveredElement, blockHandleHorizontalOffset])\n\n const handleAddClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n let hoveredElementToUse = hoveredElement\n if (!hoveredElementToUse?.node) {\n return\n }\n\n // 1. Update hoveredElement.node to a new paragraph node if the hoveredElement.node is not a paragraph node\n editor.update(() => {\n // Check if blockNode is an empty text node\n let isEmptyParagraph = true\n if (\n hoveredElementToUse?.node.getType() !== 'paragraph' ||\n hoveredElementToUse.node.getTextContent() !== ''\n ) {\n isEmptyParagraph = false\n }\n\n if (!isEmptyParagraph) {\n const newParagraph = $createParagraphNode()\n hoveredElementToUse?.node.insertAfter(newParagraph)\n\n setTimeout(() => {\n hoveredElementToUse = {\n elem: editor.getElementByKey(newParagraph.getKey())!,\n node: newParagraph,\n }\n setHoveredElement(hoveredElementToUse)\n }, 0)\n }\n })\n\n // 2. Focus on the new paragraph node\n setTimeout(() => {\n editor.update(() => {\n editor.focus()\n\n if (\n hoveredElementToUse?.node &&\n 'select' in hoveredElementToUse.node &&\n typeof hoveredElementToUse.node.select === 'function'\n ) {\n hoveredElementToUse.node.select()\n }\n })\n }, 1)\n\n // Make sure this is called AFTER the focusing has been processed by the browser\n // Otherwise, this won't work\n setTimeout(() => {\n editor.dispatchCommand(ENABLE_SLASH_MENU_COMMAND, {\n node: hoveredElementToUse?.node as ParagraphNode,\n })\n }, 2)\n\n event.stopPropagation()\n event.preventDefault()\n },\n [editor, hoveredElement],\n )\n\n return createPortal(\n <React.Fragment>\n <button\n aria-label=\"Add block\"\n className=\"icon add-block-menu\"\n onClick={(event) => {\n handleAddClick(event)\n }}\n ref={menuRef}\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function AddBlockHandlePlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useAddBlockHandle(editor, anchorElem, editor._editable)\n}\n", "'use client'\n/**\n * Calculate distance between scrollerElem and target if target is not in scrollerElem\n */\nexport const calculateDistanceFromScrollerElem = (\n scrollerElem: HTMLElement | null,\n pageX: number,\n pageY: number,\n target: HTMLElement,\n horizontalBuffer: number = 50,\n verticalBuffer: number = 25,\n): number => {\n let distanceFromScrollerElem = 0\n if (scrollerElem && !scrollerElem.contains(target)) {\n const { bottom, left, right, top } = scrollerElem.getBoundingClientRect()\n\n const adjustedTop = top + window.scrollY\n const adjustedBottom = bottom + window.scrollY\n\n if (\n pageY < adjustedTop - verticalBuffer ||\n pageY > adjustedBottom + verticalBuffer ||\n pageX < left - horizontalBuffer ||\n pageX > right + horizontalBuffer\n ) {\n return -1\n }\n\n // This is used to allow the _draggableBlockElem to be found when the mouse is in the\n // buffer zone around the scrollerElem.\n if (pageX < left || pageX > right) {\n distanceFromScrollerElem = pageX < left ? pageX - left : pageX - right\n }\n }\n return distanceFromScrollerElem\n}\n", "'use client'\nimport type { LexicalEditor, LexicalNode } from 'lexical'\n\nimport { $getNodeByKey } from 'lexical'\n\nimport { Point } from '../../../utils/point.js'\nimport { Rect } from '../../../utils/rect.js'\nimport { getBoundingClientRectWithoutTransform } from '../DraggableBlockPlugin/getBoundingRectWithoutTransform.js'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\n\n// Directions\nconst Downward = 1\nconst Upward = -1\nconst Indeterminate = 0\n\ntype Props = {\n anchorElem: HTMLElement\n cache_threshold?: number\n editor: LexicalEditor\n /** fuzzy makes the search not exact. If no exact match found, find the closes node instead of returning null */\n fuzzy?: boolean\n horizontalOffset?: number\n point: Point\n /**\n * By default, empty paragraphs are not returned. Set this to true to return empty paragraphs. @default false\n */\n returnEmptyParagraphs?: boolean\n /**\n * The index to start searching from. It can be a considerable performance optimization to start searching from the index of the\n * previously found node, as the node is likely to be close to the next node.\n */\n startIndex?: number\n useEdgeAsDefault?: boolean\n verbose?: boolean\n}\n\ntype Output = {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n}\n\nconst cache = {\n props: null as null | Props,\n result: null as null | Output,\n}\n\nfunction isPointClose(previous: Point, current: Point, threshold: number = 20): boolean {\n const dx = previous.x - current.x\n const dy = previous.y - current.y\n return dx * dx + dy * dy <= threshold * threshold\n}\n\nexport function getNodeCloseToPoint(props: Props): Output {\n const {\n anchorElem,\n cache_threshold = 20,\n editor,\n fuzzy = false,\n horizontalOffset = 0,\n point: { x, y },\n startIndex = 0,\n useEdgeAsDefault = false,\n } = props\n\n // Use cache\n if (\n cache_threshold > 0 &&\n cache.props &&\n cache.result &&\n cache.props.fuzzy === props.fuzzy &&\n cache.props.horizontalOffset === props.horizontalOffset &&\n cache.props.useEdgeAsDefault === props.useEdgeAsDefault &&\n isPointClose(cache.props.point, props.point, cache_threshold)\n ) {\n return cache.result\n }\n\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const closestBlockElem: {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n distance: number\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n } = {\n blockElem: null,\n blockNode: null,\n distance: Infinity,\n foundAtIndex: -1,\n isFoundNodeEmptyParagraph: false,\n }\n\n // Return null if matching block element is the first or last node\n editor.getEditorState().read(() => {\n if (useEdgeAsDefault) {\n const firstNode = editor.getElementByKey(topLevelNodeKeys[0]!)\n const lastNode = editor.getElementByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]!)\n\n if (firstNode && lastNode) {\n const [firstNodeRect, lastNodeRect] = [\n getBoundingClientRectWithoutTransform(firstNode),\n getBoundingClientRectWithoutTransform(lastNode),\n ]\n\n if (y < firstNodeRect.top) {\n closestBlockElem.blockElem = firstNode\n closestBlockElem.distance = firstNodeRect.top - y\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[0]!)\n closestBlockElem.foundAtIndex = 0\n } else if (y > lastNodeRect.bottom) {\n closestBlockElem.distance = y - lastNodeRect.bottom\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]!)\n closestBlockElem.blockElem = lastNode\n closestBlockElem.foundAtIndex = topLevelNodeKeys.length - 1\n }\n\n if (closestBlockElem?.blockElem) {\n return {\n blockElem: null,\n isFoundNodeEmptyParagraph: false,\n } as Output\n }\n }\n }\n\n // Find matching block element\n let index = startIndex\n let direction = Indeterminate\n\n while (index >= 0 && index < topLevelNodeKeys.length) {\n const key = topLevelNodeKeys[index]!\n const elem = editor.getElementByKey(key)\n if (elem === null) {\n break\n }\n const point = new Point(x + horizontalOffset, y)\n //const domRect = Rect.fromDOM(elem)\n // Do not consider transform of blocks when calculating distance\n const domRect = Rect.fromDOMRect(getBoundingClientRectWithoutTransform(elem))\n\n const { marginBottom, marginTop } = getCollapsedMargins(elem)\n\n const rect = domRect.generateNewRect({\n bottom: domRect.bottom + marginBottom,\n left: anchorElementRect.left,\n right: anchorElementRect.right,\n top: domRect.top - marginTop,\n })\n\n const { distance, isOnBottomSide, isOnTopSide } = rect.distanceFromPoint(point)\n\n if (distance === 0) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.foundAtIndex = index\n closestBlockElem.distance = distance\n\n // Check if blockNode is an empty text node\n if (\n closestBlockElem.blockNode &&\n closestBlockElem.blockNode.getType() === 'paragraph' &&\n closestBlockElem.blockNode.getTextContent() === ''\n ) {\n if (!fuzzy && !props.returnEmptyParagraphs) {\n closestBlockElem.blockElem = null\n closestBlockElem.blockNode = null\n }\n\n closestBlockElem.isFoundNodeEmptyParagraph = true\n }\n break\n } else if (fuzzy) {\n if (distance < closestBlockElem.distance) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.distance = distance\n closestBlockElem.foundAtIndex = index\n }\n }\n\n if (direction === Indeterminate) {\n if (isOnTopSide) {\n direction = Upward\n } else if (isOnBottomSide) {\n direction = Downward\n } else {\n // stop search block element\n direction = Infinity\n }\n }\n\n index += direction\n }\n })\n\n // Store in cache before returning\n cache.props = props\n cache.result = {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n\n return {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n}\n", "'use client'\nexport function getBoundingClientRectWithoutTransform(elem: HTMLElement): DOMRect {\n const rect = elem.getBoundingClientRect()\n\n // Extract the translation value from the transform style\n const transformValue = getComputedStyle(elem).getPropertyValue('transform')\n if (!transformValue || transformValue === 'none') {\n return rect\n }\n\n const lastNumberOfTransformValue = transformValue.split(',').pop()\n rect.y = rect.y - Number(lastNumberOfTransformValue?.replace(')', ''))\n\n // Return the original bounding rect if no translation is applied\n return rect\n}\n", "'use client'\nexport function getCollapsedMargins(elem: HTMLElement): {\n marginBottom: number\n marginTop: number\n} {\n const getMargin = (element: Element | null, margin: 'marginBottom' | 'marginTop'): number =>\n element ? parseFloat(window.getComputedStyle(element)[margin]) : 0\n\n const { marginBottom, marginTop } = window.getComputedStyle(elem)\n const prevElemSiblingMarginBottom = getMargin(elem.previousElementSibling, 'marginBottom')\n const nextElemSiblingMarginTop = getMargin(elem.nextElementSibling, 'marginTop')\n const collapsedTopMargin = Math.max(parseFloat(marginTop), prevElemSiblingMarginBottom)\n const collapsedBottomMargin = Math.max(parseFloat(marginBottom), nextElemSiblingMarginTop)\n\n return { marginBottom: collapsedBottomMargin, marginTop: collapsedTopMargin }\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { $getRoot } from 'lexical'\n\nexport function getTopLevelNodeKeys(editor: LexicalEditor): string[] {\n return editor.getEditorState().read(() => $getRoot().getChildrenKeys())\n}\n", "'use client'\nexport function isOnHandleElement(element: HTMLElement, handleElementClassName: string): boolean {\n return !!element.closest(`.${handleElementClassName}`)\n}\n", "'use client'\nconst replacedElements = [\n 'IMG',\n 'INPUT',\n 'TEXTAREA',\n 'SELECT',\n 'BUTTON',\n 'VIDEO',\n 'OBJECT',\n 'EMBED',\n 'IFRAME',\n 'HR',\n]\n\n/**\n * From ChatGPT, only that verified it works for HR elements.\n *\n * HTML Elements can have CSS lineHeight applied to them, but it doesn't always affect the visual layout.\n * This function checks if the line-height property has an effect on the element's layout.\n * @param htmlElem\n */\nexport function doesLineHeightAffectElement(htmlElem: HTMLElement) {\n if (!htmlElem) {\n return false\n }\n\n // Check for replaced elements, elements that typically don't support line-height adjustments,\n // and elements without visible content\n\n if (\n replacedElements.includes(htmlElem.tagName) ||\n htmlElem.offsetHeight === 0 ||\n htmlElem.offsetWidth === 0\n ) {\n return false\n }\n\n // Check for specific CSS properties that negate line-height's visual effects\n const style = window.getComputedStyle(htmlElem)\n if (\n style.display === 'table-cell' ||\n style.position === 'absolute' ||\n style.visibility === 'hidden' ||\n style.opacity === '0'\n ) {\n return false\n }\n\n // This is a basic check, and there can be more complex scenarios where line-height doesn't have an effect.\n return true\n}\n", "'use client'\nimport { doesLineHeightAffectElement } from './doesLineHeightAffectElement.js'\n\nexport function setHandlePosition(\n targetElem: HTMLElement | null,\n handleElem: HTMLElement,\n anchorElem: HTMLElement,\n leftOffset: number = 0, // SPACE\n) {\n if (!targetElem) {\n handleElem.style.opacity = '0'\n handleElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const targetRect = targetElem.getBoundingClientRect()\n const targetStyle = window.getComputedStyle(targetElem)\n const floatingElemRect = handleElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n\n let top: number\n\n const isBlockStyle = [\n 'LexicalEditorTheme__block',\n 'LexicalEditorTheme__upload',\n 'LexicalEditorTheme__relationship',\n ].some(\n (classes) =>\n targetElem.classList.contains(classes) ||\n targetElem.firstElementChild?.classList.contains(classes),\n )\n\n if (!isBlockStyle) {\n // No need to let line height affect the re-positioning of the floating element if line height has no\n // visual effect on the element. Otherwise, the floating element will be positioned incorrectly.\n const actualLineHeight = doesLineHeightAffectElement(targetElem)\n ? parseInt(targetStyle.lineHeight, 10)\n : 0\n\n top = targetRect.top + (actualLineHeight - floatingElemRect.height) / 2 - anchorElementRect.top\n } else {\n top = targetRect.top + 8 - anchorElementRect.top\n }\n\n const left = leftOffset\n\n handleElem.style.opacity = '1'\n handleElem.style.transform = `translate(${left}px, ${top}px)`\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.scss'\nimport { setTargetLine } from './setTargetLine.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const menuRef = useRef<HTMLButtonElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const [draggableBlockElem, setDraggableBlockElem] = useState<HTMLElement | null>(null)\n const [lastTargetBlock, setLastTargetBlock] = useState<{\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n } | null>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -44 : -8\n\n useEffect(() => {\n /**\n * Handles positioning of the drag handle\n */\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : '3rem',\n blockHandleHorizontalOffset +\n (editorConfig?.admin?.hideGutter\n ? (menuRef?.current?.getBoundingClientRect()?.width ?? 0)\n : -(menuRef?.current?.getBoundingClientRect()?.width ?? 0)),\n targetLineElem,\n targetBlockElem,\n lastTargetBlock!,\n pageY,\n anchorElem,\n event,\n debugHighlightRef,\n isFoundNodeEmptyParagraph,\n )\n\n // Prevent default event to be able to trigger onDrop events\n // Calling preventDefault() adds the green plus icon to the cursor,\n // indicating that the drop is allowed.\n event.preventDefault()\n\n if (!willStayInSamePosition) {\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow,\n })\n }\n } else if (lastTargetBlock?.elem) {\n hideTargetLine(targetLineElem, lastTargetBlock.elem)\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow: false,\n })\n }\n\n return true\n }\n\n function onDrop(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n const { dataTransfer, pageY, target } = event\n const dragData = dataTransfer?.getData(DRAG_DATA_FORMAT) || ''\n\n editor.update(() => {\n const draggedNode = $getNodeByKey(dragData)\n if (!draggedNode) {\n return false\n }\n if (!isHTMLElement(target)) {\n return false\n }\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const { blockElem: targetBlockElem, isFoundNodeEmptyParagraph } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n useEdgeAsDefault: true,\n })\n\n if (!targetBlockElem) {\n return false\n }\n const targetNode = $getNearestNodeFromDOMNode(targetBlockElem)\n if (!targetNode) {\n return false\n }\n if (targetNode === draggedNode) {\n return true\n }\n\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n getBoundingClientRectWithoutTransform(targetBlockElem)\n\n const mouseY = pageY\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n targetNode.insertAfter(draggedNode)\n } else {\n // above targetBlockElem\n targetNode.insertBefore(draggedNode)\n }\n } else {\n //\n targetNode.insertBefore(draggedNode)\n targetNode.remove()\n }\n\n /*\n if (pageY >= targetBlockElemTop + targetBlockElemHeight / 2) {\n targetNode.insertAfter(draggedNode)\n } else {\n targetNode.insertBefore(draggedNode)\n }*/\n if (draggableBlockElem !== null) {\n setDraggableBlockElem(null)\n }\n\n // find all previous elements with lexical-block-highlighter class and remove them\n const allPrevHighlighters = document.querySelectorAll('.lexical-block-highlighter')\n allPrevHighlighters.forEach((highlighter) => {\n highlighter.remove()\n })\n\n const newInsertedElem = editor.getElementByKey(draggedNode.getKey())\n setTimeout(() => {\n // add new temp html element to newInsertedElem with the same height and width and the class block-selected\n // to highlight the new inserted element\n const newInsertedElemRect = newInsertedElem?.getBoundingClientRect()\n if (!newInsertedElemRect) {\n return\n }\n const highlightElem = document.createElement('div')\n highlightElem.className = 'lexical-block-highlighter'\n\n highlightElem.style.backgroundColor = 'var(--theme-elevation-1000'\n highlightElem.style.transition = 'opacity 0.5s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n setTimeout(() => {\n highlightElem.style.opacity = '0'\n setTimeout(() => {\n highlightElem.remove()\n }, 500)\n }, 1000)\n }, 120)\n })\n\n return true\n }\n\n // register onDragover event listeners:\n document.addEventListener('dragover', onDragover)\n // register onDrop event listeners:\n document.addEventListener('drop', onDrop)\n\n return () => {\n document.removeEventListener('dragover', onDragover)\n document.removeEventListener('drop', onDrop)\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n function onDragStart(event: ReactDragEvent<HTMLButtonElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n if (lastTargetBlock?.elem) {\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n }\n\n return createPortal(\n <React.Fragment>\n <button\n aria-label=\"Drag to move\"\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n", "'use client'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nconst TARGET_LINE_HALF_HEIGHT = 0\nconst TEXT_BOX_HORIZONTAL_PADDING = -24\nconst DEBUG = false\n\nlet animationTimer = 0\n\nexport function setTargetLine(\n offsetWidth: string,\n offsetLeft: number,\n targetLineElem: HTMLElement,\n targetBlockElem: HTMLElement,\n lastTargetBlock: {\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n },\n mouseY: number,\n anchorElem: HTMLElement,\n event: DragEvent,\n debugHighlightRef: React.RefObject<HTMLDivElement | null>,\n isFoundNodeEmptyParagraph: boolean = false,\n) {\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n targetBlockElem.getBoundingClientRect() // used to be getBoundingClientRectWithoutTransform. Not sure what's better, but the normal getBoundingClientRect seems to work fine\n const { top: anchorTop, width: anchorWidth } = anchorElem.getBoundingClientRect()\n\n const { marginBottom, marginTop } = getCollapsedMargins(targetBlockElem)\n let lineTop = targetBlockElemTop\n\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n let willStayInSamePosition = false\n\n /**\n * Do not run any transform or changes if the actual new line position would be the same (even if it's now inserted BEFORE rather than AFTER - position would still be the same)\n * This prevents unnecessary flickering.\n *\n * We still need to let it run even if the position (IGNORING the transform) would not change, as the transform animation is not finished yet. This is what animationTimer does. Otherwise, the positioning will be inaccurate\n */\n if (lastTargetBlock?.elem) {\n if (targetBlockElem !== lastTargetBlock?.elem) {\n if (\n isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.nextElementSibling\n ) {\n animationTimer++\n\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n } else if (\n !isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.previousElementSibling\n ) {\n animationTimer++\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n }\n } else {\n animationTimer++\n\n const lastBoundingBoxPosition = lastTargetBlock?.boundingBox?.y\n const currentBoundingBoxPosition = targetBlockElem.getBoundingClientRect().y\n\n if (\n (isBelow === lastTargetBlock?.isBelow &&\n lastBoundingBoxPosition === currentBoundingBoxPosition) ||\n animationTimer < 200\n ) {\n willStayInSamePosition = false\n }\n }\n }\n if (willStayInSamePosition) {\n return {\n isBelow,\n willStayInSamePosition,\n }\n }\n\n /**\n * Paragraphs need no isBelow/above handling,\n */\n if (!isFoundNodeEmptyParagraph) {\n //if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n lineTop += targetBlockElemHeight + marginBottom / 2\n } else {\n // above targetBlockElem\n lineTop -= marginTop / 2\n }\n } else {\n lineTop += targetBlockElemHeight / 2\n }\n\n let targetElemTranslate2 = 0\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetElemTranslate2 = -TARGET_LINE_HALF_HEIGHT\n } else {\n targetElemTranslate2 = TARGET_LINE_HALF_HEIGHT\n }\n }\n\n const top = lineTop - anchorTop + targetElemTranslate2\n\n const left = TEXT_BOX_HORIZONTAL_PADDING - offsetLeft\n\n targetLineElem.style.width = `calc(${anchorWidth}px - ${offsetWidth})`\n targetLineElem.style.opacity = '.8'\n\n // if (DEBUG) {\n // //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, targetBlockElem, anchorElem)\n // }\n\n targetLineElem.style.transform = `translate(${left}px, calc(${top}px - ${'2px'}))`\n\n /**\n * Properly reset previous targetBlockElem styles\n */\n if (lastTargetBlock?.elem) {\n lastTargetBlock.elem.style.opacity = ''\n\n if (lastTargetBlock?.elem === targetBlockElem) {\n if (isBelow) {\n lastTargetBlock.elem.style.marginTop = ''\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n }\n } else {\n lastTargetBlock.elem.style.marginBottom = ''\n lastTargetBlock.elem.style.marginTop = ''\n }\n }\n\n animationTimer = 0\n return {\n isBelow,\n willStayInSamePosition,\n }\n}\n", "/* eslint-disable jsx-a11y/click-events-have-key-events */\n'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $createParagraphNode, $getRoot } from 'lexical'\nimport React from 'react'\n\nimport './index.scss'\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nconst baseClass = 'insert-paragraph-at-end'\n\nexport const InsertParagraphAtEndPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig } = useEditorConfigContext()\n\n if (editorConfig?.admin?.hideInsertParagraphAtEnd) {\n return null\n }\n\n const onClick = () => {\n editor.update(() => {\n const paragraphNode = $createParagraphNode()\n $getRoot().append(paragraphNode)\n paragraphNode.select()\n })\n }\n\n return (\n // TODO: convert to button\n <div\n aria-label=\"Insert Paragraph\"\n className={baseClass}\n onClick={onClick}\n role=\"button\"\n tabIndex={0}\n >\n <div className={`${baseClass}-inside`}>\n <span>+</span>\n </div>\n </div>\n )\n}\n", "'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport * as React from 'react'\n\nimport { registerMarkdownShortcuts } from '../../../packages/@lexical/markdown/MarkdownShortcuts.js'\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\n\nexport const MarkdownShortcutPlugin: React.FC = () => {\n const { editorConfig } = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n\n React.useEffect(() => {\n return registerMarkdownShortcuts(editor, editorConfig.features.markdownTransformers ?? [])\n }, [editor, editorConfig.features.markdownTransformers])\n\n return null\n}\n", "import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $getSelection, $isRangeSelection, RootNode } from 'lexical'\nimport { useEffect } from 'react'\n\n/**\n * By default, Lexical throws an error if the selection ends in deleted nodes.\n * This is very aggressive considering there are reasons why this can happen\n * outside of Payload's control (custom features or conflicting features, for example).\n * In the case of selections on nonexistent nodes, this plugin moves the selection to\n * the end of the editor and displays a warning instead of an error.\n */\nexport function NormalizeSelectionPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerNodeTransform(RootNode, (root) => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n if (!anchorNode.isAttached() || !focusNode.isAttached()) {\n root.selectEnd()\n // eslint-disable-next-line no-console\n console.warn(\n 'updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and ' +\n \"selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.\",\n )\n }\n }\n return false\n })\n }, [editor])\n\n return null\n}\n", "import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $getSelection, COMMAND_PRIORITY_LOW, SELECT_ALL_COMMAND } from 'lexical'\nimport { useEffect } from 'react'\n\n/**\n * Allows to select inputs with `ctrl+a` or `cmd+a`.\n * Required because Lexical preventDefault the event.\n * see: https://github.com/payloadcms/payload/issues/6871\n */\nexport function SelectAllPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand(\n SELECT_ALL_COMMAND,\n () => {\n const selection = $getSelection()\n if (selection) {\n return false\n }\n const activeElement = document.activeElement\n if (activeElement instanceof HTMLInputElement) {\n activeElement.select()\n }\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useTranslation } from '@payloadcms/ui'\nimport { useCallback, useMemo, useState } from 'react'\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\n\nimport type {\n SlashMenuGroup,\n SlashMenuGroupInternal,\n SlashMenuItemInternal,\n SlashMenuItem as SlashMenuItemType,\n} from './LexicalTypeaheadMenuPlugin/types.js'\n\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nimport './index.scss'\nimport { LexicalTypeaheadMenuPlugin } from './LexicalTypeaheadMenuPlugin/index.js'\nimport { useMenuTriggerMatch } from './useMenuTriggerMatch.js'\n\nconst baseClass = 'slash-menu-popup'\n\nfunction SlashMenuItem({\n isSelected,\n item,\n onClick,\n onMouseEnter,\n ref,\n}: {\n index: number\n isSelected: boolean\n item: SlashMenuItemInternal\n onClick: () => void\n onMouseEnter: () => void\n ref?: React.Ref<HTMLButtonElement>\n}) {\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const { i18n } = useTranslation<{}, string>()\n\n let className = `${baseClass}__item ${baseClass}__item-${item.key}`\n if (isSelected) {\n className += ` ${baseClass}__item--selected`\n }\n\n let title = item.key\n if (item.label) {\n title =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n // Crop title to max. 25 characters\n if (title.length > 25) {\n title = title.substring(0, 25) + '...'\n }\n\n return (\n <button\n aria-selected={isSelected}\n className={className}\n id={baseClass + '__item-' + item.key}\n key={item.key}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n ref={ref}\n role=\"option\"\n tabIndex={-1}\n type=\"button\"\n >\n {item?.Icon && <item.Icon />}\n\n <span className={`${baseClass}__item-text`}>{title}</span>\n </button>\n )\n}\n\nexport function SlashMenuPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n const [queryString, setQueryString] = useState<null | string>(null)\n const { editorConfig } = useEditorConfigContext()\n const { i18n } = useTranslation<{}, string>()\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const checkForTriggerMatch = useMenuTriggerMatch('/', {\n minLength: 0,\n })\n\n const getDynamicItems = useCallback(() => {\n let groupWithItems: Array<SlashMenuGroup> = []\n\n for (const dynamicItem of editorConfig.features.slashMenu.dynamicGroups) {\n if (queryString) {\n const dynamicGroupWithItems = dynamicItem({\n editor,\n queryString,\n })\n groupWithItems = groupWithItems.concat(dynamicGroupWithItems)\n }\n }\n\n return groupWithItems\n }, [editor, queryString, editorConfig?.features])\n\n const groups: SlashMenuGroup[] = useMemo(() => {\n let groupsWithItems: SlashMenuGroup[] = []\n for (const groupWithItem of editorConfig?.features.slashMenu.groups ?? []) {\n groupsWithItems.push(groupWithItem)\n }\n\n if (queryString) {\n // Filter current groups first\n // @ts-expect-error - TODO: fix this\n groupsWithItems = groupsWithItems.map((group) => {\n const filteredItems = group.items.filter((item) => {\n let itemTitle = item.key\n if (item.label) {\n itemTitle =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n\n if (new RegExp(queryString, 'gi').exec(itemTitle)) {\n return true\n }\n if (item.keywords != null) {\n return item.keywords.some((keyword) => new RegExp(queryString, 'gi').exec(keyword))\n }\n return false\n })\n if (filteredItems.length) {\n return {\n ...group,\n items: filteredItems,\n }\n }\n return null\n })\n\n groupsWithItems = groupsWithItems.filter((group) => group != null)\n\n // Now add dynamic groups\n const dynamicItemGroups = getDynamicItems()\n\n // merge dynamic items into groups\n for (const dynamicGroup of dynamicItemGroups) {\n // 1. find the group with the same name or create new one\n let group = groupsWithItems.find((group) => group.key === dynamicGroup.key)\n if (!group) {\n group = {\n ...dynamicGroup,\n items: [],\n }\n } else {\n groupsWithItems = groupsWithItems.filter((group) => group.key !== dynamicGroup.key)\n }\n\n // 2. Add items to group items array and add to sanitized.slashMenu.groupsWithItems\n if (group?.items?.length) {\n group.items = group.items.concat(group.items)\n }\n groupsWithItems.push(group)\n }\n }\n\n return groupsWithItems\n }, [\n queryString,\n editorConfig?.features.slashMenu.groups,\n getDynamicItems,\n featureClientSchemaMap,\n i18n,\n schemaPath,\n ])\n\n return (\n <LexicalTypeaheadMenuPlugin\n anchorElem={anchorElem}\n groups={groups as SlashMenuGroupInternal[]}\n menuRenderFn={(\n anchorElementRef,\n { selectedItemKey, selectItemAndCleanUp, setSelectedItemKey },\n ) =>\n anchorElementRef.current && groups.length\n ? ReactDOM.createPortal(\n <div className={baseClass}>\n {groups.map((group) => {\n let groupTitle = group.key\n if (group.label && featureClientSchemaMap) {\n groupTitle =\n typeof group.label === 'function'\n ? group.label({ featureClientSchemaMap, i18n, schemaPath })\n : group.label\n }\n\n return (\n <div\n className={`${baseClass}__group ${baseClass}__group-${group.key}`}\n key={group.key}\n >\n <div className={`${baseClass}__group-title`}>{groupTitle}</div>\n {group.items.map((item, oi: number) => (\n <SlashMenuItem\n index={oi}\n isSelected={selectedItemKey === item.key}\n item={item as SlashMenuItemInternal}\n key={item.key}\n onClick={() => {\n setSelectedItemKey(item.key)\n selectItemAndCleanUp(item)\n }}\n onMouseEnter={() => {\n setSelectedItemKey(item.key)\n }}\n ref={(el) => {\n ;(item as SlashMenuItemInternal).ref = { current: el }\n }}\n />\n ))}\n </div>\n )\n })}\n </div>,\n anchorElementRef.current,\n )\n : null\n }\n onQueryChange={setQueryString}\n triggerFn={checkForTriggerMatch}\n />\n )\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useCallback } from 'react'\n\nimport { PUNCTUATION } from './LexicalTypeaheadMenuPlugin/index.js'\n\nexport type TriggerFn = ({\n editor,\n query,\n}: {\n editor: LexicalEditor\n /** The query string is the POTENTIAL trigger AND the text after the trigger text. */\n query: string\n}) => MenuTextMatch | null\n\nexport type MenuTextMatch = {\n leadOffset: number\n matchingString: string\n replaceableString: string\n}\n\n/**\n * Returns a function which checks if the trigger (e.g. '/') is present in the query and, if so, returns the matching string (text after the trigger)\n */\nexport function useMenuTriggerMatch(\n /**\n * Text which triggers the menu. Everything after this text will be used as the query.\n */\n trigger: string,\n { maxLength = 75, minLength = 1 }: { maxLength?: number; minLength?: number },\n): TriggerFn {\n return useCallback(\n ({ query }) => {\n const validChars = '[^' + trigger + PUNCTUATION + '\\\\s]'\n const TypeaheadTriggerRegex = new RegExp(\n '(^|\\\\s|\\\\()(' +\n '[' +\n trigger +\n ']' +\n '((?:' +\n validChars +\n '){0,' +\n maxLength +\n '})' +\n ')$',\n )\n const match = TypeaheadTriggerRegex.exec(query)\n if (match !== null) {\n const maybeLeadingWhitespace = match[1]!\n\n /**\n * matchingString is only the text AFTER the trigger text. (So everything after the /)\n */\n const matchingString = match[3]!\n\n if (matchingString.length >= minLength) {\n return {\n leadOffset: match.index + maybeLeadingWhitespace.length,\n matchingString,\n replaceableString: match[2]!, // replaceableString is the trigger text + the matching string\n }\n }\n }\n return null\n },\n [maxLength, minLength, trigger],\n )\n}\n", "'use client'\nimport type { TextFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { TEXT_TYPE_TO_FORMAT, TextNode } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { SanitizedClientFeatures } from '../../../features/typesClient.js'\n\nexport function TextPlugin({ features }: { features: SanitizedClientFeatures }) {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n const disabledFormats = getDisabledFormats(features.enabledFormats)\n if (disabledFormats.length === 0) {\n return\n }\n // Ideally override the TextNode with our own TextNode (changing its setFormat or toggleFormat methods),\n // would be more performant. If we find a noticeable perf regression we can switch to that option.\n // Overriding the FORMAT_TEXT_COMMAND and PASTE_COMMAND commands is not an option I considered because\n // there might be other forms of mutation that we might not be considering. For example:\n // browser extensions or Payload/Lexical plugins that have their own commands.\n return editor.registerNodeTransform(TextNode, (textNode) => {\n disabledFormats.forEach((disabledFormat) => {\n if (textNode.hasFormat(disabledFormat)) {\n textNode.toggleFormat(disabledFormat)\n }\n })\n })\n }, [editor, features])\n\n return null\n}\n\nfunction getDisabledFormats(enabledFormats: TextFormatType[]): TextFormatType[] {\n const allFormats = Object.keys(TEXT_TYPE_TO_FORMAT) as TextFormatType[]\n const enabledSet = new Set(enabledFormats)\n\n return allFormats.filter((format) => !enabledSet.has(format))\n}\n", "'use client'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport { useTranslation } from '@payloadcms/ui'\n\nimport './ContentEditable.scss'\n\nimport * as React from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../config/types.js'\n\nexport function LexicalContentEditable({\n className,\n editorConfig,\n}: {\n className?: string\n editorConfig: SanitizedClientEditorConfig\n}): JSX.Element {\n const { t } = useTranslation<{}, string>()\n const [_, { getTheme }] = useLexicalComposerContext()\n const theme = getTheme()\n\n return (\n <ContentEditable\n aria-placeholder={t('lexical:general:placeholder')}\n className={className ?? 'ContentEditable__root'}\n placeholder={\n <p className={theme?.placeholder}>\n {editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')}\n </p>\n }\n />\n )\n}\n"],
5
- "mappings": "gNAGA,OACEA,sBAAAA,GACAC,oBAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,yBAAAA,GACAC,gBAAAA,GACAC,kBAAAA,GACAC,YAAAA,OACK,iBACP,OAASC,oBAAAA,OAAwB,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6F,KAAK,kBAClCjB,EAAC,IAAA,UAAE,0BACHA,EAAC,MAAA,CAAID,MAAO,CAAEmB,MAAO,KAAM,WAAIF,EAAMG,YAG3C,CAEO,IAAMC,GAAqCrG",
6
- "names": ["BulkUploadProvider", "FieldDescription", "FieldError", "FieldLabel", "RenderCustomComponent", "useEditDepth", "useEffectEvent", "useField", "mergeFieldStyles", "dequal", "React", "useCallback", "useEffect", "useMemo", "useState", "ErrorBoundary", "LexicalComposer", "useEditDepth", "React", "useMemo", "c", "_c", "useLexicalComposerContext", "LexicalErrorBoundary", "HistoryPlugin", "OnChangePlugin", "RichTextPlugin", "useLexicalEditable", "BLUR_COMMAND", "COMMAND_PRIORITY_LOW", "FOCUS_COMMAND", "React", "useEffect", "useState", "EditorPlugin", "anchorElem", "clientProps", "plugin", "position", "Component", "_jsx", "c", "_c", "copyToClipboard", "useLexicalComposerContext", "objectKlassEquals", "ObjectID", "$getSelection", "$isNodeSelection", "COMMAND_PRIORITY_LOW", "COPY_COMMAND", "useEffect", "changeIds", "node", "fields", "id", "default", "toHexString", "children", "child", "ClipboardPlugin", "$", "editor", "t0", "t1", "registerCommand", "event", "selection", "serializedNode", "getNodes", "exportJSON", "deepCloneSerializedNode", "JSON", "parse", "stringify", "lexicalClipboardData", "namespace", "_config", "nodes", "stringifiedLexicalClipboardData", "catch", "_temp", "ClipboardEvent", "then", "clipboardData", "Error", "lexicalStringified", "getData", "lexical", "node_0", "stringified", "setData", "error_0", "error", "c", "_c", "useLexicalComposerContext", "$findMatchingParent", "mergeRegister", "$createNodeSelection", "$getEditor", "$getNearestNodeFromDOMNode", "$getSelection", "$isDecoratorNode", "$isElementNode", "$isLineBreakNode", "$isNodeSelection", "$isRangeSelection", "$isRootOrShadowRoot", "$isTextNode", "$setSelection", "CLICK_COMMAND", "COMMAND_PRIORITY_LOW", "KEY_ARROW_DOWN_COMMAND", "KEY_ARROW_UP_COMMAND", "KEY_BACKSPACE_COMMAND", "KEY_DELETE_COMMAND", "SELECTION_CHANGE_COMMAND", "useEffect", "DecoratorPlugin", "$", "editor", "$onDelete", "_temp2", "t0", "t1", "registerCommand", "_temp3", "_temp4", "_temp6", "_temp8", "event_2", "selection_1", "selection", "event", "preventDefault", "nextSibling", "getNodes", "getNextSibling", "element_0", "getElementByKey", "getKey", "element", "$selectDecorator", "node", "firstDescendant", "getFirstDescendant", "INTERNAL_$isBlock", "selectEnd", "lastNode", "isBackward", "anchor", "focus", "getNode", "lastSelectedBlock", "_temp7", "nextBlock", "findLaterSiblingBlock", "nextBlockElement", "node_1", "event_1", "selection_0", "prevSibling", "getPreviousSibling", "lastDescendant", "getLastDescendant", "selectStart", "firstNode", "firstSelectedBlock", "_temp5", "prevBlock", "findFirstSiblingBlock", "prevBlockElement", "node_0", "decorator_0", "$getSelectedDecorator", "document", "querySelector", "classList", "remove", "decorator", "add", "event_0", "$getDecoratorByMouseEvent", "target", "HTMLElement", "isContentEditable", "closest", "forEach", "_temp", "undefined", "nodes", "length", "scrollIntoView", "behavior", "block", "isInline", "firstChild", "getFirstChild", "isLeafElement", "canBeEmpty", "current", "useLexicalComposerContext", "$createParagraphNode", "isHTMLElement", "React", "useCallback", "useEffect", "useRef", "useState", "createPortal", "calculateDistanceFromScrollerElem", "scrollerElem", "pageX", "pageY", "target", "horizontalBuffer", "verticalBuffer", "distanceFromScrollerElem", "contains", "bottom", "left", "right", "top", "getBoundingClientRect", "adjustedTop", "window", "scrollY", "adjustedBottom", "$getNodeByKey", "getBoundingClientRectWithoutTransform", "elem", "rect", "getBoundingClientRect", "transformValue", "getComputedStyle", "getPropertyValue", "lastNumberOfTransformValue", "split", "pop", "y", "Number", "replace", "getCollapsedMargins", "elem", "getMargin", "element", "margin", "parseFloat", "window", "getComputedStyle", "marginBottom", "marginTop", "prevElemSiblingMarginBottom", "previousElementSibling", "nextElemSiblingMarginTop", "nextElementSibling", "collapsedTopMargin", "Math", "max", "$getRoot", "getTopLevelNodeKeys", "editor", "getEditorState", "read", "getChildrenKeys", "Downward", "Upward", "Indeterminate", "cache", "props", "result", "isPointClose", "previous", "current", "threshold", "dx", "x", "dy", "y", "getNodeCloseToPoint", "anchorElem", "cache_threshold", "editor", "fuzzy", "horizontalOffset", "point", "startIndex", "useEdgeAsDefault", "anchorElementRect", "getBoundingClientRect", "topLevelNodeKeys", "getTopLevelNodeKeys", "closestBlockElem", "blockElem", "blockNode", "distance", "Infinity", "foundAtIndex", "isFoundNodeEmptyParagraph", "getEditorState", "read", "firstNode", "getElementByKey", "lastNode", "length", "firstNodeRect", "lastNodeRect", "getBoundingClientRectWithoutTransform", "top", "$getNodeByKey", "bottom", "index", "direction", "key", "elem", "Point", "domRect", "Rect", "fromDOMRect", "marginBottom", "marginTop", "getCollapsedMargins", "rect", "generateNewRect", "left", "right", "isOnBottomSide", "isOnTopSide", "distanceFromPoint", "getType", "getTextContent", "returnEmptyParagraphs", "isOnHandleElement", "element", "handleElementClassName", "closest", "replacedElements", "doesLineHeightAffectElement", "htmlElem", "includes", "tagName", "offsetHeight", "offsetWidth", "style", "window", "getComputedStyle", "display", "position", "visibility", "opacity", "setHandlePosition", "targetElem", "handleElem", "anchorElem", "leftOffset", "style", "opacity", "transform", "targetRect", "getBoundingClientRect", "targetStyle", "window", "getComputedStyle", "floatingElemRect", "anchorElementRect", "top", "some", "classes", "classList", "contains", "firstElementChild", "actualLineHeight", "doesLineHeightAffectElement", "parseInt", "lineHeight", "height", "left", "ADD_BLOCK_MENU_CLASSNAME", "prevIndex", "Infinity", "getCurrentIndex", "keysLength", "Math", "floor", "useAddBlockHandle", "editor", "anchorElem", "isEditable", "scrollerElem", "parentElement", "editorConfig", "useEditorConfigContext", "blockHandleHorizontalOffset", "admin", "hideGutter", "menuRef", "useRef", "hoveredElement", "setHoveredElement", "useState", "useEffect", "onDocumentMouseMove", "event", "target", "isHTMLElement", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "pageX", "pageY", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "blockElem", "_emptyBlockElem", "blockNode", "foundAtIndex", "getNodeCloseToPoint", "cache_threshold", "horizontalOffset", "point", "Point", "x", "y", "returnEmptyParagraphs", "startIndex", "length", "useEdgeAsDefault", "node", "elem", "document", "addEventListener", "removeEventListener", "current", "setHandlePosition", "handleAddClick", "useCallback", "hoveredElementToUse", "update", "isEmptyParagraph", "getType", "getTextContent", "newParagraph", "$createParagraphNode", "insertAfter", "setTimeout", "getElementByKey", "getKey", "focus", "select", "dispatchCommand", "ENABLE_SLASH_MENU_COMMAND", "stopPropagation", "preventDefault", "createPortal", "_jsx", "Fragment", "className", "onClick", "ref", "type", "AddBlockHandlePlugin", "t0", "t1", "undefined", "body", "useLexicalComposerContext", "_editable", "useLexicalComposerContext", "eventFiles", "$getNearestNodeFromDOMNode", "$getNodeByKey", "isHTMLElement", "React", "useEffect", "useRef", "useState", "createPortal", "TARGET_LINE_HALF_HEIGHT", "TEXT_BOX_HORIZONTAL_PADDING", "animationTimer", "setTargetLine", "offsetWidth", "offsetLeft", "targetLineElem", "targetBlockElem", "lastTargetBlock", "mouseY", "anchorElem", "event", "debugHighlightRef", "isFoundNodeEmptyParagraph", "height", "targetBlockElemHeight", "top", "targetBlockElemTop", "getBoundingClientRect", "anchorTop", "width", "anchorWidth", "marginBottom", "marginTop", "getCollapsedMargins", "lineTop", "isBelow", "window", "scrollY", "willStayInSamePosition", "elem", "nextElementSibling", "previousElementSibling", "lastBoundingBoxPosition", "boundingBox", "y", "currentBoundingBoxPosition", "targetElemTranslate2", "TARGET_LINE_HALF_HEIGHT", "left", "TEXT_BOX_HORIZONTAL_PADDING", "style", "opacity", "transform", "DRAGGABLE_BLOCK_MENU_CLASSNAME", "DRAG_DATA_FORMAT", "prevIndex", "Infinity", "getCurrentIndex", "keysLength", "Math", "floor", "setDragImage", "dataTransfer", "draggableBlockElem", "transform", "style", "setTimeout", "hideTargetLine", "targetLineElem", "lastTargetBlockElem", "opacity", "marginBottom", "marginTop", "useDraggableBlockMenu", "editor", "anchorElem", "isEditable", "scrollerElem", "parentElement", "menuRef", "useRef", "targetLineRef", "debugHighlightRef", "isDraggingBlockRef", "setDraggableBlockElem", "useState", "lastTargetBlock", "setLastTargetBlock", "editorConfig", "useEditorConfigContext", "blockHandleHorizontalOffset", "admin", "hideGutter", "useEffect", "onDocumentMouseMove", "event", "target", "isHTMLElement", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "pageX", "pageY", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "blockElem", "_draggableBlockElem", "foundAtIndex", "isFoundNodeEmptyParagraph", "getNodeCloseToPoint", "cache_threshold", "horizontalOffset", "point", "Point", "x", "y", "startIndex", "length", "useEdgeAsDefault", "verbose", "document", "addEventListener", "removeEventListener", "current", "setHandlePosition", "onDragover", "isFileTransfer", "eventFiles", "targetBlockElem", "fuzzy", "isBelow", "willStayInSamePosition", "setTargetLine", "getBoundingClientRect", "width", "preventDefault", "boundingBox", "elem", "onDrop", "dragData", "getData", "update", "draggedNode", "$getNodeByKey", "targetNode", "$getNearestNodeFromDOMNode", "height", "targetBlockElemHeight", "top", "targetBlockElemTop", "getBoundingClientRectWithoutTransform", "window", "scrollY", "insertBefore", "remove", "insertAfter", "querySelectorAll", "forEach", "highlighter", "newInsertedElem", "getElementByKey", "getKey", "newInsertedElemRect", "highlightElem", "createElement", "className", "backgroundColor", "transition", "zIndex", "pointerEvents", "boxSizing", "borderRadius", "position", "body", "appendChild", "left", "onDragStart", "nodeKey", "node", "setData", "onDragEnd", "createPortal", "_jsxs", "Fragment", "_jsx", "draggable", "ref", "type", "DraggableBlockPlugin", "t0", "t1", "undefined", "useLexicalComposerContext", "_editable", "c", "_c", "useLexicalComposerContext", "$createParagraphNode", "$getRoot", "baseClass", "InsertParagraphAtEndPlugin", "$", "_c", "editor", "useLexicalComposerContext", "editorConfig", "useEditorConfigContext", "admin", "hideInsertParagraphAtEnd", "t0", "_jsx", "className", "onClick", "update", "_temp", "role", "tabIndex", "children", "paragraphNode", "$createParagraphNode", "$getRoot", "append", "select", "c", "_c", "useLexicalComposerContext", "React", "MarkdownShortcutPlugin", "$", "_c", "editorConfig", "useEditorConfigContext", "editor", "useLexicalComposerContext", "t0", "t1", "features", "markdownTransformers", "registerMarkdownShortcuts", "useEffect", "useLexicalComposerContext", "$getSelection", "$isRangeSelection", "RootNode", "useEffect", "NormalizeSelectionPlugin", "editor", "registerNodeTransform", "root", "selection", "anchorNode", "anchor", "getNode", "focusNode", "focus", "isAttached", "selectEnd", "console", "warn", "useLexicalComposerContext", "$getSelection", "COMMAND_PRIORITY_LOW", "SELECT_ALL_COMMAND", "useEffect", "SelectAllPlugin", "editor", "registerCommand", "activeElement", "document", "HTMLInputElement", "select", "useLexicalComposerContext", "useTranslation", "useCallback", "useMemo", "useState", "ReactDOM", "c", "_c", "useMenuTriggerMatch", "trigger", "t0", "$", "_c", "maxLength", "t1", "minLength", "t2", "undefined", "t3", "t4", "query", "validChars", "PUNCTUATION", "match", "RegExp", "exec", "maybeLeadingWhitespace", "matchingString", "length", "leadOffset", "index", "replaceableString", "baseClass", "SlashMenuItem", "isSelected", "item", "onClick", "onMouseEnter", "ref", "fieldProps", "featureClientSchemaMap", "schemaPath", "useEditorConfigContext", "i18n", "useTranslation", "className", "key", "title", "label", "length", "substring", "_jsxs", "id", "role", "tabIndex", "type", "Icon", "_jsx", "SlashMenuPlugin", "anchorElem", "document", "body", "editor", "useLexicalComposerContext", "queryString", "setQueryString", "useState", "editorConfig", "checkForTriggerMatch", "useMenuTriggerMatch", "minLength", "getDynamicItems", "useCallback", "groupWithItems", "dynamicItem", "features", "slashMenu", "dynamicGroups", "dynamicGroupWithItems", "concat", "groups", "useMemo", "groupsWithItems", "groupWithItem", "push", "map", "group", "filteredItems", "items", "filter", "itemTitle", "RegExp", "exec", "keywords", "some", "keyword", "dynamicItemGroups", "dynamicGroup", "find", "LexicalTypeaheadMenuPlugin", "menuRenderFn", "anchorElementRef", "selectedItemKey", "selectItemAndCleanUp", "setSelectedItemKey", "current", "createPortal", "groupTitle", "oi", "index", "el", "onQueryChange", "triggerFn", "c", "_c", "useLexicalComposerContext", "TEXT_TYPE_TO_FORMAT", "TextNode", "useEffect", "TextPlugin", "t0", "$", "features", "editor", "t1", "enabledFormats", "disabledFormats", "getDisabledFormats", "length", "registerNodeTransform", "textNode", "forEach", "disabledFormat", "hasFormat", "toggleFormat", "t2", "allFormats", "Object", "keys", "enabledSet", "Set", "filter", "format", "has", "c", "_c", "useLexicalComposerContext", "ContentEditable", "useTranslation", "LexicalContentEditable", "t0", "$", "className", "editorConfig", "t", "t1", "getTheme", "t2", "admin", "placeholder", "theme", "_jsx", "children", "LexicalEditor", "props", "$", "_c", "editorConfig", "editorContainerRef", "isSmallWidthViewport", "onChange", "editorConfigContext", "useEditorConfigContext", "editor", "useLexicalComposerContext", "isEditable", "useLexicalEditable", "floatingAnchorElem", "setFloatingAnchorElem", "useState", "t0", "Symbol", "for", "_floatingAnchorElem", "onRef", "t1", "t2", "uuid", "console", "error", "parentEditor", "registerChild", "handleFocus", "focusEditor", "handleBlur", "blurEditor", "unregisterFocus", "registerCommand", "FOCUS_COMMAND", "COMMAND_PRIORITY_LOW", "unregisterBlur", "BLUR_COMMAND", "unregisterChild", "useEffect", "t3", "_jsxs", "Fragment", "children", "features", "plugins", "map", "_temp", "className", "ref", "_temp2", "_jsx", "RichTextPlugin", "contentEditable", "LexicalContentEditable", "NormalizeSelectionPlugin", "InsertParagraphAtEndPlugin", "DecoratorPlugin", "ClipboardPlugin", "TextPlugin", "SelectAllPlugin", "OnChangePlugin", "ignoreSelectionChange", "editorState", "editor_0", "tags", "has", "size", "admin", "hideDraggableBlockElement", "DraggableBlockPlugin", "anchorElem", "hideAddBlockButton", "AddBlockHandlePlugin", "plugin_1", "plugin", "position", "desktopOnly", "EditorPlugin", "clientProps", "key", "SlashMenuPlugin", "HistoryPlugin", "markdownTransformers", "length", "MarkdownShortcutPlugin", "_temp3", "_temp4", "_temp5", "plugin_0", "plugin_2", "plugin_3", "plugin_4", "NestProviders", "children", "providers", "length", "Component", "_jsx", "slice", "LexicalProvider", "props", "composerKey", "editorConfig", "fieldProps", "isSmallWidthViewport", "onChange", "readOnly", "value", "parentContext", "useEditorConfigContext", "editDepth", "useEditDepth", "editorContainerRef", "useRef", "initialConfig", "useMemo", "Error", "JSON", "stringify", "Array", "isArray", "editable", "editorState", "undefined", "namespace", "lexical", "nodes", "getEnabledNodes", "onError", "error", "theme", "LexicalComposer", "EditorConfigProvider", "features", "LexicalEditorComponent", "baseClass", "RichTextComponent", "props", "editorConfig", "field", "admin", "className", "description", "readOnly", "readOnlyFromAdmin", "label", "localized", "required", "path", "pathFromProps", "readOnlyFromTopLevelProps", "validate", "readOnlyFromProps", "editDepth", "useEditDepth", "memoizedValidate", "useCallback", "value", "validationOptions", "customComponents", "AfterInput", "BeforeInput", "Description", "Error", "Label", "disabled", "disabledFromField", "initialValue", "setValue", "showError", "useField", "potentiallyStalePath", "isSmallWidthViewport", "setIsSmallWidthViewport", "useState", "rerenderProviderKey", "setRerenderProviderKey", "prevInitialValueRef", "React", "useRef", "prevValueRef", "useEffect", "updateViewPortWidth", "isNextSmallWidthViewport", "window", "matchMedia", "matches", "addEventListener", "removeEventListener", "classes", "hideGutter", "filter", "Boolean", "join", "pathWithEditDepth", "runDeprioritized", "useRunDeprioritized", "handleChange", "editorState", "updateFieldValue", "newState", "toJSON", "current", "styles", "useMemo", "mergeFieldStyles", "handleInitialValueChange", "useEffectEvent", "dequal", "JSON", "parse", "stringify", "Date", "Object", "is", "_jsxs", "style", "_jsx", "RenderCustomComponent", "CustomComponent", "Fallback", "FieldError", "FieldLabel", "ErrorBoundary", "fallbackRender", "onReset", "BulkUploadProvider", "drawerSlugPrefix", "LexicalProvider", "composerKey", "fieldProps", "onChange", "FieldDescription", "error", "role", "color", "message", "RichText"]
7
- }
@@ -1,2 +0,0 @@
1
- "use client";import{a as h}from"./chunk-DBWINSQN.js";import{a as f}from"./chunk-F26IQ5RE.js";import{jsx as o,jsxs as c}from"react/jsx-runtime";import{useLexicalComposerContext as S}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as L}from"@lexical/react/useLexicalEditable";import{getTranslation as j}from"@payloadcms/translations";import{Button as b,useConfig as A,usePayloadAPI as B,useTranslation as I}from"@payloadcms/ui";import{$getNodeByKey as P}from"lexical";import{formatAdminURL as k}from"payload/shared";import H,{useCallback as K,useReducer as M,useRef as O,useState as U}from"react";var _={depth:0},Z=R=>{let{className:e,data:{relationTo:g,value:a},nodeKey:s}=R;if(typeof a=="object")throw new Error("Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.");let v=O(null),[l]=S(),i=L(),{config:{routes:{api:C},serverURL:N},getEntityConfig:w}=A(),[t]=U(()=>w({collectionSlug:g})),{i18n:x,t:n}=I(),[u,D]=M(r=>r+1,0),[{data:m},{setParams:d}]=B(k({apiRoute:C,path:`/${t.slug}/${a}`,serverURL:N}),{initialParams:_}),{closeDocumentDrawer:p,DocumentDrawer:$,DocumentDrawerToggler:E}=f({id:a,collectionSlug:t.slug}),T=K(()=>{l.update(()=>{P(s)?.remove()})},[l,s]),y=H.useCallback(()=>{d({..._,cacheBust:u}),p(),D()},[u,d,p]);return c("div",{className:`${e}__contents`,contentEditable:!1,ref:v,children:[c("div",{className:`${e}__wrap`,children:[o("p",{className:`${e}__label`,children:n("fields:labelRelationship",{label:t.labels?.singular?j(t.labels?.singular,x):t.slug})}),o(E,{className:`${e}__doc-drawer-toggler`,children:o("p",{className:`${e}__title`,children:m?m[t?.admin?.useAsTitle||"id"]:a})})]}),i&&c("div",{className:`${e}__actions`,children:[o(b,{buttonStyle:"icon-label",className:`${e}__swapButton`,disabled:!i,el:"button",icon:"swap",onClick:()=>{s&&l.dispatchCommand(h,{replace:{nodeKey:s}})},round:!0,tooltip:n("fields:swapRelationship")}),o(b,{buttonStyle:"icon-label",className:`${e}__removeButton`,disabled:!i,icon:"x",onClick:r=>{r.preventDefault(),T()},round:!0,tooltip:n("fields:removeRelationship")})]}),!!a&&o($,{onSave:y})]})};export{Z as RelationshipComponent};
2
- //# sourceMappingURL=RelationshipComponent-BG3DPV3T.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/relationship/client/components/RelationshipComponent.tsx"],
4
- "sourcesContent": ["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport './index.scss'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],
5
- "mappings": "+IAGA,OAASA,6BAAAA,MAAiC,2CAC1C,OAASC,sBA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LC,QAAS5C,EAAE,2BAAA,OAKhB,CAAC,CAACnB,GAAS8C,EAACd,EAAA,CAAekC,OAAQzB,MAG1C",
6
- "names": ["useLexicalComposerContext", "useLexicalEditable", "getTranslation", "Button", "useConfig", "usePayloadAPI", "useTranslation", "$getNodeByKey", "formatAdminURL", "React", "useCallback", "useReducer", "useRef", "useState", "initialParams", "depth", "RelationshipComponent", "props", "className", "baseClass", "data", "relationTo", "value", "nodeKey", "Error", "relationshipElemRef", "useRef", "editor", "useLexicalComposerContext", "isEditable", "useLexicalEditable", "config", "routes", "api", "serverURL", "getEntityConfig", "useConfig", "relatedCollection", "useState", "collectionSlug", "i18n", "t", "useTranslation", "cacheBust", "dispatchCacheBust", "useReducer", "state", "setParams", "usePayloadAPI", "formatAdminURL", "apiRoute", "path", "slug", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "removeRelationship", "useCallback", "update", "$getNodeByKey", "remove", "updateRelationship", "React", "_jsxs", "contentEditable", "ref", "_jsx", "label", "labels", "singular", "getTranslation", "admin", "useAsTitle", "Button", "buttonStyle", "disabled", "el", "icon", "onClick", "dispatchCommand", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "replace", "round", "tooltip", "e", "preventDefault", "onSave"]
7
- }