@payloadcms/richtext-lexical 4.0.0-internal.5b1e7cd → 4.0.0-internal.5f0cd13

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 (1036) hide show
  1. package/dist/cell/rscEntry.d.ts +1 -1
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js.map +1 -1
  4. package/dist/exports/client/Field-G5Z2HM5Y.js +2 -0
  5. package/dist/exports/client/Field-G5Z2HM5Y.js.map +7 -0
  6. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js +2 -0
  7. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  8. package/dist/exports/client/bundled.css +1 -1
  9. package/dist/exports/client/{chunk-QJ5EETIB.js → chunk-6QWQ7JV4.js} +2 -2
  10. package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  11. package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
  12. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  13. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  14. package/dist/exports/client/chunk-UAKNDD6R.js +2 -0
  15. package/dist/exports/client/chunk-UAKNDD6R.js.map +7 -0
  16. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  17. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  18. package/dist/exports/client/component-HKTAZ77E.js +2 -0
  19. package/dist/exports/client/component-HKTAZ77E.js.map +7 -0
  20. package/dist/exports/client/componentInline-D3A6OW76.js +2 -0
  21. package/dist/exports/client/index.d.ts +0 -2
  22. package/dist/exports/client/index.d.ts.map +1 -1
  23. package/dist/exports/client/index.js +30 -30
  24. package/dist/exports/client/index.js.map +4 -4
  25. package/dist/exports/react/index.d.ts +1 -1
  26. package/dist/exports/react/index.d.ts.map +1 -1
  27. package/dist/exports/react/index.js.map +1 -1
  28. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  29. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  30. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  31. package/dist/features/blockquote/server/index.d.ts +1 -4
  32. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  33. package/dist/features/blockquote/server/index.js +2 -39
  34. package/dist/features/blockquote/server/index.js.map +1 -1
  35. package/dist/features/blockquote/server/schema.d.ts +8 -0
  36. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  37. package/dist/features/blockquote/server/schema.js +15 -0
  38. package/dist/features/blockquote/server/schema.js.map +1 -0
  39. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  40. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  41. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  42. package/dist/features/blocks/client/component/index.css +178 -0
  43. package/dist/features/blocks/client/component/index.d.ts +3 -3
  44. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  45. package/dist/features/blocks/client/component/index.js +90 -18
  46. package/dist/features/blocks/client/component/index.js.map +1 -1
  47. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  48. package/dist/features/blocks/client/componentInline/index.css +85 -0
  49. package/dist/features/blocks/client/componentInline/index.d.ts +3 -3
  50. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  51. package/dist/features/blocks/client/componentInline/index.js +31 -8
  52. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  53. package/dist/features/blocks/client/index.d.ts.map +1 -1
  54. package/dist/features/blocks/client/index.js +0 -2
  55. package/dist/features/blocks/client/index.js.map +1 -1
  56. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  57. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  58. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  59. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  60. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  62. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  63. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  64. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  65. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  66. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  67. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  68. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  69. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  70. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  71. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  72. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  73. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  74. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  75. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  76. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  77. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  78. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  79. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  80. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  81. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  82. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  83. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  84. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  85. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  86. package/dist/features/blocks/server/index.d.ts +1 -0
  87. package/dist/features/blocks/server/index.d.ts.map +1 -1
  88. package/dist/features/blocks/server/index.js +20 -66
  89. package/dist/features/blocks/server/index.js.map +1 -1
  90. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  91. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  92. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  93. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  94. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  95. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  96. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  97. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  98. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  99. package/dist/features/blocks/server/schema.d.ts +45 -0
  100. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  101. package/dist/features/blocks/server/schema.js +136 -0
  102. package/dist/features/blocks/server/schema.js.map +1 -0
  103. package/dist/features/blocks/server/validate.d.ts +1 -2
  104. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  105. package/dist/features/blocks/server/validate.js.map +1 -1
  106. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  107. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  108. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  110. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  112. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  113. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  115. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  116. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  117. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  118. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  123. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  125. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  129. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  131. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  132. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  134. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  135. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  136. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  137. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  138. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  140. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  141. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  143. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  144. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  146. package/dist/features/converters/lexicalToHtml/async/types.d.ts +2 -1
  147. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  149. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  151. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  152. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  155. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  157. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  158. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  159. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  165. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  167. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  170. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  171. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  173. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  174. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  175. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  176. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  177. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  178. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  179. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  180. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  182. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  183. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  185. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  186. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  188. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +2 -1
  189. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  190. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  191. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +4 -2
  192. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  193. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  194. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  195. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  196. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  197. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  198. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  199. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  200. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  201. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  202. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  204. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  207. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  209. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  211. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  215. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  216. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  217. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  218. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  219. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  220. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  221. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  222. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  223. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  224. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  225. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  226. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  227. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  228. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  229. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  230. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  231. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  232. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  233. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +1 -1
  234. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  235. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  236. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  237. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  238. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  239. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +1 -1
  240. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  241. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  242. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  243. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  244. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  245. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  246. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  247. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  248. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  249. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  250. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  251. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  252. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  253. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  254. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  255. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  256. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  257. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  258. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  259. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  260. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  261. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  262. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  263. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  264. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  265. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  266. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  267. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  268. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  269. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  270. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  271. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  272. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  273. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  274. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  275. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  276. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  277. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  278. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  279. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  280. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  281. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  282. package/dist/features/experimental_table/server/index.d.ts +1 -6
  283. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  284. package/dist/features/experimental_table/server/index.js +4 -102
  285. package/dist/features/experimental_table/server/index.js.map +1 -1
  286. package/dist/features/experimental_table/server/schema.d.ts +27 -0
  287. package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
  288. package/dist/features/experimental_table/server/schema.js +104 -0
  289. package/dist/features/experimental_table/server/schema.js.map +1 -0
  290. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  291. package/dist/features/heading/server/index.d.ts +2 -4
  292. package/dist/features/heading/server/index.d.ts.map +1 -1
  293. package/dist/features/heading/server/index.js +2 -39
  294. package/dist/features/heading/server/index.js.map +1 -1
  295. package/dist/features/heading/server/schema.d.ts +10 -0
  296. package/dist/features/heading/server/schema.d.ts.map +1 -0
  297. package/dist/features/heading/server/schema.js +37 -0
  298. package/dist/features/heading/server/schema.js.map +1 -0
  299. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  300. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  301. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  302. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  303. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  304. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  305. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  306. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  307. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  308. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  309. package/dist/features/horizontalRule/server/index.js +2 -8
  310. package/dist/features/horizontalRule/server/index.js.map +1 -1
  311. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
  312. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  313. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  314. package/dist/features/horizontalRule/server/schema.d.ts +7 -0
  315. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  316. package/dist/features/horizontalRule/server/schema.js +25 -0
  317. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  318. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  319. package/dist/features/link/client/index.d.ts.map +1 -1
  320. package/dist/features/link/client/index.js.map +1 -1
  321. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  322. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  323. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  324. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  325. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  326. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  327. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  328. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  329. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  330. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  331. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  332. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  333. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  334. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  335. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  336. package/dist/features/link/markdownTransformer.d.ts +1 -1
  337. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  338. package/dist/features/link/markdownTransformer.js.map +1 -1
  339. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  340. package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
  341. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  342. package/dist/features/link/nodes/AutoLinkNode.js +2 -1
  343. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  344. package/dist/features/link/nodes/LinkNode.d.ts +3 -3
  345. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  346. package/dist/features/link/nodes/LinkNode.js +2 -1
  347. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  348. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  349. package/dist/features/link/server/baseFields.js.map +1 -1
  350. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  351. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  352. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  353. package/dist/features/link/server/index.d.ts +2 -1
  354. package/dist/features/link/server/index.d.ts.map +1 -1
  355. package/dist/features/link/server/index.js +3 -71
  356. package/dist/features/link/server/index.js.map +1 -1
  357. package/dist/features/link/server/schema.d.ts +32 -0
  358. package/dist/features/link/server/schema.d.ts.map +1 -0
  359. package/dist/features/link/server/schema.js +166 -0
  360. package/dist/features/link/server/schema.js.map +1 -0
  361. package/dist/features/link/server/validate.d.ts +1 -1
  362. package/dist/features/link/server/validate.d.ts.map +1 -1
  363. package/dist/features/link/server/validate.js.map +1 -1
  364. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  365. package/dist/features/lists/checklist/server/index.js +3 -7
  366. package/dist/features/lists/checklist/server/index.js.map +1 -1
  367. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  368. package/dist/features/lists/orderedList/server/index.js +3 -7
  369. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  370. package/dist/features/lists/plugin/index.d.ts +0 -9
  371. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  372. package/dist/features/lists/plugin/index.js.map +1 -1
  373. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  374. package/dist/features/lists/shared/schema.d.ts +18 -0
  375. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  376. package/dist/features/lists/shared/schema.js +62 -0
  377. package/dist/features/lists/shared/schema.js.map +1 -0
  378. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  379. package/dist/features/lists/unorderedList/server/index.js +3 -7
  380. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  381. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
  382. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  383. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  384. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  385. package/dist/features/relationship/client/components/index.css +112 -0
  386. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  387. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  388. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  389. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  390. package/dist/features/relationship/client/plugins/index.d.ts +1 -1
  391. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  392. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  393. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  394. package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
  395. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  396. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
  397. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  398. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  399. package/dist/features/relationship/server/index.d.ts +1 -0
  400. package/dist/features/relationship/server/index.d.ts.map +1 -1
  401. package/dist/features/relationship/server/index.js +2 -0
  402. package/dist/features/relationship/server/index.js.map +1 -1
  403. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  404. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  405. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  406. package/dist/features/relationship/server/schema.d.ts +28 -0
  407. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  408. package/dist/features/relationship/server/schema.js +83 -0
  409. package/dist/features/relationship/server/schema.js.map +1 -0
  410. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
  411. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  412. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
  413. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  414. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  415. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  416. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  417. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  418. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  419. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  420. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  421. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  422. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  423. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  424. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  425. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  426. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  427. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  428. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  429. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  430. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  431. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  432. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  433. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  434. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  435. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  436. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  437. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  438. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  439. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  440. package/dist/features/toolbars/types.d.ts +5 -1
  441. package/dist/features/toolbars/types.d.ts.map +1 -1
  442. package/dist/features/toolbars/types.js.map +1 -1
  443. package/dist/features/typesClient.d.ts +1 -1
  444. package/dist/features/typesClient.d.ts.map +1 -1
  445. package/dist/features/typesClient.js.map +1 -1
  446. package/dist/features/typesServer.d.ts +18 -58
  447. package/dist/features/typesServer.d.ts.map +1 -1
  448. package/dist/features/typesServer.js.map +1 -1
  449. package/dist/features/upload/client/component/index.css +214 -0
  450. package/dist/features/upload/client/component/index.d.ts +2 -2
  451. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  452. package/dist/features/upload/client/component/index.js +86 -63
  453. package/dist/features/upload/client/component/index.js.map +1 -1
  454. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  455. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  456. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  457. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  458. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  459. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  460. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  461. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  462. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  463. package/dist/features/upload/client/plugin/index.js.map +1 -1
  464. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
  465. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  466. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  467. package/dist/features/upload/server/index.d.ts +1 -0
  468. package/dist/features/upload/server/index.d.ts.map +1 -1
  469. package/dist/features/upload/server/index.js +3 -80
  470. package/dist/features/upload/server/index.js.map +1 -1
  471. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  472. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  473. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  474. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  475. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  476. package/dist/features/upload/server/schema.d.ts +52 -0
  477. package/dist/features/upload/server/schema.d.ts.map +1 -0
  478. package/dist/features/upload/server/schema.js +113 -0
  479. package/dist/features/upload/server/schema.js.map +1 -0
  480. package/dist/features/upload/server/validate.d.ts +1 -1
  481. package/dist/features/upload/server/validate.d.ts.map +1 -1
  482. package/dist/features/upload/server/validate.js.map +1 -1
  483. package/dist/field/Diff/converters/link.d.ts +1 -1
  484. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  485. package/dist/field/Diff/converters/link.js.map +1 -1
  486. package/dist/field/Diff/converters/listitem/index.css +80 -0
  487. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  488. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  489. package/dist/field/Diff/converters/listitem/index.js +1 -0
  490. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  491. package/dist/field/Diff/converters/relationship/index.css +108 -0
  492. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  493. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  494. package/dist/field/Diff/converters/relationship/index.js +11 -28
  495. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  496. package/dist/field/Diff/converters/unknown/index.css +37 -0
  497. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  498. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  499. package/dist/field/Diff/converters/unknown/index.js +1 -0
  500. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  501. package/dist/field/Diff/converters/upload/index.css +175 -0
  502. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  503. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  504. package/dist/field/Diff/converters/upload/index.js +7 -2
  505. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  506. package/dist/field/Diff/index.css +156 -0
  507. package/dist/field/Diff/index.d.ts +1 -1
  508. package/dist/field/Diff/index.d.ts.map +1 -1
  509. package/dist/field/Diff/index.js +1 -0
  510. package/dist/field/Diff/index.js.map +1 -1
  511. package/dist/field/Field.d.ts +3 -3
  512. package/dist/field/Field.d.ts.map +1 -1
  513. package/dist/field/Field.js +13 -12
  514. package/dist/field/Field.js.map +1 -1
  515. package/dist/field/RenderLexical/index.d.ts +2 -2
  516. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  517. package/dist/field/RenderLexical/index.js.map +1 -1
  518. package/dist/field/RichTextViewProvider.d.ts +1 -1
  519. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  520. package/dist/field/RichTextViewProvider.js.map +1 -1
  521. package/dist/field/ViewSelector.css +32 -0
  522. package/dist/field/ViewSelector.d.ts +1 -1
  523. package/dist/field/ViewSelector.d.ts.map +1 -1
  524. package/dist/field/ViewSelector.js +1 -0
  525. package/dist/field/ViewSelector.js.map +1 -1
  526. package/dist/field/bundled.css +1 -1
  527. package/dist/field/index.css +60 -0
  528. package/dist/field/index.d.ts +1 -1
  529. package/dist/field/index.d.ts.map +1 -1
  530. package/dist/field/index.js.map +1 -1
  531. package/dist/field/rscEntry.d.ts +1 -1
  532. package/dist/field/rscEntry.d.ts.map +1 -1
  533. package/dist/field/rscEntry.js.map +1 -1
  534. package/dist/hooks.d.ts +6 -0
  535. package/dist/hooks.d.ts.map +1 -0
  536. package/dist/hooks.js +548 -0
  537. package/dist/hooks.js.map +1 -0
  538. package/dist/index.d.ts +11 -18
  539. package/dist/index.d.ts.map +1 -1
  540. package/dist/index.js +20 -628
  541. package/dist/index.js.map +1 -1
  542. package/dist/lexical/LexicalEditor.css +50 -0
  543. package/dist/lexical/LexicalEditor.d.ts +1 -1
  544. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  545. package/dist/lexical/LexicalEditor.js +1 -0
  546. package/dist/lexical/LexicalEditor.js.map +1 -1
  547. package/dist/lexical/LexicalProvider.d.ts +1 -1
  548. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  549. package/dist/lexical/LexicalProvider.js.map +1 -1
  550. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  551. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  552. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  553. package/dist/lexical/config/client/loader.d.ts +1 -1
  554. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  555. package/dist/lexical/config/client/loader.js.map +1 -1
  556. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  557. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  558. package/dist/lexical/config/client/sanitize.js.map +1 -1
  559. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  560. package/dist/lexical/config/server/loader.js +12 -9
  561. package/dist/lexical/config/server/loader.js.map +1 -1
  562. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  563. package/dist/lexical/config/server/sanitize.js +9 -17
  564. package/dist/lexical/config/server/sanitize.js.map +1 -1
  565. package/dist/lexical/config/types.d.ts +1 -1
  566. package/dist/lexical/config/types.d.ts.map +1 -1
  567. package/dist/lexical/config/types.js.map +1 -1
  568. package/dist/lexical/nodes/index.d.ts +1 -1
  569. package/dist/lexical/nodes/index.d.ts.map +1 -1
  570. package/dist/lexical/nodes/index.js.map +1 -1
  571. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  572. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  573. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  574. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  575. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  576. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  577. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  578. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  579. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  580. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  581. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  582. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  583. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  584. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  585. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  586. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  587. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  588. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  589. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  590. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  591. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  592. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  593. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  594. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  595. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  596. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  597. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  598. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  599. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  600. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  601. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  602. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  603. package/dist/lexical/theme/EditorTheme.css +359 -0
  604. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  605. package/dist/lexical/theme/EditorTheme.js +1 -0
  606. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  607. package/dist/lexical/ui/ContentEditable.css +95 -0
  608. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  609. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  610. package/dist/lexical/ui/ContentEditable.js +1 -0
  611. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  612. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  613. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  614. package/dist/lexical/ui/icons/Add/index.js +19 -12
  615. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  616. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  617. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  618. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  619. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  620. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  621. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  622. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  623. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  624. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  625. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  627. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  628. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  629. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  630. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  631. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  632. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  633. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  634. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  635. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  636. package/dist/lexical/ui/icons/Block/index.js +13 -28
  637. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  639. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  640. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  641. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  642. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  643. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  644. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  645. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  646. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  647. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  648. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  649. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  650. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  651. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  652. package/dist/lexical/ui/icons/Code/index.js +15 -13
  653. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  654. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  655. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  656. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  657. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  658. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  659. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  660. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  661. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  662. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  663. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  664. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  665. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  666. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  667. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  668. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  669. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  670. package/dist/lexical/ui/icons/H1/index.js +9 -6
  671. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  672. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  673. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  674. package/dist/lexical/ui/icons/H2/index.js +9 -6
  675. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  676. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  677. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  678. package/dist/lexical/ui/icons/H3/index.js +9 -6
  679. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  680. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  681. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  682. package/dist/lexical/ui/icons/H4/index.js +9 -6
  683. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  684. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  685. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  686. package/dist/lexical/ui/icons/H5/index.js +9 -6
  687. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  688. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  689. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  690. package/dist/lexical/ui/icons/H6/index.js +9 -6
  691. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  692. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  693. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  694. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  695. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  696. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  697. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  698. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  699. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  700. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  701. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  702. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  703. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  704. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  705. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  706. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  707. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  708. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  709. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  710. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  711. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  712. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  713. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  714. package/dist/lexical/ui/icons/Link/index.js +14 -9
  715. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  716. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  717. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  718. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  719. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  720. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  721. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  722. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  723. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  724. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  725. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  726. package/dist/lexical/ui/icons/Page/index.js +21 -0
  727. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  728. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  729. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  730. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  731. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  732. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  733. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  734. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  735. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  736. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  737. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  738. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  739. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  740. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  741. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  742. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  743. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  744. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  745. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  746. package/dist/lexical/ui/icons/Table/index.js +20 -15
  747. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  748. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  749. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  750. package/dist/lexical/ui/icons/Text/index.js +17 -8
  751. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  752. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  753. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  754. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  755. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  756. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  757. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  758. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  759. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  760. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  761. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  762. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  763. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  764. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  765. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  766. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  767. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  768. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  769. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  770. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  771. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  772. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  773. package/dist/types/builtInNodes.d.ts +14 -0
  774. package/dist/types/builtInNodes.d.ts.map +1 -0
  775. package/dist/types/builtInNodes.js +203 -0
  776. package/dist/types/builtInNodes.js.map +1 -0
  777. package/dist/{types.d.ts → types/index.d.ts} +9 -10
  778. package/dist/types/index.d.ts.map +1 -0
  779. package/dist/types/index.js +2 -0
  780. package/dist/types/index.js.map +1 -0
  781. package/dist/types/jsonSchemaHelpers.d.ts +28 -0
  782. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  783. package/dist/types/jsonSchemaHelpers.js +54 -0
  784. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  785. package/dist/types/nodeTypes.d.ts +86 -0
  786. package/dist/types/nodeTypes.d.ts.map +1 -0
  787. package/dist/types/nodeTypes.js +6 -0
  788. package/dist/types/nodeTypes.js.map +1 -0
  789. package/dist/types/schema.d.ts +6 -0
  790. package/dist/types/schema.d.ts.map +1 -0
  791. package/dist/types/schema.js +73 -0
  792. package/dist/types/schema.js.map +1 -0
  793. package/dist/utilities/buildEditorState.d.ts +1 -1
  794. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  795. package/dist/utilities/buildEditorState.js +13 -0
  796. package/dist/utilities/buildEditorState.js.map +1 -1
  797. package/dist/utilities/buildInitialState.js.map +1 -1
  798. package/dist/utilities/createClientFeature.d.ts +1 -1
  799. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  800. package/dist/utilities/createClientFeature.js.map +1 -1
  801. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  802. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  803. package/dist/utilities/editorConfigFactory.js.map +1 -1
  804. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  805. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  806. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  807. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  808. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  809. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  810. package/dist/utilities/generateImportMap.d.ts +1 -1
  811. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  812. package/dist/utilities/generateImportMap.js.map +1 -1
  813. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  814. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  815. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  816. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  817. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  818. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  819. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  820. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  821. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  822. package/dist/validate/index.d.ts.map +1 -1
  823. package/package.json +17 -22
  824. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  825. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  826. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  827. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  828. package/dist/exports/client/Field-4UEGQMIN.js +0 -2
  829. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  830. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  831. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  832. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  833. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  834. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  835. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  836. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  837. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  838. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  839. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  840. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  841. package/dist/exports/server/migrate.d.ts +0 -16
  842. package/dist/exports/server/migrate.d.ts.map +0 -1
  843. package/dist/exports/server/migrate.js +0 -16
  844. package/dist/exports/server/migrate.js.map +0 -1
  845. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  846. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  847. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  848. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  849. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  850. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  851. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  852. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  853. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  854. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  855. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  856. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  857. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  858. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  859. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  860. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  861. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  862. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  863. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  864. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  865. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  866. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  867. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  868. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  869. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  870. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  871. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  872. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  873. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  874. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  875. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  876. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  877. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  878. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  879. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  880. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  881. package/dist/features/link/nodes/types.d.ts +0 -27
  882. package/dist/features/link/nodes/types.d.ts.map +0 -1
  883. package/dist/features/link/nodes/types.js +0 -2
  884. package/dist/features/link/nodes/types.js.map +0 -1
  885. package/dist/features/lists/htmlConverter.d.ts +0 -5
  886. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  887. package/dist/features/lists/htmlConverter.js +0 -81
  888. package/dist/features/lists/htmlConverter.js.map +0 -1
  889. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  890. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  891. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  892. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  893. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  894. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  895. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  896. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  897. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  898. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  899. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  900. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  901. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  902. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  903. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  904. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  905. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  906. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  907. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  908. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  909. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  910. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  911. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  912. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  913. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  914. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  915. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  916. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  917. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  918. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  919. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  920. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  921. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  922. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  923. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  924. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  925. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  926. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  927. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  928. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  929. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  930. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  931. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  932. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  933. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  934. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  935. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  936. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  937. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  938. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  939. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  940. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  941. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  942. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  943. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  944. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  945. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  946. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  947. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  948. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  949. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  950. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  951. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  952. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  953. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  954. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  955. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  956. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  957. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  958. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  959. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  960. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  961. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  962. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  963. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  964. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  965. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  966. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  967. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  968. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  969. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  970. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  971. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  972. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  973. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  974. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  975. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  976. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  977. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  978. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  979. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  980. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  981. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  982. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  983. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  984. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  985. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  986. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  987. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  988. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  989. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  990. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  991. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  992. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  993. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  994. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  995. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  996. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  997. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  998. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  999. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  1000. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  1001. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  1002. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  1003. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  1004. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  1005. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  1006. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  1007. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  1008. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  1009. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  1010. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  1011. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  1012. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  1013. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  1014. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  1015. package/dist/lexical/ui/icons/AI/index.js +0 -34
  1016. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  1017. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  1018. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  1019. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  1020. package/dist/nodeTypes.d.ts +0 -74
  1021. package/dist/nodeTypes.d.ts.map +0 -1
  1022. package/dist/nodeTypes.js +0 -5
  1023. package/dist/nodeTypes.js.map +0 -1
  1024. package/dist/types.d.ts.map +0 -1
  1025. package/dist/types.js +0 -2
  1026. package/dist/types.js.map +0 -1
  1027. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  1028. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  1029. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  1030. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  1031. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  1032. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  1033. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  1034. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  1035. /package/dist/exports/client/{chunk-QJ5EETIB.js.map → chunk-6QWQ7JV4.js.map} +0 -0
  1036. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-D3A6OW76.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import type { LexicalRichTextCellProps } from '../types.js';
2
+ import type { LexicalRichTextCellProps } from '../types/index.js';
3
3
  export declare const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps>;
4
4
  //# sourceMappingURL=rscEntry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rscEntry.d.ts","sourceRoot":"","sources":["../../src/cell/rscEntry.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAuB3D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA4ElE,CAAA"}
1
+ {"version":3,"file":"rscEntry.d.ts","sourceRoot":"","sources":["../../src/cell/rscEntry.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAuBjE,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA4ElE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"rscEntry.js","names":["getTranslation","Link","formatAdminURL","React","recurseEditorState","editorState","textContent","i","node","text","push","_jsxs","type","children","RscEntryLexicalCell","props","cellData","className","classNameFromProps","collectionConfig","field","admin","i18n","link","onClick","onClickFromProps","payload","rowData","classNameFromConfigContext","undefined","adminRoute","config","routes","serverURL","WrapElement","wrapElementProps","prefetch","href","slug","path","id","collectionSlug","root","length","t","label","_jsx"],"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}>&#32;[{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n const serverURL = payload.config.serverURL\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n serverURL,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"mappings":";AAEA,SAASA,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AACrB,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAIlB,SAASC,mBACPC,WAAoC,EACpCC,WAA8B,EAC9BC,CAAA,GAAY,CAAC;EAEb,KAAK,MAAMC,IAAA,IAAQH,WAAA,EAAa;IAC9BE,CAAA;IACA,IAAI,UAAUC,IAAA,IAAQA,IAAA,CAAKC,IAAI,EAAE;MAC/BH,WAAA,CAAYI,IAAI,CAACF,IAAA,CAAKC,IAAI;IAC5B,OAAO;MACL,IAAI,EAAE,cAAcD,IAAG,GAAI;QACzBF,WAAA,CAAYI,IAAI,c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A,IAAQX,OAAA,CAAQa,EAAE,EAAE;MAC5DP;IACF,KACA;EACN;EAEA,IAAI,OAAOT,OAAA,KAAY,YAAY;IACjCU,WAAA,GAAc;IACdC,gBAAA,CAAiBvB,IAAI,GAAG;IACxBuB,gBAAA,CAAiBX,OAAO,GAAG;MACzBA,OAAA,CAAQ;QACNR,QAAA;QACAyB,cAAA,EAAgBtB,gBAAA,EAAkBmB,IAAA;QAClCX;MACF;IACF;EACF;EAEA,IAAIrB,WAAA,GAAiC,EAAE;EAEvC,IAAIU,QAAA,EAAU0B,IAAA,EAAM7B,QAAA,EAAU;IAC5BP,WAAA,GAAcF,kBAAA,CAAmBY,QAAA,EAAU0B,IAAA,EAAM7B,QAAA,EAAUP,WAAA;EAC7D;EAEA,IAAI,CAACA,WAAA,EAAaqC,MAAA,EAAQ;IACxBrC,WAAA,GAAc,CACZgB,IAAA,CAAKsB,CAAC,CAAC,mBAAmB;MACxBC,KAAA,EAAO7C,cAAA,CAAe,CAAC,WAAWoB,KAAA,GAAQA,KAAA,CAAMyB,KAAK,GAAG,IAAG,KAAM,QAAQvB,IAAA;IAC3E,GACD;EACH;EAEA,oBAAOwB,IAAA,CAACZ,WAAA;IAAa,GAAGC,gBAAgB;cAAG7B;;AAC7C","ignoreList":[]}
1
+ {"version":3,"file":"rscEntry.js","names":["getTranslation","Link","formatAdminURL","React","recurseEditorState","editorState","textContent","i","node","text","push","_jsxs","type","children","RscEntryLexicalCell","props","cellData","className","classNameFromProps","collectionConfig","field","admin","i18n","link","onClick","onClickFromProps","payload","rowData","classNameFromConfigContext","undefined","adminRoute","config","routes","serverURL","WrapElement","wrapElementProps","prefetch","href","slug","path","id","collectionSlug","root","length","t","label","_jsx"],"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types/index.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}>&#32;[{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n const serverURL = payload.config.serverURL\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n serverURL,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementPro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ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use client";import{a as Be,e as Oe,g as $,h as K,j as Ie,k as Fe,l as $e,m as Ke,n as Se,o as Pe,p as je}from"./chunk-LH634DPU.js";import{a as Ae,b as P}from"./chunk-RJ5MAOKZ.js";import{jsx as L,jsxs as le}from"react/jsx-runtime";import{BulkUploadProvider as Zr,FieldDescription as en,FieldError as tn,FieldLabel as on,isFieldRTL as rn,RenderCustomComponent as At,useConfig as nn,useEditDepth as sn,useEffectEvent as ln,useField as an,useLocale as cn}from"@payloadcms/ui";import{mergeFieldStyles as un}from"@payloadcms/ui/shared";import{dequal as dn}from"dequal/lite";import Bt,{useCallback as Ot,useEffect as It,useMemo as fn,useState as Ft}from"react";import{ErrorBoundary as mn}from"react-error-boundary";import"./bundled.css";import{jsx as j}from"react/jsx-runtime";import{LexicalComposer as Vr}from"@lexical/react/LexicalComposer.js";import{useEditDepth as Wr}from"@payloadcms/ui";import*as _t from"react";import{useMemo as Yr}from"react";import{c as vr}from"react/compiler-runtime";import{jsx as C,jsxs as ie}from"react/jsx-runtime";import{useLexicalComposerContext as _r}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as kr}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as Lr}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Dr}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Mr}from"@lexical/react/LexicalRichTextPlugin.js";import{useLexicalEditable as Ar}from"@lexical/react/useLexicalEditable";import{BLUR_COMMAND as Br,COMMAND_PRIORITY_LOW as Rt,FOCUS_COMMAND as Or}from"lexical";import*as Q from"react";import{useEffect as Ir,useState as Fr}from"react";import{jsx as ze}from"react/jsx-runtime";import"react";var z=({anchorElem:e,clientProps:t,plugin:o})=>o.position==="floatingAnchorElem"&&e?o.Component&&ze(o.Component,{anchorElem:e,clientProps:t}):o.Component&&ze(o.Component,{clientProps:t});import{c as zt}from"react/compiler-runtime";import{copyToClipboard as He}from"@lexical/clipboard";import{useLexicalComposerContext as Ht}from"@lexical/react/LexicalComposerContext.js";import{objectKlassEquals as Vt}from"@lexical/utils";import Ve from"bson-objectid";import{$getSelection as Wt,$isNodeSelection as Yt,COMMAND_PRIORITY_LOW as Gt,COPY_COMMAND as Ut}from"lexical";import{useEffect as Jt}from"react";var Te=e=>{if("fields"in e&&typeof e.fields=="object"&&e.fields!==null&&"id"in e.fields?e.fields.id=new Ve.default().toHexString():"id"in e&&(e.id=new Ve.default().toHexString()),e.children)for(let t of e.children)Te(t)};function We(){let e=zt(3),[t]=Ht(),o,r;return e[0]!==t?(o=()=>t.registerCommand(Ut,n=>{let c=Wt();if(Yt(c)){let s=c.getNodes()[0]?.exportJSON(),u=JSON.parse(JSON.stringify(s));Te(u);let d={namespace:t._config.namespace,nodes:[u]},m=JSON.stringify(d);return He(t,null,{"application/x-lexical-editor":m,"text/plain":""}).catch(qt),!0}return He(t,Vt(n,ClipboardEvent)?n:null).then(()=>{if(!(n instanceof ClipboardEvent)||!n.clipboardData)throw new Error("No clipboard event");let l=n.clipboardData.getData("application/x-lexical-editor");if(!l)return!0;let s=JSON.parse(l);for(let d of s.nodes)Te(d);let u=JSON.stringify(s);n.clipboardData.setData("application/x-lexical-editor",u)}).catch(l=>{throw n instanceof ClipboardEvent&&n.clipboardData?.setData("application/x-lexical-editor",""),l}),!0},Gt),r=[t],e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]),Jt(o,r),null}function qt(e){throw e}import{c as Qt}from"react/compiler-runtime";import{useLexicalComposerContext as Xt}from"@lexical/react/LexicalComposerContext";import{$findMatchingParent as fe,mergeRegister as Zt}from"@lexical/utils";import{$createNodeSelection as eo,$getEditor as te,$getNearestNodeFromDOMNode as to,$getSelection as me,$isDecoratorNode as H,$isElementNode as Re,$isLineBreakNode as oo,$isNodeSelection as pe,$isRangeSelection as Ye,$isRootOrShadowRoot as ro,$isTextNode as no,$setSelection as Ge,CLICK_COMMAND as io,COMMAND_PRIORITY_LOW as Y,KEY_ARROW_DOWN_COMMAND as so,KEY_ARROW_UP_COMMAND as lo,KEY_BACKSPACE_COMMAND as ao,KEY_DELETE_COMMAND as co,SELECTION_CHANGE_COMMAND as uo}from"lexical";import{useEffect as fo}from"react";function Ue(){let e=Qt(3),[t]=Xt(),o=Eo,r,n;return e[0]!==t?(r=()=>Zt(t.registerCommand(io,xo,Y),t.registerCommand(co,o,Y),t.registerCommand(ao,o,Y),t.registerCommand(uo,yo,Y),t.registerCommand(lo,go,Y),t.registerCommand(so,mo,Y)),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),fo(r,n),null}function mo(e){let t=me();if(pe(t)){e.preventDefault();let l=t.getNodes()[0]?.getNextSibling();if(H(l)){let d=te().getElementByKey(l.getKey());return d&&oe({element:d,node:l}),!0}if(!Re(l))return!0;let s=l.getFirstDescendant()??l;return s&&(fe(s,ge)?.selectEnd(),e.preventDefault()),!0}if(!Ye(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=fe(r,po),c=n?.getNextSibling();if(!n||c!==Je(n))return!1;if(H(c)){let l=te().getElementByKey(c.getKey());if(l)return oe({element:l,node:c}),e.preventDefault(),!0}return!1}function po(e){return Je(e)!==null}function go(e){let t=me();if(pe(t)){let l=t.getNodes()[0]?.getPreviousSibling();if(H(l)){let d=te().getElementByKey(l.getKey());return d?(oe({element:d,node:l}),e.preventDefault(),!0):!1}if(!Re(l))return!1;let s=l.getLastDescendant()??l;return s?(fe(s,ge)?.selectStart(),e.preventDefault(),!0):!1}if(!Ye(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=fe(r,ho),c=n?.getPreviousSibling();if(!n||c!==qe(n))return!1;if(H(c)){let l=te().getElementByKey(c.getKey());if(l)return oe({element:l,node:c}),e.preventDefault(),!0}return!1}function ho(e){return qe(e)!==null}function yo(){let e=No();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),e?(e.element?.classList.add("decorator-selected"),!0):!1}function xo(e){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let t=bo(e);if(!t)return!0;let{target:o}=e;return!(o instanceof HTMLElement)||o.isContentEditable||o.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?Ge(null):oe(t),!0}function Eo(e){let t=me();return pe(t)?(e.preventDefault(),t.getNodes().forEach(Co),!0):!1}function Co(e){e.remove()}function bo(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let o=to(t);return H(o)?{element:t,node:o}:void 0}function No(){let e=me();if(!pe(e))return;let t=e.getNodes();if(t.length!==1)return;let o=t[0];return H(o)?{decorator:o,element:te().getElementByKey(o.getKey())}:void 0}function oe({element:e,node:t}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let o=eo();o.add(t.getKey()),Ge(o),e.scrollIntoView({behavior:"smooth",block:"nearest"}),e.classList.add("decorator-selected")}function ge(e){if(H(e)&&!e.isInline())return!0;if(!Re(e)||ro(e))return!1;let t=e.getFirstChild(),o=t===null||oo(t)||no(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&o}function Je(e){let t=e.getNextSibling();for(;t!==null;){if(ge(t))return t;t=t.getNextSibling()}return null}function qe(e){let t=e.getPreviousSibling();for(;t!==null;){if(ge(t))return t;t=t.getPreviousSibling()}return null}import{jsx as ve}from"react/jsx-runtime";import{useLexicalComposerContext as vo}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as _o,isHTMLElement as ko}from"lexical";import*as et from"react";import{useCallback as Lo,useEffect as Ze,useRef as Do,useState as Mo}from"react";import{createPortal as Ao}from"react-dom";var G=(e,t,o,r,n=50,c=25)=>{let l=0;if(e&&!e.contains(r)){let{bottom:s,left:u,right:d,top:m}=e.getBoundingClientRect(),a=m+window.scrollY,i=s+window.scrollY;if(o<a-c||o>i+c||t<u-n||t>d+n)return-1;(t<u||t>d)&&(l=t<u?t-u:t-d)}return l};import{$getNodeByKey as ye}from"lexical";function U(e){let t=e.getBoundingClientRect(),o=getComputedStyle(e).getPropertyValue("transform");if(!o||o==="none")return t;let r=o.split(",").pop();return t.y=t.y-Number(r?.replace(")","")),t}function he(e){let t=(u,d)=>u?parseFloat(window.getComputedStyle(u)[d]):0,{marginBottom:o,marginTop:r}=window.getComputedStyle(e),n=t(e.previousElementSibling,"marginBottom"),c=t(e.nextElementSibling,"marginTop"),l=Math.max(parseFloat(r),n);return{marginBottom:Math.max(parseFloat(o),c),marginTop:l}}import{$getRoot as wo}from"lexical";function V(e){return e.getEditorState().read(()=>wo().getChildrenKeys())}var So=1,Po=-1,Qe=0,B={props:null,result:null};function To(e,t,o=20){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n<=o*o}function J(e){let{anchorElem:t,cache_threshold:o=20,editor:r,fuzzy:n=!1,horizontalOffset:c=0,point:{x:l,y:s},startIndex:u=0,useEdgeAsDefault:d=!1}=e;if(o>0&&B.props&&B.result&&B.props.fuzzy===e.fuzzy&&B.props.horizontalOffset===e.horizontalOffset&&B.props.useEdgeAsDefault===e.useEdgeAsDefault&&To(B.props.point,e.point,o))return B.result;let m=t.getBoundingClientRect(),a=V(r),i={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return r.getEditorState().read(()=>{if(d){let p=r.getElementByKey(a[0]),g=r.getElementByKey(a[a.length-1]);if(p&&g){let[f,E]=[U(p),U(g)];if(s<f.top?(i.blockElem=p,i.distance=f.top-s,i.blockNode=ye(a[0]),i.foundAtIndex=0):s>E.bottom&&(i.distance=s-E.bottom,i.blockNode=ye(a[a.length-1]),i.blockElem=g,i.foundAtIndex=a.length-1),i?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let x=u,y=Qe;for(;x>=0&&x<a.length;){let p=a[x],g=r.getElementByKey(p);if(g===null)break;let f=new K(l+c,s),E=Ke.fromDOMRect(U(g)),{marginBottom:h,marginTop:b}=he(g),_=E.generateNewRect({bottom:E.bottom+h,left:m.left,right:m.right,top:E.top-b}),{distance:w,isOnBottomSide:v,isOnTopSide:D}=_.distanceFromPoint(f);if(w===0){i.blockElem=g,i.blockNode=ye(p),i.foundAtIndex=x,i.distance=w,i.blockNode&&i.blockNode.getType()==="paragraph"&&i.blockNode.getTextContent()===""&&(!n&&!e.returnEmptyParagraphs&&(i.blockElem=null,i.blockNode=null),i.isFoundNodeEmptyParagraph=!0);break}else n&&w<i.distance&&(i.blockElem=g,i.blockNode=ye(p),i.distance=w,i.foundAtIndex=x);y===Qe&&(D?y=Po:v?y=So:y=1/0),x+=y}}),B.props=e,B.result={blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph},{blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph}}function xe(e,t){return!!e.closest(`.${t}`)}var Ro=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Xe(e){if(!e||Ro.includes(e.tagName)||e.offsetHeight===0||e.offsetWidth===0)return!1;let t=window.getComputedStyle(e);return!(t.display==="table-cell"||t.position==="absolute"||t.visibility==="hidden"||t.opacity==="0")}function Ee(e,t,o,r=0){if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let n=e.getBoundingClientRect(),c=window.getComputedStyle(e),l=t.getBoundingClientRect(),s=o.getBoundingClientRect(),u;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(a=>e.classList.contains(a)||e.firstElementChild?.classList.contains(a)))u=n.top+8-s.top;else{let a=Xe(e)?parseInt(c.lineHeight,10):0;u=n.top+(a-l.height)/2-s.top}let m=r;t.style.opacity="1",t.style.transform=`translate(${m}px, ${u}px)`}var Bo="add-block-menu",Ce=1/0;function Oo(e){return e===0?1/0:Ce>=0&&Ce<e?Ce:Math.floor(e/2)}function Io(e,t,o){let r=t.parentElement,{editorConfig:n}=P(),c=n?.admin?.hideGutter?-24:12,l=Do(null),[s,u]=Mo(null);Ze(()=>{function m(a){let i=a.target;if(!ko(i))return;let x=G(r,a.pageX,a.pageY,i);if(x===-1){u(null);return}if(xe(i,Bo))return;let y=V(e),{blockElem:p,blockNode:g,foundAtIndex:f}=J({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-x,point:new K(a.x,a.y),returnEmptyParagraphs:!0,startIndex:Oo(y.length),useEdgeAsDefault:!1});Ce=f,p&&g&&(s?.node!==g||s?.elem!==p)&&u({elem:p,node:g})}return document?.addEventListener("mousemove",m),()=>{document?.removeEventListener("mousemove",m)}},[r,t,e,s]),Ze(()=>{l.current&&s?.node&&Ee(s?.elem,l.current,t,c)},[t,s,c]);let d=Lo(m=>{let a=s;a?.node&&(e.update(()=>{let i=!0;if((a?.node.getType()!=="paragraph"||a.node.getTextContent()!=="")&&(i=!1),!i){let x=_o();a?.node.insertAfter(x),setTimeout(()=>{a={elem:e.getElementByKey(x.getKey()),node:x},u(a)},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),a?.node&&"select"in a.node&&typeof a.node.select=="function"&&a.node.select()})},1),setTimeout(()=>{e.dispatchCommand(Fe,{node:a?.node})},2),m.stopPropagation(),m.preventDefault())},[e,s]);return Ao(ve(et.Fragment,{children:ve("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:m=>{d(m)},ref:l,type:"button",children:ve("div",{className:o?"icon":""})})}),t)}function tt(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[r]=vo();return Io(r,o,r._editable)}import{jsx as be,jsxs as $o}from"react/jsx-runtime";import{useLexicalComposerContext as Ko}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as nt}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as it,$getNodeByKey as jo,isHTMLElement as _e}from"lexical";import*as ut from"react";import{useEffect as ke,useRef as re,useState as st}from"react";import{createPortal as zo}from"react-dom";var ot=0,Fo=-24;var W=0;function rt(e,t,o,r,n,c,l,s,u,d=!1){let{height:m,top:a}=r.getBoundingClientRect(),{top:i,width:x}=l.getBoundingClientRect(),{marginBottom:y,marginTop:p}=he(r),g=a,f=c>=a+m/2+window.scrollY,E=!1;if(n?.elem)if(r!==n?.elem)(f&&n?.elem&&n?.elem===r.nextElementSibling||!f&&n?.elem&&n?.elem===r.previousElementSibling)&&(W++,W<200&&(E=!0));else{W++;let w=n?.boundingBox?.y,v=r.getBoundingClientRect().y;(f===n?.isBelow&&w===v||W<200)&&(E=!1)}if(E)return{isBelow:f,willStayInSamePosition:E};d?g+=m/2:f?g+=m+y/2:g-=p/2;let h=0;d||(f?h=-ot:h=ot);let b=g-i+h,_=Fo-t;return o.style.width=`calc(${x}px - ${e} - var(--spacer-5))`,o.style.opacity=".8",o.style.transform=`translate(${_}px, calc(${b}px - 2px))`,n?.elem&&(n.elem.style.opacity="",n?.elem===r?f?n.elem.style.marginTop="":n.elem.style.marginBottom="":(n.elem.style.marginBottom="",n.elem.style.marginTop="")),W=0,{isBelow:f,willStayInSamePosition:E}}var Ho="draggable-block-menu",lt="application/x-lexical-drag-block",ne=1/0;function at(e){return e===0?1/0:ne>=0&&ne<e?ne:Math.floor(e/2)}function Vo(e,t){let{transform:o}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=o})}function ct(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function Wo(e,t,o){let r=t.parentElement,n=re(null),c=re(null),l=re(null),s=re(!1),u=re([]),[d,m]=st(null),[a,i]=st(null),{editorConfig:x}=P(),y=x?.admin?.hideGutter?-44:-8;ke(()=>{function f(E){let h=E.target;if(!_e(h))return;let b=G(r,E.pageX,E.pageY,h);if(b===-1){m(null);return}if(xe(h,Ho))return;let _=V(e),{blockElem:w,foundAtIndex:v,isFoundNodeEmptyParagraph:D}=J({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-b,point:new K(E.x,E.y),startIndex:at(_.length),useEdgeAsDefault:!1,verbose:!1});ne=v,!(!w&&!D)&&d!==w&&m(w)}return document?.addEventListener("mousemove",f),()=>{document?.removeEventListener("mousemove",f)}},[r,t,e,d]),ke(()=>{n.current&&Ee(d,n.current,t,y)},[t,d,y]),ke(()=>{function f(h){if(!s.current)return!1;let[b]=nt(h);if(b)return!1;let{pageY:_,target:w}=h;if(!_e(w))return!1;let v=G(r,h.pageX,h.pageY,w,100,50),D=V(e),{blockElem:S,foundAtIndex:I,isFoundNodeEmptyParagraph:R}=J({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-v,point:new K(h.x,h.y),startIndex:at(D.length),useEdgeAsDefault:!0,verbose:!0});ne=I;let F=c.current;if(S===null||F===null)return!1;if(h.preventDefault(),h.dataTransfer.dropEffect="move",d!==S){let{isBelow:k,willStayInSamePosition:M}=rt(x?.admin?.hideGutter?"0px":"var(--spacer-5)",y+(x?.admin?.hideGutter?n?.current?.getBoundingClientRect()?.width??0:-(n?.current?.getBoundingClientRect()?.width??0)),F,S,a,_,t,h,l,R);M||i({boundingBox:S.getBoundingClientRect(),elem:S,isBelow:k})}else a?.elem&&(ct(F,a.elem),i({boundingBox:S.getBoundingClientRect(),elem:S,isBelow:!1}));return!0}function E(h){if(!s.current)return!1;let[b]=nt(h);if(b)return!1;let{dataTransfer:_,pageY:w,target:v}=h,D=_?.getData(lt)||"";return e.update(()=>{let S=jo(D);if(!S||!_e(v))return!1;let I=G(r,h.pageX,h.pageY,v,100,50),{blockElem:R,isFoundNodeEmptyParagraph:F}=J({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-I,point:new K(h.x,h.y),useEdgeAsDefault:!0});if(!R)return!1;let k=it(R);if(!k)return!1;if(k===S)return!0;let{height:M,top:ae}=U(R),Ne=w>=ae+M/2+window.scrollY;F?(k.insertBefore(S),k.remove()):Ne?k.insertAfter(S):k.insertBefore(S),d!==null&&m(null),document.querySelectorAll(".lexical-block-highlighter").forEach(T=>{T.remove()});let we=e.getElementByKey(S.getKey()),ce=setTimeout(()=>{let T=we?.getBoundingClientRect();if(!T)return;let N=document.createElement("div");N.className="lexical-block-highlighter",N.style.backgroundColor="var(--theme-elevation-1000",N.style.transition="opacity 0.5s ease-in-out",N.style.zIndex="1",N.style.pointerEvents="none",N.style.boxSizing="border-box",N.style.borderRadius="4px",N.style.position="absolute",document.body.appendChild(N),N.style.opacity="0.1",N.style.height=`${T.height+8}px`,N.style.width=`${T.width+8}px`,N.style.top=`${T.top+window.scrollY-4}px`,N.style.left=`${T.left-4}px`;let ue=setTimeout(()=>{N.style.opacity="0";let de=setTimeout(()=>{N.remove()},500);u.current.push(de)},1e3);u.current.push(ue)},120);u.current.push(ce)}),!0}return document.addEventListener("dragover",f),document.addEventListener("drop",E),()=>{document.removeEventListener("dragover",f),document.removeEventListener("drop",E),u.current.forEach(clearTimeout),u.current=[]}},[r,y,t,e,a,d,x?.admin?.hideGutter]);function p(f){let E=f.dataTransfer;if(!E||!d)return;Vo(E,d),E.effectAllowed="move";let h="";e.update(()=>{let b=it(d);b&&(h=b.getKey())}),s.current=!0,E.setData(lt,h)}function g(){s.current=!1,a?.elem&&ct(c.current,a?.elem)}return zo($o(ut.Fragment,{children:[be("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:g,onDragStart:p,ref:n,type:"button",children:be("div",{className:o?"icon":""})}),be("div",{className:"draggable-block-target-line",ref:c}),be("div",{className:"debug-highlight",ref:l})]}),t)}function dt(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[r]=Ko();return Wo(r,o,r._editable)}import{c as Yo}from"react/compiler-runtime";import{jsx as Le}from"react/jsx-runtime";import{useLexicalComposerContext as Go}from"@lexical/react/LexicalComposerContext";import{$createParagraphNode as Uo,$getRoot as Jo}from"lexical";import"react";var ft="insert-paragraph-at-end",mt=()=>{let e=Yo(2),[t]=Go(),{editorConfig:o}=P();if(o?.admin?.hideInsertParagraphAtEnd)return null;let r;return e[0]!==t?(r=Le("div",{"aria-label":"Insert Paragraph",className:ft,onClick:()=>{t.update(qo)},role:"button",tabIndex:0,children:Le("div",{className:`${ft}-inside`,children:Le("span",{children:"+"})})}),e[0]=t,e[1]=r):r=e[1],r};function qo(){let e=Uo();Jo().append(e),e.select()}import{c as Qo}from"react/compiler-runtime";import{useLexicalComposerContext as Xo}from"@lexical/react/LexicalComposerContext";import*as pt from"react";var gt=()=>{let e=Qo(4),{editorConfig:t}=P(),[o]=Xo(),r,n;return e[0]!==o||e[1]!==t.features.markdownTransformers?(r=()=>Be(o,t.features.markdownTransformers??[]),n=[o,t.features.markdownTransformers],e[0]=o,e[1]=t.features.markdownTransformers,e[2]=r,e[3]=n):(r=e[2],n=e[3]),pt.useEffect(r,n),null};import{c as Zo}from"react/compiler-runtime";import{useLexicalComposerContext as er}from"@lexical/react/LexicalComposerContext.js";import{useEffect as tr}from"react";function ht(){let e=Zo(5),[t]=er(),{currentView:o,views:r}=$(),n,c;return e[0]!==o||e[1]!==t||e[2]!==r?(n=()=>{r&&(o==="default"?r.default?Se(t,r.default?.nodes):Pe(t):r[o]&&(Pe(t),Se(t,r[o]?.nodes)))},c=[t,r,o],e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=c):(n=e[3],c=e[4]),tr(n,c),null}import{useLexicalComposerContext as or}from"@lexical/react/LexicalComposerContext";import{$getSelection as rr,$isRangeSelection as nr,RootNode as ir}from"lexical";import{useEffect as sr}from"react";function yt(){let[e]=or();return sr(()=>e.registerNodeTransform(ir,t=>{let o=rr();if(nr(o)){let r=o.anchor.getNode(),n=o.focus.getNode();(!r.isAttached()||!n.isAttached())&&(t.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[e]),null}import{useLexicalComposerContext as lr}from"@lexical/react/LexicalComposerContext";import{$getSelection as ar,COMMAND_PRIORITY_LOW as cr,SELECT_ALL_COMMAND as ur}from"lexical";import{useEffect as dr}from"react";function xt(){let[e]=lr();return dr(()=>e.registerCommand(ur,()=>{if(ar())return!1;let o=document.activeElement;return o instanceof HTMLInputElement&&o.select(),!0},cr),[e]),null}import{jsx as q,jsxs as Ct}from"react/jsx-runtime";import{useLexicalComposerContext as mr}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as bt}from"@payloadcms/ui";import{useCallback as pr,useMemo as gr,useState as hr}from"react";import"react";import*as Nt from"react-dom";import{c as fr}from"react/compiler-runtime";import"react";function Et(e,t){let o=fr(4),{maxLength:r,minLength:n}=t,c=r===void 0?75:r,l=n===void 0?1:n,s;return o[0]!==c||o[1]!==l||o[2]!==e?(s=u=>{let{query:d}=u,m="[^"+e+Ie+"\\s]",i=new RegExp("(^|\\s|\\()(["+e+"]((?:"+m+"){0,"+c+"}))$").exec(d);if(i!==null){let x=i[1],y=i[3];if(y.length>=l)return{leadOffset:i.index+x.length,matchingString:y,replaceableString:i[2]}}return null},o[0]=c,o[1]=l,o[2]=e,o[3]=s):s=o[3],s}var O="slash-menu-popup";function yr({isSelected:e,item:t,onClick:o,onMouseEnter:r,ref:n}){let{fieldProps:{featureClientSchemaMap:c,schemaPath:l}}=P(),{i18n:s}=bt(),u=`${O}__item ${O}__item-${t.key}`;e&&(u+=` ${O}__item--selected`);let d=t.key;return t.label&&(d=typeof t.label=="function"?t.label({featureClientSchemaMap:c,i18n:s,schemaPath:l}):t.label),d.length>25&&(d=d.substring(0,25)+"..."),Ct("button",{"aria-selected":e,className:u,id:O+"__item-"+t.key,onClick:o,onMouseEnter:r,ref:n,role:"option",tabIndex:-1,type:"button",children:[t?.Icon&&q(t.Icon,{}),q("span",{className:`${O}__item-text`,children:d})]},t.key)}function wt({anchorElem:e=document.body}){let[t]=mr(),[o,r]=hr(null),{editorConfig:n}=P(),{i18n:c}=bt(),{fieldProps:{featureClientSchemaMap:l,schemaPath:s}}=P(),u=Et("/",{minLength:0}),d=pr(()=>{let a=[];for(let i of n.features.slashMenu.dynamicGroups)if(o){let x=i({editor:t,queryString:o});a=a.concat(x)}return a},[t,o,n?.features]),m=gr(()=>{let a=[];for(let i of n?.features.slashMenu.groups??[])a.push(i);if(o){let i=o.toLowerCase().replace(/[\s\-_]/g,"");a=a.map(y=>{let p=y.items.filter(g=>{let f=g.key;return g.label&&(f=typeof g.label=="function"?g.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):g.label),new RegExp(o,"gi").exec(f)||f.toLowerCase().replace(/[\s\-_]/g,"").includes(i)?!0:g.keywords!=null?g.keywords.some(h=>new RegExp(o,"gi").exec(h)?!0:h.toLowerCase().replace(/[\s\-_]/g,"").includes(i)):!1});return p.length?{...y,items:p}:null}),a=a.filter(y=>y!=null);let x=d();for(let y of x){let p=a.find(g=>g.key===y.key);p?a=a.filter(g=>g.key!==y.key):p={...y,items:[]},p?.items?.length&&(p.items=p.items.concat(p.items)),a.push(p)}}return a},[o,n?.features.slashMenu.groups,d,l,c,s]);return q($e,{anchorElem:e,groups:m,menuRenderFn:(a,{selectedItemKey:i,selectItemAndCleanUp:x,setSelectedItemKey:y})=>a.current&&m.length?Nt.createPortal(q("div",{className:O,"data-theme":"dark",children:m.map(p=>{let g=p.key;return p.label&&l&&(g=typeof p.label=="function"?p.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):p.label),Ct("div",{className:`${O}__group ${O}__group-${p.key}`,children:[q("div",{className:`${O}__group-title`,children:g}),p.items.map((f,E)=>q(yr,{index:E,isSelected:i===f.key,item:f,onClick:()=>{y(f.key),x(f)},onMouseEnter:()=>{y(f.key)},ref:h=>{f.ref={current:h}}},f.key))]},p.key)})}),a.current):null,onQueryChange:r,triggerFn:u})}import{c as xr}from"react/compiler-runtime";import{useLexicalComposerContext as Er}from"@lexical/react/LexicalComposerContext";import{TEXT_TYPE_TO_FORMAT as Cr,TextNode as br}from"lexical";import{useEffect as Nr}from"react";function St(e){let t=xr(6),{features:o}=e,[r]=Er(),n;t[0]!==r||t[1]!==o.enabledFormats?(n=()=>{let l=wr(o.enabledFormats);if(l.length!==0)return r.registerNodeTransform(br,s=>{l.forEach(u=>{s.hasFormat(u)&&s.toggleFormat(u)})})},t[0]=r,t[1]=o.enabledFormats,t[2]=n):n=t[2];let c;return t[3]!==r||t[4]!==o?(c=[r,o],t[3]=r,t[4]=o,t[5]=c):c=t[5],Nr(n,c),null}function wr(e){let t=Object.keys(Cr),o=new Set(e);return t.filter(r=>!o.has(r))}import{c as Sr}from"react/compiler-runtime";import{jsx as Pt}from"react/jsx-runtime";import{useLexicalComposerContext as Pr}from"@lexical/react/LexicalComposerContext";import{ContentEditable as Tr}from"@lexical/react/LexicalContentEditable.js";import{useTranslation as Rr}from"@payloadcms/ui";import"react";function Tt(e){let t=Sr(5),{className:o,editorConfig:r}=e,{t:n}=Rr(),[,c]=Pr(),{getTheme:l}=c,s;if(t[0]!==o||t[1]!==r?.admin?.placeholder||t[2]!==l||t[3]!==n){let u=l();s=Pt(Tr,{"aria-placeholder":n("lexical:general:placeholder"),className:o??"ContentEditable__root",placeholder:Pt("p",{className:u?.placeholder,children:r?.admin?.placeholder??n("lexical:general:placeholder")})}),t[0]=o,t[1]=r?.admin?.placeholder,t[2]=l,t[3]=n,t[4]=s}else s=t[4];return s}var vt=e=>{let t=vr(13),{editorConfig:o,editorContainerRef:r,isSmallWidthViewport:n,onChange:c,rtl:l}=e,s=P(),[u]=_r(),d=Ar(),[m,a]=Fr(null),i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>{f!==null&&a(f)},t[0]=i):i=t[0];let x=i,y,p;t[1]!==u||t[2]!==s?(y=()=>{if(!s?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}s?.parentEditor?.uuid&&s.parentEditor?.registerChild(s.uuid,s);let f=()=>{s.focusEditor(s)},E=()=>{s.blurEditor(s)},h=u.registerCommand(Or,()=>(f(),!0),Rt),b=u.registerCommand(Br,()=>(E(),!0),Rt);return()=>{h(),b(),s.parentEditor?.unregisterChild?.(s.uuid)}},p=[u,s],t[1]=u,t[2]=s,t[3]=y,t[4]=p):(y=t[3],p=t[4]),Ir(y,p);let g;return t[5]!==o||t[6]!==r||t[7]!==m||t[8]!==d||t[9]!==n||t[10]!==c||t[11]!==l?(g=ie(Q.Fragment,{children:[o.features.plugins?.map($r),ie("div",{className:"editor-container",dir:l?"rtl":void 0,ref:r,children:[o.features.plugins?.map(Kr),C(Mr,{contentEditable:C("div",{className:"editor-scroller",children:C("div",{className:"editor",ref:x,children:C(Tt,{editorConfig:o})})}),ErrorBoundary:kr}),C(yt,{}),d&&C(mt,{}),C(Ue,{}),C(We,{}),C(St,{features:o.features}),C(xt,{}),C(ht,{}),d&&C(Dr,{ignoreSelectionChange:!0,onChange:(f,E,h)=>{(!h.has("focus")||h.size>1)&&c?.(f,E,h)}}),m&&ie(Q.Fragment,{children:[!n&&d&&ie(Q.Fragment,{children:[o.admin?.hideDraggableBlockElement?null:C(dt,{anchorElem:m}),o.admin?.hideAddBlockButton?null:C(tt,{anchorElem:m})]}),o.features.plugins?.map(f=>{if(f.position==="floatingAnchorElem"&&!(f.desktopOnly===!0&&n))return C(z,{anchorElem:m,clientProps:f.clientProps,plugin:f},f.key)}),d&&C(Q.Fragment,{children:C(wt,{anchorElem:m})})]}),d&&ie(Q.Fragment,{children:[C(Lr,{}),o?.features?.markdownTransformers?.length>0&&C(gt,{})]}),o.features.plugins?.map(jr),o.features.plugins?.map(zr)]}),o.features.plugins?.map(Hr)]}),t[5]=o,t[6]=r,t[7]=m,t[8]=d,t[9]=n,t[10]=c,t[11]=l,t[12]=g):g=t[12],g};function $r(e){if(e.position==="aboveContainer")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function Kr(e){if(e.position==="top")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function jr(e){if(e.position==="normal")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function zr(e){if(e.position==="bottom")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function Hr(e){if(e.position==="belowContainer")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}var kt=({children:e,providers:t})=>{if(!t?.length)return e;let o=t[0];return t.length>1?j(o,{children:j(kt,{providers:t.slice(1),children:e})}):j(o,{children:e})},Lt=e=>{let{composerKey:t,editorConfig:o,fieldProps:r,isSmallWidthViewport:n,onChange:c,readOnly:l,rtl:s,value:u}=e,{currentView:d,views:m}=$(),a=P(),i=Wr(),x=_t.useRef(null),y=Yr(()=>{if(u&&typeof u!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(u));if(u&&Array.isArray(u)&&!("root"in u))throw new Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(u&&"jsonContent"in u)throw new Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");let p=m?.[d]?.nodes;return{editable:l!==!0,editorState:u!=null?JSON.stringify(u):void 0,namespace:o.lexical.namespace,nodes:je({editorConfig:o,nodeViews:p}),onError:g=>{throw g},theme:o.lexical.theme}},[o,m,d]);return y?j(Vr,{initialConfig:y,children:j(Ae,{editorConfig:o,editorContainerRef:x,fieldProps:r,parentContext:a?.editDepth===i?a:void 0,children:j(kt,{providers:o.features.providers,children:j(vt,{editorConfig:o,editorContainerRef:x,isSmallWidthViewport:n,onChange:c,rtl:s})})})},t+y.editable+d):j("p",{children:"Loading..."})};import{c as Gr}from"react/compiler-runtime";import{jsx as X,jsxs as Ur}from"react/jsx-runtime";import{ChevronIcon as Jr,Popup as qr,PopupList as Dt}from"@payloadcms/ui";import"react";function Mt(){let e=Gr(5),{currentView:t,setCurrentView:o,views:r}=$();if(!r||Object.keys(r).length===0)return null;let n,c;if(e[0]!==t||e[1]!==o||e[2]!==r){c=Symbol.for("react.early_return_sentinel");e:{let l=Object.keys(r);if(!l.some(Xr)){c=null;break e}let u=["default",...l.filter(Qr)],d=t.charAt(0).toUpperCase()+t.slice(1);n=X("div",{className:"lexical-view-selector",children:X(qr,{button:Ur("button",{className:"lexical-view-selector__button",type:"button",children:[X("span",{className:"lexical-view-selector__label",children:d}),X(Jr,{className:"lexical-view-selector__icon"})]}),buttonType:"custom",horizontalAlign:"left",render:m=>{let{close:a}=m;return X(Dt.ButtonGroup,{children:u.map(i=>{let x=i.charAt(0).toUpperCase()+i.slice(1);return X(Dt.Button,{active:i===t,disabled:i===t,onClick:()=>{o?.(i),a()},children:x},i)})})},size:"large"})})}e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=c}else n=e[3],c=e[4];return c!==Symbol.for("react.early_return_sentinel")?c:n}function Qr(e){return e!=="default"}function Xr(e){return e!=="default"}var se="rich-text-lexical",pn=e=>{let{editorConfig:t,field:o,field:{admin:{className:r,description:n,readOnly:c}={},label:l,localized:s,required:u},path:d,readOnly:m,schemaPath:a,validate:i}=e,x=m||c,y=cn(),{config:{localization:p}}=nn(),g=rn({fieldLocalized:s,locale:y,localizationConfig:p||void 0}),f=sn(),{isControlledByParent:E}=$(),h=Ot((A,ee)=>typeof i=="function"?i(A,{...ee,required:u}):!0,[i,u]),{customComponents:{AfterInput:b,BeforeInput:_,Description:w,Error:v,Label:D}={},disabled:S,initialValue:I,path:R,setValue:F,showError:k,value:M}=an({potentiallyStalePath:d,validate:h}),ae=x||S,[Z,Ne]=Ft(!1),[De,we]=Ft(),ce=Bt.useRef(I),T=Bt.useRef(M);It(()=>{let A=()=>{let ee=window.matchMedia("(max-width: 768px)").matches;ee!==Z&&Ne(ee)};return A(),window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[Z]);let N=["field-type",se,r,k&&"error",ae&&`${se}--read-only`,t?.admin?.hideGutter!==!0&&!Z?`${se}--show-gutter`:null].filter(Boolean).join(" "),ue=`${R}.${f}`,de=Oe(),$t=Ot(A=>{de(()=>{let Me=A.toJSON();T.current=Me,F(Me)})},[F,de]),Kt=fn(()=>un(o),[o]),jt=ln(A=>{T.current!==M&&!dn(T.current!=null?JSON.parse(JSON.stringify(T.current)):T.current,M)&&(ce.current=A,T.current=M,we(new Date))});return It(()=>{Object.is(I,ce.current)||jt(I)},[I]),le("div",{className:N,"data-field-path":R,"data-field-schemapath":a,"data-lexical-view":t?.view,style:Kt,children:[le("div",{className:`${se}__label-row`,children:[D||L(on,{label:l,localized:s,path:R,required:u}),!E&&L(Mt,{})]}),le("div",{className:`${se}__wrap`,children:[L(At,{CustomComponent:v,Fallback:L(tn,{path:R,showError:k})}),le(mn,{fallbackRender:gn,onReset:()=>{},children:[_,L(Zr,{drawerSlugPrefix:`lexical-${R}`,children:L(Lt,{composerKey:ue,editorConfig:t,fieldProps:e,isSmallWidthViewport:Z,onChange:$t,readOnly:ae,rtl:g,value:M},JSON.stringify({path:R,rerenderProviderKey:De}))}),b]}),L(At,{CustomComponent:w,Fallback:L(en,{description:n,path:R})})]})]},ue)};function gn({error:e}){return le("div",{className:"errorBoundary",role:"alert",children:[L("p",{children:"Something went wrong:"}),L("pre",{style:{color:"red"},children:e instanceof Error?e.message:String(e)})]})}var Pl=pn;export{Pl as RichText};
2
+ //# sourceMappingURL=Field-G5Z2HM5Y.js.map
@@ -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/setTargetLine.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 {\n BulkUploadProvider,\n FieldDescription,\n FieldError,\n FieldLabel,\n isFieldRTL,\n RenderCustomComponent,\n useConfig,\n useEditDepth,\n useEffectEvent,\n useField,\n useLocale,\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 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 className={classes}\n data-field-path={path}\n data-field-schemapath={schemaPath}\n data-lexical-view={editorConfig?.view}\n key={pathWithEditDepth}\n style={styles}\n >\n <div className={`${baseClass}__label-row`}>\n {Label || (\n <FieldLabel label={label} localized={localized} path={path} required={required} />\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 {/* 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 drawerSlugPrefix={`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 {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 { 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\n const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)\n const onRef = (_floatingAnchorElem: HTMLDivElement) => {\n if (_floatingAnchorElem !== null) {\n setFloatingAnchorElem(_floatingAnchorElem)\n }\n }\n\n useEffect(() => {\n if (!editorConfigContext?.uuid) {\n console.error('Lexical Editor must be used within an EditorConfigProvider')\n return\n }\n if (editorConfigContext?.parentEditor?.uuid) {\n editorConfigContext.parentEditor?.registerChild(editorConfigContext.uuid, editorConfigContext)\n }\n\n const handleFocus = () => {\n editorConfigContext.focusEditor(editorConfigContext)\n }\n\n const handleBlur = () => {\n editorConfigContext.blurEditor(editorConfigContext)\n }\n\n const unregisterFocus = editor.registerCommand<MouseEvent>(\n FOCUS_COMMAND,\n () => {\n handleFocus()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n const unregisterBlur = editor.registerCommand<MouseEvent>(\n BLUR_COMMAND,\n () => {\n handleBlur()\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n\n return () => {\n unregisterFocus()\n unregisterBlur()\n editorConfigContext.parentEditor?.unregisterChild?.(editorConfigContext.uuid)\n }\n }, [editor, editorConfigContext])\n\n return (\n <React.Fragment>\n {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'aboveContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n <div className=\"editor-container\" 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 editorConfig={editorConfig} />\n </div>\n </div>\n }\n ErrorBoundary={LexicalErrorBoundary}\n />\n <NormalizeSelectionPlugin />\n {isEditable && <InsertParagraphAtEndPlugin />}\n <DecoratorPlugin />\n <ClipboardPlugin />\n <TextPlugin features={editorConfig.features} />\n <SelectAllPlugin />\n <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 {editorConfig.features.plugins?.map((plugin) => {\n if (plugin.position === 'belowContainer') {\n return <EditorPlugin clientProps={plugin.clientProps} key={plugin.key} plugin={plugin} />\n }\n })}\n </React.Fragment>\n )\n}\n", "'use client'\nimport React from 'react'\n\nimport type { SanitizedPlugin } from '../features/typesClient.js'\n\nexport const EditorPlugin: React.FC<{\n anchorElem?: HTMLDivElement\n clientProps: unknown\n plugin: SanitizedPlugin\n}> = ({ anchorElem, clientProps, plugin }) => {\n if (plugin.position === 'floatingAnchorElem' && anchorElem) {\n return (\n plugin.Component && <plugin.Component anchorElem={anchorElem} clientProps={clientProps} />\n )\n }\n\n // @ts-expect-error - ts is not able to infer that plugin.Component is of type PluginComponent\n return plugin.Component && <plugin.Component clientProps={clientProps} />\n}\n", "'use client'\n\nimport { copyToClipboard } from '@lexical/clipboard'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { objectKlassEquals } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport { $getSelection, $isNodeSelection, COMMAND_PRIORITY_LOW, COPY_COMMAND } from 'lexical'\nimport { useEffect } from 'react'\n\ntype SerializedUnknownLexicalNode = {\n children?: SerializedUnknownLexicalNode[]\n type: string\n}\n\ntype LexicalClipboardData = {\n namespace: string\n nodes: SerializedUnknownLexicalNode[]\n}\n\nconst changeIds = (node: SerializedUnknownLexicalNode) => {\n if (\n 'fields' in node &&\n typeof node.fields === 'object' &&\n node.fields !== null &&\n 'id' in node.fields\n ) {\n node.fields.id = new ObjectID.default().toHexString()\n } else if ('id' in node) {\n node.id = new ObjectID.default().toHexString()\n }\n\n if (node.children) {\n for (const child of node.children) {\n changeIds(child)\n }\n }\n}\n\nexport function ClipboardPlugin() {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n // Remove duplicated ids from clipboard. We do it here because:\n // 1. Browsers do not allow setting the clipboardData in paste event for security reasons.\n // 2. If you cut instead of paste, the id will be kept, which is a good thing.\n return editor.registerCommand(\n COPY_COMMAND,\n (event) => {\n // Handle decorator node case\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n const node = selection.getNodes()[0]\n\n const serializedNode = node?.exportJSON() as SerializedUnknownLexicalNode\n const deepCloneSerializedNode = JSON.parse(JSON.stringify(serializedNode))\n changeIds(deepCloneSerializedNode)\n\n const lexicalClipboardData: LexicalClipboardData = {\n namespace: editor._config.namespace,\n nodes: [deepCloneSerializedNode],\n }\n\n const stringifiedLexicalClipboardData = JSON.stringify(lexicalClipboardData)\n\n copyToClipboard(editor, null, {\n 'application/x-lexical-editor': stringifiedLexicalClipboardData,\n 'text/plain': '',\n }).catch((error) => {\n throw error\n })\n return true\n }\n\n // Handle range selection case\n copyToClipboard(editor, objectKlassEquals(event, ClipboardEvent) ? event : null)\n .then(() => {\n if (!(event instanceof ClipboardEvent) || !event.clipboardData) {\n throw new Error('No clipboard event')\n }\n const lexicalStringified = event.clipboardData.getData('application/x-lexical-editor')\n if (!lexicalStringified) {\n return true\n }\n\n const lexical = JSON.parse(lexicalStringified) as {\n nodes: SerializedUnknownLexicalNode[]\n }\n\n for (const node of lexical.nodes) {\n changeIds(node)\n }\n const stringified = JSON.stringify(lexical)\n event.clipboardData.setData('application/x-lexical-editor', stringified)\n })\n .catch((error) => {\n if (event instanceof ClipboardEvent) {\n event.clipboardData?.setData('application/x-lexical-editor', '')\n }\n throw error\n })\n return true\n },\n COMMAND_PRIORITY_LOW,\n )\n }, [editor])\n\n return null\n}\n", "'use client'\n\nimport type { DecoratorNode, ElementNode, LexicalNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport {\n $createNodeSelection,\n $getEditor,\n $getNearestNodeFromDOMNode,\n $getSelection,\n $isDecoratorNode,\n $isElementNode,\n $isLineBreakNode,\n $isNodeSelection,\n $isRangeSelection,\n $isRootOrShadowRoot,\n $isTextNode,\n $setSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_LOW,\n KEY_ARROW_DOWN_COMMAND,\n KEY_ARROW_UP_COMMAND,\n KEY_BACKSPACE_COMMAND,\n KEY_DELETE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport './index.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 () => {\n const decorator = $getSelectedDecorator()\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n if (decorator) {\n decorator.element?.classList.add('decorator-selected')\n return true\n }\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ARROW_UP_COMMAND,\n (event) => {\n // CASE 1: Node selection\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n const prevSibling = selection.getNodes()[0]?.getPreviousSibling()\n if ($isDecoratorNode(prevSibling)) {\n const element = $getEditor().getElementByKey(prevSibling.getKey())\n if (element) {\n $selectDecorator({ element, node: prevSibling })\n event.preventDefault()\n return true\n }\n return false\n }\n if (!$isElementNode(prevSibling)) {\n return false\n }\n const lastDescendant = prevSibling.getLastDescendant() ?? prevSibling\n if (!lastDescendant) {\n return false\n }\n const block = $findMatchingParent(lastDescendant, INTERNAL_$isBlock)\n block?.selectStart()\n event.preventDefault()\n return true\n }\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n // CASE 2: Range selection\n // Get first selected block\n const firstPoint = selection.isBackward() ? selection.anchor : selection.focus\n const firstNode = firstPoint.getNode()\n const firstSelectedBlock = $findMatchingParent(firstNode, (node) => {\n return findFirstSiblingBlock(node) !== null\n })\n const prevBlock = firstSelectedBlock?.getPreviousSibling()\n if (!firstSelectedBlock || prevBlock !== findFirstSiblingBlock(firstSelectedBlock)) {\n return false\n }\n\n if ($isDecoratorNode(prevBlock)) {\n const prevBlockElement = $getEditor().getElementByKey(prevBlock.getKey())\n if (prevBlockElement) {\n $selectDecorator({ element: prevBlockElement, node: prevBlock })\n event.preventDefault()\n return true\n }\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ARROW_DOWN_COMMAND,\n (event) => {\n // CASE 1: Node selection\n const selection = $getSelection()\n if ($isNodeSelection(selection)) {\n event.preventDefault()\n const nextSibling = selection.getNodes()[0]?.getNextSibling()\n if ($isDecoratorNode(nextSibling)) {\n const element = $getEditor().getElementByKey(nextSibling.getKey())\n if (element) {\n $selectDecorator({ element, node: nextSibling })\n }\n return true\n }\n if (!$isElementNode(nextSibling)) {\n return true\n }\n const firstDescendant = nextSibling.getFirstDescendant() ?? nextSibling\n if (!firstDescendant) {\n return true\n }\n const block = $findMatchingParent(firstDescendant, INTERNAL_$isBlock)\n block?.selectEnd()\n event.preventDefault()\n return true\n }\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n // CASE 2: Range selection\n // Get last selected block\n const lastPoint = selection.isBackward() ? selection.anchor : selection.focus\n const lastNode = lastPoint.getNode()\n const lastSelectedBlock = $findMatchingParent(lastNode, (node) => {\n return findLaterSiblingBlock(node) !== null\n })\n const nextBlock = lastSelectedBlock?.getNextSibling()\n if (!lastSelectedBlock || nextBlock !== findLaterSiblingBlock(lastSelectedBlock)) {\n return false\n }\n\n if ($isDecoratorNode(nextBlock)) {\n const nextBlockElement = $getEditor().getElementByKey(nextBlock.getKey())\n if (nextBlockElement) {\n $selectDecorator({ element: nextBlockElement, node: nextBlock })\n event.preventDefault()\n return true\n }\n }\n\n return false\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor])\n\n return null\n}\n\nfunction $getDecoratorByMouseEvent(\n event: MouseEvent,\n): { element: HTMLElement; node: DecoratorNode<unknown> } | undefined {\n if (!(event.target instanceof HTMLElement)) {\n return undefined\n }\n const element = event.target.closest('[data-lexical-decorator=\"true\"]')\n if (!(element instanceof HTMLElement)) {\n return undefined\n }\n const node = $getNearestNodeFromDOMNode(element)\n return $isDecoratorNode(node) ? { element, node } : undefined\n}\n\nfunction $getSelectedDecorator() {\n const selection = $getSelection()\n if (!$isNodeSelection(selection)) {\n return undefined\n }\n const nodes = selection.getNodes()\n if (nodes.length !== 1) {\n return undefined\n }\n const node = nodes[0]\n return $isDecoratorNode(node)\n ? {\n decorator: node,\n element: $getEditor().getElementByKey(node.getKey()),\n }\n : undefined\n}\n\nfunction $selectDecorator({\n element,\n node,\n}: {\n element: HTMLElement\n node: DecoratorNode<unknown>\n}) {\n document.querySelector('.decorator-selected')?.classList.remove('decorator-selected')\n const selection = $createNodeSelection()\n selection.add(node.getKey())\n $setSelection(selection)\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n element.classList.add('decorator-selected')\n}\n\n/**\n * Copied from https://github.com/facebook/lexical/blob/main/packages/lexical/src/LexicalUtils.ts\n *\n * This function returns true for a DecoratorNode that is not inline OR\n * an ElementNode that is:\n * - not a root or shadow root\n * - not inline\n * - can't be empty\n * - has no children or an inline first child\n */\nexport function INTERNAL_$isBlock(node: LexicalNode): node is DecoratorNode<unknown> | ElementNode {\n if ($isDecoratorNode(node) && !node.isInline()) {\n return true\n }\n if (!$isElementNode(node) || $isRootOrShadowRoot(node)) {\n return false\n }\n\n const firstChild = node.getFirstChild()\n const isLeafElement =\n firstChild === null ||\n $isLineBreakNode(firstChild) ||\n $isTextNode(firstChild) ||\n firstChild.isInline()\n\n return !node.isInline() && node.canBeEmpty() !== false && isLeafElement\n}\n\nfunction findLaterSiblingBlock(node: LexicalNode): LexicalNode | null {\n let current = node.getNextSibling()\n while (current !== null) {\n if (INTERNAL_$isBlock(current)) {\n return current\n }\n current = current.getNextSibling()\n }\n return null\n}\n\nfunction findFirstSiblingBlock(node: LexicalNode): LexicalNode | null {\n let current = node.getPreviousSibling()\n while (current !== null) {\n if (INTERNAL_$isBlock(current)) {\n return current\n }\n current = current.getPreviousSibling()\n }\n return null\n}\n", "'use client'\nimport type { LexicalEditor, LexicalNode, ParagraphNode } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { Point } from '../../../utils/point.js'\nimport { ENABLE_SLASH_MENU_COMMAND } from '../../SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport './index.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 && hoveredElement?.node) {\n setHandlePosition(\n hoveredElement?.elem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, hoveredElement, blockHandleHorizontalOffset])\n\n const handleAddClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n let hoveredElementToUse = hoveredElement\n if (!hoveredElementToUse?.node) {\n return\n }\n\n // 1. Update hoveredElement.node to a new paragraph node if the hoveredElement.node is not a paragraph node\n editor.update(() => {\n // Check if blockNode is an empty text node\n let isEmptyParagraph = true\n if (\n hoveredElementToUse?.node.getType() !== 'paragraph' ||\n hoveredElementToUse.node.getTextContent() !== ''\n ) {\n isEmptyParagraph = false\n }\n\n if (!isEmptyParagraph) {\n const newParagraph = $createParagraphNode()\n hoveredElementToUse?.node.insertAfter(newParagraph)\n\n setTimeout(() => {\n hoveredElementToUse = {\n elem: editor.getElementByKey(newParagraph.getKey())!,\n node: newParagraph,\n }\n setHoveredElement(hoveredElementToUse)\n }, 0)\n }\n })\n\n // 2. Focus on the new paragraph node\n setTimeout(() => {\n editor.update(() => {\n editor.focus()\n\n if (\n hoveredElementToUse?.node &&\n 'select' in hoveredElementToUse.node &&\n typeof hoveredElementToUse.node.select === 'function'\n ) {\n hoveredElementToUse.node.select()\n }\n })\n }, 1)\n\n // Make sure this is called AFTER the focusing has been processed by the browser\n // Otherwise, this won't work\n setTimeout(() => {\n editor.dispatchCommand(ENABLE_SLASH_MENU_COMMAND, {\n node: hoveredElementToUse?.node as ParagraphNode,\n })\n }, 2)\n\n event.stopPropagation()\n event.preventDefault()\n },\n [editor, hoveredElement],\n )\n\n return createPortal(\n <React.Fragment>\n <button\n aria-label=\"Add block\"\n className=\"icon add-block-menu\"\n onClick={(event) => {\n handleAddClick(event)\n }}\n ref={menuRef}\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function AddBlockHandlePlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useAddBlockHandle(editor, anchorElem, editor._editable)\n}\n", "'use client'\n/**\n * Calculate distance between scrollerElem and target if target is not in scrollerElem\n */\nexport const calculateDistanceFromScrollerElem = (\n scrollerElem: HTMLElement | null,\n pageX: number,\n pageY: number,\n target: HTMLElement,\n horizontalBuffer: number = 50,\n verticalBuffer: number = 25,\n): number => {\n let distanceFromScrollerElem = 0\n if (scrollerElem && !scrollerElem.contains(target)) {\n const { bottom, left, right, top } = scrollerElem.getBoundingClientRect()\n\n const adjustedTop = top + window.scrollY\n const adjustedBottom = bottom + window.scrollY\n\n if (\n pageY < adjustedTop - verticalBuffer ||\n pageY > adjustedBottom + verticalBuffer ||\n pageX < left - horizontalBuffer ||\n pageX > right + horizontalBuffer\n ) {\n return -1\n }\n\n // This is used to allow the _draggableBlockElem to be found when the mouse is in the\n // buffer zone around the scrollerElem.\n if (pageX < left || pageX > right) {\n distanceFromScrollerElem = pageX < left ? pageX - left : pageX - right\n }\n }\n return distanceFromScrollerElem\n}\n", "'use client'\nimport type { LexicalEditor, LexicalNode } from 'lexical'\n\nimport { $getNodeByKey } from 'lexical'\n\nimport { Point } from '../../../utils/point.js'\nimport { Rect } from '../../../utils/rect.js'\nimport { getBoundingClientRectWithoutTransform } from '../DraggableBlockPlugin/getBoundingRectWithoutTransform.js'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\n\n// Directions\nconst Downward = 1\nconst Upward = -1\nconst Indeterminate = 0\n\ntype Props = {\n anchorElem: HTMLElement\n cache_threshold?: number\n editor: LexicalEditor\n /** fuzzy makes the search not exact. If no exact match found, find the closes node instead of returning null */\n fuzzy?: boolean\n horizontalOffset?: number\n point: Point\n /**\n * By default, empty paragraphs are not returned. Set this to true to return empty paragraphs. @default false\n */\n returnEmptyParagraphs?: boolean\n /**\n * The index to start searching from. It can be a considerable performance optimization to start searching from the index of the\n * previously found node, as the node is likely to be close to the next node.\n */\n startIndex?: number\n useEdgeAsDefault?: boolean\n verbose?: boolean\n}\n\ntype Output = {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n}\n\nconst cache = {\n props: null as null | Props,\n result: null as null | Output,\n}\n\nfunction isPointClose(previous: Point, current: Point, threshold: number = 20): boolean {\n const dx = previous.x - current.x\n const dy = previous.y - current.y\n return dx * dx + dy * dy <= threshold * threshold\n}\n\nexport function getNodeCloseToPoint(props: Props): Output {\n const {\n anchorElem,\n cache_threshold = 20,\n editor,\n fuzzy = false,\n horizontalOffset = 0,\n point: { x, y },\n startIndex = 0,\n useEdgeAsDefault = false,\n } = props\n\n // Use cache\n if (\n cache_threshold > 0 &&\n cache.props &&\n cache.result &&\n cache.props.fuzzy === props.fuzzy &&\n cache.props.horizontalOffset === props.horizontalOffset &&\n cache.props.useEdgeAsDefault === props.useEdgeAsDefault &&\n isPointClose(cache.props.point, props.point, cache_threshold)\n ) {\n return cache.result\n }\n\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const closestBlockElem: {\n blockElem: HTMLElement | null\n blockNode: LexicalNode | null\n distance: number\n foundAtIndex: number\n isFoundNodeEmptyParagraph: boolean\n } = {\n blockElem: null,\n blockNode: null,\n distance: Infinity,\n foundAtIndex: -1,\n isFoundNodeEmptyParagraph: false,\n }\n\n // Return null if matching block element is the first or last node\n editor.getEditorState().read(() => {\n if (useEdgeAsDefault) {\n const firstNode = editor.getElementByKey(topLevelNodeKeys[0]!)\n const lastNode = editor.getElementByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]!)\n\n if (firstNode && lastNode) {\n const [firstNodeRect, lastNodeRect] = [\n getBoundingClientRectWithoutTransform(firstNode),\n getBoundingClientRectWithoutTransform(lastNode),\n ]\n\n if (y < firstNodeRect.top) {\n closestBlockElem.blockElem = firstNode\n closestBlockElem.distance = firstNodeRect.top - y\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[0]!)\n closestBlockElem.foundAtIndex = 0\n } else if (y > lastNodeRect.bottom) {\n closestBlockElem.distance = y - lastNodeRect.bottom\n closestBlockElem.blockNode = $getNodeByKey(topLevelNodeKeys[topLevelNodeKeys.length - 1]!)\n closestBlockElem.blockElem = lastNode\n closestBlockElem.foundAtIndex = topLevelNodeKeys.length - 1\n }\n\n if (closestBlockElem?.blockElem) {\n return {\n blockElem: null,\n isFoundNodeEmptyParagraph: false,\n } as Output\n }\n }\n }\n\n // Find matching block element\n let index = startIndex\n let direction = Indeterminate\n\n while (index >= 0 && index < topLevelNodeKeys.length) {\n const key = topLevelNodeKeys[index]!\n const elem = editor.getElementByKey(key)\n if (elem === null) {\n break\n }\n const point = new Point(x + horizontalOffset, y)\n //const domRect = Rect.fromDOM(elem)\n // Do not consider transform of blocks when calculating distance\n const domRect = Rect.fromDOMRect(getBoundingClientRectWithoutTransform(elem))\n\n const { marginBottom, marginTop } = getCollapsedMargins(elem)\n\n const rect = domRect.generateNewRect({\n bottom: domRect.bottom + marginBottom,\n left: anchorElementRect.left,\n right: anchorElementRect.right,\n top: domRect.top - marginTop,\n })\n\n const { distance, isOnBottomSide, isOnTopSide } = rect.distanceFromPoint(point)\n\n if (distance === 0) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.foundAtIndex = index\n closestBlockElem.distance = distance\n\n // Check if blockNode is an empty text node\n if (\n closestBlockElem.blockNode &&\n closestBlockElem.blockNode.getType() === 'paragraph' &&\n closestBlockElem.blockNode.getTextContent() === ''\n ) {\n if (!fuzzy && !props.returnEmptyParagraphs) {\n closestBlockElem.blockElem = null\n closestBlockElem.blockNode = null\n }\n\n closestBlockElem.isFoundNodeEmptyParagraph = true\n }\n break\n } else if (fuzzy) {\n if (distance < closestBlockElem.distance) {\n closestBlockElem.blockElem = elem\n closestBlockElem.blockNode = $getNodeByKey(key)\n closestBlockElem.distance = distance\n closestBlockElem.foundAtIndex = index\n }\n }\n\n if (direction === Indeterminate) {\n if (isOnTopSide) {\n direction = Upward\n } else if (isOnBottomSide) {\n direction = Downward\n } else {\n // stop search block element\n direction = Infinity\n }\n }\n\n index += direction\n }\n })\n\n // Store in cache before returning\n cache.props = props\n cache.result = {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n\n return {\n blockElem: closestBlockElem.blockElem,\n blockNode: closestBlockElem.blockNode,\n foundAtIndex: closestBlockElem.foundAtIndex,\n isFoundNodeEmptyParagraph: closestBlockElem.isFoundNodeEmptyParagraph,\n }\n}\n", "'use client'\nexport function getBoundingClientRectWithoutTransform(elem: HTMLElement): DOMRect {\n const rect = elem.getBoundingClientRect()\n\n // Extract the translation value from the transform style\n const transformValue = getComputedStyle(elem).getPropertyValue('transform')\n if (!transformValue || transformValue === 'none') {\n return rect\n }\n\n const lastNumberOfTransformValue = transformValue.split(',').pop()\n rect.y = rect.y - Number(lastNumberOfTransformValue?.replace(')', ''))\n\n // Return the original bounding rect if no translation is applied\n return rect\n}\n", "'use client'\nexport function getCollapsedMargins(elem: HTMLElement): {\n marginBottom: number\n marginTop: number\n} {\n const getMargin = (element: Element | null, margin: 'marginBottom' | 'marginTop'): number =>\n element ? parseFloat(window.getComputedStyle(element)[margin]) : 0\n\n const { marginBottom, marginTop } = window.getComputedStyle(elem)\n const prevElemSiblingMarginBottom = getMargin(elem.previousElementSibling, 'marginBottom')\n const nextElemSiblingMarginTop = getMargin(elem.nextElementSibling, 'marginTop')\n const collapsedTopMargin = Math.max(parseFloat(marginTop), prevElemSiblingMarginBottom)\n const collapsedBottomMargin = Math.max(parseFloat(marginBottom), nextElemSiblingMarginTop)\n\n return { marginBottom: collapsedBottomMargin, marginTop: collapsedTopMargin }\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { $getRoot } from 'lexical'\n\nexport function getTopLevelNodeKeys(editor: LexicalEditor): string[] {\n return editor.getEditorState().read(() => $getRoot().getChildrenKeys())\n}\n", "'use client'\nexport function isOnHandleElement(element: HTMLElement, handleElementClassName: string): boolean {\n return !!element.closest(`.${handleElementClassName}`)\n}\n", "'use client'\nconst replacedElements = [\n 'IMG',\n 'INPUT',\n 'TEXTAREA',\n 'SELECT',\n 'BUTTON',\n 'VIDEO',\n 'OBJECT',\n 'EMBED',\n 'IFRAME',\n 'HR',\n]\n\n/**\n * From ChatGPT, only that verified it works for HR elements.\n *\n * HTML Elements can have CSS lineHeight applied to them, but it doesn't always affect the visual layout.\n * This function checks if the line-height property has an effect on the element's layout.\n * @param htmlElem\n */\nexport function doesLineHeightAffectElement(htmlElem: HTMLElement) {\n if (!htmlElem) {\n return false\n }\n\n // Check for replaced elements, elements that typically don't support line-height adjustments,\n // and elements without visible content\n\n if (\n replacedElements.includes(htmlElem.tagName) ||\n htmlElem.offsetHeight === 0 ||\n htmlElem.offsetWidth === 0\n ) {\n return false\n }\n\n // Check for specific CSS properties that negate line-height's visual effects\n const style = window.getComputedStyle(htmlElem)\n if (\n style.display === 'table-cell' ||\n style.position === 'absolute' ||\n style.visibility === 'hidden' ||\n style.opacity === '0'\n ) {\n return false\n }\n\n // This is a basic check, and there can be more complex scenarios where line-height doesn't have an effect.\n return true\n}\n", "'use client'\nimport { doesLineHeightAffectElement } from './doesLineHeightAffectElement.js'\n\nexport function setHandlePosition(\n targetElem: HTMLElement | null,\n handleElem: HTMLElement,\n anchorElem: HTMLElement,\n leftOffset: number = 0, // SPACE\n) {\n if (!targetElem) {\n handleElem.style.opacity = '0'\n handleElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const targetRect = targetElem.getBoundingClientRect()\n const targetStyle = window.getComputedStyle(targetElem)\n const floatingElemRect = handleElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n\n let top: number\n\n const isBlockStyle = [\n 'LexicalEditorTheme__block',\n 'LexicalEditorTheme__upload',\n 'LexicalEditorTheme__relationship',\n ].some(\n (classes) =>\n targetElem.classList.contains(classes) ||\n targetElem.firstElementChild?.classList.contains(classes),\n )\n\n if (!isBlockStyle) {\n // No need to let line height affect the re-positioning of the floating element if line height has no\n // visual effect on the element. Otherwise, the floating element will be positioned incorrectly.\n const actualLineHeight = doesLineHeightAffectElement(targetElem)\n ? parseInt(targetStyle.lineHeight, 10)\n : 0\n\n top = targetRect.top + (actualLineHeight - floatingElemRect.height) / 2 - anchorElementRect.top\n } else {\n top = targetRect.top + 8 - anchorElementRect.top\n }\n\n const left = leftOffset\n\n handleElem.style.opacity = '1'\n handleElem.style.transform = `translate(${left}px, ${top}px)`\n}\n", "'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey, isHTMLElement } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.css'\nimport { setTargetLine } from './setTargetLine.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const menuRef = useRef<HTMLButtonElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const 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 (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n // 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(--theme-elevation-1000'\n highlightElem.style.transition = 'opacity 0.5s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n 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 function onDragStart(event: ReactDragEvent<HTMLButtonElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n dataTransfer.effectAllowed = 'move'\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n if (lastTargetBlock?.elem) {\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n }\n\n return createPortal(\n <React.Fragment>\n <button\n aria-label=\"Drag to move\"\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n type=\"button\"\n >\n <div className={isEditable ? 'icon' : ''} />\n </button>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n", "'use client'\nimport { getCollapsedMargins } from '../utils/getCollapsedMargins.js'\nconst TARGET_LINE_HALF_HEIGHT = 0\nconst TEXT_BOX_HORIZONTAL_PADDING = -24\nconst DEBUG = false\n\nlet animationTimer = 0\n\nexport function setTargetLine(\n offsetWidth: string,\n offsetLeft: number,\n targetLineElem: HTMLElement,\n targetBlockElem: HTMLElement,\n lastTargetBlock: {\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n },\n mouseY: number,\n anchorElem: HTMLElement,\n event: DragEvent,\n debugHighlightRef: React.RefObject<HTMLDivElement | null>,\n isFoundNodeEmptyParagraph: boolean = false,\n) {\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n targetBlockElem.getBoundingClientRect() // used to be getBoundingClientRectWithoutTransform. Not sure what's better, but the normal getBoundingClientRect seems to work fine\n const { top: anchorTop, width: anchorWidth } = anchorElem.getBoundingClientRect()\n\n const { marginBottom, marginTop } = getCollapsedMargins(targetBlockElem)\n let lineTop = targetBlockElemTop\n\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n let willStayInSamePosition = false\n\n /**\n * Do not run any transform or changes if the actual new line position would be the same (even if it's now inserted BEFORE rather than AFTER - position would still be the same)\n * This prevents unnecessary flickering.\n *\n * We still need to let it run even if the position (IGNORING the transform) would not change, as the transform animation is not finished yet. This is what animationTimer does. Otherwise, the positioning will be inaccurate\n */\n if (lastTargetBlock?.elem) {\n if (targetBlockElem !== lastTargetBlock?.elem) {\n if (\n isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.nextElementSibling\n ) {\n animationTimer++\n\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n } else if (\n !isBelow &&\n lastTargetBlock?.elem &&\n lastTargetBlock?.elem === targetBlockElem.previousElementSibling\n ) {\n animationTimer++\n if (animationTimer < 200) {\n willStayInSamePosition = true\n }\n }\n } else {\n animationTimer++\n\n const lastBoundingBoxPosition = lastTargetBlock?.boundingBox?.y\n const currentBoundingBoxPosition = targetBlockElem.getBoundingClientRect().y\n\n if (\n (isBelow === lastTargetBlock?.isBelow &&\n lastBoundingBoxPosition === currentBoundingBoxPosition) ||\n animationTimer < 200\n ) {\n willStayInSamePosition = false\n }\n }\n }\n if (willStayInSamePosition) {\n return {\n isBelow,\n willStayInSamePosition,\n }\n }\n\n /**\n * Paragraphs need no isBelow/above handling,\n */\n if (!isFoundNodeEmptyParagraph) {\n //if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n lineTop += targetBlockElemHeight + marginBottom / 2\n } else {\n // above targetBlockElem\n lineTop -= marginTop / 2\n }\n } else {\n lineTop += targetBlockElemHeight / 2\n }\n\n let targetElemTranslate2 = 0\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n targetElemTranslate2 = -TARGET_LINE_HALF_HEIGHT\n } else {\n targetElemTranslate2 = TARGET_LINE_HALF_HEIGHT\n }\n }\n\n const top = lineTop - anchorTop + targetElemTranslate2\n\n const left = TEXT_BOX_HORIZONTAL_PADDING - offsetLeft\n\n targetLineElem.style.width = `calc(${anchorWidth}px - ${offsetWidth} - 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", "/* eslint-disable jsx-a11y/click-events-have-key-events */\n'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $createParagraphNode, $getRoot } from 'lexical'\nimport React from 'react'\n\nimport './index.css'\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\nconst baseClass = 'insert-paragraph-at-end'\n\nexport const InsertParagraphAtEndPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig } = useEditorConfigContext()\n\n if (editorConfig?.admin?.hideInsertParagraphAtEnd) {\n return null\n }\n\n const onClick = () => {\n editor.update(() => {\n const paragraphNode = $createParagraphNode()\n $getRoot().append(paragraphNode)\n paragraphNode.select()\n })\n }\n\n return (\n // TODO: convert to button\n <div\n aria-label=\"Insert Paragraph\"\n className={baseClass}\n onClick={onClick}\n role=\"button\"\n tabIndex={0}\n >\n <div className={`${baseClass}-inside`}>\n <span>+</span>\n </div>\n </div>\n )\n}\n", "'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport * as React from 'react'\n\nimport { registerMarkdownShortcuts } from '../../../packages/@lexical/markdown/MarkdownShortcuts.js'\nimport { useEditorConfigContext } from '../../config/client/EditorConfigProvider.js'\n\nexport const MarkdownShortcutPlugin: React.FC = () => {\n const { editorConfig } = useEditorConfigContext()\n const [editor] = useLexicalComposerContext()\n\n React.useEffect(() => {\n return registerMarkdownShortcuts(editor, editorConfig.features.markdownTransformers ?? [])\n }, [editor, editorConfig.features.markdownTransformers])\n\n return null\n}\n", "'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useEffect } from 'react'\n\nimport { useRichTextView } from '../../../field/RichTextViewProvider.js'\nimport { clearEditorNodeViews, registerEditorNodeViews } from '../../nodes/index.js'\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 }, [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 { useTranslation } from '@payloadcms/ui'\n\nimport './ContentEditable.css'\n\nimport * as React from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../config/types.js'\n\nexport function LexicalContentEditable({\n className,\n editorConfig,\n}: {\n className?: string\n editorConfig: SanitizedClientEditorConfig\n}): JSX.Element {\n const { t } = useTranslation<{}, string>()\n const [_, { getTheme }] = useLexicalComposerContext()\n const theme = getTheme()\n\n return (\n <ContentEditable\n aria-placeholder={t('lexical:general:placeholder')}\n className={className ?? 'ContentEditable__root'}\n placeholder={\n <p className={theme?.placeholder}>\n {editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')}\n </p>\n }\n />\n )\n}\n", "'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 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,OACEA,sBAAAA,GACAC,oBAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,cAAAA,GACAC,yBAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,kBAAAA,GACAC,YAAAA,GACAC,aAAAA,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,wDCrBP,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,gBAAAA,GAAcC,wBAAAA,GAAsBC,iBAAAA,OAAqB,UAClE,UAAYC,MAAW,QACvB,OAASC,aAAAA,GAAWC,YAAAA,OAAgB,iDCRpC,MAAkB,QAIX,IAAMC,EAIRA,CAAC,CAAEC,WAAAA,EAAYC,YAAAA,EAAaC,OAAAA,CAAM,IACjCA,EAAOC,WAAa,sBAAwBH,EAE5CE,EAAOE,WAAaC,GAACH,EAAOE,UAAS,CAACJ,WAAYA,EAAYC,YAAaA,IAKxEC,EAAOE,WAAaC,GAACH,EAAOE,UAAS,CAACH,YAAaA,ICjB5D,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BzB,IAAMkC,CAAAA,IAAoB2B,EAAAG,GAAA,iBAOnD9C,WAEF8C,EAAAA,GAAA,CACCC,YAAAtE,EACAuE,KAAAlE,yBApCC4E,GAAA,CAyCX,MAAAC,CAEA,EAAA,CAA0BA,OAAAA,GAAAA,MAAAA,CAAsB,UAAA,gBAC9C,KAAA,QACOpF,SAAA,CAAUoE,EAAA,IAAA,CAAgBiB,SAAK,kCACjC,mBACIlB,WAAgBiB,aAAA,MAAAA,EAAA,QAAA,OAAAA,CAAA,GAAM",
6
+ "names": ["BulkUploadProvider", "FieldDescription", "FieldError", "FieldLabel", "isFieldRTL", "RenderCustomComponent", "useConfig", "useEditDepth", "useEffectEvent", "useField", "useLocale", "mergeFieldStyles", "dequal", "React", "useCallback", "useEffect", "useMemo", "useState", "ErrorBoundary", "LexicalComposer", "useEditDepth", "React", "useMemo", "c", "_c", "useLexicalComposerContext", "LexicalErrorBoundary", "HistoryPlugin", "OnChangePlugin", "RichTextPlugin", "useLexicalEditable", "BLUR_COMMAND", "COMMAND_PRIORITY_LOW", "FOCUS_COMMAND", "React", "useEffect", "useState", "EditorPlugin", "anchorElem", "clientProps", "plugin", "position", "Component", "_jsx", "c", "_c", "copyToClipboard", "useLexicalComposerContext", "objectKlassEquals", "ObjectID", "$getSelection", "$isNodeSelection", "COMMAND_PRIORITY_LOW", "COPY_COMMAND", "useEffect", "changeIds", "node", "fields", "id", "default", "toHexString", "children", "child", "ClipboardPlugin", "$", "editor", "t0", "t1", "registerCommand", "event", "selection", "serializedNode", "getNodes", "exportJSON", "deepCloneSerializedNode", "JSON", "parse", "stringify", "lexicalClipboardData", "namespace", "_config", "nodes", "stringifiedLexicalClipboardData", "catch", "_temp", "ClipboardEvent", "then", "clipboardData", "Error", "lexicalStringified", "getData", "lexical", "node_0", "stringified", "setData", "error_0", "error", "c", "_c", "useLexicalComposerContext", "$findMatchingParent", "mergeRegister", "$createNodeSelection", "$getEditor", "$getNearestNodeFromDOMNode", "$getSelection", "$isDecoratorNode", "$isElementNode", "$isLineBreakNode", "$isNodeSelection", "$isRangeSelection", "$isRootOrShadowRoot", "$isTextNode", "$setSelection", "CLICK_COMMAND", "COMMAND_PRIORITY_LOW", "KEY_ARROW_DOWN_COMMAND", "KEY_ARROW_UP_COMMAND", "KEY_BACKSPACE_COMMAND", "KEY_DELETE_COMMAND", "SELECTION_CHANGE_COMMAND", "useEffect", "DecoratorPlugin", "$", "editor", "$onDelete", "t0", "t1", "_temp3", "_temp4", "_temp6", "_temp8", "event_2", "selection_1", "selection", "event", "preventDefault", "getNodes", "nextSibling", "element_0", "$selectDecorator", "element", "firstDescendant", "INTERNAL_$isBlock", "block_0", "block", "lastPoint", "isBackward", "lastNode", "_temp7", "lastSelectedBlock", "getNextSibling", "nextBlock", "nextBlockElement", "node_1", "event_1", "selection_0", "prevSibling", "lastDescendant", "selectStart", "firstPoint", "firstNode", "_temp5", "firstSelectedBlock", "getPreviousSibling", "prevBlock", "prevBlockElement", "node_0", "decorator_0", "$getSelectedDecorator", "document", "decorator", "event_0", "querySelector", "classList", "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", "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", "node", "handleAddClick", "useCallback", "hoveredElementToUse", "isEmptyParagraph", "$createParagraphNode", "setTimeout", "newParagraph", "update", "ENABLE_SLASH_MENU_COMMAND", "dispatchCommand", "event_0", "stopPropagation", "preventDefault", "_jsx", "createPortal", "className", "event_1", "onClick", "ref", "type", "AddBlockHandlePlugin", "t0", "t1", "useLexicalComposerContext", "useLexicalComposerContext", "eventFiles", "$getNearestNodeFromDOMNode", "$getNodeByKey", "isHTMLElement", "React", "useEffect", "useRef", "useState", "createPortal", "TARGET_LINE_HALF_HEIGHT", "TEXT_BOX_HORIZONTAL_PADDING", "animationTimer", "setTargetLine", "offsetWidth", "offsetLeft", "targetLineElem", "targetBlockElem", "lastTargetBlock", "mouseY", "anchorElem", "event", "debugHighlightRef", "isFoundNodeEmptyParagraph", "height", "targetBlockElemHeight", "top", "targetBlockElemTop", "getBoundingClientRect", "anchorTop", "width", "anchorWidth", "marginBottom", "marginTop", "getCollapsedMargins", "lineTop", "isBelow", "window", "scrollY", "willStayInSamePosition", "elem", "nextElementSibling", "previousElementSibling", "lastBoundingBoxPosition", "boundingBox", "y", "currentBoundingBoxPosition", "targetElemTranslate2", "TARGET_LINE_HALF_HEIGHT", "left", "TEXT_BOX_HORIZONTAL_PADDING", "style", "opacity", "transform", "DRAGGABLE_BLOCK_MENU_CLASSNAME", "prevIndex", "DRAG_DATA_FORMAT", "keysLength", "getCurrentIndex", "setDragImage", "dataTransfer", "draggableBlockElem", "transform", "setTimeout", "hideTargetLine", "targetLineElem", "lastTargetBlockElem", "style", "marginBottom", "useDraggableBlockMenu", "editor", "anchorElem", "isEditable", "scrollerElem", "menuRef", "useRef", "targetLineRef", "debugHighlightRef", "isDraggingBlockRef", "highlightTimersRef", "useState", "setDraggableBlockElem", "editorConfig", "useEditorConfigContext", "useEffect", "blockHandleHorizontalOffset", "target", "onDocumentMouseMove", "isHTMLElement", "event", "distanceFromScrollerElem", "calculateDistanceFromScrollerElem", "isOnHandleElement", "topLevelNodeKeys", "getTopLevelNodeKeys", "_draggableBlockElem", "blockElem", "foundAtIndex", "isFoundNodeEmptyParagraph", "cache_threshold", "horizontalOffset", "point", "Point", "startIndex", "useEdgeAsDefault", "document", "addEventListener", "setHandlePosition", "onDragover", "event_0", "isFileTransfer", "eventFiles", "pageY", "target_0", "distanceFromScrollerElem_0", "targetBlockElem", "fuzzy", "foundAtIndex_0", "preventDefault", "dropEffect", "isBelow", "willStayInSamePosition", "setTargetLine", "setLastTargetBlock", "boundingBox", "elem", "lastTargetBlock", "onDrop", "event_1", "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", "removeEventListener", "current", "dataTransfer_0", "nodeKey", "node", "onDragEnd", "createPortal", "_jsxs", "draggable", "onDragStart", "ref", "type", "_jsx", "DraggableBlockPlugin", "t0", "t1", "useLexicalComposerContext", "c", "_c", "useLexicalComposerContext", "$createParagraphNode", "$getRoot", "baseClass", "useEditorConfigContext", "$", "_c", "InsertParagraphAtEndPlugin", "editor", "useLexicalComposerContext", "editorConfig", "t0", "_jsx", "className", "onClick", "role", "tabIndex", "children", "_temp", "paragraphNode", "$createParagraphNode", "$getRoot", "append", "c", "_c", "useLexicalComposerContext", "React", "MarkdownShortcutPlugin", "$", "_c", "editorConfig", "useEditorConfigContext", "editor", "useLexicalComposerContext", "t0", "t1", "features", "markdownTransformers", "registerMarkdownShortcuts", "useEffect", "c", "_c", "useLexicalComposerContext", "useEffect", "NodeViewOverridePlugin", "$", "_c", "editor", "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", "useTranslation", "React", "t0", "$", "LexicalContentEditable", "className", "editorConfig", "t", "getTheme", "t1", "t2", "theme", "_jsx", "placeholder", "LexicalContentEditable", "$", "_c", "LexicalEditor", "editorConfig", "editorContainerRef", "isSmallWidthViewport", "onChange", "rtl", "props", "useEditorConfigContext", "editorConfigContext", "isEditable", "useLexicalComposerContext", "useLexicalEditable", "useState", "t0", "_floatingAnchorElem", "setFloatingAnchorElem", "onRef", "t1", "t2", "editor", "console", "parentEditor", "handleFocus", "handleBlur", "unregisterFocus", "FOCUS_COMMAND", "COMMAND_PRIORITY_LOW", "BLUR_COMMAND", "unregisterBlur", "useEffect", "t3", "floatingAnchorElem", "_jsxs", "React", "_temp", "children", "className", "dir", "ref", "_temp2", "_jsx", "RichTextPlugin", "features", "contentEditable", "NormalizeSelectionPlugin", "ignoreSelectionChange", "editor_0", "tags", "editorState", "Fragment", "DraggableBlockPlugin", "anchorElem", "plugin_1", "plugins", "plugin", "position", "EditorPlugin", "clientProps", "SlashMenuPlugin", "MarkdownShortcutPlugin", "HistoryPlugin", "markdownTransformers", "_temp4", "length", "map", "_temp3", "plugin_0", "plugin_2", "plugin_3", "_temp5", "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", "filter", "_jsx", "currentViewLabel", "className", "Popup", "children", "button", "type", "ChevronIcon", "horizontalAlign", "render", "t2", "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", "useLocale", "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", "view", "style", "_jsx", "FieldLabel", "ViewSelector", "RenderCustomComponent", "CustomComponent", "Fallback", "fallbackRender", "BulkUploadProvider", "onReset", "LexicalProvider", "drawerSlugPrefix", "composerKey", "fieldProps", "handleChange", "onChange", "pathWithEditDepth", "error", "role"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";import{a as b}from"./chunk-DBWINSQN.js";import{a as R}from"./chunk-WSAPGI3Z.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-YCPAKOL7.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 && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],
5
+ "mappings": "+IAGA,OAASA,6BAAAA,MAAiC,2CAC1C,OAASC,sBAAAA,MAA0B,oCACnC,OAASC,kBAAAA,MAAsB,2BAC/B,OAASC,UAAAA,EAAQC,aAAAA,EAAWC,iBAAAA,EAAeC,kBAAAA,MAAsB,iBACjE,OAASC,iBAAAA,EAAeC,iBAAAA,EAAeC,oBAAAA,EAAkBC,qBAAAA,MAAyB,UAClF,OAASC,kBAAAA,MAAsB,iBAC/B,OAAOC,GAASC,eAAAA,EAAaC,aAAAA,EAAWC,cAAAA,EAAYC,UAAAA,EAAQC,YAAAA,MAAgB,QAM5E,IAAAC,EAASC,CAET,MAAMD,GAENE,GAAAC,GAAA,CASA,GAAO,CACL,UAAMC,EACJC,KAAAA,CACAC,WAAAA,EAAQC,MAAAA,GAAiB,QAAAC,GACzBA,EAAO,GACLL,OAAAM,GAAA,SAE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", "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
+ }