@payloadcms/richtext-lexical 4.0.0-internal.a0ef1b8 → 4.0.0-internal.a7ca468

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 (571) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-F22V5L4V.js +2 -0
  3. package/dist/exports/client/Field-F22V5L4V.js.map +7 -0
  4. package/dist/exports/client/bundled.css +1 -1
  5. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  6. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  7. package/dist/exports/client/chunk-ESITTE3C.js +2 -0
  8. package/dist/exports/client/chunk-ESITTE3C.js.map +7 -0
  9. package/dist/exports/client/chunk-LN6VX25I.js +2 -0
  10. package/dist/exports/client/chunk-LN6VX25I.js.map +7 -0
  11. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  12. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  13. package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
  14. package/dist/exports/client/index.d.ts +1 -3
  15. package/dist/exports/client/index.d.ts.map +1 -1
  16. package/dist/exports/client/index.js +27 -28
  17. package/dist/exports/client/index.js.map +4 -4
  18. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  19. package/dist/features/blockquote/client/index.js +2 -2
  20. package/dist/features/blockquote/client/index.js.map +1 -1
  21. package/dist/features/blockquote/server/index.js +2 -2
  22. package/dist/features/blockquote/server/index.js.map +1 -1
  23. package/dist/features/blocks/client/component/index.css +2 -2
  24. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  25. package/dist/features/blocks/client/component/index.js +2 -1
  26. package/dist/features/blocks/client/component/index.js.map +1 -1
  27. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  28. package/dist/features/blocks/client/componentInline/index.css +8 -8
  29. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  30. package/dist/features/blocks/client/componentInline/index.js +2 -1
  31. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  32. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  33. package/dist/features/blocks/client/index.d.ts.map +1 -1
  34. package/dist/features/blocks/client/index.js +4 -2
  35. package/dist/features/blocks/client/index.js.map +1 -1
  36. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  37. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  38. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  39. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  40. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  41. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  42. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  43. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  44. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  45. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  46. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  47. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  49. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  50. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  51. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  52. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  53. package/dist/features/blocks/server/index.d.ts.map +1 -1
  54. package/dist/features/blocks/server/index.js +6 -8
  55. package/dist/features/blocks/server/index.js.map +1 -1
  56. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  57. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  58. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  59. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  60. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  62. package/dist/features/blocks/server/schema.js +3 -2
  63. package/dist/features/blocks/server/schema.js.map +1 -1
  64. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  65. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  66. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  67. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  68. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  69. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  70. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  71. package/dist/features/converters/markdownToLexical/index.js +5 -2
  72. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  73. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  74. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  75. package/dist/features/format/bold/feature.client.js +1 -1
  76. package/dist/features/format/bold/feature.client.js.map +1 -1
  77. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  78. package/dist/features/format/bold/feature.server.js +1 -1
  79. package/dist/features/format/bold/feature.server.js.map +1 -1
  80. package/dist/features/format/inlineCode/feature.client.js +1 -1
  81. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  82. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  83. package/dist/features/format/inlineCode/feature.server.js +1 -1
  84. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  85. package/dist/features/format/italic/feature.client.js +1 -1
  86. package/dist/features/format/italic/feature.client.js.map +1 -1
  87. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  88. package/dist/features/format/italic/feature.server.js +1 -1
  89. package/dist/features/format/italic/feature.server.js.map +1 -1
  90. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  91. package/dist/features/format/strikethrough/feature.client.js +1 -1
  92. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  93. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  94. package/dist/features/format/strikethrough/feature.server.js +1 -1
  95. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  96. package/dist/features/heading/client/index.js +2 -2
  97. package/dist/features/heading/client/index.js.map +1 -1
  98. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  99. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  100. package/dist/features/heading/markdownTransformer.js +6 -19
  101. package/dist/features/heading/markdownTransformer.js.map +1 -1
  102. package/dist/features/heading/server/index.js +2 -2
  103. package/dist/features/heading/server/index.js.map +1 -1
  104. package/dist/features/heading/server/schema.d.ts.map +1 -1
  105. package/dist/features/horizontalRule/client/index.js +2 -2
  106. package/dist/features/horizontalRule/client/index.js.map +1 -1
  107. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  108. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  109. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  110. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  111. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  112. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  113. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  114. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  115. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  116. package/dist/features/horizontalRule/server/index.js +2 -2
  117. package/dist/features/horizontalRule/server/index.js.map +1 -1
  118. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  119. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  120. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  121. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  122. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  123. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  124. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  125. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  126. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  127. package/dist/features/link/client/index.js +2 -2
  128. package/dist/features/link/client/index.js.map +1 -1
  129. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  130. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  131. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  132. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  133. package/dist/features/link/markdownTransformer.d.ts +4 -4
  134. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  135. package/dist/features/link/markdownTransformer.js +2 -2
  136. package/dist/features/link/markdownTransformer.js.map +1 -1
  137. package/dist/features/link/markdownTransformer.spec.js +10 -10
  138. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  139. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  140. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  141. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  142. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  143. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  144. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  145. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  146. package/dist/features/link/server/baseFields.js.map +1 -1
  147. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  148. package/dist/features/link/server/index.js +4 -4
  149. package/dist/features/link/server/index.js.map +1 -1
  150. package/dist/features/link/server/schema.d.ts.map +1 -1
  151. package/dist/features/link/server/schema.js +4 -2
  152. package/dist/features/link/server/schema.js.map +1 -1
  153. package/dist/features/link/server/validate.d.ts.map +1 -1
  154. package/dist/features/lists/checklist/client/index.js +1 -1
  155. package/dist/features/lists/checklist/client/index.js.map +1 -1
  156. package/dist/features/lists/checklist/server/index.js +1 -1
  157. package/dist/features/lists/checklist/server/index.js.map +1 -1
  158. package/dist/features/lists/orderedList/client/index.js +1 -1
  159. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  160. package/dist/features/lists/orderedList/server/index.js +1 -1
  161. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  162. package/dist/features/lists/unorderedList/client/index.js +1 -1
  163. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  164. package/dist/features/lists/unorderedList/server/index.js +1 -1
  165. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  166. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  167. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  168. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  169. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  170. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  171. package/dist/features/relationship/server/schema.d.ts +3 -3
  172. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  173. package/dist/features/relationship/server/schema.js +22 -5
  174. package/dist/features/relationship/server/schema.js.map +1 -1
  175. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  176. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  177. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  178. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  179. package/dist/features/table/client/index.d.ts.map +1 -0
  180. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  181. package/dist/features/table/client/index.js.map +1 -0
  182. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  183. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  184. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  185. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  186. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  187. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  188. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  189. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  190. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  191. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  192. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  193. package/dist/features/table/client/utils/debounce.js.map +1 -0
  194. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  195. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  196. package/dist/features/table/markdownTransformer.d.ts +5 -0
  197. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  198. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  199. package/dist/features/table/markdownTransformer.js.map +1 -0
  200. package/dist/features/table/server/index.d.ts +3 -0
  201. package/dist/features/table/server/index.d.ts.map +1 -0
  202. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  203. package/dist/features/table/server/index.js.map +1 -0
  204. package/dist/features/table/server/schema.d.ts.map +1 -0
  205. package/dist/features/table/server/schema.js.map +1 -0
  206. package/dist/features/textState/feature.client.js +1 -1
  207. package/dist/features/textState/feature.client.js.map +1 -1
  208. package/dist/features/toolbars/fixed/client/Toolbar/index.css +4 -6
  209. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  210. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  211. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  212. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  213. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  214. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  215. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  216. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  217. package/dist/features/typesClient.d.ts +1 -1
  218. package/dist/features/typesClient.d.ts.map +1 -1
  219. package/dist/features/typesClient.js.map +1 -1
  220. package/dist/features/typesServer.d.ts +3 -3
  221. package/dist/features/typesServer.d.ts.map +1 -1
  222. package/dist/features/typesServer.js.map +1 -1
  223. package/dist/features/upload/client/component/index.css +9 -9
  224. package/dist/features/upload/client/component/index.js +2 -1
  225. package/dist/features/upload/client/component/index.js.map +1 -1
  226. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  227. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  228. package/dist/features/upload/client/plugin/index.js +5 -5
  229. package/dist/features/upload/client/plugin/index.js.map +1 -1
  230. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  231. package/dist/features/upload/server/index.js +4 -4
  232. package/dist/features/upload/server/index.js.map +1 -1
  233. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  234. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  235. package/dist/features/upload/server/markdownTransformer.js +1 -1
  236. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  237. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  238. package/dist/features/upload/server/schema.d.ts +4 -4
  239. package/dist/features/upload/server/schema.d.ts.map +1 -1
  240. package/dist/features/upload/server/schema.js +26 -6
  241. package/dist/features/upload/server/schema.js.map +1 -1
  242. package/dist/features/upload/server/validate.d.ts.map +1 -1
  243. package/dist/field/Diff/converters/unknown/index.css +1 -1
  244. package/dist/field/Field.d.ts.map +1 -1
  245. package/dist/field/Field.js +18 -15
  246. package/dist/field/Field.js.map +1 -1
  247. package/dist/field/ViewSelector.css +1 -1
  248. package/dist/field/bundled.css +1 -1
  249. package/dist/field/index.css +14 -11
  250. package/dist/i18n.d.ts.map +1 -1
  251. package/dist/i18n.js +68 -0
  252. package/dist/i18n.js.map +1 -1
  253. package/dist/index.d.ts +3 -3
  254. package/dist/index.d.ts.map +1 -1
  255. package/dist/index.js +11 -54
  256. package/dist/index.js.map +1 -1
  257. package/dist/lexical/LexicalEditor.css +18 -18
  258. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  259. package/dist/lexical/LexicalEditor.js +2 -36
  260. package/dist/lexical/LexicalEditor.js.map +1 -1
  261. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  262. package/dist/lexical/LexicalProvider.js +7 -22
  263. package/dist/lexical/LexicalProvider.js.map +1 -1
  264. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  265. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  266. package/dist/lexical/config/server/loader.d.ts +1 -1
  267. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  268. package/dist/lexical/config/server/loader.js +2 -2
  269. package/dist/lexical/config/server/loader.js.map +1 -1
  270. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  271. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  272. package/dist/lexical/config/server/sanitize.js +2 -2
  273. package/dist/lexical/config/server/sanitize.js.map +1 -1
  274. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  275. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  276. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  277. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  278. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  279. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  280. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  281. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  282. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  283. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  284. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  285. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  286. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  287. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  288. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  289. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  290. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  291. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  292. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  293. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  294. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  295. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  296. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  297. package/dist/lexical/theme/EditorTheme.css +18 -19
  298. package/dist/lexical/ui/ContentEditable.css +22 -17
  299. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  300. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  301. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  302. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  303. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  304. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  305. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  306. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  307. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  308. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  309. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  310. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  311. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  312. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  313. package/dist/lexical/utils/point.d.ts.map +1 -1
  314. package/dist/lexical/utils/rect.d.ts.map +1 -1
  315. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  316. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  317. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  318. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  319. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  320. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  321. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  322. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  323. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  324. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  325. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  326. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  327. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  328. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  329. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  330. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  331. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  332. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  333. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  334. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  335. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  336. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  337. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  338. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  339. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  340. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  341. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  342. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  343. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  344. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  345. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  346. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  347. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  348. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  349. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  350. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  351. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  352. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  353. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  354. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  355. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  356. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  357. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  358. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  359. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  360. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  361. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  362. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  363. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  364. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  365. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  366. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  367. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  368. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  369. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  370. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  371. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  372. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  373. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  374. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  375. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  376. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  377. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  378. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  379. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  380. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  381. package/dist/types/index.d.ts +1 -1
  382. package/dist/types/index.d.ts.map +1 -1
  383. package/dist/types/index.js.map +1 -1
  384. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  385. package/dist/types/nodeTypes.d.ts +1 -1
  386. package/dist/types/nodeTypes.d.ts.map +1 -1
  387. package/dist/types/nodeTypes.js.map +1 -1
  388. package/dist/types/schema.d.ts.map +1 -1
  389. package/dist/types/schema.js +12 -5
  390. package/dist/types/schema.js.map +1 -1
  391. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  392. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  393. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  394. package/dist/utilities/createServerFeature.d.ts +1 -1
  395. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  396. package/dist/utilities/createServerFeature.js +2 -2
  397. package/dist/utilities/createServerFeature.js.map +1 -1
  398. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  399. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  400. package/dist/utilities/editorConfigFactory.js +9 -9
  401. package/dist/utilities/editorConfigFactory.js.map +1 -1
  402. package/dist/utilities/fieldsDrawer/index.css +4 -4
  403. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  404. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  405. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  406. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  407. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  408. package/dist/utilities/generateImportMap.d.ts +1 -1
  409. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  410. package/dist/utilities/generateImportMap.js +3 -7
  411. package/dist/utilities/generateImportMap.js.map +1 -1
  412. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  413. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  414. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  415. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  416. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  417. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  418. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  419. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  420. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  421. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  422. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  423. package/dist/validate/index.d.ts.map +1 -1
  424. package/package.json +94 -26
  425. package/dist/@types/assets.d.js +0 -2
  426. package/dist/@types/assets.d.js.map +0 -1
  427. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  428. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  429. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  430. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  431. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  432. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  433. package/dist/exports/client/chunk-ZYXHC5CY.js +0 -2
  434. package/dist/exports/client/chunk-ZYXHC5CY.js.map +0 -7
  435. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  436. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  437. package/dist/exports/client/componentInline-R3EPNYWF.js +0 -2
  438. package/dist/exports/server/rsc.browser.d.ts +0 -11
  439. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  440. package/dist/exports/server/rsc.browser.js +0 -10
  441. package/dist/exports/server/rsc.browser.js.map +0 -1
  442. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  443. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  444. package/dist/features/blockquote/markdownTransformer.js +0 -33
  445. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  446. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  447. package/dist/features/experimental_table/client/index.js.map +0 -1
  448. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  449. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  450. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  451. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  452. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  453. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  454. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  455. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  456. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  457. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  458. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  459. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  460. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  461. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  462. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  463. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  464. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  465. package/dist/features/experimental_table/server/index.d.ts +0 -3
  466. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  467. package/dist/features/experimental_table/server/index.js.map +0 -1
  468. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  469. package/dist/features/experimental_table/server/schema.js.map +0 -1
  470. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  471. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  472. package/dist/features/format/bold/markdownTransformers.js +0 -23
  473. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  474. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  475. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  476. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  477. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  478. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  479. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  480. package/dist/features/format/italic/markdownTransformers.js +0 -12
  481. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  482. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  483. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  484. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  485. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  486. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  487. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  488. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  489. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  490. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  491. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  492. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  493. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  494. package/dist/features/lists/shared/markdown.d.ts +0 -6
  495. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  496. package/dist/features/lists/shared/markdown.js +0 -57
  497. package/dist/features/lists/shared/markdown.js.map +0 -1
  498. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  499. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  500. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  501. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  502. package/dist/field/clientEntry.d.ts +0 -29
  503. package/dist/field/clientEntry.d.ts.map +0 -1
  504. package/dist/field/clientEntry.js +0 -86
  505. package/dist/field/clientEntry.js.map +0 -1
  506. package/dist/lexical/utils/guard.d.ts +0 -5
  507. package/dist/lexical/utils/guard.d.ts.map +0 -1
  508. package/dist/lexical/utils/guard.js +0 -9
  509. package/dist/lexical/utils/guard.js.map +0 -1
  510. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  511. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  512. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  513. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  514. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  515. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  516. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  517. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  518. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  519. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  520. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  521. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  522. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  523. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  524. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  525. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  526. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  527. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  528. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  529. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  530. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  531. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  532. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  533. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  534. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  535. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  536. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  537. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  538. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  539. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  540. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  541. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  542. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  543. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  544. package/dist/packages/@lexical/markdown/index.js +0 -39
  545. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  546. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  547. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  548. package/dist/packages/@lexical/markdown/utils.js +0 -267
  549. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  550. /package/dist/exports/client/{componentInline-R3EPNYWF.js.map → componentInline-H24N7GUG.js.map} +0 -0
  551. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  552. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  553. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  554. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +0 -0
  555. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  556. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  557. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  558. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  559. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  560. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  561. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  562. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  563. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  564. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  565. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  566. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  567. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  568. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  569. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  570. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  571. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -3,7 +3,7 @@ import { loadFeatures } from '../lexical/config/server/loader.js';
3
3
  import { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js';
4
4
  import { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js';
5
5
  export const editorConfigFactory = {
6
- default: async args => {
6
+ default: args => {
7
7
  return getDefaultSanitizedEditorConfig({
8
8
  config: args.config,
9
9
  parentIsLocalized: args.parentIsLocalized ?? false
@@ -17,8 +17,8 @@ export const editorConfigFactory = {
17
17
  * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg
18
18
  * into a separate variable and use `fromFeatures` instead.
19
19
  */
20
- fromEditor: async args => {
21
- const lexicalAdapter = await args.editor({
20
+ fromEditor: args => {
21
+ const lexicalAdapter = args.editor({
22
22
  config: args.config,
23
23
  isRoot: args.isRoot ?? false,
24
24
  parentIsLocalized: args.parentIsLocalized ?? false
@@ -29,17 +29,17 @@ export const editorConfigFactory = {
29
29
  /**
30
30
  * Create a new editor config - behaves just like instantiating a new `lexicalEditor`
31
31
  */
32
- fromFeatures: async args => {
33
- return (await featuresInputToEditorConfig(args)).sanitizedConfig;
32
+ fromFeatures: args => {
33
+ return featuresInputToEditorConfig(args).sanitizedConfig;
34
34
  },
35
35
  fromField: args => {
36
36
  const lexicalAdapter = args.field.editor;
37
37
  const sanitizedServerEditorConfig = lexicalAdapter.editorConfig;
38
38
  return sanitizedServerEditorConfig;
39
39
  },
40
- fromUnsanitizedField: async args => {
40
+ fromUnsanitizedField: args => {
41
41
  const lexicalAdapterProvider = args.field.editor;
42
- const lexicalAdapter = await lexicalAdapterProvider({
42
+ const lexicalAdapter = lexicalAdapterProvider({
43
43
  config: args.config,
44
44
  isRoot: args.isRoot ?? false,
45
45
  parentIsLocalized: args.parentIsLocalized ?? false
@@ -48,7 +48,7 @@ export const editorConfigFactory = {
48
48
  return sanitizedServerEditorConfig;
49
49
  }
50
50
  };
51
- export const featuresInputToEditorConfig = async args => {
51
+ export const featuresInputToEditorConfig = args => {
52
52
  let features = [];
53
53
  if (args.features && typeof args.features === 'function') {
54
54
  const rootEditor = args.config.editor;
@@ -67,7 +67,7 @@ export const featuresInputToEditorConfig = async args => {
67
67
  features = defaultEditorFeatures;
68
68
  }
69
69
  const lexical = args.lexical ?? defaultEditorConfig.lexical;
70
- const resolvedFeatureMap = await loadFeatures({
70
+ const resolvedFeatureMap = loadFeatures({
71
71
  config: args.config,
72
72
  isRoot: args.isRoot ?? false,
73
73
  parentIsLocalized: args.parentIsLocalized ?? false,
@@ -1 +1 @@
1
- {"version":3,"file":"editorConfigFactory.js","names":["defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerFeatures","getDefaultSanitizedEditorConfig","editorConfigFactory","default","args","config","parentIsLocalized","fromEditor","lexicalAdapter","editor","isRoot","sanitizedServerEditorConfig","editorConfig","fromFeatures","featuresInputToEditorConfig","sanitizedConfig","fromField","field","fromUnsanitizedField","lexicalAdapterProvider","features","rootEditor","rootEditorFeatures","defaultFeatures","rootFeatures","lexical","resolvedFeatureMap","unSanitizedEditorConfig"],"sources":["../../src/utilities/editorConfigFactory.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { RichTextAdapterProvider, RichTextField, SanitizedConfig } from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type {\n FeaturesInput,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from '../types/index.js'\n\nimport { defaultEditorConfig, defaultEditorFeatures } from '../lexical/config/server/default.js'\nimport { loadFeatures } from '../lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js'\nimport { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js'\n\nexport const editorConfigFactory = {\n default: async (args: {\n config: SanitizedConfig\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n return getDefaultSanitizedEditorConfig({\n config: args.config,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n },\n /**\n * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),\n * you can extract the editor config from it.\n * This is common if you define the editor in a re-usable module scope variable and pass it to the richText field.\n *\n * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg\n * into a separate variable and use `fromFeatures` instead.\n */\n fromEditor: async (args: {\n config: SanitizedConfig\n editor: LexicalRichTextAdapterProvider\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n const lexicalAdapter: LexicalRichTextAdapter = await args.editor({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n /**\n * Create a new editor config - behaves just like instantiating a new `lexicalEditor`\n */\n fromFeatures: async (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n return (await featuresInputToEditorConfig(args)).sanitizedConfig\n },\n fromField: (args: { field: RichTextField }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.field.editor as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n fromUnsanitizedField: async (args: {\n config: SanitizedConfig\n field: RichTextField\n isRoot?: boolean\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n const lexicalAdapterProvider: RichTextAdapterProvider = args.field\n .editor as RichTextAdapterProvider\n\n const lexicalAdapter: LexicalRichTextAdapter = (await lexicalAdapterProvider({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })) as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n}\n\nexport const featuresInputToEditorConfig = async (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n}): Promise<{\n features: FeatureProviderServer<unknown, unknown, unknown>[]\n resolvedFeatureMap: ResolvedServerFeatureMap\n sanitizedConfig: SanitizedServerEditorConfig\n}> => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (args.features && typeof args.features === 'function') {\n const rootEditor = args.config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n features = args.features({\n defaultFeatures: defaultEditorFeatures,\n rootFeatures: rootEditorFeatures,\n })\n } else {\n features = args.features as FeatureProviderServer<unknown, unknown, unknown>[]\n }\n\n if (!features) {\n features = defaultEditorFeatures\n }\n\n const lexical = args.lexical ?? defaultEditorConfig.lexical\n\n const resolvedFeatureMap = await loadFeatures({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n return {\n features,\n resolvedFeatureMap,\n sanitizedConfig: {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: args.lexical,\n resolvedFeatureMap,\n },\n }\n}\n"],"mappings":"AAWA,SAASA,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAsB;EACjCC,OAAA,EAAS,MAAOC,IAAA;IAId,OAAOH,+BAAA,CAAgC;MACrCI,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBC,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;EACF;EACA;;;;;;;;EAQAC,UAAA,EAAY,MAAOH,IAAA;IAOjB,MAAMI,cAAA,GAAyC,MAAMJ,IAAA,CAAKK,MAAM,CAAC;MAC/DJ,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACA;;;EAGAE,YAAA,EAAc,MAAOT,IAAA;IAOnB,OAAO,CAAC,MAAMU,2BAAA,CAA4BV,IAAA,CAAI,EAAGW,eAAe;EAClE;EACAC,SAAA,EAAYZ,IAAA;IACV,MAAMI,cAAA,GAAyCJ,IAAA,CAAKa,KAAK,CAACR,MAAM;IAEhE,MAAME,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACAO,oBAAA,EAAsB,MAAOd,IAAA;IAM3B,MAAMe,sBAAA,GAAkDf,IAAA,CAAKa,KAAK,CAC/DR,MAAM;IAET,MAAMD,cAAA,GAA0C,MAAMW,sBAAA,CAAuB;MAC3Ed,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;AACF;AAEA,OAAO,MAAMG,2BAAA,GAA8B,MAAOV,IAAA;EAWhD,IAAIgB,QAAA,GAA+D,EAAE;EACrE,IAAIhB,IAAA,CAAKgB,QAAQ,IAAI,OAAOhB,IAAA,CAAKgB,QAAQ,KAAK,YAAY;IACxD,MAAMC,UAAA,GAAajB,IAAA,CAAKC,MAAM,CAACI,MAAM;IACrC,IAAIa,kBAAA,GAAyE,EAAE;IAC/E,IAAI,OAAOD,UAAA,KAAe,YAAY,cAAcA,UAAA,EAAY;MAC9DC,kBAAA,GAAqBD,UAAC,CAAsCD,QAAQ;IACtE;IACAA,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ,CAAC;MACvBG,eAAA,EAAiBzB,qBAAA;MACjB0B,YAAA,EAAcF;IAChB;EACF,OAAO;IACLF,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ;EAC1B;EAEA,IAAI,CAACA,QAAA,EAAU;IACbA,QAAA,GAAWtB,qBAAA;EACb;EAEA,MAAM2B,OAAA,GAAUrB,IAAA,CAAKqB,OAAO,IAAI5B,mBAAA,CAAoB4B,OAAO;EAE3D,MAAMC,kBAAA,GAAqB,MAAM3B,YAAA,CAAa;IAC5CM,MAAA,EAAQD,IAAA,CAAKC,MAAM;IACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;IACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC7CqB,uBAAA,EAAyB;MACvBP,QAAA;MACAK;IACF;EACF;EAEA,OAAO;IACLL,QAAA;IACAM,kBAAA;IACAX,eAAA,EAAiB;MACfK,QAAA,EAAUpB,sBAAA,CAAuB0B,kBAAA;MACjCD,OAAA,EAASrB,IAAA,CAAKqB,OAAO;MACrBC;IACF;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"editorConfigFactory.js","names":["defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerFeatures","getDefaultSanitizedEditorConfig","editorConfigFactory","default","args","config","parentIsLocalized","fromEditor","lexicalAdapter","editor","isRoot","sanitizedServerEditorConfig","editorConfig","fromFeatures","featuresInputToEditorConfig","sanitizedConfig","fromField","field","fromUnsanitizedField","lexicalAdapterProvider","features","rootEditor","rootEditorFeatures","defaultFeatures","rootFeatures","lexical","resolvedFeatureMap","unSanitizedEditorConfig"],"sources":["../../src/utilities/editorConfigFactory.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { RichTextAdapterProvider, RichTextField, SanitizedConfig } from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type {\n FeaturesInput,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from '../types/index.js'\n\nimport { defaultEditorConfig, defaultEditorFeatures } from '../lexical/config/server/default.js'\nimport { loadFeatures } from '../lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js'\nimport { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js'\n\nexport const editorConfigFactory = {\n default: (args: {\n config: SanitizedConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n return getDefaultSanitizedEditorConfig({\n config: args.config,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n },\n /**\n * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),\n * you can extract the editor config from it.\n * This is common if you define the editor in a re-usable module scope variable and pass it to the richText field.\n *\n * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg\n * into a separate variable and use `fromFeatures` instead.\n */\n fromEditor: (args: {\n config: SanitizedConfig\n editor: LexicalRichTextAdapterProvider\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.editor({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n /**\n * Create a new editor config - behaves just like instantiating a new `lexicalEditor`\n */\n fromFeatures: (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n return featuresInputToEditorConfig(args).sanitizedConfig\n },\n fromField: (args: { field: RichTextField }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.field.editor as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n fromUnsanitizedField: (args: {\n config: SanitizedConfig\n field: RichTextField\n isRoot?: boolean\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n const lexicalAdapterProvider: RichTextAdapterProvider = args.field\n .editor as RichTextAdapterProvider\n\n const lexicalAdapter: LexicalRichTextAdapter = lexicalAdapterProvider({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n }) as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n}\n\nexport const featuresInputToEditorConfig = (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n}): {\n features: FeatureProviderServer<unknown, unknown, unknown>[]\n resolvedFeatureMap: ResolvedServerFeatureMap\n sanitizedConfig: SanitizedServerEditorConfig\n} => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (args.features && typeof args.features === 'function') {\n const rootEditor = args.config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n features = args.features({\n defaultFeatures: defaultEditorFeatures,\n rootFeatures: rootEditorFeatures,\n })\n } else {\n features = args.features as FeatureProviderServer<unknown, unknown, unknown>[]\n }\n\n if (!features) {\n features = defaultEditorFeatures\n }\n\n const lexical = args.lexical ?? defaultEditorConfig.lexical\n\n const resolvedFeatureMap = loadFeatures({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n return {\n features,\n resolvedFeatureMap,\n sanitizedConfig: {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: args.lexical,\n resolvedFeatureMap,\n },\n }\n}\n"],"mappings":"AAWA,SAASA,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAsB;EACjCC,OAAA,EAAUC,IAAA;IAIR,OAAOH,+BAAA,CAAgC;MACrCI,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBC,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;EACF;EACA;;;;;;;;EAQAC,UAAA,EAAaH,IAAA;IAOX,MAAMI,cAAA,GAAyCJ,IAAA,CAAKK,MAAM,CAAC;MACzDJ,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACA;;;EAGAE,YAAA,EAAeT,IAAA;IAOb,OAAOU,2BAAA,CAA4BV,IAAA,EAAMW,eAAe;EAC1D;EACAC,SAAA,EAAYZ,IAAA;IACV,MAAMI,cAAA,GAAyCJ,IAAA,CAAKa,KAAK,CAACR,MAAM;IAEhE,MAAME,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACAO,oBAAA,EAAuBd,IAAA;IAMrB,MAAMe,sBAAA,GAAkDf,IAAA,CAAKa,KAAK,CAC/DR,MAAM;IAET,MAAMD,cAAA,GAAyCW,sBAAA,CAAuB;MACpEd,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;AACF;AAEA,OAAO,MAAMG,2BAAA,GAA+BV,IAAA;EAW1C,IAAIgB,QAAA,GAA+D,EAAE;EACrE,IAAIhB,IAAA,CAAKgB,QAAQ,IAAI,OAAOhB,IAAA,CAAKgB,QAAQ,KAAK,YAAY;IACxD,MAAMC,UAAA,GAAajB,IAAA,CAAKC,MAAM,CAACI,MAAM;IACrC,IAAIa,kBAAA,GAAyE,EAAE;IAC/E,IAAI,OAAOD,UAAA,KAAe,YAAY,cAAcA,UAAA,EAAY;MAC9DC,kBAAA,GAAqBD,UAAC,CAAsCD,QAAQ;IACtE;IACAA,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ,CAAC;MACvBG,eAAA,EAAiBzB,qBAAA;MACjB0B,YAAA,EAAcF;IAChB;EACF,OAAO;IACLF,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ;EAC1B;EAEA,IAAI,CAACA,QAAA,EAAU;IACbA,QAAA,GAAWtB,qBAAA;EACb;EAEA,MAAM2B,OAAA,GAAUrB,IAAA,CAAKqB,OAAO,IAAI5B,mBAAA,CAAoB4B,OAAO;EAE3D,MAAMC,kBAAA,GAAqB3B,YAAA,CAAa;IACtCM,MAAA,EAAQD,IAAA,CAAKC,MAAM;IACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;IACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC7CqB,uBAAA,EAAyB;MACvBP,QAAA;MACAK;IACF;EACF;EAEA,OAAO;IACLL,QAAA;IACAM,kBAAA;IACAX,eAAA,EAAiB;MACfK,QAAA,EAAUpB,sBAAA,CAAuB0B,kBAAA;MACjCD,OAAA,EAASrB,IAAA,CAAKqB,OAAO;MACrBC;IACF;EACF;AACF","ignoreList":[]}
@@ -3,10 +3,10 @@
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  gap: var(--spacer-3);
6
- padding: var(--spacer-2-5);
7
- }
6
+ padding: var(--spacer-4);
8
7
 
9
- .fields-drawer .radio-group .field-description {
10
- margin-top: var(--spacer-2);
8
+ @media (max-width: 768px) {
9
+ padding: var(--spacer-3);
10
+ }
11
11
  }
12
12
  }
@@ -14,7 +14,7 @@ export declare const useDrawerSubmit: () => {
14
14
  headerActions: {
15
15
  label: string;
16
16
  onClick: () => void | undefined;
17
- style: "primary";
17
+ style: 'primary';
18
18
  }[];
19
19
  submitRef: React.RefObject<(() => void) | null>;
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawerSubmit.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useDrawerSubmit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;sCAEM,IAAI;CAcrC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CAChD,CAWA,CAAA"}
1
+ {"version":3,"file":"useDrawerSubmit.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useDrawerSubmit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;eASb,SAAS;;sCAPU,IAAI;CAcrC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CAChD,CAWA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalDocumentDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAQvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC;IACD,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAkE/B,CAAA"}
1
+ {"version":3,"file":"useLexicalDocumentDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAQvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC;IACD,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAkE/B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDrawer.tsx"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,cAAc,OAAO;;;CAoEnE,CAAA"}
1
+ {"version":3,"file":"useLexicalDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDrawer.tsx"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,gBAAgB,OAAO;;;CAoEnE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalListDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalListDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAc5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KACjC;IACD,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,cAAc,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;CAsFpD,CAAA"}
1
+ {"version":3,"file":"useLexicalListDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalListDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAc5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KACjC;IACD,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,cAAc,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;CAsFpD,CAAA"}
@@ -4,5 +4,5 @@ import type { LexicalEditorProps } from '../types/index.js';
4
4
  export declare const getGenerateImportMap: (args: {
5
5
  lexicalEditorArgs?: LexicalEditorProps;
6
6
  resolvedFeatureMap: ResolvedServerFeatureMap;
7
- }) => RichTextAdapter["generateImportMap"];
7
+ }) => RichTextAdapter['generateImportMap'];
8
8
  //# sourceMappingURL=generateImportMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateImportMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateImportMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,eAAO,MAAM,oBAAoB,GAC9B,MAAM;IACL,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;IACtC,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,mBAAmB,CAoDtC,CAAA"}
1
+ {"version":3,"file":"generateImportMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateImportMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,eAAO,MAAM,oBAAoB,SACxB;IACL,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;IACtC,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,mBAAmB,CAiDtC,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import { genImportMapIterateFields } from 'payload';
2
- import { isRSCEnabled } from 'payload/shared';
3
2
  export const getGenerateImportMap = args => ({
4
3
  addToImportMap,
5
4
  baseDir,
@@ -7,12 +6,9 @@ export const getGenerateImportMap = args => ({
7
6
  importMap,
8
7
  imports
9
8
  }) => {
10
- if (isRSCEnabled()) {
11
- addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell');
12
- addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalField');
13
- addToImportMap('@payloadcms/richtext-lexical/rsc#LexicalDiffComponent');
14
- }
15
- addToImportMap('@payloadcms/richtext-lexical/client#ClientEntryLexicalField');
9
+ addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell');
10
+ addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalField');
11
+ addToImportMap('@payloadcms/richtext-lexical/rsc#LexicalDiffComponent');
16
12
  addToImportMap(args.lexicalEditorArgs?.views);
17
13
  for (const resolvedFeature of args.resolvedFeatureMap.values()) {
18
14
  if ('componentImports' in resolvedFeature) {
@@ -1 +1 @@
1
- {"version":3,"file":"generateImportMap.js","names":["genImportMapIterateFields","isRSCEnabled","getGenerateImportMap","args","addToImportMap","baseDir","config","importMap","imports","lexicalEditorArgs","views","resolvedFeature","resolvedFeatureMap","values","componentImports","Array","isArray","Object","ClientFeature","nodes","length","node","getSubFields","subFields","fields"],"sources":["../../src/utilities/generateImportMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { genImportMapIterateFields } from 'payload'\nimport { isRSCEnabled } from 'payload/shared'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { LexicalEditorProps } from '../types/index.js'\n\nexport const getGenerateImportMap =\n (args: {\n lexicalEditorArgs?: LexicalEditorProps\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateImportMap'] =>\n ({ addToImportMap, baseDir, config, importMap, imports }) => {\n if (isRSCEnabled()) {\n addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell')\n addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalField')\n addToImportMap('@payloadcms/richtext-lexical/rsc#LexicalDiffComponent')\n }\n addToImportMap('@payloadcms/richtext-lexical/client#ClientEntryLexicalField')\n\n addToImportMap(args.lexicalEditorArgs?.views)\n\n for (const resolvedFeature of args.resolvedFeatureMap.values()) {\n if ('componentImports' in resolvedFeature) {\n if (typeof resolvedFeature.componentImports === 'function') {\n resolvedFeature.componentImports({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n } else if (Array.isArray(resolvedFeature.componentImports)) {\n addToImportMap(resolvedFeature.componentImports)\n } else if (typeof resolvedFeature.componentImports === 'object') {\n addToImportMap(Object.values(resolvedFeature.componentImports))\n }\n }\n\n addToImportMap(resolvedFeature.ClientFeature)\n\n /*\n * Now run for all possible sub-fields\n */\n if (resolvedFeature.nodes?.length) {\n for (const node of resolvedFeature.nodes) {\n if (typeof node?.getSubFields !== 'function') {\n continue\n }\n const subFields = node.getSubFields({})\n if (subFields?.length) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: subFields,\n importMap,\n imports,\n })\n }\n }\n }\n }\n }\n"],"mappings":"AAEA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,YAAY,QAAQ;AAK7B,OAAO,MAAMC,oBAAA,GACVC,IAAA,IAID,CAAC;EAAEC,cAAc;EAAEC,OAAO;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAO,CAAE;EACtD,IAAIP,YAAA,IAAgB;IAClBG,cAAA,CAAe;IACfA,cAAA,CAAe;IACfA,cAAA,CAAe;EACjB;EACAA,cAAA,CAAe;EAEfA,cAAA,CAAeD,IAAA,CAAKM,iBAAiB,EAAEC,KAAA;EAEvC,KAAK,MAAMC,eAAA,IAAmBR,IAAA,CAAKS,kBAAkB,CAACC,MAAM,IAAI;IAC9D,IAAI,sBAAsBF,eAAA,EAAiB;MACzC,IAAI,OAAOA,eAAA,CAAgBG,gBAAgB,KAAK,YAAY;QAC1DH,eAAA,CAAgBG,gBAAgB,CAAC;UAC/BV,cAAA;UACAC,OAAA;UACAC,MAAA;UACAC,SAAA;UACAC;QACF;MACF,OAAO,IAAIO,KAAA,CAAMC,OAAO,CAACL,eAAA,CAAgBG,gBAAgB,GAAG;QAC1DV,cAAA,CAAeO,eAAA,CAAgBG,gBAAgB;MACjD,OAAO,IAAI,OAAOH,eAAA,CAAgBG,gBAAgB,KAAK,UAAU;QAC/DV,cAAA,CAAea,MAAA,CAAOJ,MAAM,CAACF,eAAA,CAAgBG,gBAAgB;MAC/D;IACF;IAEAV,cAAA,CAAeO,eAAA,CAAgBO,aAAa;IAE5C;;;IAGA,IAAIP,eAAA,CAAgBQ,KAAK,EAAEC,MAAA,EAAQ;MACjC,KAAK,MAAMC,IAAA,IAAQV,eAAA,CAAgBQ,KAAK,EAAE;QACxC,IAAI,OAAOE,IAAA,EAAMC,YAAA,KAAiB,YAAY;UAC5C;QACF;QACA,MAAMC,SAAA,GAAYF,IAAA,CAAKC,YAAY,CAAC,CAAC;QACrC,IAAIC,SAAA,EAAWH,MAAA,EAAQ;UACrBpB,yBAAA,CAA0B;YACxBI,cAAA;YACAC,OAAA;YACAC,MAAA;YACAkB,MAAA,EAAQD,SAAA;YACRhB,SAAA;YACAC;UACF;QACF;MACF;IACF;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"generateImportMap.js","names":["genImportMapIterateFields","getGenerateImportMap","args","addToImportMap","baseDir","config","importMap","imports","lexicalEditorArgs","views","resolvedFeature","resolvedFeatureMap","values","componentImports","Array","isArray","Object","ClientFeature","nodes","length","node","getSubFields","subFields","fields"],"sources":["../../src/utilities/generateImportMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { genImportMapIterateFields } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { LexicalEditorProps } from '../types/index.js'\n\nexport const getGenerateImportMap =\n (args: {\n lexicalEditorArgs?: LexicalEditorProps\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateImportMap'] =>\n ({ addToImportMap, baseDir, config, importMap, imports }) => {\n addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell')\n addToImportMap('@payloadcms/richtext-lexical/rsc#RscEntryLexicalField')\n addToImportMap('@payloadcms/richtext-lexical/rsc#LexicalDiffComponent')\n\n addToImportMap(args.lexicalEditorArgs?.views)\n\n for (const resolvedFeature of args.resolvedFeatureMap.values()) {\n if ('componentImports' in resolvedFeature) {\n if (typeof resolvedFeature.componentImports === 'function') {\n resolvedFeature.componentImports({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n } else if (Array.isArray(resolvedFeature.componentImports)) {\n addToImportMap(resolvedFeature.componentImports)\n } else if (typeof resolvedFeature.componentImports === 'object') {\n addToImportMap(Object.values(resolvedFeature.componentImports))\n }\n }\n\n addToImportMap(resolvedFeature.ClientFeature)\n\n /*\n * Now run for all possible sub-fields\n */\n if (resolvedFeature.nodes?.length) {\n for (const node of resolvedFeature.nodes) {\n if (typeof node?.getSubFields !== 'function') {\n continue\n }\n const subFields = node.getSubFields({})\n if (subFields?.length) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: subFields,\n importMap,\n imports,\n })\n }\n }\n }\n }\n }\n"],"mappings":"AAEA,SAASA,yBAAyB,QAAQ;AAK1C,OAAO,MAAMC,oBAAA,GACVC,IAAA,IAID,CAAC;EAAEC,cAAc;EAAEC,OAAO;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAO,CAAE;EACtDJ,cAAA,CAAe;EACfA,cAAA,CAAe;EACfA,cAAA,CAAe;EAEfA,cAAA,CAAeD,IAAA,CAAKM,iBAAiB,EAAEC,KAAA;EAEvC,KAAK,MAAMC,eAAA,IAAmBR,IAAA,CAAKS,kBAAkB,CAACC,MAAM,IAAI;IAC9D,IAAI,sBAAsBF,eAAA,EAAiB;MACzC,IAAI,OAAOA,eAAA,CAAgBG,gBAAgB,KAAK,YAAY;QAC1DH,eAAA,CAAgBG,gBAAgB,CAAC;UAC/BV,cAAA;UACAC,OAAA;UACAC,MAAA;UACAC,SAAA;UACAC;QACF;MACF,OAAO,IAAIO,KAAA,CAAMC,OAAO,CAACL,eAAA,CAAgBG,gBAAgB,GAAG;QAC1DV,cAAA,CAAeO,eAAA,CAAgBG,gBAAgB;MACjD,OAAO,IAAI,OAAOH,eAAA,CAAgBG,gBAAgB,KAAK,UAAU;QAC/DV,cAAA,CAAea,MAAA,CAAOJ,MAAM,CAACF,eAAA,CAAgBG,gBAAgB;MAC/D;IACF;IAEAV,cAAA,CAAeO,eAAA,CAAgBO,aAAa;IAE5C;;;IAGA,IAAIP,eAAA,CAAgBQ,KAAK,EAAEC,MAAA,EAAQ;MACjC,KAAK,MAAMC,IAAA,IAAQV,eAAA,CAAgBQ,KAAK,EAAE;QACxC,IAAI,OAAOE,IAAA,EAAMC,YAAA,KAAiB,YAAY;UAC5C;QACF;QACA,MAAMC,SAAA,GAAYF,IAAA,CAAKC,YAAY,CAAC,CAAC;QACrC,IAAIC,SAAA,EAAWH,MAAA,EAAQ;UACrBnB,yBAAA,CAA0B;YACxBG,cAAA;YACAC,OAAA;YACAC,MAAA;YACAkB,MAAA,EAAQD,SAAA;YACRhB,SAAA;YACAC;UACF;QACF;MACF;IACF;EACF;AACF","ignoreList":[]}
@@ -2,5 +2,5 @@ import type { RichTextAdapter } from 'payload';
2
2
  import type { ResolvedServerFeatureMap } from '../features/typesServer.js';
3
3
  export declare const getGenerateSchemaMap: (args: {
4
4
  resolvedFeatureMap: ResolvedServerFeatureMap;
5
- }) => RichTextAdapter["generateSchemaMap"];
5
+ }) => RichTextAdapter['generateSchemaMap'];
6
6
  //# sourceMappingURL=generateSchemaMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAE1E,eAAO,MAAM,oBAAoB,GAC9B,MAAM;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAsC5F,CAAA"}
1
+ {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAE1E,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAsC5F,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { SanitizedConfig } from 'payload';
2
2
  import { type SanitizedServerEditorConfig } from '../index.js';
3
- export declare const getDefaultSanitizedEditorConfig: (args: {
3
+ export declare const getDefaultSanitizedEditorConfig: ({ config, parentIsLocalized, }: {
4
4
  config: SanitizedConfig;
5
5
  parentIsLocalized: boolean;
6
- }) => Promise<SanitizedServerEditorConfig>;
6
+ }) => SanitizedServerEditorConfig;
7
7
  //# sourceMappingURL=getDefaultSanitizedEditorConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultSanitizedEditorConfig.d.ts","sourceRoot":"","sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAgB9D,eAAO,MAAM,+BAA+B,GAAU,MAAM;IAC1D,MAAM,EAAE,eAAe,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;CAC3B,KAAG,OAAO,CAAC,2BAA2B,CAoBtC,CAAA"}
1
+ {"version":3,"file":"getDefaultSanitizedEditorConfig.d.ts","sourceRoot":"","sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAQ9D,eAAO,MAAM,+BAA+B,mCAGzC;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;CAC3B,KAAG,2BAGH,CAAA"}
@@ -1,21 +1,10 @@
1
1
  import { defaultEditorConfig } from '../lexical/config/server/default.js';
2
2
  import { sanitizeServerEditorConfig } from '../lexical/config/server/sanitize.js';
3
- let cachedDefaultSanitizedServerEditorConfig = global._payload_lexical_defaultSanitizedServerEditorConfig;
4
- if (!cachedDefaultSanitizedServerEditorConfig) {
5
- cachedDefaultSanitizedServerEditorConfig = global._payload_lexical_defaultSanitizedServerEditorConfig = null;
6
- }
7
- export const getDefaultSanitizedEditorConfig = async args => {
8
- const {
9
- config,
10
- parentIsLocalized
11
- } = args;
12
- if (cachedDefaultSanitizedServerEditorConfig) {
13
- return await cachedDefaultSanitizedServerEditorConfig;
14
- }
15
- cachedDefaultSanitizedServerEditorConfig = sanitizeServerEditorConfig(defaultEditorConfig, config, parentIsLocalized);
16
- global.payload_lexical_defaultSanitizedServerEditorConfig = cachedDefaultSanitizedServerEditorConfig;
17
- cachedDefaultSanitizedServerEditorConfig = await cachedDefaultSanitizedServerEditorConfig;
18
- global.payload_lexical_defaultSanitizedServerEditorConfig = cachedDefaultSanitizedServerEditorConfig;
19
- return cachedDefaultSanitizedServerEditorConfig;
3
+ const lexicalGlobal = globalThis;
4
+ export const getDefaultSanitizedEditorConfig = ({
5
+ config,
6
+ parentIsLocalized
7
+ }) => {
8
+ return lexicalGlobal._payload_lexical_defaultSanitizedServerEditorConfig ??= sanitizeServerEditorConfig(defaultEditorConfig, config, parentIsLocalized);
20
9
  };
21
10
  //# sourceMappingURL=getDefaultSanitizedEditorConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultSanitizedEditorConfig.js","names":["defaultEditorConfig","sanitizeServerEditorConfig","cachedDefaultSanitizedServerEditorConfig","global","_payload_lexical_defaultSanitizedServerEditorConfig","getDefaultSanitizedEditorConfig","args","config","parentIsLocalized","payload_lexical_defaultSanitizedServerEditorConfig"],"sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { type SanitizedServerEditorConfig } from '../index.js'\nimport { defaultEditorConfig } from '../lexical/config/server/default.js'\nimport { sanitizeServerEditorConfig } from '../lexical/config/server/sanitize.js'\n\nlet cachedDefaultSanitizedServerEditorConfig:\n | null\n | Promise<SanitizedServerEditorConfig>\n | SanitizedServerEditorConfig = (global as any)\n ._payload_lexical_defaultSanitizedServerEditorConfig\n\nif (!cachedDefaultSanitizedServerEditorConfig) {\n cachedDefaultSanitizedServerEditorConfig = (\n global as any\n )._payload_lexical_defaultSanitizedServerEditorConfig = null\n}\n\nexport const getDefaultSanitizedEditorConfig = async (args: {\n config: SanitizedConfig\n parentIsLocalized: boolean\n}): Promise<SanitizedServerEditorConfig> => {\n const { config, parentIsLocalized } = args\n\n if (cachedDefaultSanitizedServerEditorConfig) {\n return await cachedDefaultSanitizedServerEditorConfig\n }\n\n cachedDefaultSanitizedServerEditorConfig = sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n parentIsLocalized,\n )\n ;(global as any).payload_lexical_defaultSanitizedServerEditorConfig =\n cachedDefaultSanitizedServerEditorConfig\n\n cachedDefaultSanitizedServerEditorConfig = await cachedDefaultSanitizedServerEditorConfig\n ;(global as any).payload_lexical_defaultSanitizedServerEditorConfig =\n cachedDefaultSanitizedServerEditorConfig\n\n return cachedDefaultSanitizedServerEditorConfig\n}\n"],"mappings":"AAGA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,0BAA0B,QAAQ;AAE3C,IAAIC,wCAAA,GAG8BC,MAAC,CAChCC,mDAAmD;AAEtD,IAAI,CAACF,wCAAA,EAA0C;EAC7CA,wCAAA,GAA2CC,MACzC,CACAC,mDAAmD,GAAG;AAC1D;AAEA,OAAO,MAAMC,+BAAA,GAAkC,MAAOC,IAAA;EAIpD,MAAM;IAAEC,MAAM;IAAEC;EAAiB,CAAE,GAAGF,IAAA;EAEtC,IAAIJ,wCAAA,EAA0C;IAC5C,OAAO,MAAMA,wCAAA;EACf;EAEAA,wCAAA,GAA2CD,0BAAA,CACzCD,mBAAA,EACAO,MAAA,EACAC,iBAAA;EAEAL,MAAA,CAAeM,kDAAkD,GACjEP,wCAAA;EAEFA,wCAAA,GAA2C,MAAMA,wCAAA;EAC/CC,MAAA,CAAeM,kDAAkD,GACjEP,wCAAA;EAEF,OAAOA,wCAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"getDefaultSanitizedEditorConfig.js","names":["defaultEditorConfig","sanitizeServerEditorConfig","lexicalGlobal","globalThis","getDefaultSanitizedEditorConfig","config","parentIsLocalized","_payload_lexical_defaultSanitizedServerEditorConfig"],"sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { type SanitizedServerEditorConfig } from '../index.js'\nimport { defaultEditorConfig } from '../lexical/config/server/default.js'\nimport { sanitizeServerEditorConfig } from '../lexical/config/server/sanitize.js'\n\nconst lexicalGlobal = globalThis as {\n _payload_lexical_defaultSanitizedServerEditorConfig?: SanitizedServerEditorConfig\n} & typeof globalThis\n\nexport const getDefaultSanitizedEditorConfig = ({\n config,\n parentIsLocalized,\n}: {\n config: SanitizedConfig\n parentIsLocalized: boolean\n}): SanitizedServerEditorConfig => {\n return (lexicalGlobal._payload_lexical_defaultSanitizedServerEditorConfig ??=\n sanitizeServerEditorConfig(defaultEditorConfig, config, parentIsLocalized))\n}\n"],"mappings":"AAGA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,0BAA0B,QAAQ;AAE3C,MAAMC,aAAA,GAAgBC,UAAA;AAItB,OAAO,MAAMC,+BAAA,GAAkCA,CAAC;EAC9CC,MAAM;EACNC;AAAiB,CAIlB;EACC,OAAQJ,aAAA,CAAcK,mDAAmD,KACvEN,0BAAA,CAA2BD,mBAAA,EAAqBK,MAAA,EAAQC,iBAAA;AAC5D","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../../src/utilities/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,GAAI,uCAI7B;IACD,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACrC,CAAA;IACD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,KAAG,IA+BH,CAAA"}
1
+ {"version":3,"file":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../../src/utilities/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,0CAIzB;IACD,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACrC,CAAA;IACD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,KAAG,IA+BH,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAS7D,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,gCAAgC,GAAI,mCAK9C,wBAAwB,KAAG,MAgG7B,CAAA"}
1
+ {"version":3,"file":"upgradeDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAS7D,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,gCAAgC,sCAK1C,wBAAwB,KAAG,MAgG7B,CAAA"}
@@ -37,7 +37,7 @@ export const upgradeDocumentFieldsRecursively = ({
37
37
  if (field.type === 'blocks') {
38
38
  data[field.name].forEach(row => {
39
39
  const blockTypeToMatch = row?.blockType;
40
- const block = payload.blocks[blockTypeToMatch] ?? (field.blockReferences ?? field.blocks).find(block => typeof block !== 'string' && block.slug === blockTypeToMatch);
40
+ const block = payload.blocks[blockTypeToMatch] ?? field.blocks.find(block => typeof block !== 'string' && block.slug === blockTypeToMatch);
41
41
  if (block) {
42
42
  found += upgradeDocumentFieldsRecursively({
43
43
  data: row,
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeDocumentFieldsRecursively.js","names":["createHeadlessEditor","fieldAffectsData","fieldHasSubFields","fieldIsArrayType","tabHasName","getEnabledNodes","upgradeDocumentFieldsRecursively","data","fields","found","payload","field","name","type","tabs","forEach","tab","Array","isArray","row","blockTypeToMatch","blockType","block","blocks","blockReferences","find","slug","editor","features","length","editorState","headlessEditor","nodes","editorConfig","update","setEditorState","parseEditorState","discrete","getEditorState","toJSON"],"sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { Field, FlattenedBlock, Payload } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } from 'payload/shared'\n\nimport type { LexicalRichTextAdapter } from '../../types/index.js'\n\nimport { getEnabledNodes } from '../../lexical/nodes/index.js'\n\ntype NestedRichTextFieldsArgs = {\n data: Record<string, unknown>\n\n fields: Field[]\n found: number\n payload: Payload\n}\n\nexport const upgradeDocumentFieldsRecursively = ({\n data,\n fields,\n found,\n payload,\n}: NestedRichTextFieldsArgs): number => {\n for (const field of fields) {\n if (fieldHasSubFields(field) && !fieldIsArrayType(field)) {\n if (fieldAffectsData(field) && typeof data[field.name] === 'object') {\n found += upgradeDocumentFieldsRecursively({\n data: data[field.name] as Record<string, unknown>,\n fields: field.fields,\n found,\n payload,\n })\n } else {\n found += upgradeDocumentFieldsRecursively({\n data,\n fields: field.fields,\n found,\n payload,\n })\n }\n } else if (field.type === 'tabs') {\n field.tabs.forEach((tab) => {\n found += upgradeDocumentFieldsRecursively({\n data: (tabHasName(tab) ? data[tab.name] : data) as Record<string, unknown>,\n fields: tab.fields,\n found,\n payload,\n })\n })\n } else if (Array.isArray(data[field.name])) {\n if (field.type === 'blocks') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n const blockTypeToMatch: string = row?.blockType as string\n\n const block =\n payload.blocks[blockTypeToMatch] ??\n ((field.blockReferences ?? field.blocks).find(\n (block) => typeof block !== 'string' && block.slug === blockTypeToMatch,\n ) as FlattenedBlock | undefined)\n\n if (block) {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: block.fields,\n found,\n payload,\n })\n }\n })\n }\n\n if (field.type === 'array') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: field.fields,\n found,\n payload,\n })\n })\n }\n }\n\n if (\n field.type === 'richText' &&\n data[field.name] &&\n !Array.isArray(data[field.name]) &&\n 'root' in (data[field.name] as Record<string, unknown>)\n ) {\n // Lexical richText\n const editor: LexicalRichTextAdapter = field.editor as LexicalRichTextAdapter\n if (editor && typeof editor === 'object') {\n if ('features' in editor && editor.features?.length) {\n // Load lexical editor into lexical, then save it immediately\n const editorState = data[field.name] as SerializedEditorState\n\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig: editor.editorConfig,\n }),\n })\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(editorState))\n },\n { discrete: true },\n )\n\n // get editor state\n data[field.name] = headlessEditor.getEditorState().toJSON()\n\n found++\n }\n }\n }\n }\n\n return found\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"upgradeDocumentFieldsRecursively.js","names":["createHeadlessEditor","fieldAffectsData","fieldHasSubFields","fieldIsArrayType","tabHasName","getEnabledNodes","upgradeDocumentFieldsRecursively","data","fields","found","payload","field","name","type","tabs","forEach","tab","Array","isArray","row","blockTypeToMatch","blockType","block","blocks","find","slug","editor","features","length","editorState","headlessEditor","nodes","editorConfig","update","setEditorState","parseEditorState","discrete","getEditorState","toJSON"],"sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { Field, FlattenedBlock, Payload } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } from 'payload/shared'\n\nimport type { LexicalRichTextAdapter } from '../../types/index.js'\n\nimport { getEnabledNodes } from '../../lexical/nodes/index.js'\n\ntype NestedRichTextFieldsArgs = {\n data: Record<string, unknown>\n\n fields: Field[]\n found: number\n payload: Payload\n}\n\nexport const upgradeDocumentFieldsRecursively = ({\n data,\n fields,\n found,\n payload,\n}: NestedRichTextFieldsArgs): number => {\n for (const field of fields) {\n if (fieldHasSubFields(field) && !fieldIsArrayType(field)) {\n if (fieldAffectsData(field) && typeof data[field.name] === 'object') {\n found += upgradeDocumentFieldsRecursively({\n data: data[field.name] as Record<string, unknown>,\n fields: field.fields,\n found,\n payload,\n })\n } else {\n found += upgradeDocumentFieldsRecursively({\n data,\n fields: field.fields,\n found,\n payload,\n })\n }\n } else if (field.type === 'tabs') {\n field.tabs.forEach((tab) => {\n found += upgradeDocumentFieldsRecursively({\n data: (tabHasName(tab) ? data[tab.name] : data) as Record<string, unknown>,\n fields: tab.fields,\n found,\n payload,\n })\n })\n } else if (Array.isArray(data[field.name])) {\n if (field.type === 'blocks') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n const blockTypeToMatch: string = row?.blockType as string\n\n const block =\n payload.blocks[blockTypeToMatch] ??\n (field.blocks.find(\n (block) => typeof block !== 'string' && block.slug === blockTypeToMatch,\n ) as FlattenedBlock | undefined)\n\n if (block) {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: block.fields,\n found,\n payload,\n })\n }\n })\n }\n\n if (field.type === 'array') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: field.fields,\n found,\n payload,\n })\n })\n }\n }\n\n if (\n field.type === 'richText' &&\n data[field.name] &&\n !Array.isArray(data[field.name]) &&\n 'root' in (data[field.name] as Record<string, unknown>)\n ) {\n // Lexical richText\n const editor: LexicalRichTextAdapter = field.editor as LexicalRichTextAdapter\n if (editor && typeof editor === 'object') {\n if ('features' in editor && editor.features?.length) {\n // Load lexical editor into lexical, then save it immediately\n const editorState = data[field.name] as SerializedEditorState\n\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig: editor.editorConfig,\n }),\n })\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(editorState))\n },\n { discrete: true },\n )\n\n // get editor state\n data[field.name] = headlessEditor.getEditorState().toJSON()\n\n found++\n }\n }\n }\n }\n\n return found\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,EAClD,YAAY,MAAM,EAClB,SAAS,qBAAqB,CAAC,kBAAkB,CAAC,SAenD,CAAA"}
1
+ {"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,cACtC,MAAM,WACT,qBAAqB,CAAC,kBAAkB,CAAC,SAenD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,GAAI,mBAEjC;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAiCA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAiCA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "4.0.0-internal.a0ef1b8",
3
+ "version": "4.0.0-internal.a7ca468",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -18,7 +18,6 @@
18
18
  }
19
19
  ],
20
20
  "sideEffects": [
21
- "*.scss",
22
21
  "*.css"
23
22
  ],
24
23
  "type": "module",
@@ -60,7 +59,6 @@
60
59
  },
61
60
  "./rsc": {
62
61
  "types": "./dist/exports/server/rsc.d.ts",
63
- "browser": "./dist/exports/server/rsc.browser.js",
64
62
  "import": "./dist/exports/server/rsc.js",
65
63
  "default": "./dist/exports/server/rsc.js"
66
64
  },
@@ -114,6 +112,11 @@
114
112
  "types": "./dist/lexical-proxy/@lexical-utils.d.ts",
115
113
  "default": "./dist/lexical-proxy/@lexical-utils.js"
116
114
  },
115
+ "./lexical/react/ExtensionComponent": {
116
+ "import": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js",
117
+ "types": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts",
118
+ "default": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js"
119
+ },
117
120
  "./lexical/react/LexicalAutoEmbedPlugin": {
118
121
  "import": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js",
119
122
  "types": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts",
@@ -179,10 +182,15 @@
179
182
  "types": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts",
180
183
  "default": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.js"
181
184
  },
182
- "./lexical/react/LexicalContextMenuPlugin": {
183
- "import": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js",
184
- "types": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts",
185
- "default": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js"
185
+ "./lexical/react/LexicalExtensionComposer": {
186
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js",
187
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts",
188
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js"
189
+ },
190
+ "./lexical/react/LexicalExtensionEditorComposer": {
191
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js",
192
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts",
193
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js"
186
194
  },
187
195
  "./lexical/react/LexicalNodeContextMenuPlugin": {
188
196
  "import": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js",
@@ -274,6 +282,11 @@
274
282
  "types": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts",
275
283
  "default": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js"
276
284
  },
285
+ "./lexical/react/LexicalSelectionAlwaysOnDisplay": {
286
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js",
287
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts",
288
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js"
289
+ },
277
290
  "./lexical/react/LexicalTabIndentationPlugin": {
278
291
  "import": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js",
279
292
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts",
@@ -299,11 +312,56 @@
299
312
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts",
300
313
  "default": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js"
301
314
  },
315
+ "./lexical/react/ReactExtension": {
316
+ "import": "./dist/lexical-proxy/@lexical-react/ReactExtension.js",
317
+ "types": "./dist/lexical-proxy/@lexical-react/ReactExtension.d.ts",
318
+ "default": "./dist/lexical-proxy/@lexical-react/ReactExtension.js"
319
+ },
320
+ "./lexical/react/ReactPluginHostExtension": {
321
+ "import": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js",
322
+ "types": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts",
323
+ "default": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js"
324
+ },
325
+ "./lexical/react/ReactProviderExtension": {
326
+ "import": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js",
327
+ "types": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts",
328
+ "default": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js"
329
+ },
330
+ "./lexical/react/TreeViewExtension": {
331
+ "import": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js",
332
+ "types": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts",
333
+ "default": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js"
334
+ },
335
+ "./lexical/react/useExtensionComponent": {
336
+ "import": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js",
337
+ "types": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts",
338
+ "default": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js"
339
+ },
340
+ "./lexical/react/useExtensionSignalValue": {
341
+ "import": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js",
342
+ "types": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts",
343
+ "default": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js"
344
+ },
345
+ "./lexical/react/useLexicalAriaLiveRegion": {
346
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js",
347
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts",
348
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js"
349
+ },
302
350
  "./lexical/react/useLexicalEditable": {
303
351
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js",
304
352
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts",
305
353
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js"
306
354
  },
355
+ "./lexical/react/useLexicalFocusManagerRef": {
356
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js",
357
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts",
358
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js"
359
+ },
360
+ "./lexical/react/useLexicalFocusTrapRef": {
361
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js",
362
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts",
363
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js"
364
+ },
307
365
  "./lexical/react/useLexicalIsTextContentEmpty": {
308
366
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js",
309
367
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts",
@@ -314,6 +372,16 @@
314
372
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts",
315
373
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js"
316
374
  },
375
+ "./lexical/react/useLexicalRovingTabIndexRef": {
376
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js",
377
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts",
378
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js"
379
+ },
380
+ "./lexical/react/useLexicalSlotRef": {
381
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js",
382
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts",
383
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js"
384
+ },
317
385
  "./lexical/react/useLexicalSubscription": {
318
386
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.js",
319
387
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts",
@@ -349,24 +417,25 @@
349
417
  ]
350
418
  },
351
419
  "dependencies": {
352
- "@lexical/clipboard": "0.41.0",
353
- "@lexical/headless": "0.41.0",
354
- "@lexical/html": "0.41.0",
355
- "@lexical/link": "0.41.0",
356
- "@lexical/list": "0.41.0",
357
- "@lexical/mark": "0.41.0",
358
- "@lexical/react": "0.41.0",
359
- "@lexical/rich-text": "0.41.0",
360
- "@lexical/selection": "0.41.0",
361
- "@lexical/table": "0.41.0",
362
- "@lexical/utils": "0.41.0",
420
+ "@lexical/clipboard": "0.48.0",
421
+ "@lexical/headless": "0.48.0",
422
+ "@lexical/html": "0.48.0",
423
+ "@lexical/link": "0.48.0",
424
+ "@lexical/list": "0.48.0",
425
+ "@lexical/mark": "0.48.0",
426
+ "@lexical/markdown": "0.48.0",
427
+ "@lexical/react": "0.48.0",
428
+ "@lexical/rich-text": "0.48.0",
429
+ "@lexical/selection": "0.48.0",
430
+ "@lexical/table": "0.48.0",
431
+ "@lexical/utils": "0.48.0",
363
432
  "acorn": "8.16.0",
364
433
  "bson-objectid": "2.0.4",
365
434
  "csstype": "3.2.3",
366
435
  "dequal": "2.0.3",
367
436
  "escape-html": "1.0.3",
368
437
  "jsox": "1.2.125",
369
- "lexical": "0.41.0",
438
+ "lexical": "0.48.0",
370
439
  "mdast-util-from-markdown": "2.0.3",
371
440
  "mdast-util-mdx-jsx": "3.2.0",
372
441
  "micromark-extension-mdx-jsx": "3.0.2",
@@ -374,8 +443,8 @@
374
443
  "react-error-boundary": "6.1.1",
375
444
  "ts-essentials": "10.0.3",
376
445
  "uuid": "14.0.0",
377
- "@payloadcms/translations": "4.0.0-internal.a0ef1b8",
378
- "@payloadcms/ui": "4.0.0-internal.a0ef1b8"
446
+ "@payloadcms/translations": "4.0.0-internal.a7ca468",
447
+ "@payloadcms/ui": "4.0.0-internal.a7ca468"
379
448
  },
380
449
  "devDependencies": {
381
450
  "@babel/cli": "7.27.2",
@@ -383,7 +452,7 @@
383
452
  "@babel/preset-env": "7.27.2",
384
453
  "@babel/preset-react": "7.27.1",
385
454
  "@babel/preset-typescript": "7.27.1",
386
- "@lexical/eslint-plugin": "0.41.0",
455
+ "@lexical/eslint-plugin": "0.48.0",
387
456
  "@types/escape-html": "1.0.4",
388
457
  "@types/json-schema": "7.0.15",
389
458
  "@types/node": "24.12.3",
@@ -394,16 +463,15 @@
394
463
  "esbuild": "0.27.1",
395
464
  "esbuild-sass-plugin": "3.3.1",
396
465
  "swc-plugin-transform-remove-imports": "8.3.0",
397
- "payload": "4.0.0-internal.a0ef1b8",
466
+ "payload": "4.0.0-internal.a7ca468",
398
467
  "@payloadcms/eslint-config": "3.28.0"
399
468
  },
400
469
  "peerDependencies": {
401
- "@faceless-ui/modal": "3.0.0",
470
+ "@faceless-ui/modal": "3.0.1",
402
471
  "@faceless-ui/scroll-info": "2.0.0",
403
472
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
404
473
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
405
- "@payloadcms/next": "4.0.0-internal.a0ef1b8",
406
- "payload": "4.0.0-internal.a0ef1b8"
474
+ "payload": "4.0.0-internal.a7ca468"
407
475
  },
408
476
  "engines": {
409
477
  "node": ">=24.15.0"
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=assets.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assets.d.js","names":[],"sources":["../../src/@types/assets.d.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]}