@payloadcms/richtext-lexical 3.85.0 → 4.0.0-internal.1f9ae9a

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 (916) 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-QJ5EETIB.js → chunk-6QWQ7JV4.js} +2 -2
  10. package/dist/exports/client/chunk-FEJXFRL7.js +2 -0
  11. package/dist/exports/client/chunk-FEJXFRL7.js.map +7 -0
  12. package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  13. package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
  14. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  15. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  16. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  17. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  18. package/dist/exports/client/component-CVM4OESA.js +2 -0
  19. package/dist/exports/client/component-CVM4OESA.js.map +7 -0
  20. package/dist/exports/client/componentInline-JJZ2NKW2.js +2 -0
  21. package/dist/exports/client/index.d.ts +0 -2
  22. package/dist/exports/client/index.d.ts.map +1 -1
  23. package/dist/exports/client/index.js +30 -30
  24. package/dist/exports/client/index.js.map +4 -4
  25. package/dist/exports/react/index.d.ts +1 -1
  26. package/dist/exports/react/index.d.ts.map +1 -1
  27. package/dist/exports/react/index.js.map +1 -1
  28. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  29. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  30. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  31. package/dist/features/blockquote/server/index.d.ts +1 -1
  32. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  33. package/dist/features/blockquote/server/index.js +0 -39
  34. package/dist/features/blockquote/server/index.js.map +1 -1
  35. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  36. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  37. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  38. package/dist/features/blocks/client/component/index.css +178 -0
  39. package/dist/features/blocks/client/component/index.d.ts +2 -2
  40. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  41. package/dist/features/blocks/client/component/index.js +75 -18
  42. package/dist/features/blocks/client/component/index.js.map +1 -1
  43. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  44. package/dist/features/blocks/client/componentInline/index.css +85 -0
  45. package/dist/features/blocks/client/componentInline/index.d.ts +2 -2
  46. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  47. package/dist/features/blocks/client/componentInline/index.js +20 -7
  48. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  49. package/dist/features/blocks/client/index.d.ts.map +1 -1
  50. package/dist/features/blocks/client/index.js +0 -2
  51. package/dist/features/blocks/client/index.js.map +1 -1
  52. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  53. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +1 -1
  54. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  55. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  56. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +1 -1
  57. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  58. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  59. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  60. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  61. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  62. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  63. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  64. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  65. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  66. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  67. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  68. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  69. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  70. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  71. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  72. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  73. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  74. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  75. package/dist/features/blocks/server/index.js +1 -1
  76. package/dist/features/blocks/server/index.js.map +1 -1
  77. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  78. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -1
  79. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  80. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  81. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +1 -1
  82. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  83. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  84. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  85. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  86. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  87. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  89. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  90. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  91. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  92. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  93. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  94. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  95. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  96. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  97. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  98. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  99. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  100. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  101. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  102. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  103. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  104. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  105. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  107. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  110. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  112. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  113. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  115. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  116. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  117. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  118. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  123. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/async/types.d.ts +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  129. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  131. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  132. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  134. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  135. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  137. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  138. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  140. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  141. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  143. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  144. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  146. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  147. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  149. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  151. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  152. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  155. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  157. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  159. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  165. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  170. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +2 -2
  171. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  172. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  173. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  174. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  175. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  176. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  177. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  178. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  179. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  180. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  182. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  183. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  185. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  186. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  188. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  189. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  190. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  191. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  192. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  193. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  194. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  195. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  196. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  197. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  198. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  199. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  200. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  201. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  202. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  204. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  207. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  209. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  211. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  215. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  216. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  217. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  218. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +1 -1
  219. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  220. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  221. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  222. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  223. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  224. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  225. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  226. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  227. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  228. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  229. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  230. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  231. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  232. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  233. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  234. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  235. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  236. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  237. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  238. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  239. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  240. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  241. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  242. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  243. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  244. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  245. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  246. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  247. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  248. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  249. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  250. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  251. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  252. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  253. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  254. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  255. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  256. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  257. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  258. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  259. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  260. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  261. package/dist/features/experimental_table/server/index.d.ts +1 -1
  262. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  263. package/dist/features/experimental_table/server/index.js +0 -102
  264. package/dist/features/experimental_table/server/index.js.map +1 -1
  265. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  266. package/dist/features/heading/server/index.d.ts +1 -1
  267. package/dist/features/heading/server/index.d.ts.map +1 -1
  268. package/dist/features/heading/server/index.js +0 -39
  269. package/dist/features/heading/server/index.js.map +1 -1
  270. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  271. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  272. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  273. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  274. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  275. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  276. package/dist/features/horizontalRule/server/index.js +0 -8
  277. package/dist/features/horizontalRule/server/index.js.map +1 -1
  278. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  279. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  280. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  281. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  282. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  283. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  284. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  285. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  286. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  287. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  288. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  289. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  290. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  291. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  292. package/dist/features/link/nodes/types.d.ts +1 -1
  293. package/dist/features/link/nodes/types.d.ts.map +1 -1
  294. package/dist/features/link/nodes/types.js.map +1 -1
  295. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  296. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  297. package/dist/features/link/server/index.d.ts.map +1 -1
  298. package/dist/features/link/server/index.js +0 -71
  299. package/dist/features/link/server/index.js.map +1 -1
  300. package/dist/features/link/server/validate.d.ts.map +1 -1
  301. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  302. package/dist/features/lists/checklist/server/index.js +0 -7
  303. package/dist/features/lists/checklist/server/index.js.map +1 -1
  304. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  305. package/dist/features/lists/orderedList/server/index.js +0 -7
  306. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  307. package/dist/features/lists/plugin/index.d.ts +1 -1
  308. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  309. package/dist/features/lists/plugin/index.js.map +1 -1
  310. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  311. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  312. package/dist/features/lists/unorderedList/server/index.js +0 -7
  313. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  314. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  315. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  316. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  317. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  318. package/dist/features/relationship/client/components/index.css +112 -0
  319. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  320. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  321. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  322. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -1
  323. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  324. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  325. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  326. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  327. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  328. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  329. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  330. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  331. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  332. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  333. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  334. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  335. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  336. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  337. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  338. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  339. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  340. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  341. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  342. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  343. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  344. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  345. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  346. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  347. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  348. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  349. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  350. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  351. package/dist/features/toolbars/types.d.ts +5 -1
  352. package/dist/features/toolbars/types.d.ts.map +1 -1
  353. package/dist/features/toolbars/types.js.map +1 -1
  354. package/dist/features/typesClient.d.ts +1 -1
  355. package/dist/features/typesClient.d.ts.map +1 -1
  356. package/dist/features/typesClient.js.map +1 -1
  357. package/dist/features/typesServer.d.ts +3 -20
  358. package/dist/features/typesServer.d.ts.map +1 -1
  359. package/dist/features/typesServer.js.map +1 -1
  360. package/dist/features/upload/client/component/index.css +214 -0
  361. package/dist/features/upload/client/component/index.d.ts +1 -1
  362. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  363. package/dist/features/upload/client/component/index.js +86 -63
  364. package/dist/features/upload/client/component/index.js.map +1 -1
  365. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  366. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  367. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  368. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  369. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  370. package/dist/features/upload/server/index.d.ts.map +1 -1
  371. package/dist/features/upload/server/index.js +0 -78
  372. package/dist/features/upload/server/index.js.map +1 -1
  373. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -1
  374. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  375. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  376. package/dist/features/upload/server/validate.d.ts.map +1 -1
  377. package/dist/field/Diff/converters/link.d.ts +1 -1
  378. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  379. package/dist/field/Diff/converters/link.js.map +1 -1
  380. package/dist/field/Diff/converters/listitem/index.css +80 -0
  381. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  382. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  383. package/dist/field/Diff/converters/listitem/index.js +1 -0
  384. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  385. package/dist/field/Diff/converters/relationship/index.css +108 -0
  386. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  387. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  388. package/dist/field/Diff/converters/relationship/index.js +11 -28
  389. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  390. package/dist/field/Diff/converters/unknown/index.css +37 -0
  391. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  392. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  393. package/dist/field/Diff/converters/unknown/index.js +1 -0
  394. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  395. package/dist/field/Diff/converters/upload/index.css +175 -0
  396. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  397. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  398. package/dist/field/Diff/converters/upload/index.js +7 -2
  399. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  400. package/dist/field/Diff/index.css +156 -0
  401. package/dist/field/Diff/index.d.ts +1 -1
  402. package/dist/field/Diff/index.d.ts.map +1 -1
  403. package/dist/field/Diff/index.js +1 -0
  404. package/dist/field/Diff/index.js.map +1 -1
  405. package/dist/field/Field.d.ts +3 -3
  406. package/dist/field/Field.d.ts.map +1 -1
  407. package/dist/field/Field.js +12 -11
  408. package/dist/field/Field.js.map +1 -1
  409. package/dist/field/RenderLexical/index.d.ts +2 -2
  410. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  411. package/dist/field/RenderLexical/index.js.map +1 -1
  412. package/dist/field/RichTextViewProvider.d.ts +1 -1
  413. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  414. package/dist/field/RichTextViewProvider.js.map +1 -1
  415. package/dist/field/ViewSelector.css +32 -0
  416. package/dist/field/ViewSelector.d.ts +1 -1
  417. package/dist/field/ViewSelector.d.ts.map +1 -1
  418. package/dist/field/ViewSelector.js +1 -0
  419. package/dist/field/ViewSelector.js.map +1 -1
  420. package/dist/field/bundled.css +1 -1
  421. package/dist/field/index.css +60 -0
  422. package/dist/field/index.d.ts +1 -1
  423. package/dist/field/index.d.ts.map +1 -1
  424. package/dist/field/index.js.map +1 -1
  425. package/dist/field/rscEntry.d.ts +1 -1
  426. package/dist/field/rscEntry.d.ts.map +1 -1
  427. package/dist/field/rscEntry.js.map +1 -1
  428. package/dist/hooks.d.ts +6 -0
  429. package/dist/hooks.d.ts.map +1 -0
  430. package/dist/hooks.js +548 -0
  431. package/dist/hooks.js.map +1 -0
  432. package/dist/index.d.ts +3 -13
  433. package/dist/index.d.ts.map +1 -1
  434. package/dist/index.js +20 -628
  435. package/dist/index.js.map +1 -1
  436. package/dist/lexical/LexicalEditor.css +50 -0
  437. package/dist/lexical/LexicalEditor.d.ts +1 -1
  438. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  439. package/dist/lexical/LexicalEditor.js +1 -0
  440. package/dist/lexical/LexicalEditor.js.map +1 -1
  441. package/dist/lexical/LexicalProvider.d.ts +1 -1
  442. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  443. package/dist/lexical/LexicalProvider.js.map +1 -1
  444. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  445. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  446. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  447. package/dist/lexical/config/client/loader.d.ts +1 -1
  448. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  449. package/dist/lexical/config/client/loader.js.map +1 -1
  450. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  451. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  452. package/dist/lexical/config/client/sanitize.js.map +1 -1
  453. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  454. package/dist/lexical/config/server/loader.js +12 -9
  455. package/dist/lexical/config/server/loader.js.map +1 -1
  456. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  457. package/dist/lexical/config/server/sanitize.js +3 -9
  458. package/dist/lexical/config/server/sanitize.js.map +1 -1
  459. package/dist/lexical/config/types.d.ts +1 -1
  460. package/dist/lexical/config/types.d.ts.map +1 -1
  461. package/dist/lexical/config/types.js.map +1 -1
  462. package/dist/lexical/nodes/index.d.ts +1 -1
  463. package/dist/lexical/nodes/index.d.ts.map +1 -1
  464. package/dist/lexical/nodes/index.js.map +1 -1
  465. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  466. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  467. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  468. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  469. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  470. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  471. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  472. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  473. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  474. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  475. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  476. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  477. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  478. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  479. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  480. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  481. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  482. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  483. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  484. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  485. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  486. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  487. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  488. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  489. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  490. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  491. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  492. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  493. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  494. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  495. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  496. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  497. package/dist/lexical/theme/EditorTheme.css +359 -0
  498. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  499. package/dist/lexical/theme/EditorTheme.js +1 -0
  500. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  501. package/dist/lexical/ui/ContentEditable.css +95 -0
  502. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  503. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  504. package/dist/lexical/ui/ContentEditable.js +1 -0
  505. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  506. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  507. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  508. package/dist/lexical/ui/icons/Add/index.js +19 -12
  509. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  510. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  511. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  512. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  513. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  514. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  515. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  516. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  517. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  518. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  519. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  520. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  521. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  522. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  523. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  524. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  525. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  526. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  527. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  528. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  529. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  530. package/dist/lexical/ui/icons/Block/index.js +13 -28
  531. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  532. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  533. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  534. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  535. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  536. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  537. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  538. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  539. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  540. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  541. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  542. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  543. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  544. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  545. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  546. package/dist/lexical/ui/icons/Code/index.js +15 -13
  547. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  548. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  549. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  550. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  551. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  552. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  553. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  554. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  555. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  556. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  557. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  558. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  559. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  560. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  561. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  562. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  563. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  564. package/dist/lexical/ui/icons/H1/index.js +9 -6
  565. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  566. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  567. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  568. package/dist/lexical/ui/icons/H2/index.js +9 -6
  569. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  570. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  571. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  572. package/dist/lexical/ui/icons/H3/index.js +9 -6
  573. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  574. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  575. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  576. package/dist/lexical/ui/icons/H4/index.js +9 -6
  577. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  579. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  580. package/dist/lexical/ui/icons/H5/index.js +9 -6
  581. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  582. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  583. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  584. package/dist/lexical/ui/icons/H6/index.js +9 -6
  585. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  587. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  588. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  589. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  591. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  592. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  593. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  594. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  595. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  596. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  597. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  598. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  599. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  600. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  601. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  603. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  604. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  605. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  606. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  607. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  608. package/dist/lexical/ui/icons/Link/index.js +14 -9
  609. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  611. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  612. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  613. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  615. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  616. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  617. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  618. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  619. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  620. package/dist/lexical/ui/icons/Page/index.js +21 -0
  621. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  622. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  623. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  624. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  625. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  627. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  628. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  629. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  630. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  631. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  632. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  633. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  634. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  635. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  636. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  637. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  639. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  640. package/dist/lexical/ui/icons/Table/index.js +20 -15
  641. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  642. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  643. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  644. package/dist/lexical/ui/icons/Text/index.js +17 -8
  645. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  646. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  647. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  648. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  649. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  650. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  651. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  652. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  653. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  654. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  655. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  656. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  657. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  658. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  659. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  660. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  661. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  662. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  663. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  664. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  665. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  666. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  667. package/dist/{types.d.ts → types/index.d.ts} +9 -9
  668. package/dist/types/index.d.ts.map +1 -0
  669. package/dist/types/index.js +2 -0
  670. package/dist/types/index.js.map +1 -0
  671. package/dist/{nodeTypes.d.ts → types/nodeTypes.d.ts} +10 -10
  672. package/dist/types/nodeTypes.d.ts.map +1 -0
  673. package/dist/types/nodeTypes.js.map +1 -0
  674. package/dist/types/schema.d.ts +6 -0
  675. package/dist/types/schema.d.ts.map +1 -0
  676. package/dist/types/schema.js +81 -0
  677. package/dist/types/schema.js.map +1 -0
  678. package/dist/utilities/buildEditorState.d.ts +1 -1
  679. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  680. package/dist/utilities/buildEditorState.js +13 -0
  681. package/dist/utilities/buildEditorState.js.map +1 -1
  682. package/dist/utilities/buildInitialState.js.map +1 -1
  683. package/dist/utilities/createClientFeature.d.ts +1 -1
  684. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  685. package/dist/utilities/createClientFeature.js.map +1 -1
  686. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  687. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  688. package/dist/utilities/editorConfigFactory.js.map +1 -1
  689. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  690. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  691. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  692. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  693. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  694. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  695. package/dist/utilities/generateImportMap.d.ts +1 -1
  696. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  697. package/dist/utilities/generateImportMap.js.map +1 -1
  698. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  699. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  700. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  701. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  702. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  703. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  704. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  705. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  706. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  707. package/dist/validate/index.d.ts.map +1 -1
  708. package/package.json +16 -21
  709. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  710. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  711. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  712. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  713. package/dist/exports/client/Field-OVF2FPGD.js +0 -2
  714. package/dist/exports/client/Field-OVF2FPGD.js.map +0 -7
  715. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  716. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  717. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  718. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  719. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  720. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  721. package/dist/exports/client/chunk-XFA5M7FY.js +0 -2
  722. package/dist/exports/client/chunk-XFA5M7FY.js.map +0 -7
  723. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  724. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  725. package/dist/exports/client/componentInline-A4H3EY3L.js +0 -2
  726. package/dist/exports/server/migrate.d.ts +0 -16
  727. package/dist/exports/server/migrate.d.ts.map +0 -1
  728. package/dist/exports/server/migrate.js +0 -16
  729. package/dist/exports/server/migrate.js.map +0 -1
  730. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  731. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  732. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  733. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  734. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  735. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  736. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  737. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  738. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  739. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  740. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  741. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  742. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  743. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  744. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  745. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  746. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  747. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  748. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  749. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  750. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  751. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  752. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  753. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  754. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  755. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  756. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  757. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  758. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  759. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  760. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  761. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  762. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  763. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  764. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  765. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  766. package/dist/features/lists/htmlConverter.d.ts +0 -5
  767. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  768. package/dist/features/lists/htmlConverter.js +0 -81
  769. package/dist/features/lists/htmlConverter.js.map +0 -1
  770. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  771. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  772. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  773. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  774. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  775. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  776. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  777. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  778. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  779. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  780. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  781. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  782. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  783. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  784. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  785. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  786. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  787. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  788. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  789. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  790. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  791. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  792. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  793. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  794. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  795. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  796. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  797. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  798. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  799. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  800. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  801. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  802. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  803. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  804. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  805. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  806. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  807. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  808. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  809. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  810. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  811. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  812. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  813. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  814. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  815. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  816. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  817. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  818. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  819. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  820. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  821. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  822. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  823. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  824. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  825. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  826. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  827. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  828. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  829. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  830. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  831. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  832. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  833. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  834. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  835. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  836. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  837. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  838. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  839. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  840. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  841. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  842. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  843. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  844. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  845. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  846. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  847. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  848. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  849. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  850. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  851. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  852. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  853. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  854. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  855. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  856. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  857. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  858. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  859. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  860. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  861. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  862. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  863. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  864. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  865. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  866. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  867. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  868. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  869. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  870. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  871. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  872. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  873. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  874. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  875. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  876. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  877. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  878. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  879. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  880. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  881. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  882. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  883. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  884. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  885. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  886. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  887. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  888. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  889. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  890. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  891. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  892. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  893. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  894. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  895. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  896. package/dist/lexical/ui/icons/AI/index.js +0 -34
  897. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  898. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  899. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  900. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  901. package/dist/nodeTypes.d.ts.map +0 -1
  902. package/dist/nodeTypes.js.map +0 -1
  903. package/dist/types.d.ts.map +0 -1
  904. package/dist/types.js +0 -2
  905. package/dist/types.js.map +0 -1
  906. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  907. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  908. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  909. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  910. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  911. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  912. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  913. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  914. /package/dist/exports/client/{chunk-QJ5EETIB.js.map → chunk-6QWQ7JV4.js.map} +0 -0
  915. /package/dist/exports/client/{componentInline-A4H3EY3L.js.map → componentInline-JJZ2NKW2.js.map} +0 -0
  916. /package/dist/{nodeTypes.js → types/nodeTypes.js} +0 -0
@@ -1,10 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { File } from '@payloadcms/ui/rsc';
3
3
  import { createHash } from 'crypto';
4
+ import './index.css';
4
5
  import { formatFilesize } from 'payload/shared';
5
6
  import React from 'react';
6
7
  const baseClass = 'lexical-upload-diff';
7
- export const UploadDiffHTMLConverterAsync = () => {
8
+ export const UploadDiffHTMLConverterAsync = ({
9
+ i18n,
10
+ req
11
+ }) => {
8
12
  return {
9
13
  upload: async ({
10
14
  node,
@@ -33,6 +37,7 @@ export const UploadDiffHTMLConverterAsync = () => {
33
37
  const ReactDOMServer = (await import('react-dom/server')).default;
34
38
  // hash fields to ensure they are diffed if they change
35
39
  const nodeFieldsHash = createHash('sha256').update(JSON.stringify(node.fields ?? {})).digest('hex');
40
+ const filename = uploadDoc?.filename || `${i18n.t('general:untitled')} - ID: ${typeof uploadNode.value === 'object' ? uploadNode.value : uploadNode.value}`;
36
41
  const JSX = /*#__PURE__*/_jsx("div", {
37
42
  className: `${baseClass}${providedCSSString}`,
38
43
  "data-enable-match": "true",
@@ -53,7 +58,7 @@ export const UploadDiffHTMLConverterAsync = () => {
53
58
  className: `${baseClass}__info`,
54
59
  "data-enable-match": "false",
55
60
  children: [/*#__PURE__*/_jsx("strong", {
56
- children: uploadDoc?.filename
61
+ children: filename
57
62
  }), /*#__PURE__*/_jsxs("div", {
58
63
  className: `${baseClass}__meta`,
59
64
  children: [formatFilesize(uploadDoc?.filesize), typeof uploadDoc?.width === 'number' && typeof uploadDoc?.height === 'number' && /*#__PURE__*/_jsxs(React.Fragment, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["File","createHash","formatFilesize","React","baseClass","UploadDiffHTMLConverterAsync","upload","node","populate","providedCSSString","uploadNode","uploadDoc","undefined","value","id","collectionSlug","relationTo","alt","fields","thumbnailSRC","thumbnailURL","url","ReactDOMServer","default","nodeFieldsHash","update","JSON","stringify","digest","JSX","_jsx","className","filename","_jsxs","length","src","filesize","width","height","Fragment","mimeType","html","renderToStaticMarkup"],"sources":["../../../../../src/field/Diff/converters/upload/index.tsx"],"sourcesContent":["import type { FileData, PayloadRequest, TypeWithID } from 'payload'\n\nimport { type I18nClient } from '@payloadcms/translations'\nimport { File } from '@payloadcms/ui/rsc'\nimport { createHash } from 'crypto'\n\nimport './index.scss'\n\nimport { formatFilesize } from 'payload/shared'\nimport React from 'react'\n\nimport type { HTMLConvertersAsync } from '../../../../features/converters/lexicalToHtml/async/types.js'\nimport type { UploadDataImproved } from '../../../../features/upload/server/nodes/UploadNode.js'\nimport type { SerializedUploadNode } from '../../../../nodeTypes.js'\n\nconst baseClass = 'lexical-upload-diff'\n\nexport const UploadDiffHTMLConverterAsync: (args: {\n i18n: I18nClient\n req: PayloadRequest\n}) => HTMLConvertersAsync<SerializedUploadNode> = () => {\n return {\n upload: async ({ node, populate, providedCSSString }) => {\n const uploadNode = node as UploadDataImproved\n\n let uploadDoc: (FileData & TypeWithID) | undefined = undefined\n\n // If there's no valid upload data, populate return an empty string\n if (typeof uploadNode.value !== 'object') {\n if (!populate) {\n return ''\n }\n uploadDoc = await populate<FileData & TypeWithID>({\n id: uploadNode.value,\n collectionSlug: uploadNode.relationTo,\n })\n } else {\n uploadDoc = uploadNode.value as unknown as FileData & TypeWithID\n }\n\n if (!uploadDoc) {\n return ''\n }\n\n const alt = (node.fields?.alt as string) || (uploadDoc as { alt?: string })?.alt || ''\n\n const thumbnailSRC: string =\n ('thumbnailURL' in uploadDoc && (uploadDoc?.thumbnailURL as string)) || uploadDoc?.url || ''\n\n const ReactDOMServer = (await import('react-dom/server')).default\n\n // hash fields to ensure they are diffed if they change\n const nodeFieldsHash = createHash('sha256')\n .update(JSON.stringify(node.fields ?? {}))\n .digest('hex')\n\n const JSX = (\n <div\n className={`${baseClass}${providedCSSString}`}\n data-enable-match=\"true\"\n data-fields-hash={`${nodeFieldsHash}`}\n data-filename={uploadDoc?.filename}\n data-lexical-upload-id={uploadNode.value}\n data-lexical-upload-relation-to={uploadNode.relationTo}\n data-src={thumbnailSRC}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__thumbnail`}>\n {thumbnailSRC?.length ? <img alt={alt} src={thumbnailSRC} /> : <File />}\n </div>\n <div className={`${baseClass}__info`} data-enable-match=\"false\">\n <strong>{uploadDoc?.filename}</strong>\n <div className={`${baseClass}__meta`}>\n {formatFilesize(uploadDoc?.filesize)}\n {typeof uploadDoc?.width === 'number' && typeof uploadDoc?.height === 'number' && (\n <React.Fragment>\n &nbsp;-&nbsp;\n {uploadDoc?.width}x{uploadDoc?.height}\n </React.Fragment>\n )}\n {uploadDoc?.mimeType && (\n <React.Fragment>\n &nbsp;-&nbsp;\n {uploadDoc?.mimeType}\n </React.Fragment>\n )}\n </div>\n </div>\n </div>\n </div>\n )\n\n // Render to HTML\n const html = ReactDOMServer.renderToStaticMarkup(JSX)\n\n return html\n },\n }\n}\n"],"mappings":";AAGA,SAASA,IAAI,QAAQ;AACrB,SAASC,UAAU,QAAQ;AAI3B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAMlB,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,4BAAA,GAGqCA,CAAA;EAChD,OAAO;IACLC,MAAA,EAAQ,MAAAA,CAAO;MAAEC,IAAI;MAAEC,QAAQ;MAAEC;IAAiB,CAAE;MAClD,MAAMC,UAAA,GAAaH,IAAA;MAEnB,IAAII,SAAA,GAAiDC,SAAA;MAErD;MACA,IAAI,OAAOF,UAAA,CAAWG,KAAK,KAAK,UAAU;QACxC,IAAI,CAACL,QAAA,EAAU;UACb,OAAO;QACT;QACAG,SAAA,GAAY,MAAMH,QAAA,CAAgC;UAChDM,EAAA,EAAIJ,UAAA,CAAWG,KAAK;UACpBE,cAAA,EAAgBL,UAAA,CAAWM;QAC7B;MACF,OAAO;QACLL,SAAA,GAAYD,UAAA,CAAWG,KAAK;MAC9B;MAEA,IAAI,CAACF,SAAA,EAAW;QACd,OAAO;MACT;MAEA,MAAMM,GAAA,GAAMV,IAAC,CAAKW,MAAM,EAAED,GA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oC,QAAQ;2BAAC,OAEb5B,SAAA,EAAW0B,KAAA,EAAM,KAAE1B,SAAA,EAAW2B,MAAA;kBAGlC3B,SAAA,EAAW6B,QAAA,iBACVP,KAAA,CAAC9B,KAAA,CAAMoC,QAAQ;2BAAC,OAEb5B,SAAA,EAAW6B,QAAA;;;;;;MAS1B;MACA,MAAMC,IAAA,GAAOnB,cAAA,CAAeoB,oBAAoB,CAACb,GAAA;MAEjD,OAAOY,IAAA;IACT;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["File","createHash","formatFilesize","React","baseClass","UploadDiffHTMLConverterAsync","i18n","req","upload","node","populate","providedCSSString","uploadNode","uploadDoc","undefined","value","id","collectionSlug","relationTo","alt","fields","thumbnailSRC","thumbnailURL","url","ReactDOMServer","default","nodeFieldsHash","update","JSON","stringify","digest","filename","t","JSX","_jsx","className","_jsxs","length","src","filesize","width","height","Fragment","mimeType","html","renderToStaticMarkup"],"sources":["../../../../../src/field/Diff/converters/upload/index.tsx"],"sourcesContent":["import type { FileData, PayloadRequest, TypeWithID } from 'payload'\n\nimport { type I18nClient } from '@payloadcms/translations'\nimport { File } from '@payloadcms/ui/rsc'\nimport { createHash } from 'crypto'\n\nimport './index.css'\n\nimport { formatFilesize } from 'payload/shared'\nimport React from 'react'\n\nimport type { HTMLConvertersAsync } from '../../../../features/converters/lexicalToHtml/async/types.js'\nimport type { UploadDataImproved } from '../../../../features/upload/server/nodes/UploadNode.js'\nimport type { SerializedUploadNode } from '../../../../types/nodeTypes.js'\n\nconst baseClass = 'lexical-upload-diff'\n\nexport const UploadDiffHTMLConverterAsync: (args: {\n i18n: I18nClient\n req: PayloadRequest\n}) => HTMLConvertersAsync<SerializedUploadNode> = ({ i18n, req }) => {\n return {\n upload: async ({ node, populate, providedCSSString }) => {\n const uploadNode = node as UploadDataImproved\n\n let uploadDoc: (FileData & TypeWithID) | undefined = undefined\n\n // If there's no valid upload data, populate return an empty string\n if (typeof uploadNode.value !== 'object') {\n if (!populate) {\n return ''\n }\n uploadDoc = await populate<FileData & TypeWithID>({\n id: uploadNode.value,\n collectionSlug: uploadNode.relationTo,\n })\n } else {\n uploadDoc = uploadNode.value as unknown as FileData & TypeWithID\n }\n\n if (!uploadDoc) {\n return ''\n }\n\n const alt = (node.fields?.alt as string) || (uploadDoc as { alt?: string })?.alt || ''\n\n const thumbnailSRC: string =\n ('thumbnailURL' in uploadDoc && (uploadDoc?.thumbnailURL as string)) || uploadDoc?.url || ''\n\n const ReactDOMServer = (await import('react-dom/server')).default\n\n // hash fields to ensure they are diffed if they change\n const nodeFieldsHash = createHash('sha256')\n .update(JSON.stringify(node.fields ?? {}))\n .digest('hex')\n\n const filename =\n uploadDoc?.filename ||\n `${i18n.t('general:untitled')} - ID: ${typeof uploadNode.value === 'object' ? uploadNode.value : uploadNode.value}`\n\n const JSX = (\n <div\n className={`${baseClass}${providedCSSString}`}\n data-enable-match=\"true\"\n data-fields-hash={`${nodeFieldsHash}`}\n data-filename={uploadDoc?.filename}\n data-lexical-upload-id={uploadNode.value}\n data-lexical-upload-relation-to={uploadNode.relationTo}\n data-src={thumbnailSRC}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__thumbnail`}>\n {thumbnailSRC?.length ? <img alt={alt} src={thumbnailSRC} /> : <File />}\n </div>\n <div className={`${baseClass}__info`} data-enable-match=\"false\">\n <strong>{filename}</strong>\n <div className={`${baseClass}__meta`}>\n {formatFilesize(uploadDoc?.filesize)}\n {typeof uploadDoc?.width === 'number' && typeof uploadDoc?.height === 'number' && (\n <React.Fragment>\n &nbsp;-&nbsp;\n {uploadDoc?.width}x{uploadDoc?.height}\n </React.Fragment>\n )}\n {uploadDoc?.mimeType && (\n <React.Fragment>\n &nbsp;-&nbsp;\n {uploadDoc?.mimeType}\n </React.Fragment>\n )}\n </div>\n </div>\n </div>\n </div>\n )\n\n // Render to HTML\n const html = ReactDOMServer.renderToStaticMarkup(JSX)\n\n return html\n },\n }\n}\n"],"mappings":";AAG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
@@ -0,0 +1,156 @@
1
+ @layer payload-default {
2
+ .lexical-diff .field-diff-content {
3
+ .html-diff {
4
+ font-family: var(--text-body-large-font-family);
5
+ font-size: var(--text-body-large-font-size);
6
+ font-weight: var(--text-body-large-font-weight);
7
+ line-height: var(--text-body-large-line-height);
8
+ letter-spacing: -0.0325px;
9
+ }
10
+
11
+ blockquote {
12
+ font-size: var(--text-body-large-font-size);
13
+ line-height: 1.5;
14
+ letter-spacing: normal;
15
+ margin-inline: var(--spacer-1);
16
+ padding-inline-start: var(--spacer-2-5);
17
+ padding-block: var(--spacer-1);
18
+ position: relative;
19
+ border-inline-start: var(--stroke-width-medium) solid currentColor;
20
+ }
21
+
22
+ .html-diff:has([data-match-type='create']) blockquote {
23
+ color: var(--diff-create-pill-color);
24
+ }
25
+
26
+ .html-diff:has([data-match-type='delete']) blockquote {
27
+ color: var(--diff-delete-pill-color);
28
+ }
29
+
30
+ a {
31
+ color: var(--color-text-brand);
32
+ text-decoration: underline;
33
+ }
34
+
35
+ h1,
36
+ h2,
37
+ h3,
38
+ h4,
39
+ h5,
40
+ h6 {
41
+ font-weight: 550;
42
+ line-height: 1.2;
43
+ }
44
+
45
+ h1 {
46
+ font-size: 2rem;
47
+ letter-spacing: -0.544px;
48
+ }
49
+ h2 {
50
+ font-size: 1.5rem;
51
+ line-height: 2rem;
52
+ letter-spacing: var(--text-heading-large-letter-spacing);
53
+ }
54
+ h3 {
55
+ font-size: 1.25rem;
56
+ letter-spacing: -0.34px;
57
+ }
58
+ h4 {
59
+ font-size: 1rem;
60
+ letter-spacing: -0.272px;
61
+ }
62
+ h5 {
63
+ font-size: 0.8125rem;
64
+ letter-spacing: -0.221px;
65
+ }
66
+ h6 {
67
+ font-size: 0.6875rem;
68
+ letter-spacing: -0.187px;
69
+ }
70
+
71
+ > .html-diff > :first-child {
72
+ margin-top: 0;
73
+ }
74
+
75
+ > .html-diff > :last-child {
76
+ margin-bottom: 0;
77
+ }
78
+
79
+ p {
80
+ margin: 0;
81
+ }
82
+
83
+ code {
84
+ border: var(--stroke-width-small) solid var(--color-border);
85
+ color: var(--color-text);
86
+ padding: var(--spacer-1);
87
+ font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace;
88
+ font-size: var(--text-body-medium-font-size);
89
+ font-weight: var(--text-body-medium-font-weight);
90
+ border-radius: var(--radius-small);
91
+ box-decoration-break: clone;
92
+ -webkit-box-decoration-break: clone;
93
+ }
94
+
95
+ hr {
96
+ margin: 0;
97
+ border: none;
98
+ border-top: var(--stroke-width-small) solid currentColor;
99
+ }
100
+
101
+ .html-diff:has([data-match-type='create']) hr {
102
+ color: var(--diff-create-pill-color);
103
+ }
104
+
105
+ .html-diff:has([data-match-type='delete']) hr {
106
+ color: var(--diff-delete-pill-color);
107
+ }
108
+
109
+ ul {
110
+ list-style: disc;
111
+ padding: 0;
112
+ margin: 0;
113
+ }
114
+
115
+ ol {
116
+ list-style: decimal;
117
+ padding: 0;
118
+ margin: 0;
119
+ }
120
+
121
+ li {
122
+ font-family: var(--text-body-large-font-family);
123
+ font-size: var(--text-body-large-font-size);
124
+ margin-block: 0 var(--spacer-1);
125
+ margin-inline-start: var(--spacer-4);
126
+ position: relative;
127
+ z-index: 0;
128
+
129
+ &:has(> [data-match-type='create'])::before,
130
+ &:has(> [data-match-type='delete'])::before {
131
+ content: '';
132
+ position: absolute;
133
+ inset: 0;
134
+ inset-inline-start: calc(var(--spacer-4) * -1);
135
+ border-radius: var(--radius-medium);
136
+ z-index: -1;
137
+ }
138
+
139
+ &:has(> [data-match-type='create'])::before {
140
+ background-color: var(--diff-create-pill-bg);
141
+ }
142
+
143
+ &:has(> [data-match-type='delete'])::before {
144
+ background-color: var(--diff-delete-pill-bg);
145
+ }
146
+
147
+ &.nestedListItem:last-child {
148
+ margin-block-end: 0;
149
+ }
150
+
151
+ &:last-child {
152
+ margin-block-end: 0;
153
+ }
154
+ }
155
+ }
156
+ }
@@ -1,5 +1,5 @@
1
1
  import type { RichTextFieldDiffServerComponent } from 'payload';
2
- import './index.scss';
2
+ import './index.css';
3
3
  import '../bundled.css';
4
4
  export declare const LexicalDiffComponent: RichTextFieldDiffServerComponent;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/field/Diff/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAA;AAI/D,OAAO,cAAc,CAAA;AACrB,OAAO,gBAAgB,CAAA;AAqBvB,eAAO,MAAM,oBAAoB,EAAE,gCAiGlC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/field/Diff/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAA;AAI/D,OAAO,aAAa,CAAA;AACpB,OAAO,gBAAgB,CAAA;AAqBvB,eAAO,MAAM,oBAAoB,EAAE,gCAiGlC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { FieldDiffContainer, getHTMLDiffComponents } from '@payloadcms/ui/rsc';
3
+ import './index.css';
3
4
  import '../bundled.css';
4
5
  import { formatAdminURL } from 'payload/shared';
5
6
  import React from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FieldDiffContainer","getHTMLDiffComponents","formatAdminURL","React","convertLexicalToHTMLAsync","getPayloadPopulateFn","LinkDiffHTMLConverterAsync","ListItemDiffHTMLConverterAsync","RelationshipDiffHTMLConverterAsync","UnknownDiffHTMLConverterAsync","UploadDiffHTMLConverterAsync","baseClass","LexicalDiffComponent","args","comparisonValue","valueFrom","field","i18n","locale","nestingLevel","req","versionValue","valueTo","internalDocToHref","linkNode","populate","fields","doc","relationTo","value","docId","id","collectionSlug","adminRoute","payload","config","routes","admin","path","serverURL","converters","defaultConverters","payloadPopulateFn","currentDepth","depth","fromHTML","data","disableContainer","toHTML","From","To","length","_jsx","className","label"],"sources":["../../../src/field/Diff/index.tsx"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { RichTextFieldDiffServerComponent } from 'payload'\n\nimport { FieldDiffContainer, getHTMLDiffComponents } from '@payloadcms/ui/rsc'\n\nimport './index.scss'\nimport '../bundled.css'\n\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type {\n HTMLConvertersFunctionAsync,\n HTMLPopulateFn,\n} from '../../features/converters/lexicalToHtml/async/types.js'\nimport type { SerializedLinkNode } from '../../nodeTypes.js'\n\nimport { convertLexicalToHTMLAsync } from '../../features/converters/lexicalToHtml/async/index.js'\nimport { getPayloadPopulateFn } from '../../features/converters/utilities/payloadPopulateFn.js'\nimport { LinkDiffHTMLConverterAsync } from './converters/link.js'\nimport { ListItemDiffHTMLConverterAsync } from './converters/listitem/index.js'\nimport { RelationshipDiffHTMLConverterAsync } from './converters/relationship/index.js'\nimport { UnknownDiffHTMLConverterAsync } from './converters/unknown/index.js'\nimport { UploadDiffHTMLConverterAsync } from './converters/upload/index.js'\n\nconst baseClass = 'lexical-diff'\n\nexport const LexicalDiffComponent: RichTextFieldDiffServerComponent = async (args) => {\n const {\n comparisonValue: valueFrom,\n field,\n i18n,\n locale,\n nestingLevel,\n req,\n versionValue: valueTo,\n } = args\n\n const internalDocToHref = async ({\n linkNode,\n populate,\n }: {\n linkNode: SerializedLinkNode\n populate?: HTMLPopulateFn\n }) => {\n if (!linkNode.fields.doc) {\n return '#'\n }\n\n const { relationTo, value } = linkNode.fields.doc\n\n let docId: number | string\n\n if (typeof value === 'object' && value !== null) {\n docId = value.id\n } else if (populate && typeof value !== 'object') {\n const doc = await populate({\n id: value,\n collectionSlug: relationTo,\n })\n\n if (!doc || !doc.id) {\n return '#'\n }\n\n docId = doc.id\n } else {\n docId = value\n }\n\n return formatAdminURL({\n adminRoute: req.payload.config.routes.admin,\n path: `/collections/${relationTo}/${docId}`,\n serverURL: req.payload.config.serverURL,\n })\n }\n\n const converters: HTMLConvertersFunctionAsync = ({ defaultConverters }) => ({\n ...defaultConverters,\n ...LinkDiffHTMLConverterAsync({ internalDocToHref }),\n ...ListItemDiffHTMLConverterAsync,\n ...UploadDiffHTMLConverterAsync({ i18n, req }),\n ...RelationshipDiffHTMLConverterAsync({ i18n, req }),\n ...UnknownDiffHTMLConverterAsync({ i18n, req }),\n })\n\n const payloadPopulateFn = await getPayloadPopulateFn({\n currentDepth: 0,\n depth: 1,\n req,\n })\n const fromHTML = await convertLexicalToHTMLAsync({\n converters,\n data: valueFrom as SerializedEditorState,\n disableContainer: true,\n populate: payloadPopulateFn,\n })\n\n const toHTML = await convertLexicalToHTMLAsync({\n converters,\n data: valueTo as SerializedEditorState,\n disableContainer: true,\n populate: payloadPopulateFn,\n })\n\n const { From, To } = getHTMLDiffComponents({\n // Ensure empty paragraph is displayed for empty rich text fields - otherwise, toHTML may be displayed in the wrong column\n fromHTML: fromHTML?.length ? fromHTML : '<p></p>',\n toHTML: toHTML?.length ? toHTML : '<p></p>',\n })\n\n return (\n <FieldDiffContainer\n className={baseClass}\n From={From}\n i18n={i18n}\n label={{\n label: field.label,\n locale,\n }}\n nestingLevel={nestingLevel}\n To={To}\n />\n )\n}\n"],"mappings":";AAGA,SAASA,kBAAkB,EAAEC,qBAAqB,QAAQ;AAG1D,OAAO;AAEP,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAQlB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,8BAA8B,QAAQ;AAC/C,SAASC,kCAAkC,QAAQ;AACnD,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,4BAA4B,QAAQ;AAE7C,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,oBAAA,GAAyD,MAAOC,IAAA;EAC3E,MAAM;IACJC,eAAA,EAAiBC,SAAS;IAC1BC,KAAK;IACLC,IAAI;IACJC,MAAM;IACNC,YAA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GAAGX,6BAAA,CAA8B;MAAEQ,IAAA;MAAMG;IAAI;EAC/C;EAEA,MAAMsB,iBAAA,GAAoB,MAAMrC,oBAAA,CAAqB;IACnDsC,YAAA,EAAc;IACdC,KAAA,EAAO;IACPxB;EACF;EACA,MAAMyB,QAAA,GAAW,MAAMzC,yBAAA,CAA0B;IAC/CoC,UAAA;IACAM,IAAA,EAAM/B,SAAA;IACNgC,gBAAA,EAAkB;IAClBtB,QAAA,EAAUiB;EACZ;EAEA,MAAMM,MAAA,GAAS,MAAM5C,yBAAA,CAA0B;IAC7CoC,UAAA;IACAM,IAAA,EAAMxB,OAAA;IACNyB,gBAAA,EAAkB;IAClBtB,QAAA,EAAUiB;EACZ;EAEA,MAAM;IAAEO,IAAI;IAAEC;EAAE,CAAE,GAAGjD,qBAAA,CAAsB;IACzC;IACA4C,QAAA,EAAUA,QAAA,EAAUM,MAAA,GAASN,QAAA,GAAW;IACxCG,MAAA,EAAQA,MAAA,EAAQG,MAAA,GAASH,MAAA,GAAS;EACpC;EAEA,oBACEI,IAAA,CAACpD,kBAAA;IACCqD,SAAA,EAAW1C,SAAA;IACXsC,IAAA,EAAMA,IAAA;IACNhC,IAAA,EAAMA,IAAA;IACNqC,KAAA,EAAO;MACLA,KAAA,EAAOtC,KAAA,CAAMsC,KAAK;MAClBpC;IACF;IACAC,YAAA,EAAcA,YAAA;IACd+B,EAAA,EAAIA;;AAGV","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["FieldDiffContainer","getHTMLDiffComponents","formatAdminURL","React","convertLexicalToHTMLAsync","getPayloadPopulateFn","LinkDiffHTMLConverterAsync","ListItemDiffHTMLConverterAsync","RelationshipDiffHTMLConverterAsync","UnknownDiffHTMLConverterAsync","UploadDiffHTMLConverterAsync","baseClass","LexicalDiffComponent","args","comparisonValue","valueFrom","field","i18n","locale","nestingLevel","req","versionValue","valueTo","internalDocToHref","linkNode","populate","fields","doc","relationTo","value","docId","id","collectionSlug","adminRoute","payload","config","routes","admin","path","serverURL","converters","defaultConverters","payloadPopulateFn","currentDepth","depth","fromHTML","data","disableContainer","toHTML","From","To","length","_jsx","className","label"],"sources":["../../../src/field/Diff/index.tsx"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { RichTextFieldDiffServerComponent } from 'payload'\n\nimport { FieldDiffContainer, getHTMLDiffComponents } from '@payloadcms/ui/rsc'\n\nimport './index.css'\nimport '../bundled.css'\n\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type {\n HTMLConvertersFunctionAsync,\n HTMLPopulateFn,\n} from '../../features/converters/lexicalToHtml/async/types.js'\nimport type { SerializedLinkNode } from '../../types/nodeTypes.js'\n\nimport { convertLexicalToHTMLAsync } from '../../features/converters/lexicalToHtml/async/index.js'\nimport { getPayloadPopulateFn } from '../../features/converters/utilities/payloadPopulateFn.js'\nimport { LinkDiffHTMLConverterAsync } from './converters/link.js'\nimport { ListItemDiffHTMLConverterAsync } from './converters/listitem/index.js'\nimport { RelationshipDiffHTMLConverterAsync } from './converters/relationship/index.js'\nimport { UnknownDiffHTMLConverterAsync } from './converters/unknown/index.js'\nimport { UploadDiffHTMLConverterAsync } from './converters/upload/index.js'\n\nconst baseClass = 'lexical-diff'\n\nexport const LexicalDiffComponent: RichTextFieldDiffServerComponent = async (args) => {\n const {\n comparisonValue: valueFrom,\n field,\n i18n,\n locale,\n nestingLevel,\n req,\n versionValue: valueTo,\n } = args\n\n const internalDocToHref = async ({\n linkNode,\n populate,\n }: {\n linkNode: SerializedLinkNode\n populate?: HTMLPopulateFn\n }) => {\n if (!linkNode.fields.doc) {\n return '#'\n }\n\n const { relationTo, value } = linkNode.fields.doc\n\n let docId: number | string\n\n if (typeof value === 'object' && value !== null) {\n docId = value.id\n } else if (populate && typeof value !== 'object') {\n const doc = await populate({\n id: value,\n collectionSlug: relationTo,\n })\n\n if (!doc || !doc.id) {\n return '#'\n }\n\n docId = doc.id\n } else {\n docId = value\n }\n\n return formatAdminURL({\n adminRoute: req.payload.config.routes.admin,\n path: `/collections/${relationTo}/${docId}`,\n serverURL: req.payload.config.serverURL,\n })\n }\n\n const converters: HTMLConvertersFunctionAsync = ({ defaultConverters }) => ({\n ...defaultConverters,\n ...LinkDiffHTMLConverterAsync({ internalDocToHref }),\n ...ListItemDiffHTMLConverterAsync,\n ...UploadDiffHTMLConverterAsync({ i18n, req }),\n ...RelationshipDiffHTMLConverterAsync({ i18n, req }),\n ...UnknownDiffHTMLConverterAsync({ i18n, req }),\n })\n\n const payloadPopulateFn = await getPayloadPopulateFn({\n currentDepth: 0,\n depth: 1,\n req,\n })\n const fromHTML = await convertLexicalToHTMLAsync({\n converters,\n data: valueFrom as SerializedEditorState,\n disableContainer: true,\n populate: payloadPopulateFn,\n })\n\n const toHTML = await convertLexicalToHTMLAsync({\n converters,\n data: valueTo as SerializedEditorState,\n disableContainer: true,\n populate: payloadPopulateFn,\n })\n\n const { From, To } = getHTMLDiffComponents({\n // Ensure empty paragraph is displayed for empty rich text fields - otherwise, toHTML may be displayed in the wrong column\n fromHTML: fromHTML?.length ? fromHTML : '<p></p>',\n toHTML: toHTML?.length ? toHTML : '<p></p>',\n })\n\n return (\n <FieldDiffContainer\n className={baseClass}\n From={From}\n i18n={i18n}\n label={{\n label: field.label,\n locale,\n }}\n nestingLevel={nestingLevel}\n To={To}\n />\n )\n}\n"],"mappings":";AAGA,SAASA,kBAAkB,EAAEC,qBAAqB,QAAQ;AAE1D,OAAO;AACP,OAAO;AAEP,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAQlB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,8BAA8B,QAAQ;AAC/C,SAASC,kCAAkC,QAAQ;AACnD,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,4BAA4B,QAAQ;AAE7C,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,oBAAA,GAAyD,MAAOC,IAAA;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;MAAMG;IAAI,EAAE;IAC9C,GAAGZ,kCAAA,CAAmC;MAAES,IAAA;MAAMG;IAAI,EAAE;IACpD,GAAGX,6BAAA,CAA8B;MAAEQ,IAAA;MAAMG;IAAI;EAC/C;EAEA,MAAMsB,iBAAA,GAAoB,MAAMrC,oBAAA,CAAqB;IACnDsC,YAAA,EAAc;IACdC,KAAA,EAAO;IACPxB;EACF;EACA,MAAMyB,QAAA,GAAW,MAAMzC,yBAAA,CAA0B;IAC/CoC,UAAA;IACAM,IAAA,EAAM/B,SAAA;IACNgC,gBAAA,EAAkB;IAClBtB,QAAA,EAAUiB;EACZ;EAEA,MAAMM,MAAA,GAAS,MAAM5C,yBAAA,CAA0B;IAC7CoC,UAAA;IACAM,IAAA,EAAMxB,OAAA;IACNyB,gBAAA,EAAkB;IAClBtB,QAAA,EAAUiB;EACZ;EAEA,MAAM;IAAEO,IAAI;IAAEC;EAAE,CAAE,GAAGjD,qBAAA,CAAsB;IACzC;IACA4C,QAAA,EAAUA,QAAA,EAAUM,MAAA,GAASN,QAAA,GAAW;IACxCG,MAAA,EAAQA,MAAA,EAAQG,MAAA,GAASH,MAAA,GAAS;EACpC;EAEA,oBACEI,IAAA,CAACpD,kBAAA;IACCqD,SAAA,EAAW1C,SAAA;IACXsC,IAAA,EAAMA,IAAA;IACNhC,IAAA,EAAMA,IAAA;IACNqC,KAAA,EAAO;MACLA,KAAA,EAAOtC,KAAA,CAAMsC,KAAK;MAClBpC;IACF;IACAC,YAAA,EAAcA,YAAA;IACd+B,EAAA,EAAIA;;AAGV","ignoreList":[]}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { SanitizedClientEditorConfig } from '../lexical/config/types.js';
3
- import '../lexical/theme/EditorTheme.scss';
3
+ import '../lexical/theme/EditorTheme.css';
4
4
  import './bundled.css';
5
- import './index.scss';
6
- import type { LexicalRichTextFieldProps } from '../types.js';
5
+ import './index.css';
6
+ import type { LexicalRichTextFieldProps } from '../types/index.js';
7
7
  declare const RichTextComponent: React.FC<{
8
8
  readonly editorConfig: SanitizedClientEditorConfig;
9
9
  } & LexicalRichTextFieldProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../src/field/Field.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAGxE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAE7E,OAAO,mCAAmC,CAAA;AAC1C,OAAO,eAAe,CAAA;AACtB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAS5D,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAC/B;IACE,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAA;CACnD,GAAG,yBAAyB,CAuM9B,CAAA;AAaD,eAAO,MAAM,QAAQ,EAAE,OAAO,iBAAqC,CAAA"}
1
+ {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../src/field/Field.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAGxE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAE7E,OAAO,kCAAkC,CAAA;AACzC,OAAO,eAAe,CAAA;AACtB,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AASlE,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAC/B;IACE,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAA;CACnD,GAAG,yBAAyB,CAuM9B,CAAA;AAWD,eAAO,MAAM,QAAQ,EAAE,OAAO,iBAAqC,CAAA"}
@@ -6,7 +6,9 @@ import { mergeFieldStyles } from '@payloadcms/ui/shared';
6
6
  import { dequal } from 'dequal/lite';
7
7
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
8
8
  import { ErrorBoundary } from 'react-error-boundary';
9
+ import '../lexical/theme/EditorTheme.css';
9
10
  import './bundled.css';
11
+ import './index.css';
10
12
  import { LexicalProvider } from '../lexical/LexicalProvider.js';
11
13
  import { useRunDeprioritized } from '../utilities/useRunDeprioritized.js';
12
14
  import { useRichTextView } from './RichTextViewProvider.js';
@@ -66,7 +68,7 @@ const RichTextComponent = props => {
66
68
  AfterInput,
67
69
  BeforeInput,
68
70
  Description,
69
- Error,
71
+ Error: Error1,
70
72
  Label
71
73
  } = {},
72
74
  disabled: disabledFromField,
@@ -140,13 +142,7 @@ const RichTextComponent = props => {
140
142
  "data-field-schemapath": schemaPath,
141
143
  "data-lexical-view": editorConfig?.view,
142
144
  style: styles,
143
- children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
144
- CustomComponent: Error,
145
- Fallback: /*#__PURE__*/_jsx(FieldError, {
146
- path: path,
147
- showError: showError
148
- })
149
- }), /*#__PURE__*/_jsxs("div", {
145
+ children: [/*#__PURE__*/_jsxs("div", {
150
146
  className: `${baseClass}__label-row`,
151
147
  children: [Label || /*#__PURE__*/_jsx(FieldLabel, {
152
148
  label: label,
@@ -156,7 +152,13 @@ const RichTextComponent = props => {
156
152
  }), !isControlledByParent && /*#__PURE__*/_jsx(ViewSelector, {})]
157
153
  }), /*#__PURE__*/_jsxs("div", {
158
154
  className: `${baseClass}__wrap`,
159
- children: [/*#__PURE__*/_jsxs(ErrorBoundary, {
155
+ children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
156
+ CustomComponent: Error1,
157
+ Fallback: /*#__PURE__*/_jsx(FieldError, {
158
+ path: path,
159
+ showError: showError
160
+ })
161
+ }), /*#__PURE__*/_jsxs(ErrorBoundary, {
160
162
  fallbackRender: fallbackRender,
161
163
  onReset: () => {},
162
164
  children: [BeforeInput, /*#__PURE__*/_jsx(BulkUploadProvider, {
@@ -188,7 +190,6 @@ const RichTextComponent = props => {
188
190
  function fallbackRender({
189
191
  error
190
192
  }) {
191
- // Call resetErrorBoundary() to reset the error boundary and retry the render.
192
193
  return /*#__PURE__*/_jsxs("div", {
193
194
  className: "errorBoundary",
194
195
  role: "alert",
@@ -198,7 +199,7 @@ function fallbackRender({
198
199
  style: {
199
200
  color: 'red'
200
201
  },
201
- children: error.message
202
+ children: error instanceof Error ? error.message : String(error)
202
203
  })]
203
204
  });
204
205
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","names":["BulkUploadProvider","FieldDescription","FieldError","FieldLabel","isFieldRTL","RenderCustomComponent","useConfig","useEditDepth","useEffectEvent","useField","useLocale","mergeFieldStyles","dequal","React","useCallback","useEffect","useMemo","useState","ErrorBoundary","LexicalProvider","useRunDeprioritized","useRichTextView","ViewSelector","baseClass","RichTextComponent","props","editorConfig","field","admin","className","description","readOnly","readOnlyFromAdmin","label","localized","required","path","pathFromProps","readOnlyFromTopLevelProps","schemaPath","validate","readOnlyFromProps","locale","config","localization","localizationConfig","rtl","fieldLocalized","undefined","editDepth","isControlledByParent","memoizedValidate","value","validationOptions","customComponents","AfterInput","BeforeInput","Description","Error","Label","disabled","disabledFromField","initialValue","setValue","showError","potentiallyStalePath","isSmallWidthViewport","setIsSmallWidthViewport","rerenderProviderKey","setRerenderProviderKey","prevInitialValueRef","useRef","prevValueRef","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","classes","hideGutter","filter","Boolean","join","pathWithEditDepth","runDeprioritized","handleChange","editorState","updateFieldValue","newState","toJSON","current","styles","handleInitialValueChange","JSON","parse","stringify","Date","Object","is","_jsxs","view","style","_jsx","CustomComponent","Fallback","fallbackRender","onReset","drawerSlugPrefix","composerKey","fieldProps","onChange","error","role","color","message","RichText"],"sources":["../../src/field/Field.tsx"],"sourcesContent":["'use client'\nimport type { EditorState, SerializedEditorState } from 'lexical'\n\nimport {\n BulkUploadProvider,\n FieldDescription,\n FieldError,\n FieldLabel,\n isFieldRTL,\n RenderCustomComponent,\n useConfig,\n useEditDepth,\n useEffectEvent,\n useField,\n useLocale,\n} from '@payloadcms/ui'\nimport { mergeFieldStyles } from '@payloadcms/ui/shared'\nimport { dequal } from 'dequal/lite'\nimport { type Validate } from 'payload'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\n\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\n\nimport '../lexical/theme/EditorTheme.scss'\nimport './bundled.css'\nimport './index.scss'\n\nimport type { LexicalRichTextFieldProps } from '../types.js'\n\nimport { LexicalProvider } from '../lexical/LexicalProvider.js'\nimport { useRunDeprioritized } from '../utilities/useRunDeprioritized.js'\nimport { useRichTextView } from './RichTextViewProvider.js'\nimport { ViewSelector } from './ViewSelector.js'\n\nconst baseClass = 'rich-text-lexical'\n\nconst RichTextComponent: React.FC<\n {\n readonly editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n } & LexicalRichTextFieldProps\n> = (props) => {\n const {\n editorConfig,\n field,\n field: {\n admin: { className, description, readOnly: readOnlyFromAdmin } = {},\n label,\n localized,\n required,\n },\n path: pathFromProps,\n readOnly: readOnlyFromTopLevelProps,\n schemaPath,\n validate, // Users can pass in client side validation if they WANT to, but it's not required anymore\n } = props\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const locale = useLocale()\n const {\n config: { localization: localizationConfig },\n } = useConfig()\n\n const rtl = isFieldRTL({\n fieldLocalized: localized,\n locale,\n localizationConfig: localizationConfig || undefined,\n })\n\n const editDepth = useEditDepth()\n const { isControlledByParent } = useRichTextView()\n\n const memoizedValidate = useCallback<Validate>(\n (value, validationOptions) => {\n if (typeof validate === 'function') {\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return validate(value, { ...validationOptions, required })\n }\n return true\n },\n // Important: do not add props to the dependencies array.\n // This would cause an infinite loop and endless re-rendering.\n // Removing props from the dependencies array fixed this issue: https://github.com/payloadcms/payload/issues/3709\n [validate, required],\n )\n\n const {\n customComponents: { AfterInput, BeforeInput, Description, Error, Label } = {},\n disabled: disabledFromField,\n initialValue,\n path,\n setValue,\n showError,\n value,\n } = useField<SerializedEditorState>({\n potentiallyStalePath: pathFromProps,\n validate: memoizedValidate,\n })\n\n const disabled = readOnlyFromProps || disabledFromField\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n const [rerenderProviderKey, setRerenderProviderKey] = useState<Date>()\n\n const prevInitialValueRef = React.useRef<SerializedEditorState | undefined>(initialValue)\n const prevValueRef = React.useRef<SerializedEditorState | undefined>(value)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n const classes = [\n 'field-type',\n baseClass,\n className,\n showError && 'error',\n disabled && `${baseClass}--read-only`,\n editorConfig?.admin?.hideGutter !== true && !isSmallWidthViewport\n ? `${baseClass}--show-gutter`\n : null,\n ]\n .filter(Boolean)\n .join(' ')\n\n const pathWithEditDepth = `${path}.${editDepth}`\n\n const runDeprioritized = useRunDeprioritized() // defaults to 500 ms timeout\n\n const handleChange = useCallback(\n (editorState: EditorState) => {\n // Capture `editorState` in the closure so we can safely run later.\n const updateFieldValue = () => {\n const newState = editorState.toJSON()\n prevValueRef.current = newState\n setValue(newState)\n }\n\n // Queue the update for the browser’s idle time (or Safari shim)\n // and let the hook handle debouncing/cancellation.\n void runDeprioritized(updateFieldValue)\n },\n [setValue, runDeprioritized], // `runDeprioritized` is stable (useCallback inside hook)\n )\n\n const styles = useMemo(() => mergeFieldStyles(field), [field])\n\n const handleInitialValueChange = useEffectEvent(\n (initialValue: SerializedEditorState | undefined) => {\n // Object deep equality check here, as re-mounting the editor if\n // the new value is the same as the old one is not necessary.\n // In postgres, the order of keys in JSON objects is not guaranteed to be preserved,\n // so we need to do a deep equality check here that does not care about key order => we use dequal.\n // If we used JSON.stringify, the editor would re-mount every time you save the document, as the order of keys changes => change detected => re-mount.\n if (\n prevValueRef.current !== value &&\n !dequal(\n prevValueRef.current != null\n ? JSON.parse(JSON.stringify(prevValueRef.current))\n : prevValueRef.current,\n value,\n )\n ) {\n prevInitialValueRef.current = initialValue\n prevValueRef.current = value\n setRerenderProviderKey(new Date())\n }\n },\n )\n\n useEffect(() => {\n // Needs to trigger for object reference changes - otherwise,\n // reacting to the same initial value change twice will cause\n // the second change to be ignored, even though the value has changed.\n // That's because initialValue is not kept up-to-date\n if (!Object.is(initialValue, prevInitialValueRef.current)) {\n handleInitialValueChange(initialValue)\n }\n }, [initialValue])\n\n return (\n <div\n className={classes}\n data-field-path={path}\n data-field-schemapath={schemaPath}\n data-lexical-view={editorConfig?.view}\n key={pathWithEditDepth}\n style={styles}\n >\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n <div className={`${baseClass}__label-row`}>\n {Label || (\n <FieldLabel label={label} localized={localized} path={path} required={required} />\n )}\n {!isControlledByParent && <ViewSelector />}\n </div>\n <div className={`${baseClass}__wrap`}>\n <ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>\n {BeforeInput}\n {/* Lexical may be in a drawer. We need to define another BulkUploadProvider to ensure that the bulk upload drawer\n * is rendered in the correct depth (not displayed *behind* the current drawer).\n * The `lexical-` prefix prevents drawer-slug collisions with non-lexical `BulkUploadProvider`s up the tree. */}\n <BulkUploadProvider drawerSlugPrefix={`lexical-${path}`}>\n <LexicalProvider\n composerKey={pathWithEditDepth}\n editorConfig={editorConfig}\n fieldProps={props}\n isSmallWidthViewport={isSmallWidthViewport}\n key={JSON.stringify({ path, rerenderProviderKey })} // makes sure lexical is completely re-rendered when initialValue changes, bypassing the lexical-internal value memoization. That way, external changes to the form will update the editor. More infos in PR description (https://github.com/payloadcms/payload/pull/5010)\n onChange={handleChange}\n readOnly={disabled}\n rtl={rtl}\n value={value}\n />\n </BulkUploadProvider>\n {AfterInput}\n </ErrorBoundary>\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n\nfunction fallbackRender({ error }: { error: Error }) {\n // Call resetErrorBoundary() to reset the error boundary and retry the render.\n\n return (\n <div className=\"errorBoundary\" role=\"alert\">\n <p>Something went wrong:</p>\n <pre style={{ color: 'red' }}>{error.message}</pre>\n </div>\n )\n}\n\nexport const RichText: typeof RichTextComponent = RichTextComponent\n"],"mappings":"AAAA;;;AAGA,SACEA,kBAAkB,EAClBC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,EACVC,UAAU,EACVC,qBAAqB,EACrBC,SAAS,EACTC,YAAY,EACZC,cAAc,EACdC,QAAQ,EACRC,SAAS,QACJ;AACP,SAASC,gBAAgB,QAAQ;AACjC,SAASC,MAAM,QAAQ;AAEvB,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ;AACjE,SAASC,aAAa,QAAQ;AAK9B,OAAO;AAKP,SAASC,eAAe,QAAQ;AAChC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,eAAe,QAAQ;AAChC,SAASC,YAAY,QAAQ;AAE7B,MAAMC,SAAA,GAAY;AAElB,MAAMC,iBAAA,GAIDC,KAAA;EACH,MAAM;IACJC,YAAY;IACZC,KAAK;IACLA,KAAA,EAAO;MACLC,KAAA,EAAO;QAAEC,SAAS;QAAEC,WAAW;QAAEC,QAAA,EAAUC;MAAiB,CAAE,GAAG,CAAC,CAAC;MACnEC,KAAK;MACLC,SAAS;MACTC;IAAQ,CACT;IACDC,IAAA,EAAMC,aAAa;IACnBN,QAAA,EAAUO,yBAAyB;IACnCC,UAAU;IACVC;EAAQ,CACT,GAAGf,KAAA;EAEJ,MAAMgB,iBAAA,GAAoBH,yBAAA,IAA6BN,iBAAA;EA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EAAgBA,cAAA;QAAgBC,OAAA,EAASA,CAAA,MAAO;mBAC5DpD,WAAA,E,aAIDgD,IAAA,CAACxG,kBAAA;UAAmB6G,gBAAA,EAAkB,WAAWzE,IAAA,EAAM;oBACrD,aAAAoE,IAAA,CAACrF,eAAA;YACC2F,WAAA,EAAazB,iBAAA;YACb3D,YAAA,EAAcA,YAAA;YACdqF,UAAA,EAAYtF,KAAA;YACZyC,oBAAA,EAAsBA,oBAAA;YAEtB8C,QAAA,EAAUzB,YAAA;YACVxD,QAAA,EAAU6B,QAAA;YACVd,GAAA,EAAKA,GAAA;YACLM,KAAA,EAAOA;aAJF2C,IAAA,CAAKE,SAAS,CAAC;YAAE7D,IAAA;YAAMgC;UAAoB;YAOnDb,UAAA;uBAEHiD,IAAA,CAACnG,qBAAA;QACCoG,eAAA,EAAiBhD,WAAA;QACjBiD,QAAA,eAAUF,IAAA,CAACvG,gBAAA;UAAiB6B,WAAA,EAAaA,WAAA;UAAaM,IAAA,EAAMA;;;;KApC3DiD,iBAAA;AAyCX;AAEA,SAASsB,eAAe;EAAEM;AAAK,CAAoB;EACjD;EAEA,oBACEZ,KAAA,CAAC;IAAIxE,SAAA,EAAU;IAAgBqF,IAAA,EAAK;4BAClCV,IAAA,CAAC;gBAAE;qBACHA,IAAA,CAAC;MAAID,KAAA,EAAO;QAAEY,KAAA,EAAO;MAAM;gBAAIF,KAAA,CAAMG;;;AAG3C;AAEA,OAAO,MAAMC,QAAA,GAAqC7F,iBAAA","ignoreList":[]}
1
+ {"version":3,"file":"Field.js","names":["BulkUploadProvider","FieldDescription","FieldError","FieldLabel","isFieldRTL","RenderCustomComponent","useConfig","useEditDepth","useEffectEvent","useField","useLocale","mergeFieldStyles","dequal","React","useCallback","useEffect","useMemo","useState","ErrorBoundary","LexicalProvider","useRunDeprioritized","useRichTextView","ViewSelector","baseClass","RichTextComponent","props","editorConfig","field","admin","className","description","readOnly","readOnlyFromAdmin","label","localized","required","path","pathFromProps","readOnlyFromTopLevelProps","schemaPath","validate","readOnlyFromProps","locale","config","localization","localizationConfig","rtl","fieldLocalized","undefined","editDepth","isControlledByParent","memoizedValidate","value","validationOptions","customComponents","AfterInput","BeforeInput","Description","Error","Error1","Label","disabled","disabledFromField","initialValue","setValue","showError","potentiallyStalePath","isSmallWidthViewport","setIsSmallWidthViewport","rerenderProviderKey","setRerenderProviderKey","prevInitialValueRef","useRef","prevValueRef","updateViewPortWidth","isNextSmallWidthViewport","window","matchMedia","matches","addEventListener","removeEventListener","classes","hideGutter","filter","Boolean","join","pathWithEditDepth","runDeprioritized","handleChange","editorState","updateFieldValue","newState","toJSON","current","styles","handleInitialValueChange","JSON","parse","stringify","Date","Object","is","_jsxs","view","style","_jsx","CustomComponent","Fallback","fallbackRender","onReset","drawerSlugPrefix","composerKey","fieldProps","onChange","error","role","color","message","String","RichText"],"sources":["../../src/field/Field.tsx"],"sourcesContent":["'use client'\nimport type { EditorState, SerializedEditorState } from 'lexical'\nimport type { FallbackProps } from 'react-error-boundary'\n\nimport {\n BulkUploadProvider,\n FieldDescription,\n FieldError,\n FieldLabel,\n isFieldRTL,\n RenderCustomComponent,\n useConfig,\n useEditDepth,\n useEffectEvent,\n useField,\n useLocale,\n} from '@payloadcms/ui'\nimport { mergeFieldStyles } from '@payloadcms/ui/shared'\nimport { dequal } from 'dequal/lite'\nimport { type Validate } from 'payload'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\n\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\n\nimport '../lexical/theme/EditorTheme.css'\nimport './bundled.css'\nimport './index.css'\n\nimport type { LexicalRichTextFieldProps } from '../types/index.js'\n\nimport { LexicalProvider } from '../lexical/LexicalProvider.js'\nimport { useRunDeprioritized } from '../utilities/useRunDeprioritized.js'\nimport { useRichTextView } from './RichTextViewProvider.js'\nimport { ViewSelector } from './ViewSelector.js'\n\nconst baseClass = 'rich-text-lexical'\n\nconst RichTextComponent: React.FC<\n {\n readonly editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n } & LexicalRichTextFieldProps\n> = (props) => {\n const {\n editorConfig,\n field,\n field: {\n admin: { className, description, readOnly: readOnlyFromAdmin } = {},\n label,\n localized,\n required,\n },\n path: pathFromProps,\n readOnly: readOnlyFromTopLevelProps,\n schemaPath,\n validate, // Users can pass in client side validation if they WANT to, but it's not required anymore\n } = props\n\n const readOnlyFromProps = readOnlyFromTopLevelProps || readOnlyFromAdmin\n\n const locale = useLocale()\n const {\n config: { localization: localizationConfig },\n } = useConfig()\n\n const rtl = isFieldRTL({\n fieldLocalized: localized,\n locale,\n localizationConfig: localizationConfig || undefined,\n })\n\n const editDepth = useEditDepth()\n const { isControlledByParent } = useRichTextView()\n\n const memoizedValidate = useCallback<Validate>(\n (value, validationOptions) => {\n if (typeof validate === 'function') {\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return validate(value, { ...validationOptions, required })\n }\n return true\n },\n // Important: do not add props to the dependencies array.\n // This would cause an infinite loop and endless re-rendering.\n // Removing props from the dependencies array fixed this issue: https://github.com/payloadcms/payload/issues/3709\n [validate, required],\n )\n\n const {\n customComponents: { AfterInput, BeforeInput, Description, Error, Label } = {},\n disabled: disabledFromField,\n initialValue,\n path,\n setValue,\n showError,\n value,\n } = useField<SerializedEditorState>({\n potentiallyStalePath: pathFromProps,\n validate: memoizedValidate,\n })\n\n const disabled = readOnlyFromProps || disabledFromField\n\n const [isSmallWidthViewport, setIsSmallWidthViewport] = useState<boolean>(false)\n const [rerenderProviderKey, setRerenderProviderKey] = useState<Date>()\n\n const prevInitialValueRef = React.useRef<SerializedEditorState | undefined>(initialValue)\n const prevValueRef = React.useRef<SerializedEditorState | undefined>(value)\n\n useEffect(() => {\n const updateViewPortWidth = () => {\n const isNextSmallWidthViewport = window.matchMedia('(max-width: 768px)').matches\n\n if (isNextSmallWidthViewport !== isSmallWidthViewport) {\n setIsSmallWidthViewport(isNextSmallWidthViewport)\n }\n }\n updateViewPortWidth()\n window.addEventListener('resize', updateViewPortWidth)\n\n return () => {\n window.removeEventListener('resize', updateViewPortWidth)\n }\n }, [isSmallWidthViewport])\n\n const classes = [\n 'field-type',\n baseClass,\n className,\n showError && 'error',\n disabled && `${baseClass}--read-only`,\n editorConfig?.admin?.hideGutter !== true && !isSmallWidthViewport\n ? `${baseClass}--show-gutter`\n : null,\n ]\n .filter(Boolean)\n .join(' ')\n\n const pathWithEditDepth = `${path}.${editDepth}`\n\n const runDeprioritized = useRunDeprioritized() // defaults to 500 ms timeout\n\n const handleChange = useCallback(\n (editorState: EditorState) => {\n // Capture `editorState` in the closure so we can safely run later.\n const updateFieldValue = () => {\n const newState = editorState.toJSON()\n prevValueRef.current = newState\n setValue(newState)\n }\n\n // Queue the update for the browser’s idle time (or Safari shim)\n // and let the hook handle debouncing/cancellation.\n void runDeprioritized(updateFieldValue)\n },\n [setValue, runDeprioritized], // `runDeprioritized` is stable (useCallback inside hook)\n )\n\n const styles = useMemo(() => mergeFieldStyles(field), [field])\n\n const handleInitialValueChange = useEffectEvent(\n (initialValue: SerializedEditorState | undefined) => {\n // Object deep equality check here, as re-mounting the editor if\n // the new value is the same as the old one is not necessary.\n // In postgres, the order of keys in JSON objects is not guaranteed to be preserved,\n // so we need to do a deep equality check here that does not care about key order => we use dequal.\n // If we used JSON.stringify, the editor would re-mount every time you save the document, as the order of keys changes => change detected => re-mount.\n if (\n prevValueRef.current !== value &&\n !dequal(\n prevValueRef.current != null\n ? JSON.parse(JSON.stringify(prevValueRef.current))\n : prevValueRef.current,\n value,\n )\n ) {\n prevInitialValueRef.current = initialValue\n prevValueRef.current = value\n setRerenderProviderKey(new Date())\n }\n },\n )\n\n useEffect(() => {\n // Needs to trigger for object reference changes - otherwise,\n // reacting to the same initial value change twice will cause\n // the second change to be ignored, even though the value has changed.\n // That's because initialValue is not kept up-to-date\n if (!Object.is(initialValue, prevInitialValueRef.current)) {\n handleInitialValueChange(initialValue)\n }\n }, [initialValue])\n\n return (\n <div\n className={classes}\n data-field-path={path}\n data-field-schemapath={schemaPath}\n data-lexical-view={editorConfig?.view}\n key={pathWithEditDepth}\n style={styles}\n >\n <div className={`${baseClass}__label-row`}>\n {Label || (\n <FieldLabel label={label} localized={localized} path={path} required={required} />\n )}\n {!isControlledByParent && <ViewSelector />}\n </div>\n <div className={`${baseClass}__wrap`}>\n <RenderCustomComponent\n CustomComponent={Error}\n Fallback={<FieldError path={path} showError={showError} />}\n />\n <ErrorBoundary fallbackRender={fallbackRender} onReset={() => {}}>\n {BeforeInput}\n {/* Lexical may be in a drawer. We need to define another BulkUploadProvider to ensure that the bulk upload drawer\n is rendered in the correct depth (not displayed *behind* the current drawer).\n The `lexical-` prefix prevents drawer-slug collisions with non-lexical `BulkUploadProvider`s up the tree. */}\n <BulkUploadProvider drawerSlugPrefix={`lexical-${path}`}>\n <LexicalProvider\n composerKey={pathWithEditDepth}\n editorConfig={editorConfig}\n fieldProps={props}\n isSmallWidthViewport={isSmallWidthViewport}\n key={JSON.stringify({ path, rerenderProviderKey })} // makes sure lexical is completely re-rendered when initialValue changes, bypassing the lexical-internal value memoization. That way, external changes to the form will update the editor. More infos in PR description (https://github.com/payloadcms/payload/pull/5010)\n onChange={handleChange}\n readOnly={disabled}\n rtl={rtl}\n value={value}\n />\n </BulkUploadProvider>\n {AfterInput}\n </ErrorBoundary>\n <RenderCustomComponent\n CustomComponent={Description}\n Fallback={<FieldDescription description={description} path={path} />}\n />\n </div>\n </div>\n )\n}\n\nfunction fallbackRender({ error }: FallbackProps) {\n return (\n <div className=\"errorBoundary\" role=\"alert\">\n <p>Something went wrong:</p>\n <pre style={{ color: 'red' }}>{error instanceof Error ? error.message : String(error)}</pre>\n </div>\n )\n}\n\nexport const RichText: typeof RichTextComponent = RichTextComponent\n"],"mappings":"AAAA;;;AAIA,SACEA,kBAAkB,EAClBC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,EACVC,UAAU,EACVC,qBAAqB,EACrBC,SAAS,EACTC,YAAY,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AEHkD,IAAA,CAACpG,qBAAA;QACCqG,eAAA,EAAiBjD,WAAA;QACjBkD,QAAA,eAAUF,IAAA,CAACxG,gBAAA;UAAiB6B,WAAA,EAAaA,WAAA;UAAaM,IAAA,EAAMA;;;;KApC3DkD,iBAAA;AAyCX;AAEA,SAASsB,eAAe;EAAEM;AAAK,CAAiB;EAC9C,oBACEZ,KAAA,CAAC;IAAIzE,SAAA,EAAU;IAAgBsF,IAAA,EAAK;4BAClCV,IAAA,CAAC;gBAAE;qBACHA,IAAA,CAAC;MAAID,KAAA,EAAO;QAAEY,KAAA,EAAO;MAAM;gBAAIF,KAAA,YAAiBxD,KAAA,GAAQwD,KAAA,CAAMG,OAAO,GAAGC,MAAA,CAAOJ,KAAA;;;AAGrF;AAEA,OAAO,MAAMK,QAAA,GAAqC/F,iBAAA","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import { type FieldType, type RenderFieldServerFnArgs } from '@payloadcms/ui';
2
2
  import React from 'react';
3
- import type { DefaultTypedEditorState } from '../../nodeTypes.js';
4
- import type { LexicalRichTextField } from '../../types.js';
3
+ import type { LexicalRichTextField } from '../../types/index.js';
4
+ import type { DefaultTypedEditorState } from '../../types/nodeTypes.js';
5
5
  /**
6
6
  * Utility to render a lexical editor on the client.
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/field/RenderLexical/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,uBAAuB,EAK7B,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAyC,MAAM,OAAO,CAAA;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE;AAClC;;;GAGG;AACH;IACE;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAA;IAE5B,QAAQ,CAAC,EAAE,SAAS,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC,UAAU,CAAC,CAAA;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAA;CAChE,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CA4FlD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/field/RenderLexical/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,uBAAuB,EAK7B,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAyC,MAAM,OAAO,CAAA;AAE7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE;AAClC;;;GAGG;AACH;IACE;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAA;IAE5B,QAAQ,CAAC,EAAE,SAAS,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC,UAAU,CAAC,CAAA;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAA;CAChE,GAAG,uBAAuB,CAAC,oBAAoB,CAAC,CA4FlD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","FieldContext","FieldPathContext","ServerFunctionsContext","ShimmerEffect","useServerFunctions","React","useCallback","useEffect","useRef","RenderLexical","args","$","field","initialValue","Loading","path","schemaPath","setValue","value","Component","setComponent","useState","serverFunctionContext","_internal_renderField","entityType","entitySlug","split","fieldPath","name","t0","render","Field","type","admin","hidden","undefined","renderLexical","mounted","t1","t2","current","_jsx","adjustedServerFunctionContext","getFormState","getFormStateArgs","collectionSlug","globalSlug","children","fieldValue","disabled","formInitializing","formProcessing","formSubmitted","_temp","showError"],"sources":["../../../src/field/RenderLexical/index.tsx"],"sourcesContent":["'use client'\nimport type { RichTextField } from 'payload'\n\nimport {\n FieldContext,\n FieldPathContext,\n type FieldType,\n type RenderFieldServerFnArgs,\n ServerFunctionsContext,\n type ServerFunctionsContextType,\n ShimmerEffect,\n useServerFunctions,\n} from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useRef } from 'react'\n\nimport type { DefaultTypedEditorState } from '../../nodeTypes.js'\nimport type { LexicalRichTextField } from '../../types.js'\n\n/**\n * Utility to render a lexical editor on the client.\n *\n * @experimental - may break in minor releases\n * @todo - replace this with a general utility that works for all fields. Maybe merge with packages/ui/src/forms/RenderFields/RenderField.tsx\n */\nexport const RenderLexical: React.FC<\n /**\n * If value or setValue, or both, is provided, this component will manage its own value.\n * If neither is passed, it will rely on the parent form to manage the value.\n */\n {\n /**\n * Override the loading state while the field component is being fetched and rendered.\n */\n Loading?: React.ReactElement\n\n setValue?: FieldType<DefaultTypedEditorState | undefined>['setValue']\n value?: FieldType<DefaultTypedEditorState | undefined>['value']\n } & RenderFieldServerFnArgs<LexicalRichTextField>\n> = (args) => {\n const { field, initialValue, Loading, path, schemaPath, setValue, value } = args\n const [Component, setComponent] = React.useState<null | React.ReactNode>(null)\n const serverFunctionContext = useServerFunctions()\n const { _internal_renderField } = serverFunctionContext\n\n const [entityType, entitySlug] = schemaPath.split('.', 2)\n\n const fieldPath = path ?? (field && 'name' in field ? field?.name : '') ?? ''\n\n const renderLexical = useCallback(() => {\n async function render() {\n const { Field } = await _internal_renderField({\n field: {\n ...((field as RichTextField) || {}),\n type: 'richText',\n admin: {\n ...((field as RichTextField)?.admin || {}),\n // When using \"fake\" anchor fields, hidden is often set to true. We need to override that here to ensure the field is rendered.\n hidden: false,\n },\n },\n initialValue: initialValue ?? undefined,\n path,\n schemaPath,\n })\n\n setComponent(Field)\n }\n void render()\n }, [_internal_renderField, schemaPath, path, field, initialValue])\n\n const mounted = useRef(false)\n\n useEffect(() => {\n if (mounted.current) {\n return\n }\n mounted.current = true\n void renderLexical()\n }, [renderLexical])\n\n if (!Component) {\n return typeof Loading !== 'undefined' ? Loading : <ShimmerEffect />\n }\n\n /**\n * By default, the lexical will make form state requests (e.g. to get drawer fields), passing in the arguments\n * of the current field. However, we need to override those arguments to get it to make requests based on the\n * *target* field. The server only knows the schema map of the target field.\n */\n const adjustedServerFunctionContext: ServerFunctionsContextType = {\n ...serverFunctionContext,\n getFormState: async (getFormStateArgs) => {\n return serverFunctionContext.getFormState({\n ...getFormStateArgs,\n collectionSlug: entityType === 'collection' ? entitySlug : undefined,\n globalSlug: entityType === 'global' ? entitySlug : undefined,\n })\n },\n }\n\n if (typeof value === 'undefined' && !setValue) {\n return (\n <ServerFunctionsContext value={{ ...adjustedServerFunctionContext }}>\n <FieldPathContext key={fieldPath} value={fieldPath}>\n {Component}\n </FieldPathContext>\n </ServerFunctionsContext>\n )\n }\n\n const fieldValue: FieldType<DefaultTypedEditorState | undefined> = {\n disabled: false,\n formInitializing: false,\n formProcessing: false,\n formSubmitted: false,\n initialValue: value,\n path: fieldPath,\n setValue: setValue ?? (() => undefined),\n showError: false,\n value,\n }\n\n return (\n <ServerFunctionsContext value={{ ...adjustedServerFunctionContext }}>\n <FieldPathContext key={fieldPath} value={fieldPath}>\n <FieldContext value={fieldValue}>{Component}</FieldContext>\n </FieldPathContext>\n </ServerFunctionsContext>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SACEC,YAAY,EACZC,gBAAgB,EAGhBC,sBAAsB,EAEtBC,aAAa,EACbC,kBAAkB,QACb;AACP,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ;AAKtD;;;;;;AAMA,OAAO,MAAMC,aAAA,GAcTC,IAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;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;EAAA;EAGvC,OAGEuB,IAAA,CAAAvC,sBAAA;IAAAgB,KAAA;MAAA,GAAoCwB;IAA6B;IAAAK,QAAA,EAC/DN,IAAA,CAAAxC,gBAAA;MAAAiB,KAAA,EAAyCS,SAAA;MAAAoB,QAAA,EACvCN,IAAA,CAAAzC,YAAA;QAAAkB,KAAA,EAAqB8B,UAAA;QAAAD,QAAA,EAAa5B;MAAA,C;OADbQ,SAAA;EAAA,C;CAK7B;AA3FI,SAAA0B,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","FieldContext","FieldPathContext","ServerFunctionsContext","ShimmerEffect","useServerFunctions","React","useCallback","useEffect","useRef","RenderLexical","args","$","field","initialValue","Loading","path","schemaPath","setValue","value","Component","setComponent","useState","serverFunctionContext","_internal_renderField","entityType","entitySlug","split","fieldPath","name","t0","render","Field","type","admin","hidden","undefined","renderLexical","mounted","t1","t2","current","_jsx","adjustedServerFunctionContext","getFormState","getFormStateArgs","collectionSlug","globalSlug","children","fieldValue","disabled","formInitializing","formProcessing","formSubmitted","_temp","showError"],"sources":["../../../src/field/RenderLexical/index.tsx"],"sourcesContent":["'use client'\nimport type { RichTextField } from 'payload'\n\nimport {\n FieldContext,\n FieldPathContext,\n type FieldType,\n type RenderFieldServerFnArgs,\n ServerFunctionsContext,\n type ServerFunctionsContextType,\n ShimmerEffect,\n useServerFunctions,\n} from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useRef } from 'react'\n\nimport type { LexicalRichTextField } from '../../types/index.js'\nimport type { DefaultTypedEditorState } from '../../types/nodeTypes.js'\n\n/**\n * Utility to render a lexical editor on the client.\n *\n * @experimental - may break in minor releases\n * @todo - replace this with a general utility that works for all fields. Maybe merge with packages/ui/src/forms/RenderFields/RenderField.tsx\n */\nexport const RenderLexical: React.FC<\n /**\n * If value or setValue, or both, is provided, this component will manage its own value.\n * If neither is passed, it will rely on the parent form to manage the value.\n */\n {\n /**\n * Override the loading state while the field component is being fetched and rendered.\n */\n Loading?: React.ReactElement\n\n setValue?: FieldType<DefaultTypedEditorState | undefined>['setValue']\n value?: FieldType<DefaultTypedEditorState | undefined>['value']\n } & RenderFieldServerFnArgs<LexicalRichTextField>\n> = (args) => {\n const { field, initialValue, Loading, path, schemaPath, setValue, value } = args\n const [Component, setComponent] = React.useState<null | React.ReactNode>(null)\n const serverFunctionContext = useServerFunctions()\n const { _internal_renderField } = serverFunctionContext\n\n const [entityType, entitySlug] = schemaPath.split('.', 2)\n\n const fieldPath = path ?? (field && 'name' in field ? field?.name : '') ?? ''\n\n const renderLexical = useCallback(() => {\n async function render() {\n const { Field } = await _internal_renderField({\n field: {\n ...((field as RichTextField) || {}),\n type: 'richText',\n admin: {\n ...((field as RichTextField)?.admin || {}),\n // When using \"fake\" anchor fields, hidden is often set to true. We need to override that here to ensure the field is rendered.\n hidden: false,\n },\n },\n initialValue: initialValue ?? undefined,\n path,\n schemaPath,\n })\n\n setComponent(Field)\n }\n void render()\n }, [_internal_renderField, schemaPath, path, field, initialValue])\n\n const mounted = useRef(false)\n\n useEffect(() => {\n if (mounted.current) {\n return\n }\n mounted.current = true\n void renderLexical()\n }, [renderLexical])\n\n if (!Component) {\n return typeof Loading !== 'undefined' ? Loading : <ShimmerEffect />\n }\n\n /**\n * By default, the lexical will make form state requests (e.g. to get drawer fields), passing in the arguments\n * of the current field. However, we need to override those arguments to get it to make requests based on the\n * *target* field. The server only knows the schema map of the target field.\n */\n const adjustedServerFunctionContext: ServerFunctionsContextType = {\n ...serverFunctionContext,\n getFormState: async (getFormStateArgs) => {\n return serverFunctionContext.getFormState({\n ...getFormStateArgs,\n collectionSlug: entityType === 'collection' ? entitySlug : undefined,\n globalSlug: entityType === 'global' ? entitySlug : undefined,\n })\n },\n }\n\n if (typeof value === 'undefined' && !setValue) {\n return (\n <ServerFunctionsContext value={{ ...adjustedServerFunctionContext }}>\n <FieldPathContext key={fieldPath} value={fieldPath}>\n {Component}\n </FieldPathContext>\n </ServerFunctionsContext>\n )\n }\n\n const fieldValue: FieldType<DefaultTypedEditorState | undefined> = {\n disabled: false,\n formInitializing: false,\n formProcessing: false,\n formSubmitted: false,\n initialValue: value,\n path: fieldPath,\n setValue: setValue ?? (() => undefined),\n showError: false,\n value,\n }\n\n return (\n <ServerFunctionsContext value={{ ...adjustedServerFunctionContext }}>\n <FieldPathContext key={fieldPath} value={fieldPath}>\n <FieldContext value={fieldValue}>{Component}</FieldContext>\n </FieldPathContext>\n </ServerFunctionsContext>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SACEC,YAAY,EACZC,gBAAgB,EAGhBC,sBAAsB,EAEtBC,aAAa,EACbC,kBAAkB,QACb;AACP,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ;AAKtD;;;;;;AAMA,OAAO,MAAMC,aAAA,GAcTC,IAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EACF;IAAAa,KAAA;IAAAC,YAAA;IAAAC,OAAA;IAAAC,IAAA;IAAAC,UAAA;IAAAC,QAAA;IAAAC;EAAA,IAA4ER,IAAA;EAC5E,OAAAS,SAAA,EAAAC,YAAA,IAAkCf,KAAA,CAAAgB,QAAA,KAAuC;EACzE,MAAAC,qBAAA,GAA8BlB,kBAAA;EAC9B;IAAAmB;EAAA,IAAkCD,qBAAA;EAElC,OAAAE,UAAA,EAAAC,UAAA,IAAiCT,UAAA,CAAAU,KAAA,CAAiB,MAAK;EAEvD,MAAAC,SAAA,GAAkBZ,IAAA,KAASH,KAAA,IAAS,UAAUA,KAAA,GAAQA,KAAA,EAAAgB,IAAA,GAAc,EAAC,KAAM;EAAA,IAAAC,EAAA;EAAA,IAAAlB,CAAA,QAAAY,qBAAA,IAAAZ,CAAA,QAAAC,KAAA,IAAAD,CAAA,QAAAE,YAAA,IAAAF,CAAA,QAAAI,IAAA,IAAAJ,CAAA,QAAAK,UAAA;IAEzCa,EAAA,GAAAA,CAAA;MAChC,MAAAC,M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ACFC,gBAAgB;MAAAC,cAAA,EACHrB,UAAA,KAAe,eAAeC,UAAA,GAAAU,SAAa;MAAAW,UAAA,EAC/CtB,UAAA,KAAe,WAAWC,UAAA,GAAAU;IAAa,CACrD;EAAA;EAEJ,IAEI,OAAOjB,KAAA,KAAU,gBAAgBD,QAAA;IAAA,OAEjCwB,IAAA,CAAAvC,sBAAA;MAAAgB,KAAA;QAAA,GAAoCwB;MAA6B;MAAAK,QAAA,EAC/DN,IAAA,CAAAxC,gBAAA;QAAAiB,KAAA,EAAyCS,SAAA;QAAAoB,QAAA,EACtC5B;MAAA,GADoBQ,SAAA;IAAA,C;;EAO7B,MAAAqB,UAAA;IAAAC,QAAA;IAAAC,gBAAA;IAAAC,cAAA;IAAAC,aAAA;IAAAvC,YAAA,EAKgBK,KAAA;IAAAH,IAAA,EACRY,SAAA;IAAAV,QAAA,EACIA,QAAA,IAAAoC,KAA2B;IAAAC,SAAA;IAAApC;EAAA;EAGvC,OAGEuB,IAAA,CAAAvC,sBAAA;IAAAgB,KAAA;MAAA,GAAoCwB;IAA6B;IAAAK,QAAA,EAC/DN,IAAA,CAAAxC,gBAAA;MAAAiB,KAAA,EAAyCS,SAAA;MAAAoB,QAAA,EACvCN,IAAA,CAAAzC,YAAA;QAAAkB,KAAA,EAAqB8B,UAAA;QAAAD,QAAA,EAAa5B;MAAA,C;OADbQ,SAAA;EAAA,C;CAK7B;AA3FI,SAAA0B,MAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { LexicalEditorNodeMap, LexicalEditorViewMap } from '../types.js';
2
+ import type { LexicalEditorNodeMap, LexicalEditorViewMap } from '../types/index.js';
3
3
  /**
4
4
  * Context for managing richtext editor view state and inheritance.
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextViewProvider.d.ts","sourceRoot":"","sources":["../../src/field/RichTextViewProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,O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,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAC7B,CAAA;AAQD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAC7B,CA0DA,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,IAAI,uBAAuB,CAEzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextViewProvider.js","names":["useControllableState","React","createContext","use","useMemo","RichTextViewContext","currentView","inheritable","setCurrentView","RichTextViewProvider","args","parentContext","useRichTextView","hasOwnExplicitView","undefined","isControlledByParent","Boolean","views","hasExplicitCurrentView","children","currentViewFromProps","currentViewRaw","value","currentViewMap","_jsx"],"sources":["../../src/field/RichTextViewProvider.tsx"],"sourcesContent":["'use client'\nimport { useControllableState } from '@payloadcms/ui'\nimport React, { createContext, use, useMemo } from 'react'\n\nimport type { LexicalEditorNodeMap, LexicalEditorViewMap } from '../types.js'\n\n/**\n * Context for managing richtext editor view state and inheritance.\n */\ntype RichTextViewContextType = {\n /**\n * The currently active view name (e.g., 'default', 'frontend', 'debug').\n */\n currentView: string\n /**\n * The resolved node map for the current view, containing rendering overrides for each node type.\n */\n currentViewMap?: LexicalEditorNodeMap\n /**\n * True if the current view was explicitly set (via prop) by this provider or an ancestor.\n * Used to distinguish intentional view settings from automatic defaults.\n */\n hasExplicitCurrentView?: boolean\n /**\n * If true, nested richtext editors will inherit this provider's currentView and views.\n */\n inheritable?: boolean\n /**\n * True if this provider's view is controlled by an ancestor provider — either because the\n * ancestor has a views map (view-map inheritance) or an explicit `currentView` prop.\n * When true, the ViewSelector is hidden.\n */\n isControlledByParent?: boolean\n /**\n * Function to programmatically change the current view.\n */\n setCurrentView: (view: string) => void\n /**\n * Map of all available views for this editor. Each key is a view name, each value contains\n * admin config, node overrides, and lexical config for that view.\n */\n views?: LexicalEditorViewMap\n}\n\nconst RichTextViewContext = createContext<RichTextViewContextType>({\n currentView: 'default',\n inheritable: false,\n setCurrentView: () => {},\n})\n\n/**\n * Provider for managing richtext editor view state and its inheritance.\n *\n * Handles two key scenarios:\n * 1. **Explicit view setting**: Wrap with `currentView` and `inheritable={true}` to force nested editors to a specific view\n * 2. **View map inheritance**: Nested editors inherit `views` from parents, allowing view switching across the hierarchy\n *\n * When a nested editor inherits from a parent, its ViewSelector is hidden because the view is controlled by an ancestor.\n *\n * @example\n * Force all nested richtext editors to use \"frontend\" view:\n * ```tsx\n * <RichTextViewProvider currentView=\"frontend\" inheritable={true}>\n * <MyForm /> {/* All richtext fields inside will use \"frontend\" view }\n * </RichTextViewProvider>\n * ```\n */\nexport const RichTextViewProvider: React.FC<{\n children: React.ReactNode\n currentView?: string\n inheritable?: boolean\n views?: LexicalEditorViewMap\n}> = (args) => {\n const parentContext = useRichTextView()\n\n // Track if this provider explicitly sets currentView (not just using the default)\n const hasOwnExplicitView = args.currentView !== undefined\n\n const isControlledByParent =\n parentContext.inheritable &&\n (Boolean(parentContext.views) || Boolean(parentContext.hasExplicitCurrentView))\n\n // This provider has explicit currentView if it sets one OR inherits one from parent\n const hasExplicitCurrentView =\n hasOwnExplicitView ||\n (parentContext.inheritable && Boolean(parentContext.hasExplicitCurrentView))\n\n const {\n children,\n currentView: currentViewFromProps,\n inheritable,\n views,\n } = {\n children: args.children,\n currentView: isControlledByParent ? parentContext.currentView : args.currentView,\n // Propagate inheritable flag through the hierarchy\n inheritable: parentContext.inheritable || args.inheritable,\n // Only inherit views if parent has a views map\n views: isControlledByParent && parentContext.views ? parentContext.views : args.views,\n }\n\n const [currentViewRaw, setCurrentView] = useControllableState(currentViewFromProps, 'default')\n\n // Normalize currentView: if the requested view doesn't exist in this editor's\n // views map, fall back to 'default'. This ensures all consumers of useRichTextView()\n // see a consistent currentView that actually exists\n const currentView =\n views && currentViewRaw !== 'default' && !views[currentViewRaw] ? 'default' : currentViewRaw\n\n const value = useMemo(() => {\n const currentViewMap = views ? views[currentView] : undefined\n return {\n currentView,\n currentViewMap,\n hasExplicitCurrentView,\n inheritable,\n isControlledByParent,\n setCurrentView,\n views,\n }\n }, [\n currentView,\n inheritable,\n hasExplicitCurrentView,\n isControlledByParent,\n setCurrentView,\n views,\n ])\n\n return <RichTextViewContext value={value}>{children}</RichTextViewContext>\n}\n\n/**\n * Access the current richtext editor view context.\n *\n * Returns the active view name, node overrides, inheritance state, and a function to switch views.\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { currentView, currentViewMap, isControlledByParent, setCurrentView } = useRichTextView()\n *\n * return (\n * <div>\n * <p>Active view: {currentView}</p>\n * {isControlledByParent && <p>View controlled by parent</p>}\n * {currentViewMap?.heading && <p>Custom heading renderer active</p>}\n * <button onClick={() => setCurrentView('frontend')}>Switch to frontend</button>\n * </div>\n * )\n * }\n * ```\n */\nexport function useRichTextView(): RichTextViewContextType {\n return use(RichTextViewContext)\n}\n"],"mappings":"AAAA;;;AACA,SAASA,oBAAoB,QAAQ;AACrC,OAAOC,KAAA,IAASC,aAAa,EAAEC,GAAG,EAAEC,OAAO,QAAQ;AA0CnD,MAAMC,mBAAA,gBAAsBH,aAAA,CAAuC;EACjEI,WAAA,EAAa;EACbC,WAAA,EAAa;EACbC,cAAA,EAAgBA,CAAA,MAAO;AACzB;AAEA;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,oBAAA,GAKPC,IAAA;EACJ,MAAMC,aAAA,GAAgBC,eAAA;EAEtB;EACA,MAAMC,kBAAA,GAAqB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AoBiB,KAAA,EAAOA,KAAA;cAAQH;;AAC7C;AAEA;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,SAASP,gBAAA;EACd,OAAOT,GAAA,CAAIE,mBAAA;AACb","ignoreList":[]}
1
+ {"version":3,"file":"RichTextViewProvider.js","names":["useControllableState","React","createContext","use","useMemo","RichTextViewContext","currentView","inheritable","setCurrentView","RichTextViewProvider","args","parentContext","useRichTextView","hasOwnExplicitView","undefined","isControlledByParent","Boolean","views","hasExplicitCurrentView","children","currentViewFromProps","currentViewRaw","value","currentViewMap","_jsx"],"sources":["../../src/field/RichTextViewProvider.tsx"],"sourcesContent":["'use client'\nimport { useControllableState } from '@payloadcms/ui'\nimport React, { createContext, use, useMemo } from 'react'\n\nimport type { LexicalEditorNodeMap, LexicalEditorViewMap } from '../types/index.js'\n\n/**\n * Context for managing richtext editor view state and inheritance.\n */\ntype RichTextViewContextType = {\n /**\n * The currently active view name (e.g., 'default', 'frontend', 'debug').\n */\n currentView: string\n /**\n * The resolved node map for the current view, containing rendering overrides for each node type.\n */\n currentViewMap?: LexicalEditorNodeMap\n /**\n * True if the current view was explicitly set (via prop) by this provider or an ancestor.\n * Used to distinguish intentional view settings from automatic defaults.\n */\n hasExplicitCurrentView?: boolean\n /**\n * If true, nested richtext editors will inherit this provider's currentView and views.\n */\n inheritable?: boolean\n /**\n * True if this provider's view is controlled by an ancestor provider — either because the\n * ancestor has a views map (view-map inheritance) or an explicit `currentView` prop.\n * When true, the ViewSelector is hidden.\n */\n isControlledByParent?: boolean\n /**\n * Function to programmatically change the current view.\n */\n setCurrentView: (view: string) => void\n /**\n * Map of all available views for this editor. Each key is a view name, each value contains\n * admin config, node overrides, and lexical config for that view.\n */\n views?: LexicalEditorViewMap\n}\n\nconst RichTextViewContext = createContext<RichTextViewContextType>({\n currentView: 'default',\n inheritable: false,\n setCurrentView: () => {},\n})\n\n/**\n * Provider for managing richtext editor view state and its inheritance.\n *\n * Handles two key scenarios:\n * 1. **Explicit view setting**: Wrap with `currentView` and `inheritable={true}` to force nested editors to a specific view\n * 2. **View map inheritance**: Nested editors inherit `views` from parents, allowing view switching across the hierarchy\n *\n * When a nested editor inherits from a parent, its ViewSelector is hidden because the view is controlled by an ancestor.\n *\n * @example\n * Force all nested richtext editors to use \"frontend\" view:\n * ```tsx\n * <RichTextViewProvider currentView=\"frontend\" inheritable={true}>\n * <MyForm /> {/* All richtext fields inside will use \"frontend\" view }\n * </RichTextViewProvider>\n * ```\n */\nexport const RichTextViewProvider: React.FC<{\n children: React.ReactNode\n currentView?: string\n inheritable?: boolean\n views?: LexicalEditorViewMap\n}> = (args) => {\n const parentContext = useRichTextView()\n\n // Track if this provider explicitly sets currentView (not just using the default)\n const hasOwnExplicitView = args.currentView !== undefined\n\n const isControlledByParent =\n parentContext.inheritable &&\n (Boolean(parentContext.views) || Boolean(parentContext.hasExplicitCurrentView))\n\n // This provider has explicit currentView if it sets one OR inherits one from parent\n const hasExplicitCurrentView =\n hasOwnExplicitView ||\n (parentContext.inheritable && Boolean(parentContext.hasExplicitCurrentView))\n\n const {\n children,\n currentView: currentViewFromProps,\n inheritable,\n views,\n } = {\n children: args.children,\n currentView: isControlledByParent ? parentContext.currentView : args.currentView,\n // Propagate inheritable flag through the hierarchy\n inheritable: parentContext.inheritable || args.inheritable,\n // Only inherit views if parent has a views map\n views: isControlledByParent && parentContext.views ? parentContext.views : args.views,\n }\n\n const [currentViewRaw, setCurrentView] = useControllableState(currentViewFromProps, 'default')\n\n // Normalize currentView: if the requested view doesn't exist in this editor's\n // views map, fall back to 'default'. This ensures all consumers of useRichTextView()\n // see a consistent currentView that actually exists\n const currentView =\n views && currentViewRaw !== 'default' && !views[currentViewRaw] ? 'default' : currentViewRaw\n\n const value = useMemo(() => {\n const currentViewMap = views ? views[currentView] : undefined\n return {\n currentView,\n currentViewMap,\n hasExplicitCurrentView,\n inheritable,\n isControlledByParent,\n setCurrentView,\n views,\n }\n }, [\n currentView,\n inheritable,\n hasExplicitCurrentView,\n isControlledByParent,\n setCurrentView,\n views,\n ])\n\n return <RichTextViewContext value={value}>{children}</RichTextViewContext>\n}\n\n/**\n * Access the current richtext editor view context.\n *\n * Returns the active view name, node overrides, inheritance state, and a function to switch views.\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { currentView, currentViewMap, isControlledByParent, setCurrentView } = useRichTextView()\n *\n * return (\n * <div>\n * <p>Active view: {currentView}</p>\n * {isControlledByParent && <p>View controlled by parent</p>}\n * {currentViewMap?.heading && <p>Custom heading renderer active</p>}\n * <button onClick={() => setCurrentView('frontend')}>Switch to frontend</button>\n * </div>\n * )\n * }\n * ```\n */\nexport function useRichTextView(): RichTextViewContextType {\n return use(RichTextViewContext)\n}\n"],"mappings":"AAAA;;;AACA,SAASA,oBAAoB,QAAQ;AACrC,OAAOC,KAAA,IAASC,aAAa,EAAEC,GAAG,EAAEC,OAAO,QAAQ;AA0CnD,MAAMC,mBAAA,gBAAsBH,aAAA,CAAuC;EACjEI,WAAA,EAAa;EACbC,WAAA,EAAa;EACbC,cAAA,EAAgBA,CAAA,MAAO;AACzB;AAEA;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,oBAAA,GAKPC,IAAA;EACJ,MAAMC,aAAA,GAAgBC,eAAA;EAEtB;EACA,MAAMC,kBAAA,GAAqBH,IAAA,CAAKJ,WAAW,KAAKQ,SAAA;EAEhD,MAAMC,oBAAA,GACJJ,aAAA,CAAcJ,WAAW,KACxBS,OAAA,CAAQL,aAAA,CAAcM,KAAK,KAAKD,OAAA,CAAQL,aAAA,CAAcO,sBAAsB;EAE/E;EACA,MAAMA,sBAAA,GACJL,kBAAA,IACCF,aAAA,CAAcJ,WAAW,IAAIS,OAAA,CAAQL,aAAA,CAAcO,sBAAsB;EAE5E,MAAM;IACJC,QAAQ;IACRb,WAAA,EAAac,oBAAoB;IACjCb,WAAW;IACXU;EAAK,CACN,GAAG;IACFE,QAAA,EAAUT,IAAA,CAAKS,QAAQ;IACvBb,WAAA,EAAaS,oBAAA,GAAuBJ,aAAA,CAAcL,WAAW,GAAGI,IAAA,CAAKJ,WAAW;IAChF;IACAC,WAAA,EAAaI,aAAA,CAAcJ,WAAW,IAAIG,IAAA,CAAKH,WAAW;IAC1D;IACAU,KAAA,EAAOF,oBAAA,IAAwBJ,aAAA,CAAcM,KAAK,GAAGN,aAAA,CAAcM,KAAK,GAAGP,IAAA,CAAKO;EAClF;EAEA,MAAM,CAACI,cAAA,EAAgBb,cAAA,CAAe,GAAGR,oBAAA,CAAqBoB,oBAAA,EAAsB;EAEpF;EACA;EACA;EACA,MAAMd,WAAA,GACJW,KAAA,IAASI,cAAA,KAAmB,aAAa,CAACJ,KAAK,CAACI,cAAA,CAAe,GAAG,YAAYA,cAAA;EAEhF,MAAMC,KAAA,GAAQlB,OAAA,CAAQ;IACpB,MAAMmB,cAAA,GAAiBN,KAAA,GAAQA,KAAK,CAACX,WAAA,CAAY,GAAGQ,SAAA;IACpD,OAAO;MACLR,WAAA;MACAiB,cAAA;MACAL,sBAAA;MACAX,WAAA;MACAQ,oBAAA;MACAP,cAAA;MACAS;IACF;EACF,GAAG,CACDX,WAAA,EACAC,WAAA,EACAW,sBAAA,EACAH,oBAAA,EACAP,cAAA,EACAS,KAAA,CACD;EAED,oBAAOO,IAAA,CAACnB,mBAAA;IAAoBiB,KAAA,EAAOA,KAAA;cAAQH;;AAC7C;AAEA;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,SAASP,gBAAA;EACd,OAAOT,GAAA,CAAIE,mBAAA;AACb","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ .lexical-view-selector {
2
+ display: inline-flex;
3
+ margin-left: var(--spacing-xs);
4
+ vertical-align: middle;
5
+ }
6
+
7
+ .lexical-view-selector__button {
8
+ all: unset;
9
+ display: inline-flex;
10
+ align-items: center;
11
+ gap: var(--spacer-1);
12
+ padding: var(--spacer-1) var(--spacer-2);
13
+ background: transparent;
14
+ border-radius: var(--radius-small);
15
+ cursor: pointer;
16
+ color: var(--color-text-secondary);
17
+ box-sizing: border-box;
18
+
19
+ &:hover {
20
+ background: var(--color-bg-hover);
21
+ color: var(--color-text);
22
+ }
23
+ }
24
+
25
+ .lexical-view-selector__label {
26
+ line-height: 1;
27
+ white-space: nowrap;
28
+ }
29
+
30
+ .lexical-view-selector__icon {
31
+ flex-shrink: 0;
32
+ }
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import './ViewSelector.scss';
2
+ import './ViewSelector.css';
3
3
  export declare function ViewSelector(): null | React.ReactElement;
4
4
  //# sourceMappingURL=ViewSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewSelector.d.ts","sourceRoot":"","sources":["../../src/field/ViewSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,qBAAqB,CAAA;AAE5B,wBAAgB,YAAY,IAAI,IAAI,GAAG,KAAK,CAAC,YAAY,CAyDxD"}
1
+ {"version":3,"file":"ViewSelector.d.ts","sourceRoot":"","sources":["../../src/field/ViewSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,oBAAoB,CAAA;AAE3B,wBAAgB,YAAY,IAAI,IAAI,GAAG,KAAK,CAAC,YAAY,CAyDxD"}