@payloadcms/richtext-lexical 4.0.0-internal.d28e9fb → 4.0.0-internal.d7d662c

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 (1210) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts +1 -1
  3. package/dist/cell/rscEntry.d.ts.map +1 -1
  4. package/dist/cell/rscEntry.js +5 -5
  5. package/dist/cell/rscEntry.js.map +1 -1
  6. package/dist/exports/client/Field-334JNLRF.js +2 -0
  7. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  8. package/dist/exports/client/RelationshipComponent-TVK6I4W4.js +2 -0
  9. package/dist/exports/client/RelationshipComponent-TVK6I4W4.js.map +7 -0
  10. package/dist/exports/client/chunk-EA5BHQ2T.js +2 -0
  11. package/dist/exports/client/chunk-EA5BHQ2T.js.map +7 -0
  12. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  13. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  14. package/dist/exports/client/chunk-IYBYNEKX.js +2 -0
  15. package/dist/exports/client/chunk-IYBYNEKX.js.map +7 -0
  16. package/dist/exports/client/chunk-PNNCA5KZ.js +2 -0
  17. package/dist/exports/client/chunk-PNNCA5KZ.js.map +7 -0
  18. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  19. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  20. package/dist/exports/client/chunk-SE5IITBK.js +2 -0
  21. package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
  22. package/dist/exports/client/component-5IIPDLZR.js +2 -0
  23. package/dist/exports/client/component-5IIPDLZR.js.map +7 -0
  24. package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
  25. package/dist/exports/client/index.d.ts +1 -2
  26. package/dist/exports/client/index.d.ts.map +1 -1
  27. package/dist/exports/client/index.js +28 -29
  28. package/dist/exports/client/index.js.map +4 -4
  29. package/dist/exports/react/index.d.ts +1 -1
  30. package/dist/exports/react/index.d.ts.map +1 -1
  31. package/dist/exports/react/index.js.map +1 -1
  32. package/dist/features/align/client/index.js.map +1 -1
  33. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  34. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  35. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  36. package/dist/features/blockquote/client/index.js +2 -2
  37. package/dist/features/blockquote/client/index.js.map +1 -1
  38. package/dist/features/blockquote/server/index.d.ts +1 -4
  39. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  40. package/dist/features/blockquote/server/index.js +4 -41
  41. package/dist/features/blockquote/server/index.js.map +1 -1
  42. package/dist/features/blockquote/server/schema.d.ts +8 -0
  43. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  44. package/dist/features/blockquote/server/schema.js +15 -0
  45. package/dist/features/blockquote/server/schema.js.map +1 -0
  46. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  47. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  48. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  49. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  50. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  51. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  52. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  53. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  54. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  55. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  56. package/dist/features/blocks/client/component/index.css +178 -0
  57. package/dist/features/blocks/client/component/index.d.ts +4 -9
  58. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  59. package/dist/features/blocks/client/component/index.js +244 -89
  60. package/dist/features/blocks/client/component/index.js.map +1 -1
  61. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  62. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  63. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  64. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  65. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  66. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  67. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  68. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  69. package/dist/features/blocks/client/componentInline/index.css +84 -0
  70. package/dist/features/blocks/client/componentInline/index.d.ts +4 -3
  71. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  72. package/dist/features/blocks/client/componentInline/index.js +65 -42
  73. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  74. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  75. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  76. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  77. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  78. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  79. package/dist/features/blocks/client/index.d.ts.map +1 -1
  80. package/dist/features/blocks/client/index.js +4 -4
  81. package/dist/features/blocks/client/index.js.map +1 -1
  82. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  83. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  84. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  85. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  86. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  87. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  88. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  89. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  90. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  91. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  92. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  93. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  94. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  95. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  96. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  97. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  98. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  99. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  100. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  101. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  102. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  103. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  104. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  105. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  106. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +122 -75
  107. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  108. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  109. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  110. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  111. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  112. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  113. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  114. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  115. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +38 -0
  116. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  117. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  118. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  119. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  120. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  121. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  122. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  123. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  124. package/dist/features/blocks/server/index.d.ts +1 -0
  125. package/dist/features/blocks/server/index.d.ts.map +1 -1
  126. package/dist/features/blocks/server/index.js +26 -74
  127. package/dist/features/blocks/server/index.js.map +1 -1
  128. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  129. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  130. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  131. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  132. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  133. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  134. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  135. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  136. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  137. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  138. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  139. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  140. package/dist/features/blocks/server/schema.d.ts +47 -0
  141. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  142. package/dist/features/blocks/server/schema.js +138 -0
  143. package/dist/features/blocks/server/schema.js.map +1 -0
  144. package/dist/features/blocks/server/validate.d.ts +1 -2
  145. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  146. package/dist/features/blocks/server/validate.js +1 -1
  147. package/dist/features/blocks/server/validate.js.map +1 -1
  148. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  149. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  150. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  151. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  152. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  155. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  157. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  159. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  162. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  165. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  168. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  170. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  171. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  172. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  173. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  174. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  175. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  176. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  177. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  178. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  179. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  180. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  181. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  182. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  183. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  184. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  185. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  186. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  187. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  188. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  189. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  190. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  191. package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
  192. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  193. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  194. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  195. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  196. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  197. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  198. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  199. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  200. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  201. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  202. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  203. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  204. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  205. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  206. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  207. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  208. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  209. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  210. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  211. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  212. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  213. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  214. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  215. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  216. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  217. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  218. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  219. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  220. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  221. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  222. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  223. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  224. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  225. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  226. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  227. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  228. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  229. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  230. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  231. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  232. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  233. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  234. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  235. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  236. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  237. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
  238. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  239. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  240. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
  241. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  242. package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
  243. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  244. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  245. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  246. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  247. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  248. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  249. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  250. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  251. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  252. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  253. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  254. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  255. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  256. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  257. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  258. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  259. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  260. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  261. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  262. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  263. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  264. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  265. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  266. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  267. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  268. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  269. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  270. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  271. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  272. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  273. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  274. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  275. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  276. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  277. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  278. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  279. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  280. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  281. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  282. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  283. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  284. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  285. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  286. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
  287. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  288. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  289. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  290. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  291. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  292. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  293. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
  294. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  295. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  296. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  297. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  298. package/dist/features/converters/markdownToLexical/index.js +5 -2
  299. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  300. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  301. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  302. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  303. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  304. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  305. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  306. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  307. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  308. package/dist/features/debug/testRecorder/client/plugin/index.css +50 -0
  309. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  310. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  311. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  312. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  313. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  314. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  315. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  316. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  317. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  318. package/dist/features/format/bold/feature.client.js +1 -1
  319. package/dist/features/format/bold/feature.client.js.map +1 -1
  320. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  321. package/dist/features/format/bold/feature.server.js +1 -1
  322. package/dist/features/format/bold/feature.server.js.map +1 -1
  323. package/dist/features/format/inlineCode/feature.client.js +1 -1
  324. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  325. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  326. package/dist/features/format/inlineCode/feature.server.js +1 -1
  327. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  328. package/dist/features/format/italic/feature.client.js +1 -1
  329. package/dist/features/format/italic/feature.client.js.map +1 -1
  330. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  331. package/dist/features/format/italic/feature.server.js +1 -1
  332. package/dist/features/format/italic/feature.server.js.map +1 -1
  333. package/dist/features/format/strikethrough/feature.client.js +1 -1
  334. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  335. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  336. package/dist/features/format/strikethrough/feature.server.js +1 -1
  337. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  338. package/dist/features/heading/client/index.js +2 -2
  339. package/dist/features/heading/client/index.js.map +1 -1
  340. package/dist/features/heading/constants.d.ts +2 -0
  341. package/dist/features/heading/constants.d.ts.map +1 -0
  342. package/dist/features/heading/constants.js +2 -0
  343. package/dist/features/heading/constants.js.map +1 -0
  344. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  345. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  346. package/dist/features/heading/markdownTransformer.js +6 -19
  347. package/dist/features/heading/markdownTransformer.js.map +1 -1
  348. package/dist/features/heading/server/index.d.ts +2 -4
  349. package/dist/features/heading/server/index.d.ts.map +1 -1
  350. package/dist/features/heading/server/index.js +9 -42
  351. package/dist/features/heading/server/index.js.map +1 -1
  352. package/dist/features/heading/server/schema.d.ts +10 -0
  353. package/dist/features/heading/server/schema.d.ts.map +1 -0
  354. package/dist/features/heading/server/schema.js +37 -0
  355. package/dist/features/heading/server/schema.js.map +1 -0
  356. package/dist/features/heading/server/validate.d.ts +6 -0
  357. package/dist/features/heading/server/validate.d.ts.map +1 -0
  358. package/dist/features/heading/server/validate.js +15 -0
  359. package/dist/features/heading/server/validate.js.map +1 -0
  360. package/dist/features/horizontalRule/client/index.js +2 -2
  361. package/dist/features/horizontalRule/client/index.js.map +1 -1
  362. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  363. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  364. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  365. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  366. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +13 -3
  367. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  368. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  369. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  370. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  371. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  372. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  373. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  374. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  375. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  376. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  377. package/dist/features/horizontalRule/server/index.js +4 -10
  378. package/dist/features/horizontalRule/server/index.js.map +1 -1
  379. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  380. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  381. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  382. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  383. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -6
  384. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  385. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  386. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  387. package/dist/features/horizontalRule/server/schema.d.ts +8 -0
  388. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  389. package/dist/features/horizontalRule/server/schema.js +26 -0
  390. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  391. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  392. package/dist/features/indent/client/IndentPlugin.js +122 -1
  393. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  394. package/dist/features/indent/client/index.d.ts.map +1 -1
  395. package/dist/features/indent/client/index.js +0 -2
  396. package/dist/features/indent/client/index.js.map +1 -1
  397. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  398. package/dist/features/indent/server/i18n.js +74 -37
  399. package/dist/features/indent/server/i18n.js.map +1 -1
  400. package/dist/features/link/client/index.d.ts.map +1 -1
  401. package/dist/features/link/client/index.js +2 -2
  402. package/dist/features/link/client/index.js.map +1 -1
  403. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  404. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  405. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  406. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  407. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +36 -13
  408. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  409. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +106 -0
  410. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  411. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  412. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  413. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  414. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  415. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  416. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  417. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  418. package/dist/features/link/markdownTransformer.d.ts +5 -5
  419. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  420. package/dist/features/link/markdownTransformer.js +4 -4
  421. package/dist/features/link/markdownTransformer.js.map +1 -1
  422. package/dist/features/link/nodes/AutoLinkNode.d.ts +4 -4
  423. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  424. package/dist/features/link/nodes/AutoLinkNode.js +4 -11
  425. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  426. package/dist/features/link/nodes/LinkNode.d.ts +4 -4
  427. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  428. package/dist/features/link/nodes/LinkNode.js +4 -16
  429. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  430. package/dist/features/link/server/baseFields.js.map +1 -1
  431. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  432. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  433. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  434. package/dist/features/link/server/index.d.ts +2 -1
  435. package/dist/features/link/server/index.d.ts.map +1 -1
  436. package/dist/features/link/server/index.js +7 -75
  437. package/dist/features/link/server/index.js.map +1 -1
  438. package/dist/features/link/server/schema.d.ts +32 -0
  439. package/dist/features/link/server/schema.d.ts.map +1 -0
  440. package/dist/features/link/server/schema.js +171 -0
  441. package/dist/features/link/server/schema.js.map +1 -0
  442. package/dist/features/link/server/validate.d.ts +1 -1
  443. package/dist/features/link/server/validate.d.ts.map +1 -1
  444. package/dist/features/link/server/validate.js +1 -1
  445. package/dist/features/link/server/validate.js.map +1 -1
  446. package/dist/features/lists/checklist/client/index.js +1 -1
  447. package/dist/features/lists/checklist/client/index.js.map +1 -1
  448. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  449. package/dist/features/lists/checklist/server/index.js +9 -10
  450. package/dist/features/lists/checklist/server/index.js.map +1 -1
  451. package/dist/features/lists/orderedList/client/index.js +1 -1
  452. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  453. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  454. package/dist/features/lists/orderedList/server/index.js +9 -10
  455. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  456. package/dist/features/lists/plugin/index.d.ts +0 -9
  457. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  458. package/dist/features/lists/plugin/index.js.map +1 -1
  459. package/dist/features/lists/shared/constants.d.ts +2 -0
  460. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  461. package/dist/features/lists/shared/constants.js +2 -0
  462. package/dist/features/lists/shared/constants.js.map +1 -0
  463. package/dist/features/lists/shared/schema.d.ts +18 -0
  464. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  465. package/dist/features/lists/shared/schema.js +62 -0
  466. package/dist/features/lists/shared/schema.js.map +1 -0
  467. package/dist/features/lists/shared/validate.d.ts +5 -0
  468. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  469. package/dist/features/lists/shared/validate.js +15 -0
  470. package/dist/features/lists/shared/validate.js.map +1 -0
  471. package/dist/features/lists/unorderedList/client/index.js +1 -1
  472. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  473. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  474. package/dist/features/lists/unorderedList/server/index.js +9 -10
  475. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  476. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
  477. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  478. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  479. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  480. package/dist/features/relationship/client/components/index.css +109 -0
  481. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  482. package/dist/features/relationship/client/index.d.ts +2 -2
  483. package/dist/features/relationship/client/index.d.ts.map +1 -1
  484. package/dist/features/relationship/client/index.js.map +1 -1
  485. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  486. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  487. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  488. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  489. package/dist/features/relationship/client/plugins/index.d.ts +3 -3
  490. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  491. package/dist/features/relationship/client/plugins/index.js +27 -31
  492. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  493. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  494. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  495. package/dist/features/relationship/client/utils/useEnabledRelationships.js +52 -50
  496. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  497. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +3 -3
  498. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  499. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  500. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  501. package/dist/features/relationship/server/index.d.ts +9 -1
  502. package/dist/features/relationship/server/index.d.ts.map +1 -1
  503. package/dist/features/relationship/server/index.js +30 -11
  504. package/dist/features/relationship/server/index.js.map +1 -1
  505. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  506. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  507. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  508. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  509. package/dist/features/relationship/server/schema.d.ts +29 -0
  510. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  511. package/dist/features/relationship/server/schema.js +94 -0
  512. package/dist/features/relationship/server/schema.js.map +1 -0
  513. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +18 -0
  514. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  515. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +30 -0
  516. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  517. package/dist/features/table/client/index.d.ts.map +1 -0
  518. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  519. package/dist/features/table/client/index.js.map +1 -0
  520. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  521. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  522. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  523. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  524. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.css +90 -0
  525. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  526. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  527. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +20 -46
  528. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  529. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  530. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  531. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  532. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +48 -24
  533. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  534. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  535. package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  536. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  537. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.css +163 -0
  538. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  539. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  540. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  541. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  542. package/dist/features/table/client/plugins/TablePlugin/index.css +235 -0
  543. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +1 -1
  544. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  545. package/dist/features/table/client/plugins/TablePlugin/index.js +179 -0
  546. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  547. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  548. package/dist/features/table/client/utils/debounce.js.map +1 -0
  549. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  550. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  551. package/dist/features/table/markdownTransformer.d.ts +5 -0
  552. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  553. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  554. package/dist/features/table/markdownTransformer.js.map +1 -0
  555. package/dist/features/table/server/index.d.ts +3 -0
  556. package/dist/features/table/server/index.d.ts.map +1 -0
  557. package/dist/features/table/server/index.js +56 -0
  558. package/dist/features/table/server/index.js.map +1 -0
  559. package/dist/features/table/server/schema.d.ts +27 -0
  560. package/dist/features/table/server/schema.d.ts.map +1 -0
  561. package/dist/features/table/server/schema.js +107 -0
  562. package/dist/features/table/server/schema.js.map +1 -0
  563. package/dist/features/textState/defaultColors.js +1 -1
  564. package/dist/features/textState/defaultColors.js.map +1 -1
  565. package/dist/features/textState/feature.client.js +1 -1
  566. package/dist/features/textState/feature.client.js.map +1 -1
  567. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  568. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  569. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  570. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  571. package/dist/features/toolbars/fixed/client/Toolbar/index.css +159 -0
  572. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  573. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  574. package/dist/features/toolbars/fixed/client/Toolbar/index.js +146 -71
  575. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  576. package/dist/features/toolbars/inline/client/Toolbar/index.css +31 -0
  577. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  578. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  579. package/dist/features/toolbars/inline/client/Toolbar/index.js +85 -37
  580. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  581. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  582. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  583. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  584. package/dist/features/toolbars/shared/ToolbarButton/index.js +102 -71
  585. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  586. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  587. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +200 -79
  588. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  589. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +212 -0
  590. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  591. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  592. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +33 -13
  593. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  594. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  595. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  596. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  597. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  598. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  599. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  600. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  601. package/dist/features/toolbars/types.d.ts +5 -1
  602. package/dist/features/toolbars/types.d.ts.map +1 -1
  603. package/dist/features/toolbars/types.js.map +1 -1
  604. package/dist/features/typesClient.d.ts +2 -2
  605. package/dist/features/typesClient.d.ts.map +1 -1
  606. package/dist/features/typesClient.js.map +1 -1
  607. package/dist/features/typesServer.d.ts +35 -70
  608. package/dist/features/typesServer.d.ts.map +1 -1
  609. package/dist/features/typesServer.js.map +1 -1
  610. package/dist/features/upload/client/component/index.css +212 -0
  611. package/dist/features/upload/client/component/index.d.ts +2 -2
  612. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  613. package/dist/features/upload/client/component/index.js +88 -64
  614. package/dist/features/upload/client/component/index.js.map +1 -1
  615. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  616. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  617. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  618. package/dist/features/upload/client/drawer/index.js.map +1 -1
  619. package/dist/features/upload/client/index.d.ts +3 -2
  620. package/dist/features/upload/client/index.d.ts.map +1 -1
  621. package/dist/features/upload/client/index.js.map +1 -1
  622. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  623. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  624. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  625. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  626. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  627. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  628. package/dist/features/upload/client/plugin/index.js +53 -56
  629. package/dist/features/upload/client/plugin/index.js.map +1 -1
  630. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +3 -3
  631. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  632. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  633. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  634. package/dist/features/upload/server/index.d.ts +7 -2
  635. package/dist/features/upload/server/index.d.ts.map +1 -1
  636. package/dist/features/upload/server/index.js +25 -98
  637. package/dist/features/upload/server/index.js.map +1 -1
  638. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  639. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  640. package/dist/features/upload/server/markdownTransformer.js +1 -1
  641. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  642. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  643. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  644. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  645. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  646. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  647. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  648. package/dist/features/upload/server/schema.d.ts +40 -0
  649. package/dist/features/upload/server/schema.d.ts.map +1 -0
  650. package/dist/features/upload/server/schema.js +147 -0
  651. package/dist/features/upload/server/schema.js.map +1 -0
  652. package/dist/features/upload/server/validate.d.ts +3 -3
  653. package/dist/features/upload/server/validate.d.ts.map +1 -1
  654. package/dist/features/upload/server/validate.js +4 -1
  655. package/dist/features/upload/server/validate.js.map +1 -1
  656. package/dist/field/Diff/converters/link.d.ts +1 -1
  657. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  658. package/dist/field/Diff/converters/link.js.map +1 -1
  659. package/dist/field/Diff/converters/listitem/index.css +80 -0
  660. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  661. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  662. package/dist/field/Diff/converters/listitem/index.js +3 -1
  663. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  664. package/dist/field/Diff/converters/relationship/index.css +107 -0
  665. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  666. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  667. package/dist/field/Diff/converters/relationship/index.js +11 -28
  668. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  669. package/dist/field/Diff/converters/unknown/index.css +36 -0
  670. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  671. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  672. package/dist/field/Diff/converters/unknown/index.js +1 -0
  673. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  674. package/dist/field/Diff/converters/upload/index.css +174 -0
  675. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  676. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  677. package/dist/field/Diff/converters/upload/index.js +7 -2
  678. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  679. package/dist/field/Diff/index.css +154 -0
  680. package/dist/field/Diff/index.d.ts +4 -3
  681. package/dist/field/Diff/index.d.ts.map +1 -1
  682. package/dist/field/Diff/index.js +4 -2
  683. package/dist/field/Diff/index.js.map +1 -1
  684. package/dist/field/Field.d.ts +3 -3
  685. package/dist/field/Field.d.ts.map +1 -1
  686. package/dist/field/Field.js +38 -27
  687. package/dist/field/Field.js.map +1 -1
  688. package/dist/field/RenderLexical/index.d.ts +5 -3
  689. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  690. package/dist/field/RenderLexical/index.js +23 -23
  691. package/dist/field/RenderLexical/index.js.map +1 -1
  692. package/dist/field/RichTextViewProvider.d.ts +1 -1
  693. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  694. package/dist/field/RichTextViewProvider.js.map +1 -1
  695. package/dist/field/ViewSelector.css +32 -0
  696. package/dist/field/ViewSelector.d.ts +1 -1
  697. package/dist/field/ViewSelector.d.ts.map +1 -1
  698. package/dist/field/ViewSelector.js +14 -4
  699. package/dist/field/ViewSelector.js.map +1 -1
  700. package/dist/field/bundled.css +1 -1
  701. package/dist/field/index.css +59 -0
  702. package/dist/field/index.d.ts +1 -1
  703. package/dist/field/index.d.ts.map +1 -1
  704. package/dist/field/index.js +1 -1
  705. package/dist/field/index.js.map +1 -1
  706. package/dist/field/rscEntry.d.ts +2 -2
  707. package/dist/field/rscEntry.d.ts.map +1 -1
  708. package/dist/field/rscEntry.js +2 -0
  709. package/dist/field/rscEntry.js.map +1 -1
  710. package/dist/hooks.d.ts +6 -0
  711. package/dist/hooks.d.ts.map +1 -0
  712. package/dist/hooks.js +548 -0
  713. package/dist/hooks.js.map +1 -0
  714. package/dist/i18n.d.ts.map +1 -1
  715. package/dist/i18n.js +112 -0
  716. package/dist/i18n.js.map +1 -1
  717. package/dist/index.d.ts +15 -21
  718. package/dist/index.d.ts.map +1 -1
  719. package/dist/index.js +37 -632
  720. package/dist/index.js.map +1 -1
  721. package/dist/lexical/LexicalEditor.css +61 -0
  722. package/dist/lexical/LexicalEditor.d.ts +1 -1
  723. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  724. package/dist/lexical/LexicalEditor.js +62 -64
  725. package/dist/lexical/LexicalEditor.js.map +1 -1
  726. package/dist/lexical/LexicalProvider.d.ts +1 -1
  727. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  728. package/dist/lexical/LexicalProvider.js.map +1 -1
  729. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  730. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  731. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  732. package/dist/lexical/config/client/loader.d.ts +1 -1
  733. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  734. package/dist/lexical/config/client/loader.js +5 -1
  735. package/dist/lexical/config/client/loader.js.map +1 -1
  736. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  737. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  738. package/dist/lexical/config/client/sanitize.js.map +1 -1
  739. package/dist/lexical/config/server/loader.d.ts +1 -1
  740. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  741. package/dist/lexical/config/server/loader.js +2 -2
  742. package/dist/lexical/config/server/loader.js.map +1 -1
  743. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  744. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  745. package/dist/lexical/config/server/sanitize.js +11 -19
  746. package/dist/lexical/config/server/sanitize.js.map +1 -1
  747. package/dist/lexical/config/types.d.ts +1 -1
  748. package/dist/lexical/config/types.d.ts.map +1 -1
  749. package/dist/lexical/config/types.js.map +1 -1
  750. package/dist/lexical/nodes/index.d.ts +1 -1
  751. package/dist/lexical/nodes/index.d.ts.map +1 -1
  752. package/dist/lexical/nodes/index.js.map +1 -1
  753. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  754. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  755. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  756. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  757. package/dist/lexical/plugins/DecoratorPlugin/index.js +25 -21
  758. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  759. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +45 -0
  760. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  761. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  762. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +28 -14
  763. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  764. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  765. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  766. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  767. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  768. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  769. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  770. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  771. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  772. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +236 -108
  773. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  774. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  775. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  776. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  777. package/dist/lexical/plugins/SlashMenu/index.css +59 -0
  778. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  779. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  780. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  781. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  782. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  783. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  784. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +41 -0
  785. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  786. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  787. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +3 -2
  788. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  789. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +102 -0
  790. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  791. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  792. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +152 -43
  793. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  794. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  795. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  796. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  797. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  798. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  799. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  800. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  801. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  802. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  803. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  804. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  805. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  806. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  807. package/dist/lexical/theme/EditorTheme.css +356 -0
  808. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  809. package/dist/lexical/theme/EditorTheme.js +1 -0
  810. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  811. package/dist/lexical/ui/ContentEditable.css +100 -0
  812. package/dist/lexical/ui/ContentEditable.d.ts +3 -2
  813. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  814. package/dist/lexical/ui/ContentEditable.js +33 -11
  815. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  816. package/dist/lexical/ui/icons/Code/index.js +1 -1
  817. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  818. package/dist/lexical/ui/icons/CodeBlock/index.js +1 -1
  819. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  820. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  821. package/dist/lexical/ui/icons/H3/index.js +13 -6
  822. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  823. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  824. package/dist/lexical/ui/icons/H4/index.js +13 -6
  825. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  826. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  827. package/dist/lexical/ui/icons/H5/index.js +13 -6
  828. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  829. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  830. package/dist/lexical/ui/icons/H6/index.js +13 -6
  831. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  832. package/dist/lexical/ui/icons/Link/index.js +1 -1
  833. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  834. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  835. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  836. package/dist/lexical/ui/icons/Page/index.js +21 -0
  837. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  838. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  839. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  840. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  841. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  842. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  843. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  844. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  845. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  846. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  847. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  848. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  849. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  850. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  851. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  852. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  853. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  854. package/dist/lexical/utils/nodeFormat.js +0 -2
  855. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  856. package/dist/lexical/utils/point.d.ts.map +1 -1
  857. package/dist/lexical/utils/rect.d.ts.map +1 -1
  858. package/dist/lexical/utils/url.d.ts.map +1 -1
  859. package/dist/lexical/utils/url.js +1 -1
  860. package/dist/lexical/utils/url.js.map +1 -1
  861. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  862. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  863. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  864. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  865. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  866. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  867. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  868. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  869. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  870. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  871. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  872. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  873. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  874. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  875. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  876. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  877. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  878. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  879. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  880. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  881. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  882. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  883. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  884. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  885. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  886. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  887. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  888. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  889. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  890. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  891. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  892. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  893. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  894. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  895. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  896. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  897. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  898. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  899. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  900. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  901. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  902. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  903. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  904. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  905. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  906. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  907. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  908. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  909. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  910. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  911. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  912. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  913. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  914. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  915. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  916. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  917. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  918. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  919. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  920. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  921. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  922. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  923. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  924. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  925. package/dist/populateGraphQL/populate.js.map +1 -1
  926. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  927. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  928. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  929. package/dist/presets/llmInstructions.d.ts +2 -0
  930. package/dist/presets/llmInstructions.d.ts.map +1 -0
  931. package/dist/presets/llmInstructions.js +13 -0
  932. package/dist/presets/llmInstructions.js.map +1 -0
  933. package/dist/types/builtInNodes.d.ts +14 -0
  934. package/dist/types/builtInNodes.d.ts.map +1 -0
  935. package/dist/types/builtInNodes.js +208 -0
  936. package/dist/types/builtInNodes.js.map +1 -0
  937. package/dist/{types.d.ts → types/index.d.ts} +29 -33
  938. package/dist/types/index.d.ts.map +1 -0
  939. package/dist/types/index.js +2 -0
  940. package/dist/types/index.js.map +1 -0
  941. package/dist/types/jsonSchemaHelpers.d.ts +34 -0
  942. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  943. package/dist/types/jsonSchemaHelpers.js +63 -0
  944. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  945. package/dist/types/nodeTypes.d.ts +133 -0
  946. package/dist/types/nodeTypes.d.ts.map +1 -0
  947. package/dist/types/nodeTypes.js +6 -0
  948. package/dist/types/nodeTypes.js.map +1 -0
  949. package/dist/types/schema.d.ts +6 -0
  950. package/dist/types/schema.d.ts.map +1 -0
  951. package/dist/types/schema.js +90 -0
  952. package/dist/types/schema.js.map +1 -0
  953. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  954. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  955. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  956. package/dist/utilities/buildEditorState.d.ts +18 -4
  957. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  958. package/dist/utilities/buildEditorState.js +8 -0
  959. package/dist/utilities/buildEditorState.js.map +1 -1
  960. package/dist/utilities/buildInitialState.d.ts +4 -2
  961. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  962. package/dist/utilities/buildInitialState.js +1 -0
  963. package/dist/utilities/buildInitialState.js.map +1 -1
  964. package/dist/utilities/createClientFeature.d.ts +1 -1
  965. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  966. package/dist/utilities/createClientFeature.js.map +1 -1
  967. package/dist/utilities/createServerFeature.d.ts +1 -1
  968. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  969. package/dist/utilities/createServerFeature.js +2 -2
  970. package/dist/utilities/createServerFeature.js.map +1 -1
  971. package/dist/utilities/editorConfigFactory.d.ts +7 -7
  972. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  973. package/dist/utilities/editorConfigFactory.js +9 -9
  974. package/dist/utilities/editorConfigFactory.js.map +1 -1
  975. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  976. package/dist/utilities/fieldsDrawer/Drawer.js +41 -32
  977. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  978. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  979. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  980. package/dist/utilities/fieldsDrawer/DrawerContent.js +10 -14
  981. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  982. package/dist/utilities/fieldsDrawer/index.css +12 -0
  983. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  984. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  985. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  986. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  987. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  988. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  989. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  990. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  991. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  992. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  993. package/dist/utilities/generateImportMap.d.ts +3 -3
  994. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  995. package/dist/utilities/generateImportMap.js.map +1 -1
  996. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  997. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  998. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  999. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  1000. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  1001. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  1002. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  1003. package/dist/utilities/initLexicalFeatures.js +38 -4
  1004. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  1005. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  1006. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  1007. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  1008. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  1009. package/dist/utilities/useLexicalFeature.js +15 -6
  1010. package/dist/utilities/useLexicalFeature.js.map +1 -1
  1011. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  1012. package/dist/validate/hasText.d.ts +2 -2
  1013. package/dist/validate/hasText.d.ts.map +1 -1
  1014. package/dist/validate/hasText.js.map +1 -1
  1015. package/dist/validate/index.d.ts +1 -1
  1016. package/dist/validate/index.d.ts.map +1 -1
  1017. package/package.json +130 -64
  1018. package/dist/dependencyChecker.spec.js +0 -16
  1019. package/dist/dependencyChecker.spec.js.map +0 -1
  1020. package/dist/exports/client/Field-NXLXFFLW.js +0 -2
  1021. package/dist/exports/client/Field-NXLXFFLW.js.map +0 -7
  1022. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  1023. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  1024. package/dist/exports/client/bundled.css +0 -1
  1025. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  1026. package/dist/exports/client/chunk-DZDHVMML.js +0 -2
  1027. package/dist/exports/client/chunk-DZDHVMML.js.map +0 -7
  1028. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  1029. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  1030. package/dist/exports/client/chunk-FTT5KJ6W.js +0 -12
  1031. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  1032. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  1033. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  1034. package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
  1035. package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
  1036. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  1037. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  1038. package/dist/exports/client/componentInline-LCHKRXOV.js +0 -2
  1039. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  1040. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  1041. package/dist/features/blockquote/markdownTransformer.js +0 -33
  1042. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  1043. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  1044. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  1045. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  1046. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  1047. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  1048. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  1049. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  1050. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  1051. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  1052. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  1053. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  1054. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  1055. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  1056. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  1057. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  1058. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  1059. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  1060. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  1061. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  1062. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  1063. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  1064. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  1065. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  1066. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  1067. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  1068. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  1069. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  1070. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  1071. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  1072. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  1073. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  1074. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  1075. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  1076. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  1077. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  1078. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  1079. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  1080. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  1081. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  1082. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  1083. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  1084. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  1085. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  1086. package/dist/features/experimental_table/client/index.js.map +0 -1
  1087. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  1088. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  1089. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  1090. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  1091. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  1092. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  1093. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  1094. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +0 -152
  1095. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  1096. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  1097. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  1098. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  1099. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  1100. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  1101. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  1102. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  1103. package/dist/features/experimental_table/server/index.d.ts +0 -8
  1104. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  1105. package/dist/features/experimental_table/server/index.js +0 -154
  1106. package/dist/features/experimental_table/server/index.js.map +0 -1
  1107. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  1108. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  1109. package/dist/features/format/bold/markdownTransformers.js +0 -23
  1110. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  1111. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  1112. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  1113. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  1114. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  1115. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  1116. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  1117. package/dist/features/format/italic/markdownTransformers.js +0 -12
  1118. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  1119. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  1120. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  1121. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  1122. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  1123. package/dist/features/link/markdownTransformer.spec.js +0 -195
  1124. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  1125. package/dist/features/link/nodes/types.d.ts +0 -27
  1126. package/dist/features/link/nodes/types.d.ts.map +0 -1
  1127. package/dist/features/link/nodes/types.js +0 -2
  1128. package/dist/features/link/nodes/types.js.map +0 -1
  1129. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  1130. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  1131. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  1132. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  1133. package/dist/features/lists/htmlConverter.d.ts +0 -5
  1134. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  1135. package/dist/features/lists/htmlConverter.js +0 -81
  1136. package/dist/features/lists/htmlConverter.js.map +0 -1
  1137. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  1138. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  1139. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  1140. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  1141. package/dist/features/lists/shared/markdown.d.ts +0 -6
  1142. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  1143. package/dist/features/lists/shared/markdown.js +0 -57
  1144. package/dist/features/lists/shared/markdown.js.map +0 -1
  1145. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  1146. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  1147. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  1148. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  1149. package/dist/lexical/utils/guard.d.ts +0 -5
  1150. package/dist/lexical/utils/guard.d.ts.map +0 -1
  1151. package/dist/lexical/utils/guard.js +0 -9
  1152. package/dist/lexical/utils/guard.js.map +0 -1
  1153. package/dist/lexical/utils/url.spec.js +0 -114
  1154. package/dist/lexical/utils/url.spec.js.map +0 -1
  1155. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  1156. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  1157. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  1158. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  1159. package/dist/nodeTypes.d.ts +0 -74
  1160. package/dist/nodeTypes.d.ts.map +0 -1
  1161. package/dist/nodeTypes.js +0 -5
  1162. package/dist/nodeTypes.js.map +0 -1
  1163. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  1164. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  1165. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  1166. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  1167. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  1168. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  1169. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  1170. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  1171. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  1172. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  1173. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  1174. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  1175. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  1176. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  1177. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  1178. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  1179. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  1180. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  1181. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  1182. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  1183. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  1184. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  1185. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  1186. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  1187. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  1188. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  1189. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  1190. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  1191. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  1192. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  1193. package/dist/packages/@lexical/markdown/index.js +0 -39
  1194. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  1195. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  1196. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  1197. package/dist/packages/@lexical/markdown/utils.js +0 -267
  1198. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  1199. package/dist/types.d.ts.map +0 -1
  1200. package/dist/types.js +0 -2
  1201. package/dist/types.js.map +0 -1
  1202. package/dist/utilities/jsx/jsx.spec.js +0 -178
  1203. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  1204. /package/dist/exports/client/{componentInline-LCHKRXOV.js.map → componentInline-AU7IBNY7.js.map} +0 -0
  1205. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  1206. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  1207. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  1208. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  1209. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  1210. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
@@ -0,0 +1,7 @@
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/moveBlock.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.ts", "../../../src/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.ts", "../../../src/lexical/plugins/InsertParagraphAtEnd/index.tsx", "../../../src/lexical/plugins/MarkdownShortcut/index.tsx", "../../../src/lexical/plugins/NodeViewOverridePlugin/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", "../../../src/field/ViewSelector.tsx"],
4
+ "sourcesContent": ["'use client'\nimport type { EditorState, SerializedEditorState } from 'lexical'\nimport type { FallbackProps } from 'react-error-boundary'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n BulkUploadProvider,\n FieldDescription,\n FieldError,\n FieldLabel,\n isFieldRTL,\n RenderCustomComponent,\n useConfig,\n useEditDepth,\n useEffectEvent,\n useField,\n useLocale,\n useTranslation,\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.css'\nimport './bundled.css'\nimport './index.css'\n\nimport type { LexicalRichTextFieldProps } from '../types/index.js'\n\nimport { LexicalProvider } from '../lexical/LexicalProvider.js'\nimport { useRunDeprioritized } from '../utilities/useRunDeprioritized.js'\nimport { useRichTextView } from './RichTextViewProvider.js'\nimport { ViewSelector } from './ViewSelector.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 schemaPath,\n validate, // Users can pass in client side validation if they WANT to, but it's not required anymore\n } = props\n\n const { i18n } = useTranslation()\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const locale = useLocale()\n const {\n config: { localization: localizationConfig },\n } = useConfig()\n\n const rtl = isFieldRTL({\n fieldLocalized: localized,\n locale,\n localizationConfig: localizationConfig || undefined,\n })\n\n const editDepth = useEditDepth()\n const { isControlledByParent } = useRichTextView()\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 'field-type',\n baseClass,\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\n aria-label={getTranslation(label || '', i18n)}\n className={classes}\n data-field-path={path}\n data-field-schemapath={schemaPath}\n data-lexical-view={editorConfig?.view}\n key={pathWithEditDepth}\n role=\"group\"\n style={styles}\n >\n <div className={`${baseClass}__label-row`}>\n {Label || (\n <FieldLabel\n hasRequiredAccessibleState\n label={label}\n localized={localized}\n path={path}\n required={required}\n />\n )}\n {!isControlledByParent && <ViewSelector />}\n </div>\n <div className={`${baseClass}__wrap`}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n <ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>\n {BeforeInput}\n <div className={`${baseClass}__editor-content`}>\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 The `lexical-` prefix prevents drawer-slug collisions with non-lexical `BulkUploadProvider`s up the tree. */}\n <BulkUploadProvider modalSlugPrefix={`lexical-${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 rtl={rtl}\n value={value}\n />\n </BulkUploadProvider>\n </div>\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 }: FallbackProps) {\n return (\n <div className=\"errorBoundary\" role=\"alert\">\n <p>Something went wrong:</p>\n <pre style={{ color: 'red' }}>{error instanceof Error ? error.message : String(error)}</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/index.js'\nimport type { SanitizedClientEditorConfig } from './config/types.js'\n\nimport { useRichTextView } from '../field/RichTextViewProvider.js'\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 rtl?: 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 {\n composerKey,\n editorConfig,\n fieldProps,\n isSmallWidthViewport,\n onChange,\n readOnly,\n rtl,\n value,\n } = props\n\n const { currentView, views } = useRichTextView()\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 // Use the 'default' view if available, otherwise undefined\n const nodeViews = views?.[currentView]?.nodes\n\n return {\n editable: readOnly !== true,\n editorState: value != null ? JSON.stringify(value) : undefined,\n namespace: editorConfig.lexical.namespace,\n nodes: getEnabledNodes({\n editorConfig,\n nodeViews,\n }),\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, views, currentView])\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 // We also add currentView to force re-render when the view changes.\n return (\n <LexicalComposer\n initialConfig={initialConfig}\n key={composerKey + initialConfig.editable + currentView}\n >\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 rtl={rtl}\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 { useTranslation } from '@payloadcms/ui'\nimport { BLUR_COMMAND, COMMAND_PRIORITY_LOW, FOCUS_COMMAND } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\n\nimport type { LexicalProviderProps } from './LexicalProvider.js'\n\nimport { useEditorConfigContext } from './config/client/EditorConfigProvider.js'\nimport './LexicalEditor.css'\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 { NodeViewOverridePlugin } from './plugins/NodeViewOverridePlugin/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' | 'rtl'>\n> = (props) => {\n const { editorConfig, editorContainerRef, isSmallWidthViewport, onChange, rtl } = props\n const editorConfigContext = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const { t } = useTranslation<Record<string, never>, string>()\n const instructionsID = React.useId()\n const hasTabIndentation = isEditable && editorConfig.features.enabledFeatures.includes('indent')\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(\n FOCUS_COMMAND,\n () => {\n handleFocus()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n const unregisterBlur = editor.registerCommand(\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\" dir={rtl ? 'rtl' : undefined} ref={editorContainerRef}>\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'top') {\n return (\n <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n )\n }\n })}\n <RichTextPlugin\n contentEditable={\n <div className=\"editor-scroller\">\n <div className=\"editor\" ref={onRef}>\n <LexicalContentEditable\n editorConfig={editorConfig}\n instructionsID={hasTabIndentation ? instructionsID : undefined}\n />\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 <NodeViewOverridePlugin />\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 {hasTabIndentation && (\n <p className=\"ContentEditable__keyboard-hint\" id={instructionsID}>\n {t('lexical:indent:keyboardHint')}\n </p>\n )}\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 $onUpdate,\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.css'\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 (_, activeEditor) => {\n // Nested editors reconcile independently and update their own highlight.\n if (activeEditor !== editor) {\n return false\n }\n const hasSelectedDecorator = Boolean($getSelectedDecorator())\n $onUpdate(() => {\n activeEditor.read('latest', () => {\n const decorator = $getSelectedDecorator()\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n if (decorator) {\n activeEditor\n .getElementByKey(decorator.getKey())\n ?.classList.add('decorator-selected')\n }\n })\n })\n return hasSelectedDecorator\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) ? node : 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.css'\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) {\n setHandlePosition(\n hoveredElement?.elem ?? null,\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.visibility = 'hidden'\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.visibility = 'visible'\n handleElem.style.transform = `translate(${left}px, ${top}px)`\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { Popup, PopupList, useTranslation } from '@payloadcms/ui'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useCallback, useEffect, useId, 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.css'\nimport { $moveBlock } from './moveBlock.js'\nimport { setTargetLine } from './setTargetLine.js'\nimport { useKeyboardReordering } from './useKeyboardReordering.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 const instructionsID = useId()\n const { t } = useTranslation()\n\n useKeyboardReordering({ editor, instructionsID })\n\n const menuRef = useRef<HTMLDivElement>(null)\n const isMenuOpenRef = useRef(false)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const highlightTimersRef = useRef<ReturnType<typeof setTimeout>[]>([])\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 (isMenuOpenRef.current || !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 const onDocumentPointerDown = (event: PointerEvent) => {\n if (event.pointerType === 'touch' || event.pointerType === 'pen') {\n onDocumentMouseMove(event)\n }\n }\n\n document?.addEventListener('mousemove', onDocumentMouseMove)\n document?.addEventListener('pointerdown', onDocumentPointerDown)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n document?.removeEventListener('pointerdown', onDocumentPointerDown)\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 // Always prevent default and set dropEffect during drag to maintain the move cursor\n event.preventDefault()\n event.dataTransfer!.dropEffect = 'move'\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : 'var(--spacer-5)',\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 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 const highlightTimer = 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(--color-bg-inverse)'\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 const fadeTimer = setTimeout(() => {\n highlightElem.style.opacity = '0'\n const removeTimer = setTimeout(() => {\n highlightElem.remove()\n }, 500)\n highlightTimersRef.current.push(removeTimer)\n }, 1000)\n highlightTimersRef.current.push(fadeTimer)\n }, 120)\n highlightTimersRef.current.push(highlightTimer)\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 highlightTimersRef.current.forEach(clearTimeout)\n highlightTimersRef.current = []\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n const startDrag = useCallback(\n ({\n blockElem,\n dataTransfer,\n }: {\n blockElem: HTMLElement | null\n dataTransfer: DataTransfer | null\n }) => {\n if (!editor.isEditable() || !dataTransfer || !blockElem) {\n return\n }\n\n setDragImage(dataTransfer, blockElem)\n dataTransfer.effectAllowed = 'move'\n editor.read(() => {\n const node = $getNearestNodeFromDOMNode(blockElem)?.getTopLevelElement()\n\n if (node) {\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, node.getKey())\n }\n })\n },\n [editor],\n )\n\n const onDragEnd = useCallback(() => {\n isDraggingBlockRef.current = false\n if (lastTargetBlock?.elem) {\n hideTargetLine(targetLineRef.current, lastTargetBlock.elem)\n }\n }, [lastTargetBlock])\n\n useEffect(() => {\n const onHeaderDragStart = (event: DragEvent) => {\n const handle =\n event.target instanceof HTMLElement\n ? event.target.closest<HTMLElement>('.collapsible__drag[draggable=\"true\"]')\n : null\n\n if (!handle || !editor.getRootElement()?.contains(handle)) {\n return\n }\n\n const blockElem = editor.getElementByKey(handle.dataset.sortableId ?? '')\n\n if (blockElem) {\n setDraggableBlockElem(blockElem)\n startDrag({ blockElem, dataTransfer: event.dataTransfer })\n }\n }\n\n document.addEventListener('dragstart', onHeaderDragStart)\n document.addEventListener('dragend', onDragEnd)\n return () => {\n document.removeEventListener('dragstart', onHeaderDragStart)\n document.removeEventListener('dragend', onDragEnd)\n }\n }, [editor, startDrag, onDragEnd])\n\n function moveBlock({ direction }: { direction: -1 | 1 }) {\n if (!editor.isEditable() || !draggableBlockElem) {\n return\n }\n\n editor.update(\n () => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)?.getTopLevelElement()\n\n if (node) {\n $moveBlock({ direction, node })\n }\n },\n {\n onUpdate: () => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n },\n },\n )\n }\n\n return createPortal(\n <React.Fragment>\n <span className=\"sr-only\" id={instructionsID}>\n {t('general:moveUp')}: Alt + Shift + ↑. {t('general:moveDown')}: Alt + Shift + ↓.\n </span>\n <div className=\"draggable-block-menu\" ref={menuRef}>\n <Popup\n caret={false}\n disabled={!isEditable}\n onToggleClose={() => {\n isMenuOpenRef.current = false\n }}\n onToggleOpen={() => {\n isMenuOpenRef.current = true\n }}\n popupType=\"menu\"\n render={({ close }) => (\n <PopupList.ButtonGroup>\n {([-1, 1] as const).map((direction) => (\n <PopupList.Button\n key={direction}\n onClick={() => {\n moveBlock({ direction })\n close()\n }}\n >\n {t(direction === -1 ? 'general:moveUp' : 'general:moveDown')}\n </PopupList.Button>\n ))}\n </PopupList.ButtonGroup>\n )}\n renderButton={({ active: _active, ...buttonProps }) => (\n <button\n {...buttonProps}\n aria-label={t('general:dragToMove')}\n className=\"draggable-block-menu__button\"\n disabled={!isEditable}\n draggable={isEditable}\n onDragEnd={onDragEnd}\n onDragStart={(event) =>\n startDrag({ blockElem: draggableBlockElem, dataTransfer: event.dataTransfer })\n }\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n )}\n />\n </div>\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", "import type { LexicalNode } from 'lexical'\n\n/** Move a top-level block one position within a Lexical update. */\nexport function $moveBlock({ direction, node }: { direction: -1 | 1; node: LexicalNode }) {\n const sibling = direction === -1 ? node.getPreviousSibling() : node.getNextSibling()\n\n if (sibling) {\n if (direction === -1) {\n sibling.insertBefore(node)\n } else {\n sibling.insertAfter(node)\n }\n }\n\n return node\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} - var(--spacer-5))`\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", "import type { LexicalEditor } from 'lexical'\n\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isNodeSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_HIGH,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_DOWN_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport { $moveBlock } from './moveBlock.js'\n\n/** Move the current top-level line, including decorator nodes, without a pointer. */\nexport function useKeyboardReordering({\n editor,\n instructionsID,\n}: {\n editor: LexicalEditor\n instructionsID: string\n}) {\n useEffect(() => {\n const $moveLine = ({ direction, event }: { direction: -1 | 1; event: KeyboardEvent }) => {\n if (\n !editor.isEditable() ||\n !event.altKey ||\n !event.shiftKey ||\n event.ctrlKey ||\n event.metaKey\n ) {\n return false\n }\n const selection = $getSelection()\n const selectedNode =\n $isRangeSelection(selection) && selection.isCollapsed()\n ? selection.anchor.getNode()\n : $isNodeSelection(selection) && selection.getNodes().length === 1\n ? selection.getNodes()[0]\n : null\n const node = selectedNode?.getTopLevelElement()\n\n if (!node) {\n return false\n }\n event.preventDefault()\n $moveBlock({ direction, node })\n return true\n }\n\n return mergeRegister(\n editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event) =>\n event.target instanceof HTMLElement &&\n Boolean(event.target.closest('.draggable-block-menu')),\n COMMAND_PRIORITY_HIGH,\n ),\n editor.registerCommand(\n KEY_ARROW_UP_COMMAND,\n (event) => $moveLine({ direction: -1, event }),\n COMMAND_PRIORITY_HIGH,\n ),\n editor.registerCommand(\n KEY_ARROW_DOWN_COMMAND,\n (event) => $moveLine({ direction: 1, event }),\n COMMAND_PRIORITY_HIGH,\n ),\n )\n }, [editor])\n\n useEffect(() => {\n let restore: (() => void) | undefined\n const unregister = editor.registerRootListener((root) => {\n restore?.()\n if (!root) {\n return\n }\n const description = root.getAttribute('aria-describedby')\n root.setAttribute('aria-describedby', [description, instructionsID].filter(Boolean).join(' '))\n restore = () => {\n if (description === null) {\n root.removeAttribute('aria-describedby')\n } else {\n root.setAttribute('aria-describedby', description)\n }\n }\n })\n\n return () => {\n unregister()\n restore?.()\n }\n }, [editor, instructionsID])\n}\n", "'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useTranslation } from '@payloadcms/ui'\nimport { $createParagraphNode, $getRoot } from 'lexical'\nimport React from 'react'\n\nimport './index.css'\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nimport { AddIcon } from '../../ui/icons/Add/index.js'\nconst baseClass = 'insert-paragraph-at-end'\n\nexport const InsertParagraphAtEndPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig } = useEditorConfigContext()\n const { t } = useTranslation<{}, string>()\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 <button\n aria-label={t('lexical:general:insertParagraph')}\n className={baseClass}\n onClick={onClick}\n type=\"button\"\n >\n <span className={`${baseClass}-inside`}>\n <AddIcon size={16} />\n </span>\n </button>\n )\n}\n", "'use client'\n\nimport { registerMarkdownShortcuts } from '@lexical/markdown'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport * as React from 'react'\n\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", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $getRoot, type LexicalNode } from 'lexical'\nimport { useEffect } from 'react'\n\nimport { useRichTextView } from '../../../field/RichTextViewProvider.js'\nimport { clearEditorNodeViews, registerEditorNodeViews } from '../../nodes/index.js'\n\n// `LexicalComposer` re-mounts with a new `editor` whenever `currentView` changes,\n// so decorator nodes run their initial `decorate()` before this effect registers the view's overrides.\n// Mark existing block decorators dirty after registering so they re-decorate with the resolved custom `Block` component.\nfunction refreshBlockDecorators(editor: ReturnType<typeof useLexicalComposerContext>[0]): void {\n editor.update(() => {\n const walk = (node: LexicalNode): void => {\n const type = node.getType()\n if (type === 'block' || type === 'inlineBlock') {\n node.markDirty()\n }\n if ('getChildren' in node && typeof node.getChildren === 'function') {\n for (const child of node.getChildren() as LexicalNode[]) {\n walk(child)\n }\n }\n }\n walk($getRoot())\n })\n}\n\nexport function NodeViewOverridePlugin(): null {\n const [editor] = useLexicalComposerContext()\n const { currentView, views } = useRichTextView()\n\n useEffect(() => {\n if (!views) {\n return\n }\n\n if (currentView === 'default') {\n if (views.default) {\n registerEditorNodeViews(editor, views.default?.nodes)\n } else {\n clearEditorNodeViews(editor)\n }\n } else if (views[currentView]) {\n clearEditorNodeViews(editor)\n registerEditorNodeViews(editor, views[currentView]?.nodes)\n }\n\n refreshBlockDecorators(editor)\n }, [editor, views, currentView])\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.css'\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 // Normalize query string for flexible matching (remove spaces, hyphens, underscores)\n const normalizedQuery = queryString.toLowerCase().replace(/[\\s\\-_]/g, '')\n\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\n // Try normalized match (allows \"nestedcontent\" to match \"Nested Content\")\n const normalizedTitle = itemTitle.toLowerCase().replace(/[\\s\\-_]/g, '')\n if (normalizedTitle.includes(normalizedQuery)) {\n return true\n }\n\n if (item.keywords != null) {\n return item.keywords.some((keyword) => {\n if (new RegExp(queryString, 'gi').exec(keyword)) {\n return true\n }\n const normalizedKeyword = keyword.toLowerCase().replace(/[\\s\\-_]/g, '')\n return normalizedKeyword.includes(normalizedQuery)\n })\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} data-theme=\"dark\">\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 { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { useTranslation } from '@payloadcms/ui'\n\nimport './ContentEditable.css'\n\nimport * as React from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../config/types.js'\n\nimport { useEditorConfigContext } from '../config/client/EditorConfigProvider.js'\n\nexport function LexicalContentEditable({\n className,\n editorConfig,\n instructionsID,\n}: {\n className?: string\n editorConfig: SanitizedClientEditorConfig\n instructionsID?: string\n}): JSX.Element {\n const { fieldProps } = useEditorConfigContext()\n const { i18n, t } = useTranslation<{}, string>()\n const [_, { getTheme }] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const theme = getTheme()\n return (\n <ContentEditable\n aria-describedby={instructionsID}\n aria-label={getTranslation(fieldProps.field.label || '', i18n)}\n aria-required={fieldProps.field.required || undefined}\n className={className ?? 'ContentEditable__root'}\n {...(isEditable\n ? {\n 'aria-placeholder': t('lexical:general:placeholder'),\n placeholder: (\n <p className={theme?.placeholder}>\n {editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')}\n </p>\n ),\n }\n : { placeholder: null })}\n />\n )\n}\n", "'use client'\nimport { ChevronIcon, Popup, PopupList } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { useRichTextView } from './RichTextViewProvider.js'\nimport './ViewSelector.css'\n\nexport function ViewSelector(): null | React.ReactElement {\n const { currentView, setCurrentView, views } = useRichTextView()\n\n // Don't show if no views or only default exists\n if (!views || Object.keys(views).length === 0) {\n return null\n }\n\n const viewKeys = Object.keys(views)\n const hasNonDefaultViews = viewKeys.some((key) => key !== 'default')\n\n // If only 'default' exists, no need to show selector\n if (!hasNonDefaultViews) {\n return null\n }\n\n // Build list of available views\n const allViews = ['default', ...viewKeys.filter((key) => key !== 'default')]\n\n const currentViewLabel = currentView.charAt(0).toUpperCase() + currentView.slice(1)\n\n return (\n <div className=\"lexical-view-selector\">\n <Popup\n button={\n <button className=\"lexical-view-selector__button\" type=\"button\">\n <span className=\"lexical-view-selector__label\">{currentViewLabel}</span>\n <ChevronIcon className=\"lexical-view-selector__icon\" />\n </button>\n }\n buttonType=\"custom\"\n horizontalAlign=\"left\"\n popupType=\"menu\"\n render={({ close }) => (\n <PopupList.ButtonGroup>\n {allViews.map((viewName) => {\n const viewLabel = viewName.charAt(0).toUpperCase() + viewName.slice(1)\n\n return (\n <PopupList.Button\n active={viewName === currentView}\n disabled={viewName === currentView}\n key={viewName}\n onClick={() => {\n setCurrentView?.(viewName)\n close()\n }}\n >\n {viewLabel}\n </PopupList.Button>\n )\n })}\n </PopupList.ButtonGroup>\n )}\n size=\"large\"\n />\n </div>\n )\n}\n"],
5
+ "mappings": "uOAIA,OAASA,kBAAAA,OAAsB,2BAC/B,OACEC,sBAAAA,GACAC,oBAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,yBAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,kBAAAA,GACAC,YAAAA,GACAC,aAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,oBAAAA,OAAwB,wBACjC,OAASC,UAAAA,OAAc,cAEvB,OAAOC,IAASC,eAAAA,GAAaC,aAAAA,GAAWC,WAAAA,GAASC,YAAAA,OAAgB,QACjE,OAASC,iBAAAA,OAAqB,uBAI9B,MAAO,kECvBP,OAASC,mBAAAA,OAAuB,oCAChC,OAASC,gBAAAA,OAAoB,iBAC7B,UAAYC,OAAW,QACvB,OAASC,WAAAA,OAAe,QCPxB,OAAAC,KAAAC,OAAA,4EACA,OAASC,6BAAAA,OAAiC,2CAC1C,OAASC,wBAAAA,OAA4B,yCACrC,OAASC,iBAAAA,OAAqB,yCAC9B,OAASC,kBAAAA,OAAsB,0CAC/B,OAASC,kBAAAA,OAAsB,0CAC/B,OAASC,sBAAAA,OAA0B,oCACnC,OAASC,kBAAAA,OAAsB,iBAC/B,OAASC,gBAAAA,GAAcC,wBAAAA,GAAsBC,iBAAAA,OAAqB,UAClE,UAAYC,MAAW,QACvB,OAASC,aAAAA,GAAWC,YAAAA,OAAgB,iDCTpC,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,CACLG,UAAO,GAAA5E,EAAA,2BAEN6E,EAAAC,GAAA,CAAIvE,2BAAc,WAGbwE,UAAAA,EACApE,KAAAG,EACAJ,SAAAE,IACAE,CAAAA,GAAM+D,EAAAG,GAAA,CAAA,CAAA,CAAA,IACIpE,GAAAA,MAAAA,WAGZgB,GAAAA,EAAAA,mBAEHiD,EAAAI,GAAA,CAAI1E,gBAAcP,WACjB6E,EAACI,GAAAA,CACCC,KAAAA,EACAC,UAAA5C,MAA6CA,GAAAA,GAAAA,+BAE/CkC,CAAAA,EAAeW,SAAAA,CAAAA,EAAgBP,EAAA,MAAA,CAAgBQ,UAAS,GAAOrF,EAAA,4BAC5D6E,EAAAS,GACA,CAAI/E,gBAAcP,WAAAc,CAAA,YAIjB+D,EAACS,GAAA,CAAmBC,YAAAC,gBAClBpF,EACEqF,WAAAtF,EACAC,qBAAcA,EACdsF,SAAAC,EACAjD,SAAAA,EAEAkD,IAAAA,EACA7E,MAAAA,GACAU,KAAKA,UAAA,CACLe,KAAAA,0BAJsB1B,MAA0BgB,CAAA,0BAQrDG,WAEFgD,EAAAA,GAAA,CACCC,YAAAzE,EACA0E,KAAArE,yBA7CC0E,GAAA,CAkDX,MAAAK,CAEA,EAAA,CAA0BA,OAAAA,GAAAA,MAAAA,CAAsB,UAAA,gBAC9C,KAAA,QACOtF,SAAA,CAAUsE,EAAA,IAAA,CAAgBF,SAAK,kCACjC,mBACIC,WAAgBiB,aAAA,MAAAA,EAAA,QAAA,OAAAA,CAAA,GAAM",
6
+ "names": ["getTranslation", "BulkUploadProvider", "FieldDescription", "FieldError", "FieldLabel", "isFieldRTL", "RenderCustomComponent", "useConfig", "useEditDepth", "useEffectEvent", "useField", "useLocale", "useTranslation", "mergeFieldStyles", "dequal", "React", "useCallback", "useEffect", "useMemo", "useState", "ErrorBoundary", "LexicalComposer", "useEditDepth", "React", "useMemo", "c", "_c", "useLexicalComposerContext", "LexicalErrorBoundary", "HistoryPlugin", "OnChangePlugin", "RichTextPlugin", "useLexicalEditable", "useTranslation", "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", "$onUpdate", "$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", "t0", "t1", "_temp3", "_", "activeEditor", "hasSelectedDecorator", "$getSelectedDecorator", "decorator_0", "document", "_temp5", "_temp7", "event_2", "selection_1", "selection", "event", "preventDefault", "getNodes", "nextSibling", "element_0", "$selectDecorator", "element", "firstDescendant", "INTERNAL_$isBlock", "block_0", "block", "lastPoint", "isBackward", "lastNode", "_temp6", "lastSelectedBlock", "getNextSibling", "nextBlock", "nextBlockElement", "node_1", "event_1", "selection_0", "prevSibling", "lastDescendant", "selectStart", "firstPoint", "firstNode", "_temp4", "firstSelectedBlock", "getPreviousSibling", "prevBlock", "prevBlockElement", "node_0", "event_0", "querySelector", "classList", "decorator", "target", "isInteractive", "_temp2", "_temp", "node", "$getDecoratorByMouseEvent", "nodes", "getKey", "scrollIntoView", "behavior", "firstChild", "isLeafElement", "findLaterSiblingBlock", "current", "findFirstSiblingBlock", "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", "visibility", "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", "keysLength", "getCurrentIndex", "useAddBlockHandle", "editor", "anchorElem", "isEditable", "scrollerElem", "editorConfig", "useEditorConfigContext", "blockHandleHorizontalOffset", "menuRef", "setHoveredElement", "useState", "useEffect", "hoveredElement", "onDocumentMouseMove", "event", "target", "isHTMLElement", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "_emptyBlockElem", "blockElem", "blockNode", "foundAtIndex", "cache_threshold", "horizontalOffset", "point", "x", "returnEmptyParagraphs", "startIndex", "elem", "document", "addEventListener", "setHandlePosition", "handleAddClick", "useCallback", "hoveredElementToUse", "isEmptyParagraph", "$createParagraphNode", "setTimeout", "newParagraph", "update", "node", "ENABLE_SLASH_MENU_COMMAND", "dispatchCommand", "event_0", "stopPropagation", "preventDefault", "_jsx", "createPortal", "className", "event_1", "onClick", "ref", "type", "AddBlockHandlePlugin", "t0", "t1", "useLexicalComposerContext", "useLexicalComposerContext", "eventFiles", "Popup", "PopupList", "useTranslation", "$getNearestNodeFromDOMNode", "$getNodeByKey", "isHTMLElement", "React", "useCallback", "useEffect", "useId", "useRef", "useState", "createPortal", "$moveBlock", "direction", "node", "sibling", "getPreviousSibling", "getNextSibling", "insertBefore", "insertAfter", "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", "mergeRegister", "$getSelection", "$isNodeSelection", "$isRangeSelection", "COMMAND_PRIORITY_HIGH", "KEY_ARROW_DOWN_COMMAND", "KEY_ARROW_UP_COMMAND", "KEY_DOWN_COMMAND", "useEffect", "useKeyboardReordering", "editor", "instructionsID", "useEffect", "$moveLine", "direction", "event", "isEditable", "altKey", "shiftKey", "ctrlKey", "metaKey", "selection", "$getSelection", "node", "$isRangeSelection", "isCollapsed", "anchor", "getNode", "$isNodeSelection", "getNodes", "length", "getTopLevelElement", "preventDefault", "$moveBlock", "mergeRegister", "registerCommand", "KEY_DOWN_COMMAND", "target", "HTMLElement", "Boolean", "closest", "COMMAND_PRIORITY_HIGH", "KEY_ARROW_UP_COMMAND", "KEY_ARROW_DOWN_COMMAND", "restore", "unregister", "registerRootListener", "root", "description", "getAttribute", "setAttribute", "filter", "join", "removeAttribute", "DRAGGABLE_BLOCK_MENU_CLASSNAME", "prevIndex", "DRAG_DATA_FORMAT", "keysLength", "getCurrentIndex", "setDragImage", "dataTransfer", "draggableBlockElem", "transform", "setTimeout", "hideTargetLine", "targetLineElem", "lastTargetBlockElem", "style", "marginBottom", "useDraggableBlockMenu", "editor", "anchorElem", "isEditable", "scrollerElem", "instructionsID", "t", "useKeyboardReordering", "menuRef", "useRef", "isMenuOpenRef", "targetLineRef", "debugHighlightRef", "isDraggingBlockRef", "highlightTimersRef", "useState", "setDraggableBlockElem", "editorConfig", "useEditorConfigContext", "useEffect", "blockHandleHorizontalOffset", "target", "onDocumentMouseMove", "event", "isHTMLElement", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "_draggableBlockElem", "blockElem", "foundAtIndex", "isFoundNodeEmptyParagraph", "cache_threshold", "horizontalOffset", "point", "Point", "startIndex", "useEdgeAsDefault", "onDocumentPointerDown", "event_0", "pointerType", "document", "addEventListener", "removeEventListener", "setHandlePosition", "onDragover", "event_1", "isFileTransfer", "eventFiles", "pageY", "target_0", "distanceFromScrollerElem_0", "targetBlockElem", "fuzzy", "foundAtIndex_0", "preventDefault", "dropEffect", "isBelow", "willStayInSamePosition", "setTargetLine", "setLastTargetBlock", "boundingBox", "elem", "lastTargetBlock", "onDrop", "event_2", "isFileTransfer_0", "dragData", "update", "$getNodeByKey", "draggedNode", "target_1", "distanceFromScrollerElem_1", "targetBlockElem_0", "targetNode", "$getNearestNodeFromDOMNode", "targetBlockElemHeight", "height", "top", "targetBlockElemTop", "mouseY", "getBoundingClientRectWithoutTransform", "isFoundNodeEmptyParagraph_1", "insertBefore", "allPrevHighlighters", "querySelectorAll", "forEach", "newInsertedElem", "getElementByKey", "newInsertedElemRect", "highlightElem", "className", "backgroundColor", "transition", "zIndex", "pointerEvents", "boxSizing", "borderRadius", "position", "appendChild", "opacity", "width", "window", "removeTimer", "fadeTimer", "highlightTimer", "current", "dataTransfer_0", "effectAllowed", "read", "node", "useCallback", "event_3", "onHeaderDragStart", "handle", "HTMLElement", "blockElem_0", "startDrag", "onDragEnd", "direction", "node_0", "$moveBlock", "onUpdate", "createPortal", "_jsxs", "id", "_jsx", "ref", "Popup", "caret", "disabled", "onToggleClose", "onToggleOpen", "popupType", "render", "close", "PopupList", "onClick", "moveBlock", "direction_0", "renderButton", "active", "buttonProps", "draggable", "onDragStart", "type", "DraggableBlockPlugin", "t0", "t1", "useLexicalComposerContext", "c", "_c", "useLexicalComposerContext", "useTranslation", "$createParagraphNode", "$getRoot", "baseClass", "$", "_c", "InsertParagraphAtEndPlugin", "editor", "useLexicalComposerContext", "editorConfig", "useEditorConfigContext", "t", "useTranslation", "t0", "_temp", "onClick", "t1", "_jsx", "className", "type", "children", "paragraphNode", "$createParagraphNode", "$getRoot", "append", "c", "_c", "registerMarkdownShortcuts", "useLexicalComposerContext", "React", "MarkdownShortcutPlugin", "$", "_c", "editorConfig", "useEditorConfigContext", "editor", "useLexicalComposerContext", "t0", "t1", "features", "markdownTransformers", "registerMarkdownShortcuts", "useEffect", "c", "_c", "useLexicalComposerContext", "$getRoot", "useEffect", "refreshBlockDecorators", "editor", "update", "walk", "node", "type", "getType", "markDirty", "getChildren", "child", "$getRoot", "NodeViewOverridePlugin", "$", "_c", "useLexicalComposerContext", "currentView", "views", "useRichTextView", "t0", "t1", "default", "registerEditorNodeViews", "nodes", "clearEditorNodeViews", "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", "useMenuTriggerMatch", "isSelected", "item", "onClick", "onMouseEnter", "ref", "fieldProps", "featureClientSchemaMap", "useEditorConfigContext", "i18n", "useTranslation", "className", "title", "label", "schemaPath", "length", "_jsxs", "id", "role", "tabIndex", "type", "_jsx", "SlashMenuPlugin", "anchorElem", "editor", "useLexicalComposerContext", "editorConfig", "checkForTriggerMatch", "getDynamicItems", "useCallback", "groupWithItems", "queryString", "dynamicItem", "dynamicGroupWithItems", "groups", "groupsWithItems", "groupWithItem", "normalizedQuery", "group", "map", "filteredItems", "itemTitle", "normalizedTitle", "toLowerCase", "keywords", "keyword", "RegExp", "replace", "group_0", "dynamicItemGroups", "dynamicGroup", "group_2", "group_1", "group_3", "anchorElementRef", "menuRenderFn", "selectedItemKey", "selectItemAndCleanUp", "setSelectedItemKey", "group_4", "groupTitle", "index", "item_0", "key", "el", "onQueryChange", "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", "useLexicalEditable", "getTranslation", "useTranslation", "useEditorConfigContext", "t0", "$", "_c", "LexicalContentEditable", "className", "editorConfig", "instructionsID", "fieldProps", "i18n", "t", "useTranslation", "getTheme", "isEditable", "useLexicalEditable", "t2", "theme", "_jsx", "ContentEditable", "getTranslation", "label", "placeholder", "LexicalContentEditable", "$", "_c", "LexicalEditor", "editorConfig", "editorContainerRef", "isSmallWidthViewport", "onChange", "rtl", "props", "useEditorConfigContext", "editorConfigContext", "isEditable", "useLexicalComposerContext", "t", "useTranslation", "instructionsID", "React", "hasTabIndentation", "useState", "enabledFeatures", "t0", "_floatingAnchorElem", "setFloatingAnchorElem", "onRef", "t1", "t2", "editor", "console", "parentEditor", "handleFocus", "handleBlur", "unregisterFocus", "FOCUS_COMMAND", "COMMAND_PRIORITY_LOW", "BLUR_COMMAND", "unregisterBlur", "useEffect", "Fragment", "_temp", "_jsxs", "children", "className", "dir", "ref", "_temp2", "_jsx", "RichTextPlugin", "features", "contentEditable", "LexicalErrorBoundary", "NormalizeSelectionPlugin", "ignoreSelectionChange", "editor_0", "tags", "editorState", "floatingAnchorElem", "DraggableBlockPlugin", "anchorElem", "plugins", "plugin_1", "plugin", "position", "EditorPlugin", "clientProps", "MarkdownShortcutPlugin", "HistoryPlugin", "markdownTransformers", "_temp4", "length", "id", "_temp5", "plugin_0", "_temp3", "plugin_2", "plugin_3", "plugin_4", "NestProviders", "children", "providers", "length", "Component", "_jsx", "slice", "LexicalProvider", "props", "composerKey", "editorConfig", "fieldProps", "isSmallWidthViewport", "onChange", "readOnly", "rtl", "value", "currentView", "views", "useRichTextView", "parentContext", "useEditorConfigContext", "editDepth", "useEditDepth", "editorContainerRef", "useRef", "initialConfig", "useMemo", "Error", "JSON", "stringify", "Array", "isArray", "nodeViews", "nodes", "editable", "editorState", "undefined", "namespace", "lexical", "getEnabledNodes", "onError", "error", "theme", "LexicalComposer", "EditorConfigProvider", "features", "LexicalEditorComponent", "c", "_c", "ChevronIcon", "Popup", "PopupList", "ViewSelector", "$", "_c", "currentView", "setCurrentView", "views", "useRichTextView", "t0", "t1", "Symbol", "bb0", "viewKeys", "keys", "_temp", "hasNonDefaultViews", "allViews", "_temp2", "t2", "currentViewLabel", "_jsx", "className", "Popup", "children", "button", "type", "ChevronIcon", "horizontalAlign", "popupType", "render", "t3", "close", "PopupList", "ButtonGroup", "viewLabel", "map", "viewName", "charAt", "Button", "active", "disabled", "onClick", "key_0", "key", "baseClass", "useRichTextView", "RichTextComponent", "props", "editorConfig", "field", "admin", "className", "readOnlyFromAdmin", "description", "localized", "label", "required", "readOnlyFromTopLevelProps", "path", "readOnly", "schemaPath", "validate", "i18n", "useTranslation", "readOnlyFromProps", "locale", "localizationConfig", "config", "localization", "rtl", "isFieldRTL", "fieldLocalized", "isControlledByParent", "validationOptions", "AfterInput", "customComponents", "BeforeInput", "Description", "Error", "Label", "initialValue", "disabled", "setValue", "showError", "value", "memoizedValidate", "isSmallWidthViewport", "setIsSmallWidthViewport", "useState", "disabledFromField", "prevInitialValueRef", "React", "prevValueRef", "rerenderProviderKey", "setRerenderProviderKey", "useEffect", "useRef", "isNextSmallWidthViewport", "updateViewPortWidth", "window", "addEventListener", "removeEventListener", "classes", "editDepth", "useRunDeprioritized", "runDeprioritized", "useCallback", "editorState", "newState", "updateFieldValue", "styles", "useEffectEvent", "initialValue_0", "value_0", "dequal", "current", "handleInitialValueChange", "_jsxs", "getTranslation", "role", "style", "_jsx", "FieldLabel", "hasRequiredAccessibleState", "ViewSelector", "RenderCustomComponent", "CustomComponent", "Fallback", "fallbackRender", "onReset", "BulkUploadProvider", "modalSlugPrefix", "pathWithEditDepth", "composerKey", "fieldProps", "handleChange", "onChange", "error"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";import{a as b}from"./chunk-DBWINSQN.js";import{a as R}from"./chunk-EA5BHQ2T.js";import{jsx as l,jsxs as d}from"react/jsx-runtime";import{useLexicalComposerContext as k}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as K}from"@lexical/react/useLexicalEditable";import{getTranslation as U}from"@payloadcms/translations";import{Button as $,useConfig as H,usePayloadAPI as M,useTranslation as O}from"@payloadcms/ui";import{$getNodeByKey as W,$getSelection as q,$isNodeSelection as z,$isRangeSelection as F}from"lexical";import{formatAdminURL as G}from"payload/shared";import J,{useCallback as Q,useEffect as N,useReducer as V,useRef as X,useState as v}from"react";var C={depth:0},re=S=>{let{className:e,data:{relationTo:w,value:a},nodeKey:o}=S;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 m=X(null),[i]=k(),r=K(),[p,c]=v(!1),{config:{routes:{api:x},serverURL:D},getEntityConfig:E}=H(),[s]=v(()=>E({collectionSlug:w})),{i18n:y,t:u}=O(),[f,L]=V(t=>t+1,0),[{data:h},{setParams:g}]=M(G({apiRoute:x,path:`/${s.slug}/${a}`,serverURL:D}),{initialParams:C}),{closeDocumentDrawer:_,DocumentDrawer:T,DocumentDrawerToggler:j}=R({id:a,collectionSlug:s.slug});N(()=>i.registerUpdateListener(({editorState:t})=>{t.read(()=>{let n=q();if(z(n))c(n.has(o));else if(F(n)){let I=n.getNodes();c(I.some(P=>P.getKey()===o))}else c(!1)})}),[i,o]),N(()=>{let t=m.current?.closest(`.${e}`);t&&t.classList.toggle(`${e}--selected`,p)},[p,e]);let A=Q(()=>{i.update(()=>{W(o)?.remove()})},[i,o]),B=J.useCallback(()=>{g({...C,cacheBust:f}),_(),L()},[f,g,_]);return d("div",{className:`${e}__contents`,contentEditable:!1,ref:m,children:[d("div",{className:`${e}__wrap`,children:[l("p",{className:`${e}__label`,children:u("fields:labelRelationship",{label:s.labels?.singular?U(s.labels?.singular,y):s.slug})}),l(j,{className:`${e}__doc-drawer-toggler`,children:l("p",{className:`${e}__title`,children:h?h[s?.admin?.useAsTitle||"id"]:a})})]}),r&&d("div",{className:`${e}__actions`,children:[l($,{buttonStyle:"ghost",className:`${e}__swapButton`,disabled:!r,el:"button",icon:"swap",onClick:()=>{o&&i.dispatchCommand(b,{replace:{nodeKey:o}})},round:!0,tooltip:u("fields:swapRelationship")}),l($,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!r,icon:"x",onClick:t=>{t.preventDefault(),A()},round:!0,tooltip:u("fields:removeRelationship")})]}),!!a&&l(T,{onSave:B})]})};export{re as RelationshipComponent};
2
+ //# sourceMappingURL=RelationshipComponent-TVK6I4W4.js.map
@@ -0,0 +1,7 @@
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, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/schema.js'\n\nimport './index.css'\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 [isSelected, setIsSelected] = useState(false)\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 useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey!))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\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=\"ghost\"\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=\"ghost\"\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 && <Document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ACnC,GAAAxD,CAAAwD,UAAGvD,SAAAC,EAAcF,EAAAA,GAAkB,OAAA,YAAA,IAAA,EAAAK,+BAKtCG,GAAAR,CAAA,YACMC,SAAA,CAAcuD,EAAAE,EAAoB,qBAEnCC,UAAA,GAAY3D,CAAA,eACZC,SAAA,CAAWO,EACXoD,GAAAA,SACAC,KAAG,OACHC,QAAK,IAAA,CACLC,GACE1B,EAAIjC,gBAASP,EAAA,CACXwC,QAAO2B,CACLC,QAAAA,MAGN,MAAA,GACAC,QAAK9C,EAAA,yBAAA,IACMoC,EAAAE,EAAA,qBAGXC,UAAA,GAAY3D,CAAA,iBACZC,SAAA,CAAWO,EACXoD,KAAAA,IACAE,QAAKK,GAAA,CACLJ,EAAAA,eAAU,EACRI,EAAgB,GAElB,MAAA,GACAD,QAAK9C,EAAA,2BAAA,GACLgD,qBAKH/D,GAAyBgE",
6
+ "names": ["useLexicalComposerContext", "useLexicalEditable", "getTranslation", "Button", "useConfig", "usePayloadAPI", "useTranslation", "$getNodeByKey", "$getSelection", "$isNodeSelection", "$isRangeSelection", "formatAdminURL", "React", "useCallback", "useEffect", "useReducer", "useRef", "useState", "initialParams", "INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND", "RelationshipComponent", "props", "baseClass", "className", "data", "relationTo", "nodeKey", "value", "relationshipElemRef", "useRef", "isEditable", "useLexicalComposerContext", "useLexicalEditable", "config", "routes", "serverURL", "getEntityConfig", "useConfig", "useState", "relatedCollection", "collectionSlug", "i18n", "t", "useTranslation", "dispatchCacheBust", "useReducer", "state", "cacheBust", "setParams", "usePayloadAPI", "apiRoute", "api", "path", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "useEffect", "editor", "editorState", "$getSelection", "$isNodeSelection", "setIsSelected", "selection", "nodes", "$isRangeSelection", "getNodes", "node", "outerEl", "isSelected", "useCallback", "removeRelationship", "React", "updateRelationship", "contentEditable", "ref", "_jsxs", "_jsx", "getTranslation", "Button", "buttonStyle", "disabled", "el", "icon", "onClick", "dispatchCommand", "replace", "round", "e", "tooltip", "onSave"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{c as _}from"react/compiler-runtime";import{jsx as b}from"react/jsx-runtime";import{useLexicalComposerContext as h}from"@lexical/react/LexicalComposerContext";import{useDocumentDrawer as v,useModal as E}from"@payloadcms/ui";import{$getPreviousSelection as P,$getSelection as W,$setSelection as q}from"lexical";import{useEffect as y,useState as O}from"react";var J=j=>{let e=_(25),[o]=h(),[n,L]=O(null),[c,k]=O(!1),[d,g,M]=v(j),{closeDrawer:x,drawerSlug:t,openDrawer:C}=M,{modalState:i}=E(),a;e[0]!==o?(a=()=>{o.read(()=>{let l=W()??P();L(l)}),k(!0)},e[0]=o,e[1]=a):a=e[1];let s=a,u;e[2]!==o||e[3]!==n?(u=()=>{n&&o.update(()=>{q(n.clone())},{discrete:!0,skipTransforms:!0})},e[2]=o,e[3]=n,e[4]=u):u=e[4];let m=u,f;e[5]!==x?(f=()=>{x()},e[5]=x,e[6]=f):f=e[6];let T=f,D,p;e[7]!==t||e[8]!==i||e[9]!==m||e[10]!==c?(D=()=>{if(!c)return;let l=i[t];l&&!l?.isOpen&&(k(!1),setTimeout(()=>{m()},1))},p=[i,t,m,c],e[7]=t,e[8]=i,e[9]=m,e[10]=c,e[11]=D,e[12]=p):(D=e[11],p=e[12]),y(D,p);let S;e[13]!==C||e[14]!==s?(S=()=>{s(),C()},e[13]=C,e[14]=s,e[15]=S):S=e[15];let $=S,r;e[16]!==g||e[17]!==s?(r=l=>b(g,{...l,onClick:s}),e[16]=g,e[17]=s,e[18]=r):r=e[18];let w;return e[19]!==d||e[20]!==T||e[21]!==t||e[22]!==$||e[23]!==r?(w={closeDocumentDrawer:T,DocumentDrawer:d,documentDrawerSlug:t,DocumentDrawerToggler:r,openDocumentDrawer:$},e[19]=d,e[20]=T,e[21]=t,e[22]=$,e[23]=r,e[24]=w):w=e[24],w};export{J as a};
2
+ //# sourceMappingURL=chunk-EA5BHQ2T.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],
4
+ "sourcesContent": ["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n openDocumentDrawer: () => void\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug, openDrawer },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n const openDocumentDrawer = useCallback(() => {\n storeSelection()\n openDrawer()\n }, [storeSelection, openDrawer])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n openDocumentDrawer,\n }\n}\n"],
5
+ "mappings": "AAAA,OAAAA,KAAAC,MAAA,iEAIA,OAASC,6BAAAA,MAAiC,wCAC1C,OAASC,qBAAAA,EAAmBC,YAAAA,MAAgB,iBAC5C,OAASC,yBAAAA,EAAuBC,iBAAAA,EAAeC,iBAAAA,MAAqB,UACpE,OAAsBC,aAAAA,EAAWC,YAAAA,MAAgB,QAO1C,IAAMC,EAA2BC,GAAA,CAAA,IAAAC,EAAAX,EAAA,EAAA,EAStC,CAAAY,CAAA,EAAiBX,EAAA,EACjB,CAAAY,EAAAC,CAAA,EAA4CN,EAA+B,IAAA,EAC3E,CAAAO,EAAAC,CAAA,EAA8BR,EAAkB,EAAA,EAEhD,CAAAS,EAAAC,EAAAC,CAAA,EAIIjB,EAAkBQ,CAAA,EADpB,CAAAU,YAAAA,EAAAC,WAAAC,EAAAC,WAAAA,CAAA,EAAAJ,EAEF,CAAAK,WAAAA,CAAA,EAAuBrB,EAAA,EAAAsB,EAAAd,EAAA,CAAA,IAAAC,GAEYa,EAAAA,IAAA,CACjCb,EAAAc,KAAY,IAAA,CACV,IAAAC,EAAkBtB,EAAmB,GAAAD,EAAA,EACrCU,EAAkBa,CAAA,CAAA,CACpB,EACAX,EAAW,EAAA,CAAA,EACbL,EAAA,CAAA,EAAAC,EAAAD,EAAA,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A,IAAAY,GAAAZ,EAAA,EAAA,IAAAiB,GAEvBc,EAAAA,IAAA,CACrCd,EAAA,EACAL,EAAA,CAAA,EACFZ,EAAA,EAAA,EAAAY,EAAAZ,EAAA,EAAA,EAAAiB,EAAAjB,EAAA,EAAA,EAAA+B,GAAAA,EAAA/B,EAAA,EAAA,EAHA,IAAAgC,EAA2BD,EAGIE,EAAAjC,EAAA,EAAA,IAAAO,GAAAP,EAAA,EAAA,IAAAiB,GAMNgB,EAAAC,GAAWC,EAAC5B,EAAA,CAAA,GAA0B2B,EAAKE,QAAWnB,yGAJxEoB,EAAA,CAAAZ,oBAAAA,EAAAnB,eAAAA,EAAAK,mBAAAA,EAAAJ,sBAIkB0B,sBAEzB,EAAAjC,EAAA,EAAA,EAAAM,EAAAN,EAAA,EAAA,EAAAyB,EAAAzB,EAAA,EAAA,EAAAW,EAAAX,EAAA,EAAA,EAAAgC,EAAAhC,EAAA,EAAA,EAAAiC,EAAAjC,EAAA,EAAA,EAAAqC,GAAAA,EAAArC,EAAA,EAAA,EANOqC,CAMP",
6
+ "names": ["c", "_c", "useLexicalComposerContext", "useDocumentDrawer", "useModal", "$getPreviousSelection", "$getSelection", "$setSelection", "useEffect", "useState", "useLexicalDocumentDrawer", "args", "$", "editor", "selectionState", "setSelectionState", "wasOpen", "setWasOpen", "DocumentDrawer", "DocumentDrawerToggler", "t0", "closeDrawer", "drawerSlug", "documentDrawerSlug", "openDrawer", "modalState", "t1", "read", "selection", "storeSelection", "t2", "update", "clone", "discrete", "skipTransforms", "restoreSelection", "t3", "closeDocumentDrawer", "t4", "t5", "thisModalState", "isOpen", "setTimeout", "t6", "openDocumentDrawer", "t7", "props", "_jsx", "onClick", "t8"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var z=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";import{c as me}from"react/compiler-runtime";import{useRef as pe}from"react";function ft(i){let e=me(2),n=i===void 0?500:i,o=pe(void 0),t;return e[0]!==n?(t=l=>new Promise(c=>{let s=()=>{l(),c()};"requestIdleCallback"in window?("cancelIdleCallback"in window&&o.current!==void 0&&cancelIdleCallback(o.current),o.current=requestIdleCallback(s,{timeout:n})):ge().then(s)}),e[0]=n,e[1]=t):t=e[1],t}function ge(){return new Promise(i=>{setTimeout(i,100),requestAnimationFrame(()=>{setTimeout(i,0)})})}import{jsx as _e}from"react/jsx-runtime";import{useControllableState as we}from"@payloadcms/ui";import{createContext as ye,use as Oe,useMemo as xe}from"react";var Q=ye({currentView:"default",inheritable:!1,setCurrentView:()=>{}}),_t=i=>{let e=be(),n=i.currentView!==void 0,o=e.inheritable&&(!!e.views||!!e.hasExplicitCurrentView),t=n||e.inheritable&&!!e.hasExplicitCurrentView,{children:r,currentView:l,inheritable:c,views:s}={children:i.children,currentView:o?e.currentView:i.currentView,inheritable:e.inheritable||i.inheritable,views:o&&e.views?e.views:i.views},[u,a]=we(l,"default"),h=s&&u!=="default"&&!s[u]?"default":u,m=xe(()=>{let y=s?s[h]:void 0;return{currentView:h,currentViewMap:y,hasExplicitCurrentView:t,inheritable:c,isControlledByParent:o,setCurrentView:a,views:s}},[h,c,t,o,a,s]);return _e(Q,{value:m,children:r})};function be(){return Oe(Q)}var H=class{_x;_y;constructor(e,n){this._x=e,this._y=n}calcDeltaXTo({x:e}){return this.x-e}calcDeltaYTo({y:e}){return this.y-e}calcDistanceTo(e){return Math.sqrt(Math.pow(this.calcDeltaXTo(e),2)+Math.pow(this.calcDeltaYTo(e),2))}calcHorizontalDistanceTo(e){return Math.abs(this.calcDeltaXTo(e))}calcVerticalDistance(e){return Math.abs(this.calcDeltaYTo(e))}equals({x:e,y:n}){return this.x===e&&this.y===n}get x(){return this._x}get y(){return this._y}};function J(i){return i instanceof H}import{jsx as Fe}from"react/jsx-runtime";import{useLexicalComposerContext as Ke}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as ze}from"@lexical/utils";import{$getSelection as U,$isRangeSelection as F,$isTextNode as Qe,COMMAND_PRIORITY_LOW as Je,createCommand as Ge,getDOMSelection as Ze}from"lexical";import{useCallback as se,useEffect as le,useState as et}from"react";import*as q from"react";import{c as X}from"react/compiler-runtime";import{useLexicalComposerContext as te}from"@lexical/react/LexicalComposerContext.js";import{getScrollParent as Ce,mergeRegister as G}from"@lexical/utils";import{$getSelection as ne,$isRangeSelection as Se,$setSelection as Me,COMMAND_PRIORITY_LOW as Re,COMMAND_PRIORITY_NORMAL as $,createCommand as De,KEY_ARROW_DOWN_COMMAND as Te,KEY_ARROW_UP_COMMAND as ve,KEY_ENTER_COMMAND as Ee,KEY_ESCAPE_COMMAND as Ie,KEY_TAB_COMMAND as Ne}from"lexical";import{useEffect as B,useLayoutEffect as ke,useRef as Ae,useState as Le}from"react";var Be="slash-menu-popup",oe=i=>{let e=document.getElementById("slash-menu");if(!e)return;let n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),i.scrollIntoView({block:"nearest"})};function Pe(i,e,n){let o=n;for(let t=o;t<=e.length;t++)i.substring(i.length-t)===e.substring(0,t)&&(o=t);return o}function Ve(i){let e=ne();if(!Se(e)||!e.isCollapsed())return;let n=e.anchor;if(n.type!=="text")return;let o=n.getNode();if(!o.isSimpleText())return;let t=n.offset,r=o.getTextContent().slice(0,t),l=i.replaceableString.length,c=Pe(r,i.matchingString,l),s=t-c;if(s<0)return;let u;return s===0?[u]=o.splitText(t):[,u]=o.splitText(s,t),u}function Z(i,e){let n=i.getBoundingClientRect(),o=e.getBoundingClientRect();return n.top>o.top&&n.top<o.bottom}function $e(i,e,n,o){let t=X(7),[r]=te(),l,c;t[0]!==r||t[1]!==n||t[2]!==o||t[3]!==i||t[4]!==e?(l=()=>{let s=e.current;if(s!=null&&i!=null){let u=r.getRootElement(),a=u!=null?Ce(u,!1):document.body,h=!1,m=Z(s,a),y=function(){h||(window.requestAnimationFrame(function(){n(),h=!1}),h=!0);let d=Z(s,a);d!==m&&(m=d,o?.(d))},f=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",y,{capture:!0,passive:!0}),f.observe(s),()=>{f.disconnect(),window.removeEventListener("resize",n),document.removeEventListener("scroll",y,!0)}}},c=[r,o,n,i,e],t[0]=r,t[1]=n,t[2]=o,t[3]=i,t[4]=e,t[5]=l,t[6]=c):(l=t[5],c=t[6]),B(l,c)}var ee=De("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function ie(i){let e=X(50),{anchorElementRef:n,close:o,editor:t,groups:r,menuRenderFn:l,resolution:c,shouldSplitNodeWithQuery:s}=i,u=s===void 0?!1:s,[a,h]=Le(null),m=c.match&&c.match.matchingString||"",y;e[0]!==t?(y=g=>{let p=t.getRootElement();p!==null&&(p.setAttribute("aria-activedescendant",`${Be}__item-${g.key}`),h(g.key))},e[0]=t,e[1]=y):y=e[1];let f=y,d;e[2]!==r||e[3]!==m||e[4]!==f?(d=()=>{if(r!==null&&m!=null){let g=r.flatMap(qe);if(g.length){let p=g[0];f(p)}}},e[2]=r,e[3]=m,e[4]=f,e[5]=d):d=e[5];let _=d,O;e[6]!==_?(O=()=>{_()},e[6]=_,e[7]=O):O=e[7];let S;e[8]!==m||e[9]!==_?(S=[m,_],e[8]=m,e[9]=_,e[10]=S):S=e[10],B(O,S);let x;e[11]!==o||e[12]!==t||e[13]!==c.match||e[14]!==u?(x=g=>{o(),t.update(()=>{let p=c.match!=null&&u?Ve(c.match):null;p&&p.remove()}),setTimeout(()=>{let p;t.read(()=>{p=ne()?.clone()}),t.update(()=>{p&&Me(p)}),g.onSelect({editor:t,queryString:c.match?c.match.matchingString:""})},0)},e[11]=o,e[12]=t,e[13]=c.match,e[14]=u,e[15]=x):x=e[15];let w=x,R,D;e[16]!==t?(R=()=>()=>{let g=t.getRootElement();g!==null&&g.removeAttribute("aria-activedescendant")},D=[t],e[16]=t,e[17]=R,e[18]=D):(R=e[17],D=e[18]),B(R,D);let E;e[19]!==r||e[20]!==a||e[21]!==_?(E=()=>{r===null?h(null):a===null&&_()},e[19]=r,e[20]=a,e[21]=_,e[22]=E):E=e[22];let T;e[23]!==r||e[24]!==a||e[25]!==_||e[26]!==f?(T=[r,a,f,_],e[23]=r,e[24]=a,e[25]=_,e[26]=f,e[27]=T):T=e[27],ke(E,T);let v;e[28]!==t?(v=()=>G(t.registerCommand(ee,Xe,Re)),e[28]=t,e[29]=v):v=e[29];let I;e[30]!==t||e[31]!==f?(I=[t,f],e[30]=t,e[31]=f,e[32]=I):I=e[32],B(v,I);let k,N;e[33]!==o||e[34]!==t||e[35]!==r||e[36]!==w||e[37]!==a||e[38]!==f?(k=()=>G(t.registerCommand(Te,g=>{let p=g;if(r!==null&&r.length&&a!==null){let b=r.flatMap(He),M=b.findIndex(j=>j.key===a),L=M!==b.length-1?M+1:0,C=b[L];if(!C)return!1;f(C),C.ref!=null&&C.ref.current&&t.dispatchCommand(ee,{index:L,item:C}),p.preventDefault(),p.stopImmediatePropagation()}return!0},$),t.registerCommand(ve,g=>{let p=g;if(r!==null&&r.length&&a!==null){let b=r.flatMap(je),M=b.findIndex(j=>j.key===a),L=M!==0?M-1:b.length-1,C=b[L];if(!C)return!1;f(C),C.ref!=null&&C.ref.current&&oe(C.ref.current),p.preventDefault(),p.stopImmediatePropagation()}return!0},$),t.registerCommand(Ie,g=>{let p=g;return p.preventDefault(),p.stopImmediatePropagation(),o(),!0},$),t.registerCommand(Ne,g=>{let p=g;if(r===null||a===null)return!1;let M=r.flatMap(Ye).find(L=>L.key===a);return M?(p.preventDefault(),p.stopImmediatePropagation(),w(M),!0):!1},$),t.registerCommand(Ee,g=>{if(r===null||a===null)return!1;let b=r.flatMap(We).find(M=>M.key===a);return b?(g!==null&&(g.preventDefault(),g.stopImmediatePropagation()),w(b),!0):!1},$)),N=[w,o,t,r,a,f],e[33]=o,e[34]=t,e[35]=r,e[36]=w,e[37]=a,e[38]=f,e[39]=k,e[40]=N):(k=e[39],N=e[40]),B(k,N);let A;e[41]!==r||e[42]!==w||e[43]!==a?(A={groups:r,selectedItemKey:a,selectItemAndCleanUp:w,setSelectedItemKey:h},e[41]=r,e[42]=w,e[43]=a,e[44]=A):A=e[44];let P=A,V=c.match?c.match.matchingString:"",Y;return e[45]!==n||e[46]!==P||e[47]!==l||e[48]!==V?(Y=l(n,P,V),e[45]=n,e[46]=P,e[47]=l,e[48]=V,e[49]=Y):Y=e[49],Y}function We(i){return i.items}function Ye(i){return i.items}function je(i){return i.items}function He(i){return i.items}function Xe(i){let{item:e}=i;return e.ref&&e.ref.current!=null?(oe(e.ref.current),!0):!1}function qe(i){return i.items}function Ue(i,e){e!=null&&(i.className=e),i.setAttribute("aria-label","Slash menu"),i.setAttribute("role","listbox"),i.style.display="block",i.style.position="absolute"}function re(i,e,n,o){let t=X(14),[r]=te(),l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=z?document.createElement("div"):null,t[0]=l):l=t[0];let c=Ae(l),s;t[1]!==i||t[2]!==o||t[3]!==r||t[4]!==e?(s=()=>{if(c.current===null||parent===void 0)return;let f=r.getRootElement(),d=c.current,_=d.firstChild;if(f!==null&&e!==null){let{height:O,width:S}=e.getRect(),{left:x,top:w}=e.getRect(),R=w;if(w=w-(i.getBoundingClientRect().top+window.scrollY),x=x-(i.getBoundingClientRect().left+window.scrollX),d.style.left=`${x+window.scrollX}px`,d.style.height=`${O}px`,d.style.width=`${S}px`,_!==null){let D=_.getBoundingClientRect(),E=D.height,T=D.width,v=f.getBoundingClientRect(),I=document.dir==="rtl"||document.documentElement.dir==="rtl",k=i.getBoundingClientRect(),N=Math.max(0,v.left);if(!I&&x+T>v.right)d.style.left=`${v.right-T+window.scrollX}px`;else if(I&&D.left<N){let V=N+T-k.left;d.style.left=`${V+window.scrollX}px`}let A=R+E+32>window.innerHeight,P=R<0;A&&!P?d.style.top=`${w+32-E+window.scrollY-(O+24)}px`:d.style.top=`${w+window.scrollY+32}px`}d.isConnected||(Ue(d,o),i.append(d)),d.setAttribute("id","slash-menu"),c.current=d,f.setAttribute("aria-controls","slash-menu")}},t[1]=i,t[2]=o,t[3]=r,t[4]=e,t[5]=s):s=t[5];let u=s,a,h;t[6]!==r||t[7]!==u||t[8]!==e?(a=()=>{let f=r.getRootElement();if(e!==null)return u(),()=>{f!==null&&f.removeAttribute("aria-controls");let d=c.current;d!==null&&d.isConnected&&(d.remove(),d.removeAttribute("id"))}},h=[r,u,e],t[6]=r,t[7]=u,t[8]=e,t[9]=a,t[10]=h):(a=t[9],h=t[10]),B(a,h);let m;return t[11]!==e||t[12]!==n?(m=f=>{e!==null&&(f||n(null))},t[11]=e,t[12]=n,t[13]=m):m=t[13],$e(e,c,u,m),c}var Lt=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;function tt(i){let e=i.anchor;if(e.type!=="text")return null;let n=e.getNode();if(!n.isSimpleText())return null;let o=e.offset;return n.getTextContent().slice(0,o)}function ce(i,e,n){let o=Ze(n);if(o===null||!o.isCollapsed)return!1;let t=o.anchorNode,r=i,l=o.anchorOffset;if(t==null||l==null)return!1;try{e.setStart(t,r),e.setEnd(t,l>1?l:1)}catch{return!1}return!0}function nt(i){let e;return i.getEditorState().read(()=>{let n=U();F(n)&&(e=tt(n))}),e}function ae(i,e){return e!==0?!1:i.getEditorState().read(()=>{let n=U();if(F(n)){let r=n.anchor.getNode().getPreviousSibling();return Qe(r)&&r.isTextEntity()}return!1})}function ue(i){q.startTransition?q.startTransition(i):i()}var ot=Ge("ENABLE_SLASH_MENU_COMMAND");function Bt({anchorClassName:i,anchorElem:e,groups:n,menuRenderFn:o,onClose:t,onOpen:r,onQueryChange:l,triggerFn:c}){let[s]=Ke(),[u,a]=et(null),h=re(e,u,a,i),m=se(()=>{a(null),t!=null&&u!==null&&t()},[t,u]),y=se(f=>{a(f),r!=null&&u===null&&r(f)},[r,u]);return le(()=>ze(s.registerCommand(ot,({node:f})=>(s.getEditorState().read(()=>{let d={leadOffset:0,matchingString:"",replaceableString:""};if(!ae(s,d.leadOffset)&&f!==null){let _=s._window??window,O=_.document.createRange();ce(d.leadOffset,O,_)!==null&&ue(()=>y({getRect:()=>O.getBoundingClientRect(),match:d}));return}}),!0),Je)),[s,y]),le(()=>{let f=()=>{s.getEditorState().read(()=>{let _=s._window??window,O=_.document.createRange(),S=U(),x=nt(s);if(!F(S)||!S.isCollapsed()||x===void 0||O===null){m();return}let w=c({editor:s,query:x});if(l(w?w.matchingString:null),w!==null&&!ae(s,w.leadOffset)&&ce(w.leadOffset,O,_)!==null){ue(()=>y({getRect:()=>O.getBoundingClientRect(),match:w}));return}m()})},d=s.registerUpdateListener(f);return()=>{d()}},[s,c,l,u,m,y]),h.current===null||u===null||s===null?null:Fe(ie,{anchorElementRef:h,close:m,editor:s,groups:n,menuRenderFn:o,resolution:u,shouldSplitNodeWithQuery:!0})}var fe=class i{_bottom;_left;_right;_top;constructor(e,n,o,t){let[r,l]=n<=t?[n,t]:[t,n],[c,s]=e<=o?[e,o]:[o,e];this._top=r,this._right=s,this._left=c,this._bottom=l}static fromDOM(e){let{height:n,left:o,top:t,width:r}=e.getBoundingClientRect();return i.fromLWTH(o,r,t,n)}static fromDOMRect(e){let{height:n,left:o,top:t,width:r}=e;return i.fromLWTH(o,r,t,n)}static fromLTRB(e,n,o,t){return new i(e,n,o,t)}static fromLWTH(e,n,o,t){return new i(e,o,e+n,o+t)}static fromPoints(e,n){let{x:o,y:t}=e,{x:r,y:l}=n;return i.fromLTRB(o,t,r,l)}contains(e){if(J(e)){let{x:l,y:c}=e,s=c<this._top,u=c>this._bottom,a=l<this._left,h=l>this._right;return{reason:{isOnBottomSide:u,isOnLeftSide:a,isOnRightSide:h,isOnTopSide:s},result:!s&&!u&&!a&&!h}}let{bottom:n,left:o,right:t,top:r}=e;return r>=this._top&&r<=this._bottom&&n>=this._top&&n<=this._bottom&&o>=this._left&&o<=this._right&&t>=this._left&&t<=this._right}distanceFromPoint(e){let n=this.contains(e);if(n.result)return{distance:0,isOnBottomSide:n.reason.isOnBottomSide,isOnLeftSide:n.reason.isOnLeftSide,isOnRightSide:n.reason.isOnRightSide,isOnTopSide:n.reason.isOnTopSide};let o=0,t=0;return e.x<this._left?o=this._left-e.x:e.x>this._right&&(o=e.x-this._right),e.y<this._top?t=this._top-e.y:e.y>this._bottom&&(t=e.y-this._bottom),{distance:Math.sqrt(o*o+t*t),isOnBottomSide:e.y>this._bottom,isOnLeftSide:e.x<this._left,isOnRightSide:e.x>this._right,isOnTopSide:e.y<this._top}}equals({bottom:e,left:n,right:o,top:t}){return t===this._top&&e===this._bottom&&n===this._left&&o===this._right}generateNewRect({bottom:e=this.bottom,left:n=this.left,right:o=this.right,top:t=this.top}){return new i(n,t,o,e)}intersectsWith(e){let{height:n,left:o,top:t,width:r}=e,{height:l,left:c,top:s,width:u}=this,a=o+r>=c+u?o+r:c+u,h=t+n>=s+l?t+n:s+l,m=o<=c?o:c,y=t<=s?t:s;return a-m<=r+u&&h-y<=n+l}get bottom(){return this._bottom}get height(){return Math.abs(this._bottom-this._top)}get left(){return this._left}get right(){return this._right}get top(){return this._top}get width(){return Math.abs(this._left-this._right)}};import K from"react";var W=new WeakMap;function Yt(i,e){W.has(i)||W.set(i,new Map);let n=W.get(i);for(let[o,t]of Object.entries(e))if(!(!t||typeof t!="object")){if(o==="blocks"){for(let[r,l]of Object.entries(t))n.set(`block:${r}`,l);continue}if(o==="inlineBlocks"){for(let[r,l]of Object.entries(t))n.set(`inlineBlock:${r}`,l);continue}n.set(o,t)}}function jt(i){W.delete(i)}function de(i,e,n){let o=W.get(i);if(e==="block"&&n?.__fields?.blockType){let t=n.__fields.blockType;return o?.get(`block:${t}`)}if(e==="inlineBlock"&&n?.__fields?.blockType){let t=n.__fields.blockType;return o?.get(`inlineBlock:${t}`)}return o?.get(e)}function it({node:i,nodeType:e}){if(!("getType"in i)||i.getType()!==e)return;let n=i;if(n.prototype._originalDecorate||(n.prototype._originalDecorate=n.prototype.decorate),n.prototype._originalCreateDOM||(n.prototype._originalCreateDOM=n.prototype.createDOM),n.prototype.decorate&&!n.prototype._decorateOverridden){n.prototype._decorateOverridden=!0;let o=!!n.prototype.createDOM;n.prototype.decorate=function(t,r){let l=de(t,e,this);if(l){if(l.Component)return l.Component({config:r,editor:t,isEditor:!0,isJSXConverter:!1,node:this});if(l.createDOM&&l.html){let s=typeof l.html=="function"?l.html({config:r,editor:t,isEditor:!0,isJSXConverter:!1,node:this}):l.html;return K.createElement("span",{dangerouslySetInnerHTML:{__html:s}})}if(l.html&&o&&!l.createDOM)return K.createElement(K.Fragment);if(e==="block"){let s=l;if(s.Block||s.Label)return n.prototype._originalDecorate.call(this,t,r,s.Block,s.Label)}else if(e==="inlineBlock"){let s=l;if(s.Block||s.Label)return n.prototype._originalDecorate.call(this,t,r,s.Block,s.Label)}}return n.prototype._originalDecorate.call(this,t,r)}}n.prototype.createDOM&&!n.prototype._createDOMOverridden&&(n.prototype._createDOMOverridden=!0,n.prototype.createDOM=function(o,t){let r=de(t,e,this);if(r){if(r.createDOM)return r.createDOM({config:o,editor:t,node:this});if(r.html){let l=typeof r.html=="function"?r.html({config:o,editor:t,isEditor:!0,isJSXConverter:!1,node:this}):r.html,c=document.createElement("div");return c.innerHTML=l,c.firstElementChild||c}}return n.prototype._originalCreateDOM.call(this,o,t)})}function Ht({editorConfig:i,nodeViews:e}){let n=rt({nodes:i.features.nodes});if(e){let o=new Set;for(let[t,r]of Object.entries(e))!r||typeof r!="object"||(t==="blocks"&&Object.keys(r).length>0?o.add("block"):t==="inlineBlocks"&&Object.keys(r).length>0?o.add("inlineBlock"):o.add(t));for(let t of n)if("getType"in t){let r=t.getType();o.has(r)&&it({node:t,nodeType:r})}}return n}function rt({nodes:i}){return i.map(e=>"node"in e?e.node:e)}import{jsx as he}from"react/jsx-runtime";import"react";var st={16:"M8.5 3.5a.5.5 0 0 0-1 0v4h-4a.5.5 0 0 0 0 1h4v4a.5.5 0 0 0 1 0v-4h4a.5.5 0 0 0 0-1h-4z",24:"M12 6a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 12 6"},Kt=({className:i,size:e=24})=>he("svg",{className:i,fill:"none",height:e,viewBox:`0 0 ${e} ${e}`,width:e,xmlns:"http://www.w3.org/2000/svg",children:he("path",{clipRule:"evenodd",d:st[e],fill:"currentColor",fillRule:"evenodd"})});export{z as a,Kt as b,ft as c,_t as d,be as e,H as f,J as g,Lt as h,ot as i,Bt as j,fe as k,Yt as l,jt as m,Ht as n};
2
+ //# sourceMappingURL=chunk-FAJJXXCW.js.map