@payloadcms/richtext-lexical 3.85.0 → 4.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (934) 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-RZL743CS.js +2 -0
  7. package/dist/exports/client/RelationshipComponent-RZL743CS.js.map +7 -0
  8. package/dist/exports/client/bundled.css +1 -1
  9. package/dist/exports/client/chunk-5VIL27GI.js +2 -0
  10. package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
  11. package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  12. package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
  13. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  14. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  15. package/dist/exports/client/chunk-UD4DQ4AK.js +2 -0
  16. package/dist/exports/client/chunk-UD4DQ4AK.js.map +7 -0
  17. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  18. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  19. package/dist/exports/client/chunk-XIJE2UCQ.js +2 -0
  20. package/dist/exports/client/chunk-XIJE2UCQ.js.map +7 -0
  21. package/dist/exports/client/component-KESPRYJR.js +2 -0
  22. package/dist/exports/client/component-KESPRYJR.js.map +7 -0
  23. package/dist/exports/client/componentInline-R2RSJX4K.js +2 -0
  24. package/dist/exports/client/index.d.ts +0 -2
  25. package/dist/exports/client/index.d.ts.map +1 -1
  26. package/dist/exports/client/index.js +30 -30
  27. package/dist/exports/client/index.js.map +4 -4
  28. package/dist/exports/react/index.d.ts +1 -1
  29. package/dist/exports/react/index.d.ts.map +1 -1
  30. package/dist/exports/react/index.js.map +1 -1
  31. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  32. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  33. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  34. package/dist/features/blockquote/server/index.d.ts +1 -1
  35. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  36. package/dist/features/blockquote/server/index.js +0 -39
  37. package/dist/features/blockquote/server/index.js.map +1 -1
  38. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  39. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  40. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  41. package/dist/features/blocks/client/component/index.css +178 -0
  42. package/dist/features/blocks/client/component/index.d.ts +3 -2
  43. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  44. package/dist/features/blocks/client/component/index.js +88 -24
  45. package/dist/features/blocks/client/component/index.js.map +1 -1
  46. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  47. package/dist/features/blocks/client/componentInline/index.css +85 -0
  48. package/dist/features/blocks/client/componentInline/index.d.ts +3 -2
  49. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  50. package/dist/features/blocks/client/componentInline/index.js +33 -13
  51. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  52. package/dist/features/blocks/client/index.d.ts.map +1 -1
  53. package/dist/features/blocks/client/index.js +0 -2
  54. package/dist/features/blocks/client/index.js.map +1 -1
  55. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  56. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +1 -1
  57. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  58. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  59. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +1 -1
  60. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  62. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  63. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  64. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  65. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  66. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  67. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  68. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  69. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  70. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  71. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  72. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  73. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  74. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  75. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  76. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  77. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  78. package/dist/features/blocks/server/index.js +1 -1
  79. package/dist/features/blocks/server/index.js.map +1 -1
  80. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  81. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -1
  82. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  83. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  84. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +1 -1
  85. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  86. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  87. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  88. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  89. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  90. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  91. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  92. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  93. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  94. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  95. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  96. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  97. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  98. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  99. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  100. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  101. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  102. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  103. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  104. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  105. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  107. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  110. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  112. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  113. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  115. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  116. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  117. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  118. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  123. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/types.d.ts +1 -1
  129. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  131. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  132. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  134. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  135. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  137. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  138. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  140. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  141. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  143. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  144. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  146. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  147. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  149. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  151. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  152. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  155. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  157. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  158. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  159. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  160. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  165. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  170. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +1 -1
  171. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  173. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +2 -2
  174. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  175. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  176. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  177. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  178. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  179. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  180. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  182. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  183. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  185. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  186. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  188. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  189. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  190. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  191. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  192. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  193. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  194. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  195. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  196. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  197. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  198. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  199. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  200. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  201. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  202. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  204. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  207. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  209. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  211. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  215. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +1 -1
  216. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  217. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  218. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  219. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  220. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  221. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +1 -1
  222. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  223. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  224. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  225. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  226. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  227. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  228. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  229. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  230. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  231. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  232. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  233. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  234. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  235. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  236. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  237. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  238. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  239. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  240. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  241. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  242. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  243. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  244. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  245. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  246. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  247. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  248. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  249. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  250. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  251. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  252. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  253. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  254. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  255. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  256. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  257. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  258. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  259. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  260. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  261. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  262. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  263. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  264. package/dist/features/experimental_table/server/index.d.ts +1 -1
  265. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  266. package/dist/features/experimental_table/server/index.js +0 -102
  267. package/dist/features/experimental_table/server/index.js.map +1 -1
  268. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  269. package/dist/features/heading/server/index.d.ts +1 -1
  270. package/dist/features/heading/server/index.d.ts.map +1 -1
  271. package/dist/features/heading/server/index.js +0 -39
  272. package/dist/features/heading/server/index.js.map +1 -1
  273. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  274. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  275. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  276. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  277. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  278. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  279. package/dist/features/horizontalRule/server/index.js +0 -8
  280. package/dist/features/horizontalRule/server/index.js.map +1 -1
  281. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  282. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  283. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  284. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  285. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  286. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  287. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  288. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  289. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  290. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  291. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  292. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  293. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  294. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  295. package/dist/features/link/nodes/types.d.ts +1 -1
  296. package/dist/features/link/nodes/types.d.ts.map +1 -1
  297. package/dist/features/link/nodes/types.js.map +1 -1
  298. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  299. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  300. package/dist/features/link/server/index.d.ts.map +1 -1
  301. package/dist/features/link/server/index.js +0 -71
  302. package/dist/features/link/server/index.js.map +1 -1
  303. package/dist/features/link/server/validate.d.ts.map +1 -1
  304. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  305. package/dist/features/lists/checklist/server/index.js +0 -7
  306. package/dist/features/lists/checklist/server/index.js.map +1 -1
  307. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  308. package/dist/features/lists/orderedList/server/index.js +0 -7
  309. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  310. package/dist/features/lists/plugin/index.d.ts +1 -1
  311. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  312. package/dist/features/lists/plugin/index.js.map +1 -1
  313. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  314. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  315. package/dist/features/lists/unorderedList/server/index.js +0 -7
  316. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  317. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  318. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  319. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  320. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  321. package/dist/features/relationship/client/components/index.css +112 -0
  322. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  323. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  324. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  325. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -1
  326. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  327. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  328. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  329. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  330. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  331. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  332. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  333. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  334. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  335. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  336. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  337. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  338. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  339. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  340. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  341. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  342. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  343. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  344. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  345. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  346. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  347. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  348. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  349. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  350. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  351. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  352. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  353. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  354. package/dist/features/toolbars/types.d.ts +5 -1
  355. package/dist/features/toolbars/types.d.ts.map +1 -1
  356. package/dist/features/toolbars/types.js.map +1 -1
  357. package/dist/features/typesClient.d.ts +1 -1
  358. package/dist/features/typesClient.d.ts.map +1 -1
  359. package/dist/features/typesClient.js.map +1 -1
  360. package/dist/features/typesServer.d.ts +3 -20
  361. package/dist/features/typesServer.d.ts.map +1 -1
  362. package/dist/features/typesServer.js.map +1 -1
  363. package/dist/features/upload/client/component/index.css +214 -0
  364. package/dist/features/upload/client/component/index.d.ts +1 -1
  365. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  366. package/dist/features/upload/client/component/index.js +86 -63
  367. package/dist/features/upload/client/component/index.js.map +1 -1
  368. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  369. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  370. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  371. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  372. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  373. package/dist/features/upload/server/index.d.ts.map +1 -1
  374. package/dist/features/upload/server/index.js +0 -78
  375. package/dist/features/upload/server/index.js.map +1 -1
  376. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -1
  377. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  378. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  379. package/dist/features/upload/server/validate.d.ts.map +1 -1
  380. package/dist/field/Diff/converters/link.d.ts +1 -1
  381. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  382. package/dist/field/Diff/converters/link.js.map +1 -1
  383. package/dist/field/Diff/converters/listitem/index.css +80 -0
  384. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  385. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  386. package/dist/field/Diff/converters/listitem/index.js +1 -0
  387. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  388. package/dist/field/Diff/converters/relationship/index.css +108 -0
  389. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  390. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  391. package/dist/field/Diff/converters/relationship/index.js +11 -28
  392. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  393. package/dist/field/Diff/converters/unknown/index.css +37 -0
  394. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  395. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  396. package/dist/field/Diff/converters/unknown/index.js +1 -0
  397. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  398. package/dist/field/Diff/converters/upload/index.css +175 -0
  399. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  400. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  401. package/dist/field/Diff/converters/upload/index.js +7 -2
  402. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  403. package/dist/field/Diff/index.css +156 -0
  404. package/dist/field/Diff/index.d.ts +1 -1
  405. package/dist/field/Diff/index.d.ts.map +1 -1
  406. package/dist/field/Diff/index.js +1 -0
  407. package/dist/field/Diff/index.js.map +1 -1
  408. package/dist/field/Field.d.ts +3 -3
  409. package/dist/field/Field.d.ts.map +1 -1
  410. package/dist/field/Field.js +12 -11
  411. package/dist/field/Field.js.map +1 -1
  412. package/dist/field/RenderLexical/index.d.ts +2 -2
  413. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  414. package/dist/field/RenderLexical/index.js.map +1 -1
  415. package/dist/field/RichTextViewProvider.d.ts +1 -1
  416. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  417. package/dist/field/RichTextViewProvider.js.map +1 -1
  418. package/dist/field/ViewSelector.css +32 -0
  419. package/dist/field/ViewSelector.d.ts +1 -1
  420. package/dist/field/ViewSelector.d.ts.map +1 -1
  421. package/dist/field/ViewSelector.js +1 -0
  422. package/dist/field/ViewSelector.js.map +1 -1
  423. package/dist/field/bundled.css +1 -1
  424. package/dist/field/index.css +60 -0
  425. package/dist/field/index.d.ts +1 -1
  426. package/dist/field/index.d.ts.map +1 -1
  427. package/dist/field/index.js.map +1 -1
  428. package/dist/field/rscEntry.d.ts +1 -1
  429. package/dist/field/rscEntry.d.ts.map +1 -1
  430. package/dist/field/rscEntry.js.map +1 -1
  431. package/dist/hooks.d.ts +6 -0
  432. package/dist/hooks.d.ts.map +1 -0
  433. package/dist/hooks.js +548 -0
  434. package/dist/hooks.js.map +1 -0
  435. package/dist/index.d.ts +3 -13
  436. package/dist/index.d.ts.map +1 -1
  437. package/dist/index.js +20 -628
  438. package/dist/index.js.map +1 -1
  439. package/dist/lexical/LexicalEditor.css +50 -0
  440. package/dist/lexical/LexicalEditor.d.ts +1 -1
  441. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  442. package/dist/lexical/LexicalEditor.js +1 -0
  443. package/dist/lexical/LexicalEditor.js.map +1 -1
  444. package/dist/lexical/LexicalProvider.d.ts +1 -1
  445. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  446. package/dist/lexical/LexicalProvider.js.map +1 -1
  447. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  448. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  449. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  450. package/dist/lexical/config/client/loader.d.ts +1 -1
  451. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  452. package/dist/lexical/config/client/loader.js.map +1 -1
  453. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  454. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  455. package/dist/lexical/config/client/sanitize.js.map +1 -1
  456. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  457. package/dist/lexical/config/server/loader.js +12 -9
  458. package/dist/lexical/config/server/loader.js.map +1 -1
  459. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  460. package/dist/lexical/config/server/sanitize.js +3 -9
  461. package/dist/lexical/config/server/sanitize.js.map +1 -1
  462. package/dist/lexical/config/types.d.ts +1 -1
  463. package/dist/lexical/config/types.d.ts.map +1 -1
  464. package/dist/lexical/config/types.js.map +1 -1
  465. package/dist/lexical/nodes/index.d.ts +1 -1
  466. package/dist/lexical/nodes/index.d.ts.map +1 -1
  467. package/dist/lexical/nodes/index.js.map +1 -1
  468. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  469. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  470. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  471. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  472. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  473. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  474. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  475. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  476. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  477. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  478. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  479. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  480. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  481. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  482. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  483. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  484. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  485. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  486. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  487. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  488. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  489. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  490. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  491. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  492. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  493. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  494. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  495. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  496. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  497. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  498. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  499. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  500. package/dist/lexical/theme/EditorTheme.css +359 -0
  501. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  502. package/dist/lexical/theme/EditorTheme.js +1 -0
  503. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  504. package/dist/lexical/ui/ContentEditable.css +95 -0
  505. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  506. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  507. package/dist/lexical/ui/ContentEditable.js +1 -0
  508. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  509. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  510. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  511. package/dist/lexical/ui/icons/Add/index.js +19 -12
  512. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  513. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  514. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  515. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  516. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  517. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  518. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  519. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  520. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  521. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  522. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  523. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  524. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  525. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  526. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  527. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  528. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  529. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  530. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  531. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  532. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  533. package/dist/lexical/ui/icons/Block/index.js +13 -28
  534. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  535. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  536. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  537. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  538. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  539. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  540. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  541. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  542. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  543. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  544. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  545. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  546. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  547. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  548. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  549. package/dist/lexical/ui/icons/Code/index.js +15 -13
  550. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  551. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  552. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  553. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  554. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  555. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  556. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  557. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  558. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  559. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  560. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  561. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  562. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  563. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  564. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  565. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  566. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  567. package/dist/lexical/ui/icons/H1/index.js +9 -6
  568. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  569. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  570. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  571. package/dist/lexical/ui/icons/H2/index.js +9 -6
  572. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  573. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  574. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  575. package/dist/lexical/ui/icons/H3/index.js +9 -6
  576. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  577. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  578. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  579. package/dist/lexical/ui/icons/H4/index.js +9 -6
  580. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  582. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  583. package/dist/lexical/ui/icons/H5/index.js +9 -6
  584. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  585. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  586. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  587. package/dist/lexical/ui/icons/H6/index.js +9 -6
  588. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  589. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  590. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  591. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  592. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  593. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  594. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  595. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  596. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  597. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  598. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  599. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  600. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  601. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  602. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  603. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  604. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  606. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  607. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  608. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  609. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  610. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  611. package/dist/lexical/ui/icons/Link/index.js +14 -9
  612. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  613. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  614. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  615. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  616. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  617. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  618. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  619. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  620. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  621. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  622. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  623. package/dist/lexical/ui/icons/Page/index.js +21 -0
  624. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  625. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  626. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  627. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  628. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  629. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  630. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  631. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  632. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  633. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  634. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  635. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  636. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  637. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  638. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  639. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  640. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  641. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  642. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  643. package/dist/lexical/ui/icons/Table/index.js +20 -15
  644. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  645. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  646. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  647. package/dist/lexical/ui/icons/Text/index.js +17 -8
  648. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  649. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  650. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  651. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  652. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  653. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  654. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  655. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  656. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  657. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  658. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  659. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  660. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  661. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  662. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  663. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  664. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  665. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  666. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  667. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  668. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  669. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  670. package/dist/{types.d.ts → types/index.d.ts} +9 -9
  671. package/dist/types/index.d.ts.map +1 -0
  672. package/dist/types/index.js +2 -0
  673. package/dist/types/index.js.map +1 -0
  674. package/dist/{nodeTypes.d.ts → types/nodeTypes.d.ts} +10 -10
  675. package/dist/types/nodeTypes.d.ts.map +1 -0
  676. package/dist/types/nodeTypes.js.map +1 -0
  677. package/dist/types/schema.d.ts +6 -0
  678. package/dist/types/schema.d.ts.map +1 -0
  679. package/dist/types/schema.js +81 -0
  680. package/dist/types/schema.js.map +1 -0
  681. package/dist/utilities/buildEditorState.d.ts +1 -1
  682. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  683. package/dist/utilities/buildEditorState.js +13 -0
  684. package/dist/utilities/buildEditorState.js.map +1 -1
  685. package/dist/utilities/buildInitialState.js.map +1 -1
  686. package/dist/utilities/createClientFeature.d.ts +1 -1
  687. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  688. package/dist/utilities/createClientFeature.js.map +1 -1
  689. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  690. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  691. package/dist/utilities/editorConfigFactory.js.map +1 -1
  692. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  693. package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
  694. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  695. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  696. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  697. package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
  698. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  699. package/dist/utilities/fieldsDrawer/index.css +12 -0
  700. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  701. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  702. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  703. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  704. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  705. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  706. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  707. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  708. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  709. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  710. package/dist/utilities/generateImportMap.d.ts +1 -1
  711. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  712. package/dist/utilities/generateImportMap.js.map +1 -1
  713. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  714. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  715. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  716. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  717. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  718. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  719. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  720. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  721. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  722. package/dist/validate/index.d.ts.map +1 -1
  723. package/package.json +15 -20
  724. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  725. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  726. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  727. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  728. package/dist/exports/client/Field-OVF2FPGD.js +0 -2
  729. package/dist/exports/client/Field-OVF2FPGD.js.map +0 -7
  730. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  731. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  732. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  733. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  734. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  735. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  736. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  737. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  738. package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
  739. package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
  740. package/dist/exports/client/chunk-XFA5M7FY.js +0 -2
  741. package/dist/exports/client/chunk-XFA5M7FY.js.map +0 -7
  742. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  743. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  744. package/dist/exports/client/componentInline-A4H3EY3L.js +0 -2
  745. package/dist/exports/server/migrate.d.ts +0 -16
  746. package/dist/exports/server/migrate.d.ts.map +0 -1
  747. package/dist/exports/server/migrate.js +0 -16
  748. package/dist/exports/server/migrate.js.map +0 -1
  749. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  750. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  751. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  752. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  753. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  754. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  755. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  756. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  757. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  758. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  759. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  760. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  761. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  762. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  763. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  764. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  765. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  766. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  767. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  768. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  769. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  770. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  771. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  772. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  773. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  774. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  775. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  776. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  777. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  778. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  779. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  780. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  781. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  782. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  783. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  784. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  785. package/dist/features/lists/htmlConverter.d.ts +0 -5
  786. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  787. package/dist/features/lists/htmlConverter.js +0 -81
  788. package/dist/features/lists/htmlConverter.js.map +0 -1
  789. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  790. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  791. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  792. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  793. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  794. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  795. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  796. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  797. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  798. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  799. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  800. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  801. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  802. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  803. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  804. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  805. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  806. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  807. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  808. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  809. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  810. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  811. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  812. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  813. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  814. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  815. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  816. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  817. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  818. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  819. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  820. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  821. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  822. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  823. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  824. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  825. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  826. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  827. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  828. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  829. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  830. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  831. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  832. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  833. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  834. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  835. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  836. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  837. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  838. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  839. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  840. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  841. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  842. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  843. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  844. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  845. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  846. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  847. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  848. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  849. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  850. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  851. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  852. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  853. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  854. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  855. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  856. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  857. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  858. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  859. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  860. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  861. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  862. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  863. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  864. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  865. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  866. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  867. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  868. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  869. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  870. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  871. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  872. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  873. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  874. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  875. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  876. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  877. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  878. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  879. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  880. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  881. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  882. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  883. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  884. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  885. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  886. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  887. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  888. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  889. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  890. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  891. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  892. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  893. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  894. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  895. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  896. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  897. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  898. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  899. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  900. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  901. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  902. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  903. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  904. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  905. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  906. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  907. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  908. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  909. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  910. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  911. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  912. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  913. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  914. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  915. package/dist/lexical/ui/icons/AI/index.js +0 -34
  916. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  917. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  918. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  919. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  920. package/dist/nodeTypes.d.ts.map +0 -1
  921. package/dist/nodeTypes.js.map +0 -1
  922. package/dist/types.d.ts.map +0 -1
  923. package/dist/types.js +0 -2
  924. package/dist/types.js.map +0 -1
  925. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  926. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  927. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  928. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  929. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  930. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  931. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  932. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  933. /package/dist/exports/client/{componentInline-A4H3EY3L.js.map → componentInline-R2RSJX4K.js.map} +0 -0
  934. /package/dist/{nodeTypes.js → types/nodeTypes.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","$findMatchingParent","mergeRegister","getTranslation","CloseMenuIcon","EditIcon","ExternalLinkIcon","formatDrawerSlug","useConfig","useEditDepth","useLocale","useTranslation","requests","$getSelection","$isLineBreakNode","$isRangeSelection","COMMAND_PRIORITY_HIGH","COMMAND_PRIORITY_LOW","getDOMSelection","KEY_ESCAPE_COMMAND","SELECTION_CHANGE_COMMAND","formatAdminURL","React","useCallback","useEffect","useLayoutEffect","useRef","useState","useEditorConfigContext","getSelectedNode","setFloatingElemPositionForLinkEditor","FieldsDrawer","useLexicalDrawer","$isAutoLinkNode","$createLinkNode","$isLinkNode","TOGGLE_LINK_COMMAND","TOGGLE_LINK_WITH_MODAL_COMMAND","preventDefault","event","LinkEditor","anchorElem","editor","linkNode","setLinkNode","editorRef","selectedNodeRectRef","linkUrl","setLinkUrl","linkLabel","setLinkLabel","fieldProps","schemaPath","uuid","isEditable","config","getEntityConfig","i18n","t","stateData","setStateData","editDepth","isLink","setIsLink","selectedNodes","setSelectedNodes","locale","isAutoLink","setIsAutoLink","drawerSlug","slug","depth","toggleDrawer","setNotLink","current","style","opacity","transform","undefined","$updateLinkEditor","selection","selectedNodeDomRect","focusNode","getElementByKey","getKey","getBoundingClientRect","focusLinkParent","badNode","getNodes","filter","node","find","is","fields","getFields","data","id","getID","text","getTextContent","linkType","url","routes","admin","doc","relationTo","value","relatedField","collectionSlug","label","String","collection","Error","loadingLabel","labels","singular","replace","get","apiRoute","api","path","serverURL","headers","language","params","code","then","res","ok","status","json","useAsTitle","title","catch","editorElem","nativeSelection","_window","activeElement","document","rootElement","getRootElement","contains","anchorNode","getRangeAt","y","className","registerCommand","payload","dispatchCommand","scrollerElem","parentElement","update","getEditorState","read","window","addEventListener","removeEventListener","registerUpdateListener","editorState","_jsxs","Fragment","_jsx","ref","length","href","rel","target","__fields","newTab","_Fragment","onClick","onMouseDown","tabIndex","type","drawerTitle","featureKey","handleDrawerSubmit","newLinkPayload","bareLinkFields","linkParent","getParent","schemaPathSuffix"],"sources":["../../../../../../../src/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.tsx"],"sourcesContent":["'use client'\nimport type { ElementNode, LexicalNode } from 'lexical'\nimport type { Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n CloseMenuIcon,\n EditIcon,\n ExternalLinkIcon,\n formatDrawerSlug,\n useConfig,\n useEditDepth,\n useLocale,\n useTranslation,\n} from '@payloadcms/ui'\nimport { requests } from '@payloadcms/ui/shared'\nimport {\n $getSelection,\n $isLineBreakNode,\n $isRangeSelection,\n COMMAND_PRIORITY_HIGH,\n COMMAND_PRIORITY_LOW,\n getDOMSelection,\n KEY_ESCAPE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { LinkNode } from '../../../../nodes/LinkNode.js'\nimport type { LinkFields } from '../../../../nodes/types.js'\nimport type { LinkPayload } from '../types.js'\n\nimport { useEditorConfigContext } from '../../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { getSelectedNode } from '../../../../../../lexical/utils/getSelectedNode.js'\nimport { setFloatingElemPositionForLinkEditor } from '../../../../../../lexical/utils/setFloatingElemPositionForLinkEditor.js'\nimport { FieldsDrawer } from '../../../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDrawer } from '../../../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { $isAutoLinkNode } from '../../../../nodes/AutoLinkNode.js'\nimport { $createLinkNode, $isLinkNode, TOGGLE_LINK_COMMAND } from '../../../../nodes/LinkNode.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './commands.js'\n\nfunction preventDefault(\n event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLElement>,\n): void {\n event.preventDefault()\n}\n\nexport function LinkEditor({ anchorElem }: { anchorElem: HTMLElement }): React.ReactNode {\n const [editor] = useLexicalComposerContext()\n // TO-DO: There are several states that should not be state, because they\n // are derived from linkNode (linkUrl, linkLabel, stateData, isLink, isAutoLink...)\n const [linkNode, setLinkNode] = useState<LinkNode>()\n\n const editorRef = useRef<HTMLDivElement | null>(null)\n const selectedNodeRectRef = useRef<DOMRect | null>(null)\n const [linkUrl, setLinkUrl] = useState<null | string>(null)\n const [linkLabel, setLinkLabel] = useState<null | string>(null)\n\n const {\n fieldProps: { schemaPath },\n uuid,\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n\n const { config, getEntityConfig } = useConfig()\n\n const { i18n, t } = useTranslation<object, 'lexical:link:loadingWithEllipsis'>()\n\n const [stateData, setStateData] = useState<\n ({ id?: string; text: string } & LinkFields) | undefined\n >()\n\n const editDepth = useEditDepth()\n const [isLink, setIsLink] = useState(false)\n const [selectedNodes, setSelectedNodes] = useState<LexicalNode[]>([])\n const locale = useLocale()\n\n const [isAutoLink, setIsAutoLink] = useState(false)\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-link-` + uuid,\n depth: editDepth,\n })\n\n const { toggleDrawer } = useLexicalDrawer(drawerSlug)\n\n const setNotLink = useCallback(() => {\n setIsLink(false)\n if (editorRef && editorRef.current) {\n editorRef.current.style.opacity = '0'\n editorRef.current.style.transform = 'translate(-10000px, -10000px)'\n }\n setIsAutoLink(false)\n setLinkUrl(null)\n setLinkLabel(null)\n setSelectedNodes([])\n setStateData(undefined)\n }, [setIsLink, setLinkUrl, setLinkLabel, setSelectedNodes])\n\n const $updateLinkEditor = useCallback(() => {\n const selection = $getSelection()\n let selectedNodeDomRect: DOMRect | undefined\n\n if (!$isRangeSelection(selection) || !selection) {\n void setNotLink()\n return\n }\n\n // Handle the data displayed in the floating link editor & drawer when you click on a link node\n\n const focusNode = getSelectedNode(selection)\n selectedNodeDomRect = editor.getElementByKey(focusNode.getKey())?.getBoundingClientRect()\n const focusLinkParent = $findMatchingParent(focusNode, $isLinkNode)\n\n // Prevent link modal from showing if selection spans further than the link: https://github.com/facebook/lexical/issues/4064\n const badNode = selection\n .getNodes()\n .filter((node) => !$isLineBreakNode(node))\n .find((node) => {\n const linkNode = $findMatchingParent(node, $isLinkNode)\n return (\n (focusLinkParent && !focusLinkParent.is(linkNode)) ||\n (linkNode && !linkNode.is(focusLinkParent))\n )\n })\n\n if (focusLinkParent == null || badNode) {\n setNotLink()\n return\n }\n setLinkNode(focusLinkParent)\n\n const fields = focusLinkParent.getFields()\n\n // Initial state:\n const data: { text: string } & LinkFields = {\n ...fields,\n id: focusLinkParent.getID(),\n text: focusLinkParent.getTextContent(),\n }\n\n if (fields?.linkType === 'custom') {\n setLinkUrl(fields?.url ?? null)\n setLinkLabel(null)\n } else {\n // internal link\n setLinkUrl(\n `${config.routes.admin === '/' ? '' : config.routes.admin}/collections/${fields?.doc?.relationTo}/${\n fields?.doc?.value\n }`,\n )\n\n const relatedField = fields?.doc?.relationTo\n ? getEntityConfig({ collectionSlug: fields?.doc?.relationTo })\n : undefined\n if (!relatedField) {\n // Usually happens if the user removed all default fields. In this case, we let them specify the label or do not display the label at all.\n // label could be a virtual field the user added. This is useful if they want to use the link feature for things other than links.\n setLinkLabel(fields?.label ? String(fields?.label) : null)\n setLinkUrl(fields?.url ? String(fields?.url) : null)\n } else {\n const id = typeof fields.doc?.value === 'object' ? fields.doc.value.id : fields.doc?.value\n const collection = fields.doc?.relationTo\n if (!id || !collection) {\n throw new Error(`Focus link parent is missing doc.value or doc.relationTo`)\n }\n\n const loadingLabel = t('fields:linkedTo', {\n label: `${getTranslation(relatedField.labels.singular, i18n)} - ${t('lexical:link:loadingWithEllipsis', i18n)}`,\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(loadingLabel)\n\n requests\n .get(\n formatAdminURL({\n apiRoute: config.routes.api,\n path: `/${collection}/${id}`,\n serverURL: config.serverURL,\n }),\n {\n headers: {\n 'Accept-Language': i18n.language,\n },\n params: {\n depth: 0,\n locale: locale?.code,\n },\n },\n )\n .then(async (res) => {\n if (!res.ok) {\n throw new Error(`HTTP error! Status: ${res.status}`)\n }\n const data = await res.json()\n const useAsTitle = relatedField?.admin?.useAsTitle || 'id'\n const title = data[useAsTitle]\n const label = t('fields:linkedTo', {\n label: `${getTranslation(relatedField.labels.singular, i18n)} - ${title}`,\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(label)\n })\n .catch(() => {\n const label = t('fields:linkedTo', {\n label: `${getTranslation(relatedField.labels.singular, i18n)} - ${t('general:untitled', i18n)} - ID: ${id}`,\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(label)\n })\n }\n }\n\n setStateData(data)\n setIsLink(true)\n setSelectedNodes(selection ? selection?.getNodes() : [])\n\n if ($isAutoLinkNode(focusLinkParent)) {\n setIsAutoLink(true)\n } else {\n setIsAutoLink(false)\n }\n\n const editorElem = editorRef.current\n const nativeSelection = getDOMSelection(editor._window)\n const { activeElement } = document\n\n if (editorElem === null) {\n return\n }\n\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n if (!selectedNodeDomRect) {\n // Get the DOM rect of the selected node using the native selection. This sometimes produces the wrong\n // result, which is why we use lexical's selection preferably.\n selectedNodeDomRect = nativeSelection.getRangeAt(0).getBoundingClientRect()\n }\n\n if (selectedNodeDomRect != null) {\n selectedNodeDomRect.y += 40\n // Store the rect for positioning in useLayoutEffect after content renders\n selectedNodeRectRef.current = selectedNodeDomRect\n }\n } else if (activeElement == null || activeElement.className !== 'link-input') {\n if (rootElement !== null) {\n setFloatingElemPositionForLinkEditor(null, editorElem, anchorElem)\n }\n setLinkUrl(null)\n setLinkLabel(null)\n }\n\n return true\n }, [\n editor,\n setNotLink,\n config.routes.admin,\n config.routes.api,\n config.serverURL,\n getEntityConfig,\n t,\n i18n,\n locale?.code,\n anchorElem,\n ])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_WITH_MODAL_COMMAND,\n (payload: LinkPayload) => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, payload)\n\n // Now, open the modal\n $updateLinkEditor()\n toggleDrawer()\n\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, $updateLinkEditor, toggleDrawer, drawerSlug])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = (): void => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }\n\n window.addEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [anchorElem.parentElement, editor, $updateLinkEditor])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n void $updateLinkEditor()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n void $updateLinkEditor()\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ESCAPE_COMMAND,\n () => {\n if (isLink) {\n setNotLink()\n\n return true\n }\n return false\n },\n COMMAND_PRIORITY_HIGH,\n ),\n )\n }, [editor, $updateLinkEditor, isLink, setNotLink])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }, [editor, $updateLinkEditor])\n\n // Position the tooltip after React renders the link content\n useLayoutEffect(() => {\n if (!isLink || !editorRef.current || !anchorElem || !selectedNodeRectRef.current) {\n return\n }\n\n // Now the DOM has the actual link element, we can position the tooltip\n setFloatingElemPositionForLinkEditor(selectedNodeRectRef.current, editorRef.current, anchorElem)\n // linkNode dependency ensures re-positioning when clicking between different links with the same URL\n }, [linkUrl, linkLabel, isLink, anchorElem, linkNode])\n\n return (\n <React.Fragment>\n <div className=\"link-editor\" ref={editorRef}>\n <div className=\"link-input\">\n {linkUrl && linkUrl.length > 0 ? (\n <a href={linkUrl} rel=\"noopener noreferrer\" target=\"_blank\">\n {linkNode?.__fields.newTab ? <ExternalLinkIcon /> : null}\n {linkLabel != null && linkLabel.length > 0 ? linkLabel : linkUrl}\n </a>\n ) : linkLabel != null && linkLabel.length > 0 ? (\n <>\n {linkNode?.__fields.newTab ? <ExternalLinkIcon /> : null}\n <span className=\"link-input__label-pure\">{linkLabel}</span>\n </>\n ) : null}\n\n {isEditable && (\n <React.Fragment>\n <button\n aria-label=\"Edit link\"\n className=\"link-edit\"\n onClick={(event) => {\n event.preventDefault()\n toggleDrawer()\n }}\n onMouseDown={preventDefault}\n tabIndex={0}\n type=\"button\"\n >\n <EditIcon />\n </button>\n {!isAutoLink && (\n <button\n aria-label=\"Remove link\"\n className=\"link-trash\"\n onClick={() => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }}\n onMouseDown={preventDefault}\n tabIndex={0}\n type=\"button\"\n >\n <CloseMenuIcon />\n </button>\n )}\n </React.Fragment>\n )}\n </div>\n </div>\n <FieldsDrawer\n className=\"lexical-link-edit-drawer\"\n data={stateData}\n drawerSlug={drawerSlug}\n drawerTitle={t('fields:editLink')}\n featureKey=\"link\"\n handleDrawerSubmit={(fields: FormState, data: Data) => {\n const newLinkPayload = data as { text: string } & LinkFields\n\n const bareLinkFields: LinkFields = {\n ...newLinkPayload,\n }\n delete bareLinkFields.text\n\n // See: https://github.com/facebook/lexical/pull/5536. This updates autolink nodes to link nodes whenever a change was made (which is good!).\n editor.update(() => {\n const selection = $getSelection()\n let linkParent: ElementNode | null = null\n if ($isRangeSelection(selection)) {\n linkParent = getSelectedNode(selection).getParent()\n } else {\n if (selectedNodes.length) {\n linkParent = selectedNodes[0]?.getParent() ?? null\n }\n }\n\n if (linkParent && $isAutoLinkNode(linkParent)) {\n const linkNode = $createLinkNode({\n fields: bareLinkFields,\n })\n linkParent.replace(linkNode, true)\n }\n })\n\n // Needs to happen AFTER a potential auto link => link node conversion, as otherwise, the updated text to display may be lost due to\n // it being applied to the auto link node instead of the link node.\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: bareLinkFields,\n selectedNodes,\n text: newLinkPayload.text,\n })\n }}\n schemaPath={schemaPath}\n schemaPathSuffix=\"fields\"\n />\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,mBAAmB,EAAEC,aAAa,QAAQ;AACnD,SAASC,cAAc,QAAQ;AAC/B,SACEC,aAAa,EACbC,QAAQ,EACRC,gBAAgB,EAChBC,gBAAgB,EAChBC,SAAS,EACTC,YAAY,EACZC,SAAS,EACTC,cAAc,QACT;AACP,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,aAAA;;;;qBAOb6J,IAAA,CAAClI,YAAA;MACCkH,SAAA,EAAU;MACVlD,IAAA,EAAMpC,SAAA;MACNU,UAAA,EAAYA,UAAA;MACZyG,WAAA,EAAapH,CAAA,CAAE;MACfqH,UAAA,EAAW;MACXC,kBAAA,EAAoBA,CAACnF,QAAA,EAAmBE,MAAA;QACtC,MAAMkF,cAAA,GAAiBlF,MAAA;QAEvB,MAAMmF,cAAA,GAA6B;UACjC,GAAGD;QACL;QACA,OAAOC,cAAA,CAAehF,IAAI;QAE1B;QACAxD,MAAA,CAAO6G,MAAM,CAAC;UACZ,MAAMvE,WAAA,GAAYnE,aAAA;UAClB,IAAIsK,UAAA,GAAiC;UACrC,IAAIpK,iBAAA,CAAkBiE,WAAA,GAAY;YAChCmG,UAAA,GAAatJ,eAAA,CAAgBmD,WAAA,EAAWoG,SAAS;UACnD,OAAO;YACL,IAAIpH,aAAA,CAAcmG,MAAM,EAAE;cACxBgB,UAAA,GAAanH,aAAa,CAAC,EAAE,EAAEoH,SAAA,MAAe;YAChD;UACF;UAEA,IAAID,UAAA,IAAclJ,eAAA,CAAgBkJ,UAAA,GAAa;YAC7C,MAAMxI,UAAA,GAAWT,eAAA,CAAgB;cAC/B2D,MAAA,EAAQqF;YACV;YACAC,UAAA,CAAW/D,OAAO,CAACzE,UAAA,EAAU;UAC/B;QACF;QAEA;QACA;QACAD,MAAA,CAAO0G,eAAe,CAAChH,mBAAA,EAAqB;UAC1CyD,MAAA,EAAQqF,cAAA;UACRlH,aAAA;UACAkC,IAAA,EAAM+E,cAAA,CAAe/E;QACvB;MACF;MACA9C,UAAA,EAAYA,UAAA;MACZiI,gBAAA,EAAiB;;;AAIzB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","$findMatchingParent","mergeRegister","getTranslation","ExternalLinkIcon","formatDrawerSlug","useConfig","useEditDepth","useLocale","useTranslation","WriteIcon","requests","$getSelection","$isLineBreakNode","$isRangeSelection","COMMAND_PRIORITY_HIGH","COMMAND_PRIORITY_LOW","getDOMSelection","KEY_ESCAPE_COMMAND","SELECTION_CHANGE_COMMAND","formatAdminURL","React","useCallback","useEffect","useLayoutEffect","useRef","useState","useEditorConfigContext","LinkIcon","PageIcon","TrashIcon","getSelectedNode","setFloatingElemPositionForLinkEditor","FieldsDrawer","useLexicalDrawer","$isAutoLinkNode","$createLinkNode","$isLinkNode","TOGGLE_LINK_COMMAND","TOGGLE_LINK_WITH_MODAL_COMMAND","preventDefault","event","LinkEditor","anchorElem","editor","linkNode","setLinkNode","editorRef","selectedNodeRectRef","linkUrl","setLinkUrl","linkLabel","setLinkLabel","fieldProps","schemaPath","uuid","isEditable","config","getEntityConfig","i18n","t","stateData","setStateData","editDepth","isLink","setIsLink","selectedNodes","setSelectedNodes","locale","isAutoLink","setIsAutoLink","drawerSlug","slug","depth","toggleDrawer","setNotLink","current","style","opacity","transform","undefined","$updateLinkEditor","selection","selectedNodeDomRect","focusNode","getElementByKey","getKey","getBoundingClientRect","focusLinkParent","badNode","getNodes","filter","node","find","is","fields","getFields","data","id","getID","text","getTextContent","linkType","url","routes","admin","doc","relationTo","value","relatedField","collectionSlug","label","String","collection","Error","loadingLabel","labels","singular","replace","get","apiRoute","api","path","serverURL","headers","language","params","code","then","res","ok","status","json","useAsTitle","title","catch","editorElem","nativeSelection","_window","activeElement","document","rootElement","getRootElement","contains","anchorNode","getRangeAt","y","className","registerCommand","payload","dispatchCommand","scrollerElem","parentElement","update","getEditorState","read","window","addEventListener","removeEventListener","registerUpdateListener","editorState","_jsxs","Fragment","_jsx","ref","__fields","length","href","rel","target","newTab","_Fragment","size","onClick","onMouseDown","tabIndex","type","small","drawerTitle","featureKey","handleDrawerSubmit","newLinkPayload","bareLinkFields","linkParent","getParent","schemaPathSuffix"],"sources":["../../../../../../../src/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.tsx"],"sourcesContent":["'use client'\nimport type { ElementNode, LexicalNode } from 'lexical'\nimport type { Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { $findMatchingParent, mergeRegister } from '@lexical/utils'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n ExternalLinkIcon,\n formatDrawerSlug,\n useConfig,\n useEditDepth,\n useLocale,\n useTranslation,\n WriteIcon,\n} from '@payloadcms/ui'\nimport { requests } from '@payloadcms/ui/shared'\nimport {\n $getSelection,\n $isLineBreakNode,\n $isRangeSelection,\n COMMAND_PRIORITY_HIGH,\n COMMAND_PRIORITY_LOW,\n getDOMSelection,\n KEY_ESCAPE_COMMAND,\n SELECTION_CHANGE_COMMAND,\n} from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { LinkNode } from '../../../../nodes/LinkNode.js'\nimport type { LinkFields } from '../../../../nodes/types.js'\nimport type { LinkPayload } from '../types.js'\n\nimport { useEditorConfigContext } from '../../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { LinkIcon } from '../../../../../../lexical/ui/icons/Link/index.js'\nimport { PageIcon } from '../../../../../../lexical/ui/icons/Page/index.js'\nimport { TrashIcon } from '../../../../../../lexical/ui/icons/Trash/index.js'\nimport { getSelectedNode } from '../../../../../../lexical/utils/getSelectedNode.js'\nimport { setFloatingElemPositionForLinkEditor } from '../../../../../../lexical/utils/setFloatingElemPositionForLinkEditor.js'\nimport { FieldsDrawer } from '../../../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDrawer } from '../../../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { $isAutoLinkNode } from '../../../../nodes/AutoLinkNode.js'\nimport { $createLinkNode, $isLinkNode, TOGGLE_LINK_COMMAND } from '../../../../nodes/LinkNode.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './commands.js'\n\nfunction preventDefault(\n event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLElement>,\n): void {\n event.preventDefault()\n}\n\nexport function LinkEditor({ anchorElem }: { anchorElem: HTMLElement }): React.ReactNode {\n const [editor] = useLexicalComposerContext()\n // TO-DO: There are several states that should not be state, because they\n // are derived from linkNode (linkUrl, linkLabel, stateData, isLink, isAutoLink...)\n const [linkNode, setLinkNode] = useState<LinkNode>()\n\n const editorRef = useRef<HTMLDivElement | null>(null)\n const selectedNodeRectRef = useRef<DOMRect | null>(null)\n const [linkUrl, setLinkUrl] = useState<null | string>(null)\n const [linkLabel, setLinkLabel] = useState<null | string>(null)\n\n const {\n fieldProps: { schemaPath },\n uuid,\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n\n const { config, getEntityConfig } = useConfig()\n\n const { i18n, t } = useTranslation<object, 'lexical:link:loadingWithEllipsis'>()\n\n const [stateData, setStateData] = useState<\n ({ id?: string; text: string } & LinkFields) | undefined\n >()\n\n const editDepth = useEditDepth()\n const [isLink, setIsLink] = useState(false)\n const [selectedNodes, setSelectedNodes] = useState<LexicalNode[]>([])\n const locale = useLocale()\n\n const [isAutoLink, setIsAutoLink] = useState(false)\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-link-` + uuid,\n depth: editDepth,\n })\n\n const { toggleDrawer } = useLexicalDrawer(drawerSlug)\n\n const setNotLink = useCallback(() => {\n setIsLink(false)\n if (editorRef && editorRef.current) {\n editorRef.current.style.opacity = '0'\n editorRef.current.style.transform = 'translate(-10000px, -10000px)'\n }\n setIsAutoLink(false)\n setLinkUrl(null)\n setLinkLabel(null)\n setSelectedNodes([])\n setStateData(undefined)\n }, [setIsLink, setLinkUrl, setLinkLabel, setSelectedNodes])\n\n const $updateLinkEditor = useCallback(() => {\n const selection = $getSelection()\n let selectedNodeDomRect: DOMRect | undefined\n\n if (!$isRangeSelection(selection) || !selection) {\n void setNotLink()\n return\n }\n\n // Handle the data displayed in the floating link editor & drawer when you click on a link node\n\n const focusNode = getSelectedNode(selection)\n selectedNodeDomRect = editor.getElementByKey(focusNode.getKey())?.getBoundingClientRect()\n const focusLinkParent = $findMatchingParent(focusNode, $isLinkNode)\n\n // Prevent link modal from showing if selection spans further than the link: https://github.com/facebook/lexical/issues/4064\n const badNode = selection\n .getNodes()\n .filter((node) => !$isLineBreakNode(node))\n .find((node) => {\n const linkNode = $findMatchingParent(node, $isLinkNode)\n return (\n (focusLinkParent && !focusLinkParent.is(linkNode)) ||\n (linkNode && !linkNode.is(focusLinkParent))\n )\n })\n\n if (focusLinkParent == null || badNode) {\n setNotLink()\n return\n }\n setLinkNode(focusLinkParent)\n\n const fields = focusLinkParent.getFields()\n\n // Initial state:\n const data: { text: string } & LinkFields = {\n ...fields,\n id: focusLinkParent.getID(),\n text: focusLinkParent.getTextContent(),\n }\n\n if (fields?.linkType === 'custom') {\n setLinkUrl(fields?.url ?? null)\n setLinkLabel(null)\n } else {\n // internal link\n setLinkUrl(\n `${config.routes.admin === '/' ? '' : config.routes.admin}/collections/${fields?.doc?.relationTo}/${\n fields?.doc?.value\n }`,\n )\n\n const relatedField = fields?.doc?.relationTo\n ? getEntityConfig({ collectionSlug: fields?.doc?.relationTo })\n : undefined\n if (!relatedField) {\n // Usually happens if the user removed all default fields. In this case, we let them specify the label or do not display the label at all.\n // label could be a virtual field the user added. This is useful if they want to use the link feature for things other than links.\n setLinkLabel(fields?.label ? String(fields?.label) : null)\n setLinkUrl(fields?.url ? String(fields?.url) : null)\n } else {\n const id = typeof fields.doc?.value === 'object' ? fields.doc.value.id : fields.doc?.value\n const collection = fields.doc?.relationTo\n if (!id || !collection) {\n throw new Error(`Focus link parent is missing doc.value or doc.relationTo`)\n }\n\n const loadingLabel = t('fields:linkedTo', {\n label: `${getTranslation(relatedField.labels.singular, i18n)} - ${t('lexical:link:loadingWithEllipsis', i18n)}`,\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(loadingLabel)\n\n requests\n .get(\n formatAdminURL({\n apiRoute: config.routes.api,\n path: `/${collection}/${id}`,\n serverURL: config.serverURL,\n }),\n {\n headers: {\n 'Accept-Language': i18n.language,\n },\n params: {\n depth: 0,\n locale: locale?.code,\n },\n },\n )\n .then(async (res) => {\n if (!res.ok) {\n throw new Error(`HTTP error! Status: ${res.status}`)\n }\n const data = await res.json()\n const useAsTitle = relatedField?.admin?.useAsTitle || 'id'\n const title = data[useAsTitle]\n const label = t('fields:linkedTo', {\n label: `${getTranslation(relatedField.labels.singular, i18n)} - ${title}`,\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(label)\n })\n .catch(() => {\n const label = t('fields:linkedTo', {\n label: `${getTranslation(relatedField.labels.singular, i18n)} - ${t('general:untitled', i18n)} - ID: ${id}`,\n }).replace(/<[^>]*>?/g, '')\n setLinkLabel(label)\n })\n }\n }\n\n setStateData(data)\n setIsLink(true)\n setSelectedNodes(selection ? selection?.getNodes() : [])\n\n if ($isAutoLinkNode(focusLinkParent)) {\n setIsAutoLink(true)\n } else {\n setIsAutoLink(false)\n }\n\n const editorElem = editorRef.current\n const nativeSelection = getDOMSelection(editor._window)\n const { activeElement } = document\n\n if (editorElem === null) {\n return\n }\n\n const rootElement = editor.getRootElement()\n\n if (\n nativeSelection !== null &&\n rootElement !== null &&\n rootElement.contains(nativeSelection.anchorNode)\n ) {\n if (!selectedNodeDomRect) {\n // Get the DOM rect of the selected node using the native selection. This sometimes produces the wrong\n // result, which is why we use lexical's selection preferably.\n selectedNodeDomRect = nativeSelection.getRangeAt(0).getBoundingClientRect()\n }\n\n if (selectedNodeDomRect != null) {\n selectedNodeDomRect.y += 40\n // Store the rect for positioning in useLayoutEffect after content renders\n selectedNodeRectRef.current = selectedNodeDomRect\n }\n } else if (activeElement == null || activeElement.className !== 'link-input') {\n if (rootElement !== null) {\n setFloatingElemPositionForLinkEditor(null, editorElem, anchorElem)\n }\n setLinkUrl(null)\n setLinkLabel(null)\n }\n\n return true\n }, [\n editor,\n setNotLink,\n config.routes.admin,\n config.routes.api,\n config.serverURL,\n getEntityConfig,\n t,\n i18n,\n locale?.code,\n anchorElem,\n ])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_WITH_MODAL_COMMAND,\n (payload: LinkPayload) => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, payload)\n\n // Now, open the modal\n $updateLinkEditor()\n toggleDrawer()\n\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n )\n }, [editor, $updateLinkEditor, toggleDrawer, drawerSlug])\n\n useEffect(() => {\n const scrollerElem = anchorElem.parentElement\n\n const update = (): void => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }\n\n window.addEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.addEventListener('scroll', update)\n }\n\n return () => {\n window.removeEventListener('resize', update)\n\n if (scrollerElem != null) {\n scrollerElem.removeEventListener('scroll', update)\n }\n }\n }, [anchorElem.parentElement, editor, $updateLinkEditor])\n\n useEffect(() => {\n return mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n void $updateLinkEditor()\n })\n }),\n\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n void $updateLinkEditor()\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n editor.registerCommand(\n KEY_ESCAPE_COMMAND,\n () => {\n if (isLink) {\n setNotLink()\n\n return true\n }\n return false\n },\n COMMAND_PRIORITY_HIGH,\n ),\n )\n }, [editor, $updateLinkEditor, isLink, setNotLink])\n\n useEffect(() => {\n editor.getEditorState().read(() => {\n void $updateLinkEditor()\n })\n }, [editor, $updateLinkEditor])\n\n // Position the tooltip after React renders the link content\n useLayoutEffect(() => {\n if (!isLink || !editorRef.current || !anchorElem || !selectedNodeRectRef.current) {\n return\n }\n\n // Now the DOM has the actual link element, we can position the tooltip\n setFloatingElemPositionForLinkEditor(selectedNodeRectRef.current, editorRef.current, anchorElem)\n // linkNode dependency ensures re-positioning when clicking between different links with the same URL\n }, [linkUrl, linkLabel, isLink, anchorElem, linkNode])\n\n return (\n <React.Fragment>\n <div className=\"link-editor\" data-theme=\"dark\" ref={editorRef}>\n <div className=\"link-input\">\n {linkNode?.__fields?.linkType === 'custom' ? <LinkIcon /> : <PageIcon />}\n {linkUrl && linkUrl.length > 0 ? (\n <a className=\"link-input__url\" href={linkUrl} rel=\"noopener noreferrer\" target=\"_blank\">\n {linkLabel != null && linkLabel.length > 0 ? linkLabel : linkUrl}\n {linkNode?.__fields.newTab ? (\n <>\n <ExternalLinkIcon size={16} /> <div className=\"link-input__divider\" />{' '}\n </>\n ) : null}\n </a>\n ) : linkLabel != null && linkLabel.length > 0 ? (\n <>\n <span className=\"link-input__label-pure\">{linkLabel}</span>\n {linkNode?.__fields.newTab ? (\n <>\n <ExternalLinkIcon size={16} /> <div className=\"link-input__divider\" />{' '}\n </>\n ) : null}\n </>\n ) : null}\n\n {isEditable && (\n <div className=\"link-input__actions\">\n <button\n aria-label=\"Edit link\"\n className=\"link-edit\"\n onClick={(event) => {\n event.preventDefault()\n toggleDrawer()\n }}\n onMouseDown={preventDefault}\n tabIndex={0}\n type=\"button\"\n >\n <WriteIcon />\n </button>\n {!isAutoLink && (\n <button\n aria-label=\"Remove link\"\n className=\"link-trash\"\n onClick={() => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }}\n onMouseDown={preventDefault}\n tabIndex={0}\n type=\"button\"\n >\n <TrashIcon small />\n </button>\n )}\n </div>\n )}\n </div>\n </div>\n <FieldsDrawer\n className=\"lexical-link-edit-drawer\"\n data={stateData}\n drawerSlug={drawerSlug}\n drawerTitle={t('fields:editLink')}\n featureKey=\"link\"\n handleDrawerSubmit={(fields: FormState, data: Data) => {\n const newLinkPayload = data as { text: string } & LinkFields\n\n const bareLinkFields: LinkFields = {\n ...newLinkPayload,\n }\n delete bareLinkFields.text\n\n // See: https://github.com/facebook/lexical/pull/5536. This updates autolink nodes to link nodes whenever a change was made (which is good!).\n editor.update(() => {\n const selection = $getSelection()\n let linkParent: ElementNode | null = null\n if ($isRangeSelection(selection)) {\n linkParent = getSelectedNode(selection).getParent()\n } else {\n if (selectedNodes.length) {\n linkParent = selectedNodes[0]?.getParent() ?? null\n }\n }\n\n if (linkParent && $isAutoLinkNode(linkParent)) {\n const linkNode = $createLinkNode({\n fields: bareLinkFields,\n })\n linkParent.replace(linkNode, true)\n }\n })\n\n // Needs to happen AFTER a potential auto link => link node conversion, as otherwise, the updated text to display may be lost due to\n // it being applied to the auto link node instead of the link node.\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: bareLinkFields,\n selectedNodes,\n text: newLinkPayload.text,\n })\n }}\n schemaPath={schemaPath}\n schemaPathSuffix=\"fields\"\n />\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,mBAAmB,EAAEC,aAAa,QAAQ;AACnD,SAASC,cAAc,QAAQ;AAC/B,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,SAAS,EACTC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdC,SAAS,QACJ;AACP,SAASC,QAAQ,QAAQ;AACzB,SACEC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,qBAAqB,EACrBC,oBAAoB,EACpBC,eAAe,EACfC,kBAAkB,EAClBC,wBAAwB,QACnB;AACP,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAMjF,SAASC,sBAAsB,QAAQ;AACvC,SAASC,QAAQ,QAAQ;AACzB,SAASC,QAAQ,QAAQ;AACzB,SAASC,SAAS,QAAQ;AAC1B,SAASC,eAAe,QAAQ;AAChC,SAASC,oCAAoC,QAAQ;AACrD,SAASC,YAAY,QAAQ;AAC7B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,eAAe,QAAQ;AAChC,SAASC,eAAe,EAAEC,WAAW,EAAEC,mBAAm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AA;MACZ2G,WAAA,EAAatH,CAAA,CAAE;MACfuH,UAAA,EAAW;MACXC,kBAAA,EAAoBA,CAACrF,QAAA,EAAmBE,MAAA;QACtC,MAAMoF,cAAA,GAAiBpF,MAAA;QAEvB,MAAMqF,cAAA,GAA6B;UACjC,GAAGD;QACL;QACA,OAAOC,cAAA,CAAelF,IAAI;QAE1B;QACAxD,MAAA,CAAO6G,MAAM,CAAC;UACZ,MAAMvE,WAAA,GAAYtE,aAAA;UAClB,IAAI2K,UAAA,GAAiC;UACrC,IAAIzK,iBAAA,CAAkBoE,WAAA,GAAY;YAChCqG,UAAA,GAAaxJ,eAAA,CAAgBmD,WAAA,EAAWsG,SAAS;UACnD,OAAO;YACL,IAAItH,aAAA,CAAcoG,MAAM,EAAE;cACxBiB,UAAA,GAAarH,aAAa,CAAC,EAAE,EAAEsH,SAAA,MAAe;YAChD;UACF;UAEA,IAAID,UAAA,IAAcpJ,eAAA,CAAgBoJ,UAAA,GAAa;YAC7C,MAAM1I,UAAA,GAAWT,eAAA,CAAgB;cAC/B2D,MAAA,EAAQuF;YACV;YACAC,UAAA,CAAWjE,OAAO,CAACzE,UAAA,EAAU;UAC/B;QACF;QAEA;QACA;QACAD,MAAA,CAAO0G,eAAe,CAAChH,mBAAA,EAAqB;UAC1CyD,MAAA,EAAQuF,cAAA;UACRpH,aAAA;UACAkC,IAAA,EAAMiF,cAAA,CAAejF;QACvB;MACF;MACA9C,UAAA,EAAYA,UAAA;MACZmI,gBAAA,EAAiB;;;AAIzB","ignoreList":[]}
@@ -0,0 +1,112 @@
1
+ @layer payload-default {
2
+ .link-editor {
3
+ z-index: 1;
4
+ display: flex;
5
+ align-items: center;
6
+ gap: var(--spacer-2);
7
+ background: var(--color-bg-menu);
8
+ padding: 0 var(--spacer-2);
9
+ height: var(--spacer-6);
10
+ vertical-align: middle;
11
+ position: absolute;
12
+ top: 0;
13
+ left: 0;
14
+ opacity: 0;
15
+ border-radius: var(--radius-large);
16
+ transition: opacity 0.2s;
17
+ will-change: transform;
18
+ overflow: clip;
19
+ box-shadow:
20
+ 0px 3px 8px 0px rgba(0, 0, 0, 0.35),
21
+ 0px 1px 3px 0px rgba(0, 0, 0, 0.5),
22
+ inset 0px 0.5px 0px 0px rgba(255, 255, 255, 0.08),
23
+ inset 0px 0px 0.5px 0px rgba(255, 255, 255, 0.3);
24
+
25
+ .link-input {
26
+ display: flex;
27
+ align-items: center;
28
+ flex-direction: row;
29
+ flex-wrap: nowrap;
30
+ width: 100%;
31
+ min-width: 0;
32
+ box-sizing: border-box;
33
+ gap: var(--spacer-2);
34
+ border: 0;
35
+ outline: 0;
36
+ position: relative;
37
+ font-family: var(--font-body);
38
+
39
+ > .icon:first-child {
40
+ color: var(--ramp-white-400);
41
+ flex-shrink: 0;
42
+ }
43
+
44
+ & a {
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ text-decoration: underline;
49
+ gap: var(--spacer-1);
50
+ white-space: nowrap;
51
+ overflow: hidden;
52
+ text-overflow: ellipsis;
53
+ color: var(--color-text-onbrand);
54
+ font-size: var(--text-body-medium-font-size);
55
+ line-height: var(--text-body-medium-line-height);
56
+ min-width: 0;
57
+ height: 100%;
58
+
59
+ &:hover {
60
+ color: var(--color-text-onbrand);
61
+ }
62
+ }
63
+ }
64
+
65
+ .link-input__divider {
66
+ width: var(--stroke-width-small);
67
+ align-self: stretch;
68
+ background-color: var(--ramp-white-400);
69
+ margin-left: var(--spacer-2);
70
+ }
71
+
72
+ .link-input__label-pure {
73
+ color: var(--color-text-onbrand);
74
+ margin-right: var(--spacer-3);
75
+ display: block;
76
+ white-space: nowrap;
77
+ overflow: hidden;
78
+ font-size: var(--text-body-medium-font-size);
79
+ line-height: var(--text-body-medium-line-height);
80
+ }
81
+
82
+ .link-input__actions {
83
+ display: flex;
84
+ gap: var(--spacer-1);
85
+ }
86
+
87
+ button {
88
+ all: unset;
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+ min-width: var(--spacer-4);
93
+ min-height: var(--spacer-4);
94
+ cursor: pointer;
95
+ color: var(--color-icon-onbrand);
96
+ border-radius: var(--radius-medium);
97
+
98
+ &:hover:not([disabled]) {
99
+ color: var(--color-icon-onbrand);
100
+ background-color: rgba(255, 255, 255, 0.1);
101
+ }
102
+
103
+ &:focus-visible {
104
+ outline: var(--stroke-width-small) solid var(--color-border-brand-strong);
105
+ }
106
+ }
107
+
108
+ .icon {
109
+ color: var(--color-icon-onbrand);
110
+ }
111
+ }
112
+ }
@@ -1,5 +1,5 @@
1
1
  import type { PluginComponentWithAnchor } from '../../../../typesClient.js';
2
2
  import type { ClientProps } from '../../index.js';
3
- import './index.scss';
3
+ import './index.css';
4
4
  export declare const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/link/client/plugins/floatingLinkEditor/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,cAAc,CAAA;AAGrB,eAAO,MAAM,wBAAwB,EAAE,yBAAyB,CAAC,WAAW,CAI3E,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/link/client/plugins/floatingLinkEditor/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,aAAa,CAAA;AAGpB,eAAO,MAAM,wBAAwB,EAAE,yBAAyB,CAAC,WAAW,CAI3E,CAAA"}
@@ -3,6 +3,7 @@
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import * as React from 'react';
5
5
  import { createPortal } from 'react-dom';
6
+ import './index.css';
6
7
  import { LinkEditor } from './LinkEditor/index.js';
7
8
  export const FloatingLinkEditorPlugin = props => {
8
9
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","createPortal","LinkEditor","FloatingLinkEditorPlugin","props","anchorElem","document","body","_jsx"],"sources":["../../../../../../src/features/link/client/plugins/floatingLinkEditor/index.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../../typesClient.js'\nimport type { ClientProps } from '../../index.js'\n\nimport './index.scss'\nimport { LinkEditor } from './LinkEditor/index.js'\n\nexport const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps> = (props) => {\n const { anchorElem = document.body } = props\n\n return createPortal(<LinkEditor anchorElem={anchorElem} />, anchorElem)\n}\n"],"mappings":"AAAA;;;AACA,YAAYA,KAAA,MAAW;AACvB,SAASC,YAAY,QAAQ;AAM7B,SAASC,UAAU,QAAQ;AAE3B,OAAO,MAAMC,wBAAA,GAAoEC,KAAA;EAC/E,MAAM;IAAEC,UAAA,GAAaC,QAAA,CAASC;EAAI,CAAE,GAAGH,KAAA;EAEvC,oBAAOH,YAAA,cAAaO,IAAA,CAACN,UAAA;IAAWG,UAAA,EAAYA;MAAgBA,UAAA;AAC9D","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","createPortal","LinkEditor","FloatingLinkEditorPlugin","props","anchorElem","document","body","_jsx"],"sources":["../../../../../../src/features/link/client/plugins/floatingLinkEditor/index.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\n\nimport type { PluginComponentWithAnchor } from '../../../../typesClient.js'\nimport type { ClientProps } from '../../index.js'\n\nimport './index.css'\nimport { LinkEditor } from './LinkEditor/index.js'\n\nexport const FloatingLinkEditorPlugin: PluginComponentWithAnchor<ClientProps> = (props) => {\n const { anchorElem = document.body } = props\n\n return createPortal(<LinkEditor anchorElem={anchorElem} />, anchorElem)\n}\n"],"mappings":"AAAA;;;AACA,YAAYA,KAAA,MAAW;AACvB,SAASC,YAAY,QAAQ;AAK7B,OAAO;AACP,SAASC,UAAU,QAAQ;AAE3B,OAAO,MAAMC,wBAAA,GAAoEC,KAAA;EAC/E,MAAM;IAAEC,UAAA,GAAaC,QAAA,CAASC;EAAI,CAAE,GAAGH,KAAA;EAEvC,oBAAOH,YAAA,cAAaO,IAAA,CAACN,UAAA;IAAWG,UAAA,EAAYA;MAAgBA,UAAA;AAC9D","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/link/markdownTransformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAA;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAO1D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,kBAAkB,CAAA;KAAE,KAAK,MAAM,CAAA;CACvE,CAAA;AAoBD,eAAO,MAAM,6BAA6B,UACjC,iCAAiC,KACvC,oBAiCD,CAAA;AAEF,eAAO,MAAM,uBAAuB,EAAE,oBAAsD,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/link/markdownTransformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAA;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAO1D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,kBAAkB,CAAA;KAAE,KAAK,MAAM,CAAA;CACvE,CAAA;AAoBD,eAAO,MAAM,6BAA6B,GACxC,OAAO,iCAAiC,KACvC,oBAiCD,CAAA;AAEF,eAAO,MAAM,uBAAuB,EAAE,oBAAsD,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { SerializedElementNode, SerializedLexicalNode } from 'lexical';
2
2
  import type { DefaultDocumentIDType, JsonValue } from 'payload';
3
- import type { StronglyTypedElementNode } from '../../../nodeTypes.js';
3
+ import type { StronglyTypedElementNode } from '../../../types/nodeTypes.js';
4
4
  export type LinkFields = {
5
5
  [key: string]: JsonValue;
6
6
  doc?: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/link/nodes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAErE,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,GAAG,CAAC,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;QAClB,KAAK,EACD;YAEE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;YACxB,EAAE,EAAE,qBAAqB,CAAA;SAC1B,GACD,qBAAqB,CAAA;KAC1B,GAAG,IAAI,CAAA;IACR,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IACxF,MAAM,EAAE,UAAU,CAAA;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,GAAG,wBAAwB,CAAC,qBAAqB,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AAG,wBAAwB,CAAC,qBAAqB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/features/link/nodes/types.ts"],"sourcesContent":["import type { SerializedElementNode, SerializedLexicalNode } from 'lexical'\nimport type { DefaultDocumentIDType, JsonValue } from 'payload'\n\nimport type { StronglyTypedElementNode } from '../../../nodeTypes.js'\n\nexport type LinkFields = {\n [key: string]: JsonValue\n doc?: {\n relationTo: string\n value:\n | {\n // Actual doc data, populated in afterRead hook\n [key: string]: JsonValue\n id: DefaultDocumentIDType\n }\n | DefaultDocumentIDType\n } | null\n linkType: 'custom' | 'internal'\n newTab: boolean\n url?: string\n}\n\nexport type SerializedLinkNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n fields: LinkFields\n /**\n * @todo make required in 4.0 and type AutoLinkNode differently\n */\n id?: string // optional if AutoLinkNode\n} & StronglyTypedElementNode<SerializedElementNode, 'link', T>\n\nexport type SerializedAutoLinkNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n fields: LinkFields\n} & StronglyTypedElementNode<SerializedElementNode, 'autolink', T>\n"],"mappings":"AA8BA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/features/link/nodes/types.ts"],"sourcesContent":["import type { SerializedElementNode, SerializedLexicalNode } from 'lexical'\nimport type { DefaultDocumentIDType, JsonValue } from 'payload'\n\nimport type { StronglyTypedElementNode } from '../../../types/nodeTypes.js'\n\nexport type LinkFields = {\n [key: string]: JsonValue\n doc?: {\n relationTo: string\n value:\n | {\n // Actual doc data, populated in afterRead hook\n [key: string]: JsonValue\n id: DefaultDocumentIDType\n }\n | DefaultDocumentIDType\n } | null\n linkType: 'custom' | 'internal'\n newTab: boolean\n url?: string\n}\n\nexport type SerializedLinkNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n fields: LinkFields\n /**\n * @todo make required in 4.0 and type AutoLinkNode differently\n */\n id?: string // optional if AutoLinkNode\n} & StronglyTypedElementNode<SerializedElementNode, 'link', T>\n\nexport type SerializedAutoLinkNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n fields: LinkFields\n} & StronglyTypedElementNode<SerializedElementNode, 'autolink', T>\n"],"mappings":"AA8BA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"baseFields.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/baseFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAElB,eAAe,EAIhB,MAAM,SAAS,CAAA;AAMhB,eAAO,MAAM,aAAa,WAChB,eAAe,uBACF,cAAc,EAAE,wBACf,cAAc,EAAE,aAC3B,MAAM,KAChB,kBAAkB,EAqIpB,CAAA"}
1
+ {"version":3,"file":"baseFields.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/baseFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAElB,eAAe,EAIhB,MAAM,SAAS,CAAA;AAMhB,eAAO,MAAM,aAAa,GACxB,QAAQ,eAAe,EACvB,qBAAqB,cAAc,EAAE,EACrC,sBAAsB,cAAc,EAAE,EACtC,WAAW,MAAM,KAChB,kBAAkB,EAqIpB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAIxD,eAAO,MAAM,wBAAwB,UAC5B,sBAAsB,KAC5B,iBAAiB,CAAC,kBAAkB,CA8CtC,CAAA"}
1
+ {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAIxD,eAAO,MAAM,wBAAwB,GACnC,OAAO,sBAAsB,KAC5B,iBAAiB,CAAC,kBAAkB,CA8CtC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,KAAK,EACL,kBAAkB,EAElB,eAAe,EAChB,MAAM,SAAS,CAAA;AAMhB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAa3D,MAAM,MAAM,6BAA6B,GACrC;IACE;;;QAGI;IACJ,mBAAmB,CAAC,EAAE,cAAc,EAAE,CAAA;IAGtC,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAC3B,GACD;IAEE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAE3B;;;QAGI;IACJ,kBAAkB,CAAC,EAAE,cAAc,EAAE,CAAA;CACtC,CAAA;AAEL,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACxC;;;OAGG;IACH,MAAM,CAAC,EACH,CAAC,CAAC,IAAI,EAAE;QACN,MAAM,EAAE,eAAe,CAAA;QACvB,aAAa,EAAE,kBAAkB,EAAE,CAAA;KACpC,KAAK,CAAC,KAAK,GAAG,kBAAkB,CAAC,EAAE,CAAC,GACrC,KAAK,EAAE,CAAA;IACX;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAA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MAAM,WAAW,2HA6GtB,CAAA"}
@@ -1,7 +1,5 @@
1
- import escapeHTML from 'escape-html';
2
1
  import { sanitizeFields } from 'payload';
3
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
4
- import { convertLexicalNodesToHTML } from '../../converters/lexicalToHtml_deprecated/converter/index.js';
5
3
  import { createNode } from '../../typeUtilities.js';
6
4
  import { createLinkMarkdownTransformer } from '../markdownTransformer.js';
7
5
  import { AutoLinkNode } from '../nodes/AutoLinkNode.js';
@@ -70,79 +68,10 @@ export const LinkFeature = createServerFeature({
70
68
  internalDocToHref: props.internalDocToHref
71
69
  })],
72
70
  nodes: [props?.disableAutoLinks === true ? null : createNode({
73
- converters: {
74
- html: {
75
- converter: async ({
76
- converters,
77
- currentDepth,
78
- depth,
79
- draft,
80
- node,
81
- overrideAccess,
82
- parent,
83
- req,
84
- showHiddenFields
85
- }) => {
86
- const childrenText = await convertLexicalNodesToHTML({
87
- converters,
88
- currentDepth,
89
- depth,
90
- draft,
91
- lexicalNodes: node.children,
92
- overrideAccess,
93
- parent: {
94
- ...node,
95
- parent
96
- },
97
- req,
98
- showHiddenFields
99
- });
100
- let href = node.fields.url ?? '';
101
- if (node.fields.linkType === 'internal') {
102
- href = typeof node.fields.doc?.value !== 'object' ? String(node.fields.doc?.value) : String(node.fields.doc?.value?.id);
103
- }
104
- return `<a href="${href}"${node.fields.newTab ? ' rel="noopener noreferrer" target="_blank"' : ''}>${childrenText}</a>`;
105
- },
106
- nodeTypes: [AutoLinkNode.getType()]
107
- }
108
- },
109
71
  node: AutoLinkNode,
110
72
  // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises
111
73
  validations: [linkValidation(props, sanitizedFieldsWithoutText)]
112
74
  }), createNode({
113
- converters: {
114
- html: {
115
- converter: async ({
116
- converters,
117
- currentDepth,
118
- depth,
119
- draft,
120
- node,
121
- overrideAccess,
122
- parent,
123
- req,
124
- showHiddenFields
125
- }) => {
126
- const childrenText = await convertLexicalNodesToHTML({
127
- converters,
128
- currentDepth,
129
- depth,
130
- draft,
131
- lexicalNodes: node.children,
132
- overrideAccess,
133
- parent: {
134
- ...node,
135
- parent
136
- },
137
- req,
138
- showHiddenFields
139
- });
140
- const href = node.fields.linkType === 'custom' ? escapeHTML(node.fields.url) : node.fields.doc?.value;
141
- return `<a href="${href}"${node.fields.newTab ? ' rel="noopener noreferrer" target="_blank"' : ''}>${childrenText}</a>`;
142
- },
143
- nodeTypes: [LinkNode.getType()]
144
- }
145
- },
146
75
  getSubFields: () => {
147
76
  return sanitizedFieldsWithoutText;
148
77
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["escapeHTML","sanitizeFields","createServerFeature","convertLexicalNodesToHTML","createNode","createLinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","internalDocToHref","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","href","url","linkType","doc","value","String","id","newTab","nodeTypes","getType","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport escapeHTML from 'escape-html'\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\nimport type { SerializedLinkNode } from '../nodes/types.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/lexicalToHtml_deprecated/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { createLinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Resolves an internal link node to a URL string for use in the markdown converter.\n * Internal links store a doc reference rather than a URL, so without this the markdown\n * output will have an empty href: `[link text]()`.\n */\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [\n createLinkMarkdownTransformer({ internalDocToHref: props.internalDocToHref }),\n ],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value !== 'object'\n ? String(node.fields.doc?.value)\n : String(node.fields.doc?.value?.id)\n }\n\n return `<a href=\"${href}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const href: string =\n node.fields.linkType === 'custom'\n ? escapeHTML(node.fields.url)\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ].filter(Boolean) as Array<NodeWithHooks>,\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,OAAOA,UAAA,MAAgB;AACvB,SAASC,cAAc,QAAQ;AAM/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,IAAI,QAAQ;AACrB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,cAAc,QAAQ;AA4D/B,OAAO,MAAMC,WAAA,GAAcV,mBAAA,CAIzB;EACAW,OAAA,EAAS,MAAAA,CAAO;IAAEC,MAAA,EAAQC,OAAO;IAAEC,MAAM;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IACnE,IAAI,CAACA,KAAA,EAAO;MACVA,KAAA,GAAQ,CAAC;IACX;IACA,MAAMC,kBAAA,GAAqBJ,OAAA,CAAQK,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAK,EAAE;IAEvE,MAAMC,kBAAA,GAAqBd,oBAAA,CACzBQ,KAAA,CAAMO,MAAM,GAAGP,KAAA,CAAMO,MAAM,GAAG,MAC9BV,OAAA,EACAG,KAAA,CAAMQ,kBAAkB,EACxBR,KAAA,CAAMS,mBAAmB,EACzBT,KAAA,CAAMU,QAAQ;IAGhB,MAAMC,eAAA,GAAkB,MAAM5B,cAAA,CAAe;MAC3Ca,MAAA,EAAQC,OAAA;MACRU,MAAA,EAAQD,kBAAA;MACRP,iBAAA;MACAa,+BAAA,EAAiCd,MAAA;MACjCG;IACF;IACAD,KAAA,CAAMO,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Feature","createNode","createLinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","internalDocToHref","nodes","node","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\nimport type { SerializedLinkNode } from '../nodes/types.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { createLinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Resolves an internal link node to a URL string for use in the markdown converter.\n * Internal links store a doc reference rather than a URL, so without this the markdown\n * output will have an empty href: `[link text]()`.\n */\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [\n createLinkMarkdownTransformer({ internalDocToHref: props.internalDocToHref }),\n ],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ].filter(Boolean) as Array<NodeWithHooks>,\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,SAASA,cAAc,QAAQ;AAM/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC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AcA,CAAA;UACZ,OAAOzB,0BAAA;QACT;QACA0B,gBAAA,EAAkBA,CAAC;UAAEH;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAM7B,MAAA;QACf;QACAiC,yBAAA,EAA2B,CAAClD,wBAAA,CAAyBU,KAAA,EAAO;QAC5DoC,IAAA,EAAM/C,QAAA;QACNgD,WAAA,EAAa,CAAC5C,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD,CAACC,MAAM,CAAC2B,OAAA;MACTC,2BAAA,EAA6B1C;IAC/B;EACF;EACA2C,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAExD,eAAO,MAAM,cAAc,UAClB,sBAAsB,8BACD,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CA4C5D,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAExD,eAAO,MAAM,cAAc,GACzB,OAAO,sBAAsB,EAC7B,4BAA4B,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CA4C5D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,kGAyB3B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,kGAmB3B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
2
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
3
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
4
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
6
5
  import { CHECK_LIST } from '../markdownTransformers.js';
7
6
  import { i18n } from './i18n.js';
@@ -14,14 +13,8 @@ export const ChecklistFeature = createServerFeature({
14
13
  i18n,
15
14
  markdownTransformers: [CHECK_LIST],
16
15
  nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap) ? [createNode({
17
- converters: {
18
- html: ListHTMLConverter
19
- },
20
16
  node: ListNode
21
17
  }), createNode({
22
- converters: {
23
- html: ListItemHTMLConverter
24
- },
25
18
  node: ListItemNode
26
19
  })] : []
27
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","shouldRegisterListBaseNodes","CHECK_LIST","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { CHECK_LIST } from '../markdownTransformers.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,UAAU,QAAQ;AAC3B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBP,mBAAA,CAAoB;EAClDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,UAAA,CAAW;MAClCO,KAAA,EAAOR,2BAAA,CAA4B,aAAaK,kBAAA,IAC5C,CACER,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMZ;QACR;QACAa,IAAA,EAAMhB;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMX;QACR;QACAY,IAAA,EAAMjB;MACR,GACD,GACD;IACN;EACF;EACAkB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","shouldRegisterListBaseNodes","CHECK_LIST","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","node","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { CHECK_LIST } from '../markdownTransformers.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n node: ListNode,\n }),\n createNode({\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,UAAU,QAAQ;AAC3B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBL,mBAAA,CAAoB;EAClDM,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,UAAA,CAAW;MAClCO,KAAA,EAAOR,2BAAA,CAA4B,aAAaK,kBAAA,IAC5C,CACEN,UAAA,CAAW;QACTU,IAAA,EAAMZ;MACR,IACAE,UAAA,CAAW;QACTU,IAAA,EAAMb;MACR,GACD,GACD;IACN;EACF;EACAc,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,kGAyB7B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB,kGAmB7B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
2
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
3
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
4
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
6
5
  import { ORDERED_LIST } from '../markdownTransformer.js';
7
6
  import { i18n } from './i18n.js';
@@ -14,14 +13,8 @@ export const OrderedListFeature = createServerFeature({
14
13
  i18n,
15
14
  markdownTransformers: [ORDERED_LIST],
16
15
  nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap) ? [createNode({
17
- converters: {
18
- html: ListHTMLConverter
19
- },
20
16
  node: ListNode
21
17
  }), createNode({
22
- converters: {
23
- html: ListItemHTMLConverter
24
- },
25
18
  node: ListItemNode
26
19
  })] : []
27
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","shouldRegisterListBaseNodes","ORDERED_LIST","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { ORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAC7B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBP,mBAAA,CAAoB;EACpDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,YAAA,CAAa;MACpCO,KAAA,EAAOR,2BAAA,CAA4B,WAAWK,kBAAA,IAC1C,CACER,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMZ;QACR;QACAa,IAAA,EAAMhB;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMX;QACR;QACAY,IAAA,EAAMjB;MACR,GACD,GACD;IACN;EACF;EACAkB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","shouldRegisterListBaseNodes","ORDERED_LIST","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { ORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n node: ListNode,\n }),\n createNode({\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAC7B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBL,mBAAA,CAAoB;EACpDM,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,YAAA,CAAa;MACpCO,KAAA,EAAOR,2BAAA,CAA4B,WAAWK,kBAAA,IAC1C,CACEN,UAAA,CAAW;QACTU,IAAA,EAAMZ;MACR,IACAE,UAAA,CAAW;QACTU,IAAA,EAAMb;MACR,GACD,GACD;IACN;EACF;EACAc,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import type { SerializedListItemNode as _SerializedListItemNode, SerializedListNode as _SerializedListNode } from '@lexical/list';
2
2
  import type { SerializedLexicalNode } from 'lexical';
3
- import type { StronglyTypedElementNode } from '../../../nodeTypes.js';
3
+ import type { StronglyTypedElementNode } from '../../../types/nodeTypes.js';
4
4
  import type { PluginComponent } from '../../typesClient.js';
5
5
  export type SerializedListItemNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {
6
6
  checked?: boolean;