@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.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/plugin/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,IAAI,uBAAuB,EACjD,kBAAkB,IAAI,mBAAmB,EAC1C,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,uBAAuB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;AAEpE,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IACxF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;AAE5D,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,SAAS,CAExD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/plugin/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,IAAI,uBAAuB,EACjD,kBAAkB,IAAI,mBAAmB,EAC1C,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,uBAAuB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;AAEpE,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IACxF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;AAE5D,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,SAAS,CAExD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListPlugin","React","LexicalListPlugin","_jsx"],"sources":["../../../../src/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type {\n SerializedListItemNode as _SerializedListItemNode,\n SerializedListNode as _SerializedListNode,\n} from '@lexical/list'\nimport type { SerializedLexicalNode } from 'lexical'\n\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { StronglyTypedElementNode } from '../../../nodeTypes.js'\nimport type { PluginComponent } from '../../typesClient.js'\n\nexport type SerializedListItemNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n checked?: boolean\n} & StronglyTypedElementNode<_SerializedListItemNode, 'listitem', T>\n\nexport type SerializedListNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n checked?: boolean\n} & StronglyTypedElementNode<_SerializedListNode, 'list', T>\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n"],"mappings":"AAAA;;;AAOA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,KAAA,MAAW;AAalB,OAAO,MAAMC,iBAAA,GAAgDA,CAAA;EAC3D,oBAAOC,IAAA,CAACH,UAAA;AACV","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListPlugin","React","LexicalListPlugin","_jsx"],"sources":["../../../../src/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type {\n SerializedListItemNode as _SerializedListItemNode,\n SerializedListNode as _SerializedListNode,\n} from '@lexical/list'\nimport type { SerializedLexicalNode } from 'lexical'\n\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { StronglyTypedElementNode } from '../../../types/nodeTypes.js'\nimport type { PluginComponent } from '../../typesClient.js'\n\nexport type SerializedListItemNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n checked?: boolean\n} & StronglyTypedElementNode<_SerializedListItemNode, 'listitem', T>\n\nexport type SerializedListNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n checked?: boolean\n} & StronglyTypedElementNode<_SerializedListNode, 'list', T>\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n"],"mappings":"AAAA;;;AAOA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,KAAA,MAAW;AAalB,OAAO,MAAMC,iBAAA,GAAgDA,CAAA;EAC3D,oBAAOC,IAAA,CAACH,UAAA;AACV","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAKrG,eAAO,MAAM,WAAW,aAAc,QAAQ,KAAG,kBAAkB,CAAC,SAAS,CA6B5E,CAAA;AAED,eAAO,MAAM,UAAU,aACX,QAAQ,kBACF,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,SACtC,MAAM,KACZ,MA2BF,CAAA"}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAKrG,eAAO,MAAM,WAAW,GAAI,UAAU,QAAQ,KAAG,kBAAkB,CAAC,SAAS,CA6B5E,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,UAAU,QAAQ,EAClB,gBAAgB,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAC7C,OAAO,MAAM,KACZ,MA2BF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,kGAqB/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,kGAe/B,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 { UNORDERED_LIST } from '../markdownTransformer.js';
6
5
  import { i18n } from './i18n.js';
7
6
  export const UnorderedListFeature = createServerFeature({
@@ -10,14 +9,8 @@ export const UnorderedListFeature = createServerFeature({
10
9
  i18n,
11
10
  markdownTransformers: [UNORDERED_LIST],
12
11
  nodes: [createNode({
13
- converters: {
14
- html: ListHTMLConverter
15
- },
16
12
  node: ListNode
17
13
  }), createNode({
18
- converters: {
19
- html: ListItemHTMLConverter
20
- },
21
14
  node: ListItemNode
22
15
  })]
23
16
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","UNORDERED_LIST","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/unorderedList/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 { UNORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\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 key: 'unorderedList',\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,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBN,mBAAA,CAAoB;EACtDO,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACL,cAAA,CAAe;IACtCM,KAAA,EAAO,CACLT,UAAA,CAAW;MACTU,UAAA,EAAY;QACVC,IAAA,EAAMV;MACR;MACAW,IAAA,EAAMd;IACR,IACAE,UAAA,CAAW;MACTU,UAAA,EAAY;QACVC,IAAA,EAAMT;MACR;MACAU,IAAA,EAAMf;IACR;EAEJ;EACAgB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","UNORDERED_LIST","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n node: ListNode,\n }),\n createNode({\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBJ,mBAAA,CAAoB;EACtDK,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACL,cAAA,CAAe;IACtCM,KAAA,EAAO,CACLP,UAAA,CAAW;MACTQ,IAAA,EAAMV;IACR,IACAE,UAAA,CAAW;MACTQ,IAAA,EAAMX;IACR;EAEJ;EACAY,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { ElementFormatType } from 'lexical';
2
2
  import React from 'react';
3
3
  import type { RelationshipData } from '../../server/nodes/RelationshipNode.js';
4
- import './index.scss';
4
+ import './index.css';
5
5
  type Props = {
6
6
  className: string;
7
7
  data: RelationshipData;
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAQhD,OAAO,KAAoD,MAAM,OAAO,CAAA;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAE9E,OAAO,cAAc,CAAA;AAQrB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2GjD,CAAA"}
1
+ {"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAQhD,OAAO,KAA+D,MAAM,OAAO,CAAA;AAEnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAE9E,OAAO,aAAa,CAAA;AAQpB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqIjD,CAAA"}
@@ -5,9 +5,10 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
5
5
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
6
6
  import { getTranslation } from '@payloadcms/translations';
7
7
  import { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui';
8
- import { $getNodeByKey } from 'lexical';
8
+ import { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical';
9
9
  import { formatAdminURL } from 'payload/shared';
10
- import React, { useCallback, useReducer, useRef, useState } from 'react';
10
+ import React, { useCallback, useEffect, useReducer, useRef, useState } from 'react';
11
+ import './index.css';
11
12
  import { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js';
12
13
  import { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js';
13
14
  const initialParams = {
@@ -28,6 +29,7 @@ export const RelationshipComponent = props => {
28
29
  const relationshipElemRef = useRef(null);
29
30
  const [editor] = useLexicalComposerContext();
30
31
  const isEditable = useLexicalEditable();
32
+ const [isSelected, setIsSelected] = useState(false);
31
33
  const {
32
34
  config: {
33
35
  routes: {
@@ -64,6 +66,29 @@ export const RelationshipComponent = props => {
64
66
  id: value,
65
67
  collectionSlug: relatedCollection.slug
66
68
  });
69
+ useEffect(() => {
70
+ return editor.registerUpdateListener(({
71
+ editorState
72
+ }) => {
73
+ editorState.read(() => {
74
+ const selection = $getSelection();
75
+ if ($isNodeSelection(selection)) {
76
+ setIsSelected(selection.has(nodeKey));
77
+ } else if ($isRangeSelection(selection)) {
78
+ const nodes = selection.getNodes();
79
+ setIsSelected(nodes.some(node => node.getKey() === nodeKey));
80
+ } else {
81
+ setIsSelected(false);
82
+ }
83
+ });
84
+ });
85
+ }, [editor, nodeKey]);
86
+ useEffect(() => {
87
+ const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`);
88
+ if (outerEl) {
89
+ outerEl.classList.toggle(`${baseClass}--selected`, isSelected);
90
+ }
91
+ }, [isSelected, baseClass]);
67
92
  const removeRelationship = useCallback(() => {
68
93
  editor.update(() => {
69
94
  $getNodeByKey(nodeKey)?.remove();
@@ -98,7 +123,7 @@ export const RelationshipComponent = props => {
98
123
  }), isEditable && /*#__PURE__*/_jsxs("div", {
99
124
  className: `${baseClass}__actions`,
100
125
  children: [/*#__PURE__*/_jsx(Button, {
101
- buttonStyle: "icon-label",
126
+ buttonStyle: "ghost",
102
127
  className: `${baseClass}__swapButton`,
103
128
  disabled: !isEditable,
104
129
  el: "button",
@@ -115,7 +140,7 @@ export const RelationshipComponent = props => {
115
140
  round: true,
116
141
  tooltip: t('fields:swapRelationship')
117
142
  }), /*#__PURE__*/_jsx(Button, {
118
- buttonStyle: "icon-label",
143
+ buttonStyle: "ghost",
119
144
  className: `${baseClass}__removeButton`,
120
145
  disabled: !isEditable,
121
146
  icon: "x",
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","formatAdminURL","React","useCallback","useReducer","useRef","useState","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","initialParams","depth","RelationshipComponent","props","className","baseClass","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isEditable","config","routes","api","serverURL","getEntityConfig","relatedCollection","collectionSlug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","apiRoute","path","slug","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","removeRelationship","update","remove","updateRelationship","_jsxs","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","buttonStyle","disabled","el","icon","onClick","dispatchCommand","replace","round","tooltip","e","preventDefault","onSave"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport './index.scss'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div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;UAAErC,SAAA,EAAW,GAAGC,SAAA,SAAkB;oBAChCC,IAAA,GAAOA,IAAI,CAACa,iBAAA,EAAmB0B,KAAA,EAAOC,UAAA,IAAc,KAAK,GAAGtC;;;QAIlEK,UAAA,iBACCyB,KAAA,CAAC;MAAIlC,SAAA,EAAW,GAAGC,SAAA,WAAoB;8BACrCoC,IAAA,CAACtD,MAAA;QACC4D,WAAA,EAAY;QACZ3C,SAAA,EAAW,GAAGC,SAAA,cAAuB;QACrC2C,QAAA,EAAU,CAACnC,UAAA;QACXoC,EAAA,EAAG;QACHC,IAAA,EAAK;QACLC,OAAA,EAASA,CAAA;UACP,IAAI1C,OAAA,EAAS;YACXG,MAAA,CAAOwC,eAAe,CAACrD,uCAAA,EAAyC;cAC9DsD,OAAA,EAAS;gBAAE5C;cAAQ;YACrB;UACF;QACF;QACA6C,KAAK;QACLC,OAAA,EAASjC,CAAA,CAAE;uBAEbmB,IAAA,CAACtD,MAAA;QACC4D,WAAA,EAAY;QACZ3C,SAAA,EAAW,GAAGC,SAAA,gBAAyB;QACvC2C,QAAA,EAAU,CAACnC,UAAA;QACXqC,IAAA,EAAK;QACLC,OAAA,EAAUK,CAAA;UACRA,CAAA,CAAEC,cAAc;UAChBvB,kBAAA;QACF;QACAoB,KAAK;QACLC,OAAA,EAASjC,CAAA,CAAE;;QAKhB,CAAC,CAACd,KAAA,iBAASiC,IAAA,CAACV,cAAA;MAAe2B,MAAA,EAAQrB;;;AAG1C","ignoreList":[]}
1
+ {"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","$isRangeSelection","formatAdminURL","React","useCallback","useEffect","useReducer","useRef","useState","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","initialParams","depth","RelationshipComponent","props","className","baseClass","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isEditable","isSelected","setIsSelected","config","routes","api","serverURL","getEntityConfig","relatedCollection","collectionSlug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","apiRoute","path","slug","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","registerUpdateListener","editorState","read","selection","has","nodes","getNodes","some","node","getKey","outerEl","current","closest","classList","toggle","removeRelationship","update","remove","updateRelationship","_jsxs","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","buttonStyle","disabled","el","icon","onClick","dispatchCommand","replace","round","tooltip","e","preventDefault","onSave"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport './index.css'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const [isSelected, setIsSelected] = useState(false)\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey!))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,cAAc,QAAQ;AACjE,SAASC,aAAa,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,iBAAiB,QAAQ;AAClF,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAI5E,OAAO;AACP,SAASC,wBAAwB,QAAQ;AACzC,SAASC,uCAAuC,QAAQ;AAExD,MAAMC,aAAA,GAAgB;EACpBC,KAAA,EAAO;AACT;AASA,OAAO,MAAMC,qBAAA,GAA0CC,KAAA;EACrD,MAAM;IACJC,SAAA,EAAWC,SAAS;IACpBC,IAAA,EAAM;MAAEC,UAAU;MAAEC;IAAK,CAAE;IAC3BC;EAAO,CACR,GAAGN,KAAA;EAEJ,IAAI,OAAOK,KAAA,KAAU,UAAU;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+ --relationship-width: 15rem;
4
+ --relationship-max-width: 20rem;
5
+ display: flex;
6
+ width: var(--relationship-width);
7
+ max-width: var(--relationship-max-width);
8
+ padding: var(--spacer-2-5);
9
+ align-items: center;
10
+ gap: var(--spacer-2);
11
+ background: var(--color-bg);
12
+ border: var(--stroke-width-small) solid var(--color-border);
13
+ border-radius: var(--radius-medium);
14
+ font-family: var(--font-body);
15
+ margin-block: var(--spacer-2);
16
+ color: var(--color-text);
17
+
18
+ &:hover {
19
+ outline: var(--stroke-width-small) solid var(--color-border-selected);
20
+ outline-offset: calc(var(--stroke-width-small) * -1);
21
+ }
22
+ }
23
+
24
+ .LexicalEditorTheme__relationship--selected {
25
+ outline: var(--stroke-width-small) solid var(--color-border-selected);
26
+ outline-offset: calc(var(--stroke-width-small) * -1);
27
+ }
28
+
29
+ .LexicalEditorTheme__relationship__contents {
30
+ display: flex;
31
+ align-items: center;
32
+ gap: var(--spacer-2);
33
+ flex: 1 0 0;
34
+ justify-content: space-between;
35
+ min-width: 0;
36
+ }
37
+
38
+ .LexicalEditorTheme__relationship__wrap {
39
+ flex: 1 0 0;
40
+ min-width: 0;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .LexicalEditorTheme__relationship__label {
45
+ font-family: var(--text-body-small-font-family);
46
+ font-size: var(--text-body-small-font-size);
47
+ font-weight: var(--text-body-small-font-weight);
48
+ line-height: var(--text-body-small-line-height);
49
+ letter-spacing: var(--text-body-small-letter-spacing);
50
+ color: var(--color-text-secondary);
51
+ margin: 0;
52
+ white-space: nowrap;
53
+ text-overflow: ellipsis;
54
+ overflow: hidden;
55
+ }
56
+
57
+ .LexicalEditorTheme__relationship__title {
58
+ font-family: var(--text-body-medium-strong-font-family);
59
+ font-size: var(--text-body-medium-strong-font-size);
60
+ font-weight: var(--text-body-medium-strong-font-weight);
61
+ line-height: var(--text-body-medium-strong-line-height);
62
+ letter-spacing: var(--text-body-medium-letter-spacing);
63
+ color: var(--color-text);
64
+ margin: 0;
65
+ white-space: nowrap;
66
+ text-overflow: ellipsis;
67
+ overflow: hidden;
68
+ }
69
+
70
+ .LexicalEditorTheme__relationship__doc-drawer-toggler {
71
+ text-decoration: none;
72
+ pointer-events: all;
73
+ display: block;
74
+ overflow: hidden;
75
+
76
+ & > * {
77
+ margin: 0;
78
+ }
79
+ }
80
+
81
+ .LexicalEditorTheme__relationship__swapButton.btn,
82
+ .LexicalEditorTheme__relationship__removeButton.btn {
83
+ margin: 0;
84
+ width: var(--spacer-4);
85
+ height: var(--spacer-4);
86
+ min-width: var(--spacer-4);
87
+ min-height: var(--spacer-4);
88
+ padding: 0;
89
+ }
90
+
91
+ .LexicalEditorTheme__relationship__doc-drawer-toggler,
92
+ .LexicalEditorTheme__relationship__swapButton {
93
+ &:disabled {
94
+ color: var(--color-text-disabled);
95
+ pointer-events: none;
96
+ }
97
+ }
98
+
99
+ .LexicalEditorTheme__relationship__actions {
100
+ display: flex;
101
+ align-items: center;
102
+ flex-shrink: 0;
103
+ gap: var(--spacer-2);
104
+ }
105
+
106
+ .LexicalEditorTheme__relationship__removeButton.btn {
107
+ &:disabled {
108
+ color: var(--color-text-disabled);
109
+ pointer-events: none;
110
+ }
111
+ }
112
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,+BAAgC,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,GAAI,4BAA4B,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEnabledRelationships.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/utils/useEnabledRelationships.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKrE,KAAK,8BAA8B,GAAG;IACpC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;IAC5C,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,uBAAuB,aACxB,8BAA8B,KACvC,6BAsDF,CAAA"}
1
+ {"version":3,"file":"useEnabledRelationships.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/utils/useEnabledRelationships.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKrE,KAAK,8BAA8B,GAAG;IACpC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;IAC5C,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,uBAAuB,GAClC,UAAU,8BAA8B,KACvC,6BAsDF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAI7E,eAAO,MAAM,gCAAgC,UACpC,wBAAwB,KAC9B,iBAAiB,CAAC,0BAA0B,CAwC9C,CAAA"}
1
+ {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAI7E,eAAO,MAAM,gCAAgC,GAC3C,OAAO,wBAAwB,KAC9B,iBAAiB,CAAC,0BAA0B,CAwC9C,CAAA"}
@@ -3,7 +3,7 @@ import type { CollectionSlug, DataFromCollectionSlug } from 'payload';
3
3
  import type { JSX } from 'react';
4
4
  import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
5
5
  import { type DOMConversionMap, type DOMExportOutput, type EditorConfig, type ElementFormatType, type LexicalEditor, type LexicalNode, type NodeKey } from 'lexical';
6
- import type { StronglyTypedLeafNode } from '../../../../nodeTypes.js';
6
+ import type { StronglyTypedLeafNode } from '../../../../types/nodeTypes.js';
7
7
  export type RelationshipData = {
8
8
  [TCollectionSlug in CollectionSlug]: {
9
9
  relationTo: TCollectionSlug;
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/server/nodes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,MAAM,CAAC,QAAQ,IAAI,KAAK;IAIf,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW;IAM7C,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAIpE,SAAS,IAAI,eAAe;IAa5B,UAAU,IAAI,0BAA0B;IASjD,OAAO,IAAI,gBAAgB;IAIlB,cAAc,IAAI,MAAM;IAIjC,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;CAItC;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,gBAAgB,GAAG,sBAAsB,CAM5F;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,sBAAsB,GAAG,SAAS,GAC5D,IAAI,IAAI,sBAAsB,CAEhC"}
1
+ {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/server/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAEhF,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,OAAO,EACb,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AAE3E,MAAM,MAAM,gBAAgB,GAAG;KAC5B,eAAe,IAAI,cAAc,GAAG;QACnC,UAAU,EAAE,eAAe,CAAA;QAC3B,KAAK,EAAE,sBAAsB,CAAC,eAAe,CAAC,GAAG,MAAM,GAAG,MAAM,CAAA;KACjE;CACF,CAAC,cAAc,CAAC,CAAA;AAEjB,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,GACvD,qBAAqB,CAAC,4BAA4B,EAAE,cAAc,CAAC,CAAA;AAgBrE,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,MAAM,EAAE,gBAAgB,CAAA;gBAEZ,EACV,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,EAAE;QACD,IAAI,EAAE,gBAAgB,CAAA;QACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;QAC1B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd;WAKe,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB;WAQ3D,OAAO,IAAI,MAAM;WAIjB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;WAiBpD,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,sBAAsB;IAc9F,MAAM,CAAC,QAAQ,IAAI,KAAK;IAIf,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW;IAM7C,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAIpE,SAAS,IAAI,eAAe;IAa5B,UAAU,IAAI,0BAA0B;IASjD,OAAO,IAAI,gBAAgB;IAIlB,cAAc,IAAI,MAAM;IAIjC,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;CAItC;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,gBAAgB,GAAG,sBAAsB,CAM5F;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,sBAAsB,GAAG,SAAS,GAC5D,IAAI,IAAI,sBAAsB,CAEhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.js","names":["DecoratorBlockNode","addClassNamesToElement","$applyNodeReplacement","$relationshipElementToServerNode","domNode","id","getAttribute","relationTo","node","$createServerRelationshipNode","value","RelationshipServerNode","__data","constructor","data","format","key","clone","__format","__key","getType","importDOM","div","hasAttribute","conversion","priority","importJSON","serializedNode","version","importedData","setFormat","isInline","createDOM","config","element","document","createElement","theme","relationship","decorate","_editor","_config","exportDOM","setAttribute","String","text","createTextNode","getTextContent","append","exportJSON","getData","type","getLatest","setData","writable","getWritable","$isServerRelationshipNode"],"sources":["../../../../../src/features/relationship/server/nodes/RelationshipNode.tsx"],"sourcesContent":["import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type { CollectionSlug, DataFromCollectionSlug } from 'payload'\nimport type { JSX } from 'react'\n\nimport { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport { addClassNamesToElement } from '@lexical/utils'\nimport {\n $applyNodeReplacement,\n type DOMConversionMap,\n type DOMConversionOutput,\n type DOMExportOutput,\n type EditorConfig,\n type ElementFormatType,\n type LexicalEditor,\n type LexicalNode,\n type NodeKey,\n} from 'lexical'\n\nimport type { StronglyTypedLeafNode } from '../../../../nodeTypes.js'\n\nexport type RelationshipData = {\n [TCollectionSlug in CollectionSlug]: {\n relationTo: TCollectionSlug\n value: DataFromCollectionSlug<TCollectionSlug> | number | string\n }\n}[CollectionSlug]\n\nexport type SerializedRelationshipNode = RelationshipData &\n StronglyTypedLeafNode<SerializedDecoratorBlockNode, 'relationship'>\n\nfunction $relationshipElementToServerNode(domNode: HTMLDivElement): DOMConversionOutput | null {\n const id = domNode.getAttribute('data-lexical-relationship-id')\n const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo')\n\n if (id != null && relationTo != null) {\n const node = $createServerRelationshipNode({\n relationTo,\n value: id,\n })\n return { node }\n }\n return null\n}\n\nexport class RelationshipServerNode extends DecoratorBlockNode {\n __data: RelationshipData\n\n constructor({\n data,\n format,\n key,\n }: {\n data: RelationshipData\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__data = data\n }\n\n static override clone(node: RelationshipServerNode): RelationshipServerNode {\n return new this({\n data: node.__data,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static override getType(): string {\n return 'relationship'\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {\n div: (domNode: HTMLDivElement) => {\n if (\n !domNode.hasAttribute('data-lexical-relationship-relationTo') ||\n !domNode.hasAttribute('data-lexical-relationship-id')\n ) {\n return null\n }\n return {\n conversion: $relationshipElementToServerNode,\n priority: 2,\n }\n },\n }\n }\n\n static override importJSON(serializedNode: SerializedRelationshipNode): RelationshipServerNode {\n if (serializedNode.version === 1 && (serializedNode?.value as unknown as { id: string })?.id) {\n serializedNode.value = (serializedNode.value as unknown as { id: string }).id\n }\n\n const importedData: RelationshipData = {\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n const node = $createServerRelationshipNode(importedData)\n node.setFormat(serializedNode.format)\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n override createDOM(config?: EditorConfig): HTMLElement {\n const element = document.createElement('div')\n addClassNamesToElement(element, config?.theme?.relationship)\n return element\n }\n\n override decorate(_editor: LexicalEditor, _config: EditorConfig): JSX.Element {\n return null as unknown as JSX.Element\n }\n\n override exportDOM(): DOMExportOutput {\n const element = document.createElement('div')\n element.setAttribute(\n 'data-lexical-relationship-id',\n String(typeof this.__data?.value === 'object' ? this.__data?.value?.id : this.__data?.value),\n )\n element.setAttribute('data-lexical-relationship-relationTo', this.__data?.relationTo)\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n override exportJSON(): SerializedRelationshipNode {\n return {\n ...super.exportJSON(),\n ...this.getData(),\n type: 'relationship',\n version: 2,\n }\n }\n\n getData(): RelationshipData {\n return this.getLatest().__data\n }\n\n override getTextContent(): string {\n return `${this.__data?.relationTo} relation to ${typeof this.__data?.value === 'object' ? this.__data?.value?.id : this.__data?.value}`\n }\n\n setData(data: RelationshipData): void {\n const writable = this.getWritable()\n writable.__data = data\n }\n}\n\nexport function $createServerRelationshipNode(data: RelationshipData): RelationshipServerNode {\n return $applyNodeReplacement(\n new RelationshipServerNode({\n data,\n }),\n )\n}\n\nexport function $isServerRelationshipNode(\n node: LexicalNode | null | RelationshipServerNode | undefined,\n): node is RelationshipServerNode {\n return node instanceof RelationshipServerNode\n}\n"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ;AACnC,SAASC,sBAAsB,QAAQ;AACvC,SACEC,qBAAqB,QAShB;AAcP,SAASC,iCAAiCC,OAAuB;EAC/D,MAAMC,EAAA,GAAKD,OAAA,CAAQE,YAAY,CAAC;EAChC,MAAMC,UAAA,GAAaH,OAAA,CAAQE,YAAY,CAAC;EAExC,IAAID,EAAA,IAAM,QAAQE,UAAA,IAAc,MAAM;IACpC,MAAMC,IAAA,GAAOC,6BAAA,CAA8B;MACzCF,UAAA;MACAG,KAAA,EAAOL;IACT;IACA,OAAO;MAAEG;IAAK;EAChB;EACA,OAAO;AACT;AAEA,OAAO,MAAMG,sBAAA,SAA+BX,kBAAA;EAC1CY,MAAA;EAEAC,YAAY;IACVC,IAAI;IACJC,MAAM;IACNC;EAAG,CAKJ,EAAE;IACD,KAAK,CAACD,MAAA,EAAQC,GAAA;IACd,IAAI,CAACJ,MAAM,GAAGE,IAAA;EAChB;EAEA,OAAgBG,MAAMT,IAA4B,EAA0B;IAC1E,OAAO,IAAI,IAAI,CAAC;MACdM,IAAA,EAAMN,IAAA,CAAKI,MAAM;MACjBG,MAAA,EAAQP,IAAA,CAAKU,QAAQ;MACrBF,GAAA,EAAKR,IAAA,CAAKW;IACZ;EACF;EAEA,OAAgBC,QAAA,EAAkB;IAChC,OAAO;EACT;EAEA,OAAgBC,UAAA,EAAqD;IACnE,OAAO;MACLC,GAAA,EAAMlB,OAAA;QACJ,IACE,CAACA,OAAA,CAAQmB,YAAY,CAAC,2CACtB,CAACnB,OAAA,CAAQmB,YAAY,CAAC,iCACtB;UACA,OAAO;QACT;QACA,OAAO;UACLC,UAAA,EAAYrB,g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B;EAESe,WAAA,EAAyC;IAChD,OAAO;MACL,GAAG,KAAK,CAACA,UAAA,EAAY;MACrB,GAAG,IAAI,CAACC,OAAO,EAAE;MACjBC,IAAA,EAAM;MACNvB,OAAA,EAAS;IACX;EACF;EAEAsB,QAAA,EAA4B;IAC1B,OAAO,IAAI,CAACE,SAAS,GAAGxC,MAAM;EAChC;EAESmC,eAAA,EAAyB;IAChC,OAAO,GAAG,IAAI,CAACnC,MAAM,EAAEL,UAAA,gBAA0B,OAAO,IAAI,CAACK,MAAM,EAAEF,KAAA,KAAU,WAAW,IAAI,CAACE,MAAM,EAAEF,KAAA,EAAOL,EAAA,GAAK,IAAI,CAACO,MAAM,EAAEF,KAAA,EAAO;EACzI;EAEA2C,QAAQvC,IAAsB,EAAQ;IACpC,MAAMwC,QAAA,GAAW,IAAI,CAACC,WAAW;IACjCD,QAAA,CAAS1C,MAAM,GAAGE,IAAA;EACpB;AACF;AAEA,OAAO,SAASL,8BAA8BK,IAAsB;EAClE,OAAOZ,qBAAA,CACL,IAAIS,sBAAA,CAAuB;IACzBG;EACF;AAEJ;AAEA,OAAO,SAAS0C,0BACdhD,IAA6D;EAE7D,OAAOA,IAAA,YAAgBG,sBAAA;AACzB","ignoreList":[]}
1
+ {"version":3,"file":"RelationshipNode.js","names":["DecoratorBlockNode","addClassNamesToElement","$applyNodeReplacement","$relationshipElementToServerNode","domNode","id","getAttribute","relationTo","node","$createServerRelationshipNode","value","RelationshipServerNode","__data","constructor","data","format","key","clone","__format","__key","getType","importDOM","div","hasAttribute","conversion","priority","importJSON","serializedNode","version","importedData","setFormat","isInline","createDOM","config","element","document","createElement","theme","relationship","decorate","_editor","_config","exportDOM","setAttribute","String","text","createTextNode","getTextContent","append","exportJSON","getData","type","getLatest","setData","writable","getWritable","$isServerRelationshipNode"],"sources":["../../../../../src/features/relationship/server/nodes/RelationshipNode.tsx"],"sourcesContent":["import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type { CollectionSlug, DataFromCollectionSlug } from 'payload'\nimport type { JSX } from 'react'\n\nimport { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport { addClassNamesToElement } from '@lexical/utils'\nimport {\n $applyNodeReplacement,\n type DOMConversionMap,\n type DOMConversionOutput,\n type DOMExportOutput,\n type EditorConfig,\n type ElementFormatType,\n type LexicalEditor,\n type LexicalNode,\n type NodeKey,\n} from 'lexical'\n\nimport type { StronglyTypedLeafNode } from '../../../../types/nodeTypes.js'\n\nexport type RelationshipData = {\n [TCollectionSlug in CollectionSlug]: {\n relationTo: TCollectionSlug\n value: DataFromCollectionSlug<TCollectionSlug> | number | string\n }\n}[CollectionSlug]\n\nexport type SerializedRelationshipNode = RelationshipData &\n StronglyTypedLeafNode<SerializedDecoratorBlockNode, 'relationship'>\n\nfunction $relationshipElementToServerNode(domNode: HTMLDivElement): DOMConversionOutput | null {\n const id = domNode.getAttribute('data-lexical-relationship-id')\n const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo')\n\n if (id != null && relationTo != null) {\n const node = $createServerRelationshipNode({\n relationTo,\n value: id,\n })\n return { node }\n }\n return null\n}\n\nexport class RelationshipServerNode extends DecoratorBlockNode {\n __data: RelationshipData\n\n constructor({\n data,\n format,\n key,\n }: {\n data: RelationshipData\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__data = data\n }\n\n static override clone(node: RelationshipServerNode): RelationshipServerNode {\n return new this({\n data: node.__data,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static override getType(): string {\n return 'relationship'\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {\n div: (domNode: HTMLDivElement) => {\n if (\n !domNode.hasAttribute('data-lexical-relationship-relationTo') ||\n !domNode.hasAttribute('data-lexical-relationship-id')\n ) {\n return null\n }\n return {\n conversion: $relationshipElementToServerNode,\n priority: 2,\n }\n },\n }\n }\n\n static override importJSON(serializedNode: SerializedRelationshipNode): RelationshipServerNode {\n if (serializedNode.version === 1 && (serializedNode?.value as unknown as { id: string })?.id) {\n serializedNode.value = (serializedNode.value as unknown as { id: string }).id\n }\n\n const importedData: RelationshipData = {\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n const node = $createServerRelationshipNode(importedData)\n node.setFormat(serializedNode.format)\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n override createDOM(config?: EditorConfig): HTMLElement {\n const element = document.createElement('div')\n addClassNamesToElement(element, config?.theme?.relationship)\n return element\n }\n\n override decorate(_editor: LexicalEditor, _config: EditorConfig): JSX.Element {\n return null as unknown as JSX.Element\n }\n\n override exportDOM(): DOMExportOutput {\n const element = document.createElement('div')\n element.setAttribute(\n 'data-lexical-relationship-id',\n String(typeof this.__data?.value === 'object' ? this.__data?.value?.id : this.__data?.value),\n )\n element.setAttribute('data-lexical-relationship-relationTo', this.__data?.relationTo)\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n override exportJSON(): SerializedRelationshipNode {\n return {\n ...super.exportJSON(),\n ...this.getData(),\n type: 'relationship',\n version: 2,\n }\n }\n\n getData(): RelationshipData {\n return this.getLatest().__data\n }\n\n override getTextContent(): string {\n return `${this.__data?.relationTo} relation to ${typeof this.__data?.value === 'object' ? this.__data?.value?.id : this.__data?.value}`\n }\n\n setData(data: RelationshipData): void {\n const writable = this.getWritable()\n writable.__data = data\n }\n}\n\nexport function $createServerRelationshipNode(data: RelationshipData): RelationshipServerNode {\n return $applyNodeReplacement(\n new RelationshipServerNode({\n data,\n }),\n )\n}\n\nexport function $isServerRelationshipNode(\n node: LexicalNode | null | RelationshipServerNode | undefined,\n): node is RelationshipServerNode {\n return node instanceof RelationshipServerNode\n}\n"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ;AACnC,SAASC,sBAAsB,QAAQ;AACvC,SACEC,qBAAqB,QAShB;AAcP,SAASC,iCAAiCC,OAAuB;EAC/D,MAAMC,EAAA,GAAKD,OAAA,CAAQE,YAAY,CAAC;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MAAM,EAAEF,KAAA,EAAOL,EAAA,GAAK,IAAI,CAACO,MAAM,EAAEF,KAAA,EAAO;EACzI;EAEA2C,QAAQvC,IAAsB,EAAQ;IACpC,MAAMwC,QAAA,GAAW,IAAI,CAACC,WAAW;IACjCD,QAAA,CAAS1C,MAAM,GAAGE,IAAA;EACpB;AACF;AAEA,OAAO,SAASL,8BAA8BK,IAAsB;EAClE,OAAOZ,qBAAA,CACL,IAAIS,sBAAA,CAAuB;IACzBG;EACF;AAEJ;AAEA,OAAO,SAAS0C,0BACdhD,IAA6D;EAE7D,OAAOA,IAAA,YAAgBG,sBAAA;AACzB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"addDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/addDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,gCAAgC,UAAW,gBAAgB,EAAE,KAAG,YAQ5E,CAAA"}
1
+ {"version":3,"file":"addDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/addDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,gCAAgC,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAQ5E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"featureButtonsGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/featureButtonsGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,mCAAmC,UAAW,gBAAgB,EAAE,KAAG,YAO/E,CAAA"}
1
+ {"version":3,"file":"featureButtonsGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/featureButtonsGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,mCAAmC,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAO/E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"textDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/textDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,iCAAiC,UAAW,gBAAgB,EAAE,KAAG,YAQ7E,CAAA"}
1
+ {"version":3,"file":"textDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/textDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,iCAAiC,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAQ7E,CAAA"}
@@ -0,0 +1,87 @@
1
+ @layer payload-default {
2
+ .fixed-toolbar.fixed-toolbar--hide {
3
+ visibility: hidden;
4
+ pointer-events: none;
5
+ user-select: none;
6
+ }
7
+
8
+ .fixed-toolbar {
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ align-items: center;
12
+ padding: 0 var(--spacer-2);
13
+ gap: var(--spacer-2);
14
+ vertical-align: middle;
15
+ position: sticky;
16
+ z-index: 2;
17
+ top: var(--doc-controls-height);
18
+ border: var(--stroke-width-small) solid var(--lexical-border-color);
19
+ border-collapse: unset;
20
+ border-radius: var(--radius-medium) var(--radius-medium) 0 0;
21
+ transform: translateY(var(--stroke-width-small));
22
+
23
+ min-height: var(--spacer-6);
24
+
25
+ &:before,
26
+ &:after {
27
+ content: ' ';
28
+ position: absolute;
29
+ top: 0;
30
+ right: 0;
31
+ bottom: 0;
32
+ left: 0;
33
+ border-radius: inherit;
34
+ }
35
+
36
+ &:before {
37
+ background: var(--color-bg);
38
+ opacity: 0.75;
39
+ }
40
+
41
+ &:after {
42
+ backdrop-filter: blur(8px);
43
+ }
44
+
45
+ + .editor-container {
46
+ border-radius: 0 0 var(--radius-medium) var(--radius-medium) !important;
47
+
48
+ > .editor-scroller > .editor {
49
+ > .ContentEditable__root {
50
+ padding-top: var(--spacer-2);
51
+ }
52
+ }
53
+
54
+ > .editor-scroller > .editor > div > .LexicalEditorTheme__placeholder {
55
+ top: var(--spacer-4);
56
+ }
57
+ }
58
+ }
59
+
60
+ .fixed-toolbar__group {
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ align-items: center;
64
+ gap: var(--spacer-2);
65
+ align-self: stretch;
66
+ z-index: 1;
67
+
68
+ .divider {
69
+ width: var(--stroke-width-small);
70
+ align-self: stretch;
71
+ background-color: var(--lexical-border-color);
72
+ }
73
+ }
74
+
75
+ .rich-text-lexical--show-gutter {
76
+ .fixed-toolbar {
77
+ + .editor-container {
78
+ > .editor-scroller > .editor {
79
+ > .ContentEditable__root::before {
80
+ top: var(--spacer-4) !important;
81
+ height: calc(100% - var(--spacer-4) - 8px) !important;
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
@@ -1,5 +1,5 @@
1
1
  import type { PluginComponent } from '../../../../typesClient.js';
2
2
  import type { FixedToolbarFeatureProps } from '../../server/index.js';
3
- import './index.scss';
3
+ import './index.css';
4
4
  export declare const FixedToolbarPlugin: PluginComponent<FixedToolbarFeatureProps>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAMrE,OAAO,cAAc,CAAA;AA2PrB,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAMrE,OAAO,aAAa,CAAA;AA2PpB,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}
@@ -11,6 +11,7 @@ import { useEditorConfigContext } from '../../../../../lexical/config/client/Edi
11
11
  import { ToolbarButton } from '../../../shared/ToolbarButton/index.js';
12
12
  import { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js';
13
13
  import { useToolbarStates } from '../../../shared/useToolbarStates.js';
14
+ import './index.css';
14
15
  function ButtonGroupItem({
15
16
  active,
16
17
  anchorElem,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","useLexicalEditable","useScrollInfo","useThrottledEffect","useTranslation","React","useMemo","useEditorConfigContext","ToolbarButton","ToolbarDropdown","useToolbarStates","ButtonGroupItem","active","anchorElem","editor","enabled","item","Component","_jsx","key","ChildComponent","ToolbarGroupComponent","editorConfig","group","index","toolbarStates","i18n","fieldProps","featureClientSchemaMap","schemaPath","groupState","groupStates","get","DropdownIcon","type","undefined","activeItem","activeItems","dropdownLabel","length","t","count","label","substring","_jsxs","className","items","Icon","itemsContainerClassNames","map","itemState","itemStates","features","toolbarFixed","groups","FixedToolbar","clientProps","parentWithFixedToolbar","currentToolbarRef","useRef","isEditable","y","parentToolbarElem","disableIfParentHasFixedToolbar","parentEditorElem","editorContainerRef","current","sibling","previousElementSibling","classList","contains","currentToolbarElem","currentRect","getBoundingClientRect","parentRect","overlapping","bottom","top","remove","add","onFocus","event","stopPropagation","ref","Fragment","i","getParentEditorWithFixedToolbar","editorConfigContext","parentEditor","resolvedFeatureMap","has","FixedToolbarPlugin","t0","$","currentEditor","currentEditorConfig","applyToFocusedEditor","focusedEditor","t1","t2","Symbol","for","bb0","document","body"],"sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { EditorConfigContextType } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport type { SanitizedClientEditorConfig } from '../../../../../lexical/config/types.js'\nimport type { PluginComponent } from '../../../../typesClient.js'\nimport type { ToolbarStates } from '../../../shared/useToolbarStates.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../../types.js'\nimport type { FixedToolbarFeatureProps } from '../../server/index.js'\n\nimport { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { ToolbarButton } from '../../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js'\nimport { useToolbarStates } from '../../../shared/useToolbarStates.js'\nimport './index.scss'\n\nfunction ButtonGroupItem({\n active,\n anchorElem,\n editor,\n enabled,\n item,\n}: {\n active: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled: boolean\n item: ToolbarGroupItem\n}): React.ReactNode {\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n )\n }\n\n if (!item.ChildComponent) {\n return null\n }\n\n return (\n <ToolbarButton active={active} editor={editor} enabled={enabled} item={item} key={item.key}>\n <item.ChildComponent />\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n editorConfig,\n group,\n index,\n toolbarStates,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n group: ToolbarGroup\n index: number\n toolbarStates: ToolbarStates\n}): React.ReactNode {\n const { i18n } = useTranslation<{}, string>()\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const groupState = toolbarStates.groupStates.get(group.key)\n\n const DropdownIcon = useMemo(() => {\n if (group.type !== 'dropdown') {\n return undefined\n }\n const activeItem = groupState?.activeItems?.[0]\n if (activeItem) {\n return activeItem.ChildComponent\n }\n return group.ChildComponent\n }, [group, groupState?.activeItems])\n\n const dropdownLabel = useMemo(() => {\n if (group.type !== 'dropdown') {\n return undefined\n }\n const activeItems = groupState?.activeItems\n if (!activeItems?.length) {\n return undefined\n }\n if (activeItems.length > 1) {\n return i18n.t('lexical:general:toolbarItemsActive', { count: activeItems.length })\n }\n const item = activeItems[0]!\n let label = item.key\n if (item.label) {\n label =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n if (label.length > 25) {\n label = label.substring(0, 25) + '...'\n }\n return label\n }, [group, groupState?.activeItems, i18n, featureClientSchemaMap, schemaPath])\n\n return (\n <div\n className={`fixed-toolbar__group fixed-toolbar__group-${group.key}`}\n data-toolbar-group-key={group.key}\n key={group.key}\n >\n {group.type === 'dropdown' && group.items.length && groupState ? (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n groupState={groupState}\n Icon={DropdownIcon}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n />\n ) : null}\n {group.type === 'buttons' && group.items.length\n ? group.items.map((item) => {\n const itemState = toolbarStates.itemStates.get(item.key)\n return (\n <ButtonGroupItem\n active={itemState?.active ?? false}\n anchorElem={anchorElem}\n editor={editor}\n enabled={itemState?.enabled ?? true}\n item={item}\n key={item.key}\n />\n )\n })\n : null}\n {index < editorConfig.features.toolbarFixed?.groups.length - 1 && <div className=\"divider\" />}\n </div>\n )\n}\n\nfunction FixedToolbar({\n anchorElem,\n clientProps,\n editor,\n editorConfig,\n parentWithFixedToolbar,\n}: {\n anchorElem: HTMLElement\n clientProps?: FixedToolbarFeatureProps\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n parentWithFixedToolbar: EditorConfigContextType | false\n}): React.ReactNode {\n const currentToolbarRef = React.useRef<HTMLDivElement>(null)\n const isEditable = useLexicalEditable()\n\n const { y } = useScrollInfo()\n\n const toolbarStates = useToolbarStates(editor, editorConfig?.features?.toolbarFixed?.groups)\n\n // Memoize the parent toolbar element\n const parentToolbarElem = useMemo(() => {\n if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {\n return null\n }\n\n const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current\n let sibling = parentEditorElem.previousElementSibling\n while (sibling) {\n if (sibling.classList.contains('fixed-toolbar')) {\n return sibling\n }\n sibling = sibling.previousElementSibling\n }\n return null\n }, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar])\n\n useThrottledEffect(\n () => {\n if (!parentToolbarElem) {\n // this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo\n return\n }\n const currentToolbarElem = currentToolbarRef.current\n if (!currentToolbarElem) {\n return\n }\n\n const currentRect = currentToolbarElem.getBoundingClientRect()\n const parentRect = parentToolbarElem.getBoundingClientRect()\n\n // we only need to check for vertical overlap\n const overlapping = !(\n currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom\n )\n\n if (overlapping) {\n currentToolbarElem.classList.remove('fixed-toolbar')\n currentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--overlapping')\n parentToolbarElem.classList.remove('fixed-toolbar')\n parentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--hide')\n } else {\n if (!currentToolbarElem.classList.contains('fixed-toolbar--overlapping')) {\n return\n }\n currentToolbarElem.classList.remove('fixed-toolbar--overlapping')\n currentToolbarElem.classList.add('fixed-toolbar')\n parentToolbarElem.classList.remove('fixed-toolbar--hide')\n parentToolbarElem.classList.add('fixed-toolbar')\n }\n },\n 50,\n [currentToolbarRef, parentToolbarElem, y],\n )\n\n return (\n <div\n className=\"fixed-toolbar\"\n onFocus={(event) => {\n // Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,\n // the parent editor will be focused, and the child editor will lose focus.\n event.stopPropagation()\n }}\n ref={currentToolbarRef}\n >\n {isEditable && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarFixed?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n group={group}\n index={i}\n key={group.key}\n toolbarStates={toolbarStates}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nconst getParentEditorWithFixedToolbar = (\n editorConfigContext: EditorConfigContextType,\n): EditorConfigContextType | false => {\n if (editorConfigContext.parentEditor?.editorConfig) {\n if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {\n return editorConfigContext.parentEditor\n } else {\n if (editorConfigContext.parentEditor) {\n return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor)\n }\n }\n }\n return false\n}\n\nexport const FixedToolbarPlugin: PluginComponent<FixedToolbarFeatureProps> = ({ clientProps }) => {\n const [currentEditor] = useLexicalComposerContext()\n const editorConfigContext = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n if (!isEditable) {\n return null\n }\n\n const { editorConfig: currentEditorConfig } = editorConfigContext\n\n const editor = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editor || currentEditor\n : currentEditor\n\n const editorConfig = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig\n : currentEditorConfig\n\n const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext)\n\n if (clientProps?.disableIfParentHasFixedToolbar) {\n if (parentWithFixedToolbar) {\n return null\n }\n }\n\n if (!editorConfig?.features?.toolbarFixed?.groups?.length) {\n return null\n }\n\n return (\n <FixedToolbar\n anchorElem={document.body}\n clientProps={clientProps}\n editor={editor}\n editorConfig={editorConfig}\n parentWithFixedToolbar={parentWithFixedToolbar}\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,aAAa,EAAEC,kBAAkB,EAAEC,cAAc,QAAQ;AAClE,YAAYC,KAAA,MAAW;AACvB,SAASC,OAAO,QAAQ;AASxB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,aAAa,QAAQ;AAC9B,SAASC,eAAe,QAAQ;AAChC,SAASC,gBAAgB,QAAQ;AAGjC,SAASC,gBAAgB;EACvBC,MAAM;EACNC,UAAU;EACVC,MAAM;EACNC,OAAO;EACPC;AAAI,CAOL;EACC,IAAIA,IAAA,CAAKC,SAAS,EAAE;IAClB,OACED,IAAA,EAAMC,SAAA,iBACJC,IAAA,CAACF,IAAA,CAAKC,SAAS;MAACJ,UAAA,EAAYA,UAAA;MAAYC,MAAA,EAAQA,MAAA;MAAQE,IAAA,EAAMA;OAAWA,IAAA,CAAKG,GAAG;EAGvF;EAEA,IAAI,CAACH,IAAA,CAAKI,cAAc,EAAE;IACxB,OAAO;EACT;EAEA,oBACEF,IAAA,CAACV,aAAA;IAAcI,MAAA,EAAQA,MAAA;IAAQE,MAAA,EAAQA,MAAA;IAAQC,OAAA,EAASA,OAAA;IAASC,IAAA,EAAMA,IAAA;cACrE,aAAAE,IAAA,CAACF,IAAA,CAAKI,cAAc;KAD4DJ,IAAA,CAAKG,GAAG;AAI9F;AAEA,SAASE,sBAAsB;EAC7BR,UAAU;EACVC,MAAM;EACNQ,YAAY;EACZC,KAAK;EACLC,KAAK;EACLC;AAAa,CAQd;EACC,MAAM;IAAEC;EAAI,CAAE,GAAGtB,cAAA;EACjB,MAAM;IACJuB,UAAA,E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AAAhF,IAAA,CAAAqC,YAAA;QAAA1C,UAAA,EAAA0F,QAAA,CAAAC,IAAA;QAAAhD,WAAA;QAAA1C,MAAA;QAAAQ,YAAA;QAAAmC;MAAA,C;;;;;;;;;;;;;;;SAAAyC,E;CAQJ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","useLexicalEditable","useScrollInfo","useThrottledEffect","useTranslation","React","useMemo","useEditorConfigContext","ToolbarButton","ToolbarDropdown","useToolbarStates","ButtonGroupItem","active","anchorElem","editor","enabled","item","Component","_jsx","key","ChildComponent","ToolbarGroupComponent","editorConfig","group","index","toolbarStates","i18n","fieldProps","featureClientSchemaMap","schemaPath","groupState","groupStates","get","DropdownIcon","type","undefined","activeItem","activeItems","dropdownLabel","length","t","count","label","substring","_jsxs","className","items","Icon","itemsContainerClassNames","map","itemState","itemStates","features","toolbarFixed","groups","FixedToolbar","clientProps","parentWithFixedToolbar","currentToolbarRef","useRef","isEditable","y","parentToolbarElem","disableIfParentHasFixedToolbar","parentEditorElem","editorContainerRef","current","sibling","previousElementSibling","classList","contains","currentToolbarElem","currentRect","getBoundingClientRect","parentRect","overlapping","bottom","top","remove","add","onFocus","event","stopPropagation","ref","Fragment","i","getParentEditorWithFixedToolbar","editorConfigContext","parentEditor","resolvedFeatureMap","has","FixedToolbarPlugin","t0","$","currentEditor","currentEditorConfig","applyToFocusedEditor","focusedEditor","t1","t2","Symbol","for","bb0","document","body"],"sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { useScrollInfo, useThrottledEffect, useTranslation } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { useMemo } from 'react'\n\nimport type { EditorConfigContextType } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport type { SanitizedClientEditorConfig } from '../../../../../lexical/config/types.js'\nimport type { PluginComponent } from '../../../../typesClient.js'\nimport type { ToolbarStates } from '../../../shared/useToolbarStates.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../../types.js'\nimport type { FixedToolbarFeatureProps } from '../../server/index.js'\n\nimport { useEditorConfigContext } from '../../../../../lexical/config/client/EditorConfigProvider.js'\nimport { ToolbarButton } from '../../../shared/ToolbarButton/index.js'\nimport { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js'\nimport { useToolbarStates } from '../../../shared/useToolbarStates.js'\nimport './index.css'\n\nfunction ButtonGroupItem({\n active,\n anchorElem,\n editor,\n enabled,\n item,\n}: {\n active: boolean\n anchorElem: HTMLElement\n editor: LexicalEditor\n enabled: boolean\n item: ToolbarGroupItem\n}): React.ReactNode {\n if (item.Component) {\n return (\n item?.Component && (\n <item.Component anchorElem={anchorElem} editor={editor} item={item} key={item.key} />\n )\n )\n }\n\n if (!item.ChildComponent) {\n return null\n }\n\n return (\n <ToolbarButton active={active} editor={editor} enabled={enabled} item={item} key={item.key}>\n <item.ChildComponent />\n </ToolbarButton>\n )\n}\n\nfunction ToolbarGroupComponent({\n anchorElem,\n editor,\n editorConfig,\n group,\n index,\n toolbarStates,\n}: {\n anchorElem: HTMLElement\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n group: ToolbarGroup\n index: number\n toolbarStates: ToolbarStates\n}): React.ReactNode {\n const { i18n } = useTranslation<{}, string>()\n const {\n fieldProps: { featureClientSchemaMap, schemaPath },\n } = useEditorConfigContext()\n\n const groupState = toolbarStates.groupStates.get(group.key)\n\n const DropdownIcon = useMemo(() => {\n if (group.type !== 'dropdown') {\n return undefined\n }\n const activeItem = groupState?.activeItems?.[0]\n if (activeItem) {\n return activeItem.ChildComponent\n }\n return group.ChildComponent\n }, [group, groupState?.activeItems])\n\n const dropdownLabel = useMemo(() => {\n if (group.type !== 'dropdown') {\n return undefined\n }\n const activeItems = groupState?.activeItems\n if (!activeItems?.length) {\n return undefined\n }\n if (activeItems.length > 1) {\n return i18n.t('lexical:general:toolbarItemsActive', { count: activeItems.length })\n }\n const item = activeItems[0]!\n let label = item.key\n if (item.label) {\n label =\n typeof item.label === 'function'\n ? item.label({ featureClientSchemaMap, i18n, schemaPath })\n : item.label\n }\n if (label.length > 25) {\n label = label.substring(0, 25) + '...'\n }\n return label\n }, [group, groupState?.activeItems, i18n, featureClientSchemaMap, schemaPath])\n\n return (\n <div\n className={`fixed-toolbar__group fixed-toolbar__group-${group.key}`}\n data-toolbar-group-key={group.key}\n key={group.key}\n >\n {group.type === 'dropdown' && group.items.length && groupState ? (\n <ToolbarDropdown\n anchorElem={anchorElem}\n editor={editor}\n group={group}\n groupState={groupState}\n Icon={DropdownIcon}\n itemsContainerClassNames={['fixed-toolbar__dropdown-items']}\n label={dropdownLabel}\n />\n ) : null}\n {group.type === 'buttons' && group.items.length\n ? group.items.map((item) => {\n const itemState = toolbarStates.itemStates.get(item.key)\n return (\n <ButtonGroupItem\n active={itemState?.active ?? false}\n anchorElem={anchorElem}\n editor={editor}\n enabled={itemState?.enabled ?? true}\n item={item}\n key={item.key}\n />\n )\n })\n : null}\n {index < editorConfig.features.toolbarFixed?.groups.length - 1 && <div className=\"divider\" />}\n </div>\n )\n}\n\nfunction FixedToolbar({\n anchorElem,\n clientProps,\n editor,\n editorConfig,\n parentWithFixedToolbar,\n}: {\n anchorElem: HTMLElement\n clientProps?: FixedToolbarFeatureProps\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n parentWithFixedToolbar: EditorConfigContextType | false\n}): React.ReactNode {\n const currentToolbarRef = React.useRef<HTMLDivElement>(null)\n const isEditable = useLexicalEditable()\n\n const { y } = useScrollInfo()\n\n const toolbarStates = useToolbarStates(editor, editorConfig?.features?.toolbarFixed?.groups)\n\n // Memoize the parent toolbar element\n const parentToolbarElem = useMemo(() => {\n if (!parentWithFixedToolbar || clientProps?.disableIfParentHasFixedToolbar) {\n return null\n }\n\n const parentEditorElem = parentWithFixedToolbar.editorContainerRef.current\n let sibling = parentEditorElem.previousElementSibling\n while (sibling) {\n if (sibling.classList.contains('fixed-toolbar')) {\n return sibling\n }\n sibling = sibling.previousElementSibling\n }\n return null\n }, [clientProps?.disableIfParentHasFixedToolbar, parentWithFixedToolbar])\n\n useThrottledEffect(\n () => {\n if (!parentToolbarElem) {\n // this also checks for clientProps?.disableIfParentHasFixedToolbar indirectly, see the parentToolbarElem useMemo\n return\n }\n const currentToolbarElem = currentToolbarRef.current\n if (!currentToolbarElem) {\n return\n }\n\n const currentRect = currentToolbarElem.getBoundingClientRect()\n const parentRect = parentToolbarElem.getBoundingClientRect()\n\n // we only need to check for vertical overlap\n const overlapping = !(\n currentRect.bottom < parentRect.top || currentRect.top > parentRect.bottom\n )\n\n if (overlapping) {\n currentToolbarElem.classList.remove('fixed-toolbar')\n currentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--overlapping')\n parentToolbarElem.classList.remove('fixed-toolbar')\n parentToolbarElem.classList.add('fixed-toolbar', 'fixed-toolbar--hide')\n } else {\n if (!currentToolbarElem.classList.contains('fixed-toolbar--overlapping')) {\n return\n }\n currentToolbarElem.classList.remove('fixed-toolbar--overlapping')\n currentToolbarElem.classList.add('fixed-toolbar')\n parentToolbarElem.classList.remove('fixed-toolbar--hide')\n parentToolbarElem.classList.add('fixed-toolbar')\n }\n },\n 50,\n [currentToolbarRef, parentToolbarElem, y],\n )\n\n return (\n <div\n className=\"fixed-toolbar\"\n onFocus={(event) => {\n // Prevent other focus events being triggered. Otherwise, if this was to be clicked while in a child editor,\n // the parent editor will be focused, and the child editor will lose focus.\n event.stopPropagation()\n }}\n ref={currentToolbarRef}\n >\n {isEditable && (\n <React.Fragment>\n {editorConfig?.features &&\n editorConfig.features?.toolbarFixed?.groups.map((group, i) => {\n return (\n <ToolbarGroupComponent\n anchorElem={anchorElem}\n editor={editor}\n editorConfig={editorConfig}\n group={group}\n index={i}\n key={group.key}\n toolbarStates={toolbarStates}\n />\n )\n })}\n </React.Fragment>\n )}\n </div>\n )\n}\n\nconst getParentEditorWithFixedToolbar = (\n editorConfigContext: EditorConfigContextType,\n): EditorConfigContextType | false => {\n if (editorConfigContext.parentEditor?.editorConfig) {\n if (editorConfigContext.parentEditor?.editorConfig.resolvedFeatureMap.has('toolbarFixed')) {\n return editorConfigContext.parentEditor\n } else {\n if (editorConfigContext.parentEditor) {\n return getParentEditorWithFixedToolbar(editorConfigContext.parentEditor)\n }\n }\n }\n return false\n}\n\nexport const FixedToolbarPlugin: PluginComponent<FixedToolbarFeatureProps> = ({ clientProps }) => {\n const [currentEditor] = useLexicalComposerContext()\n const editorConfigContext = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n if (!isEditable) {\n return null\n }\n\n const { editorConfig: currentEditorConfig } = editorConfigContext\n\n const editor = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editor || currentEditor\n : currentEditor\n\n const editorConfig = clientProps.applyToFocusedEditor\n ? editorConfigContext.focusedEditor?.editorConfig || currentEditorConfig\n : currentEditorConfig\n\n const parentWithFixedToolbar = getParentEditorWithFixedToolbar(editorConfigContext)\n\n if (clientProps?.disableIfParentHasFixedToolbar) {\n if (parentWithFixedToolbar) {\n return null\n }\n }\n\n if (!editorConfig?.features?.toolbarFixed?.groups?.length) {\n return null\n }\n\n return (\n <FixedToolbar\n anchorElem={document.body}\n clientProps={clientProps}\n editor={editor}\n editorConfig={editorConfig}\n parentWithFixedToolbar={parentWithFixedToolbar}\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,aAAa,EAAEC,kBAAkB,EAAEC,cAAc,QAAQ;AAClE,YAAYC,KAAA,MAAW;AACvB,SAASC,OAAO,QAAQ;AASxB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,aAAa,QAAQ;AAC9B,SAASC,eAAe,QAAQ;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