@payloadcms/richtext-lexical 4.0.0-internal.c7d5de4 → 4.0.0-internal.cb69780

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 (432) hide show
  1. package/dist/exports/client/Field-TS5CRYHE.js +2 -0
  2. package/dist/exports/client/Field-TS5CRYHE.js.map +7 -0
  3. package/dist/exports/client/bundled.css +1 -1
  4. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  5. package/dist/exports/client/{chunk-X3D4LZS7.js.map → chunk-3LRZDIIG.js.map} +4 -4
  6. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  7. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  8. package/dist/exports/client/{chunk-ESITTE3C.js → chunk-ZFGDYZDE.js} +2 -2
  9. package/dist/exports/client/{chunk-ESITTE3C.js.map → chunk-ZFGDYZDE.js.map} +2 -2
  10. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  11. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  12. package/dist/exports/client/componentInline-55HZXGUS.js +2 -0
  13. package/dist/exports/client/index.d.ts +1 -1
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +26 -26
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  18. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  19. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  20. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  21. package/dist/features/blocks/client/component/index.d.ts +0 -6
  22. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  23. package/dist/features/blocks/client/component/index.js +133 -76
  24. package/dist/features/blocks/client/component/index.js.map +1 -1
  25. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  26. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  27. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  28. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  29. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  30. package/dist/features/blocks/client/componentInline/index.js +2 -2
  31. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  32. package/dist/features/blocks/server/index.js +2 -2
  33. package/dist/features/blocks/server/index.js.map +1 -1
  34. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  35. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  36. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  37. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  38. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  39. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  40. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  41. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  42. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  43. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  44. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  45. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  46. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  47. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  48. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  49. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  50. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  51. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  52. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  53. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  54. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  55. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  56. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  57. package/dist/features/heading/constants.d.ts +2 -0
  58. package/dist/features/heading/constants.d.ts.map +1 -0
  59. package/dist/features/heading/constants.js +2 -0
  60. package/dist/features/heading/constants.js.map +1 -0
  61. package/dist/features/heading/server/index.d.ts.map +1 -1
  62. package/dist/features/heading/server/index.js +5 -1
  63. package/dist/features/heading/server/index.js.map +1 -1
  64. package/dist/features/heading/server/validate.d.ts +6 -0
  65. package/dist/features/heading/server/validate.d.ts.map +1 -0
  66. package/dist/features/heading/server/validate.js +15 -0
  67. package/dist/features/heading/server/validate.js.map +1 -0
  68. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  69. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  70. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  71. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  72. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  73. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  74. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  75. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  76. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  77. package/dist/features/indent/client/IndentPlugin.js +122 -1
  78. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  79. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  80. package/dist/features/indent/server/i18n.js +74 -37
  81. package/dist/features/indent/server/i18n.js.map +1 -1
  82. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  83. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +6 -3
  84. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  85. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -1
  86. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  87. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  88. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  89. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  90. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  91. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  92. package/dist/features/link/server/index.js +2 -2
  93. package/dist/features/link/server/index.js.map +1 -1
  94. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  95. package/dist/features/lists/checklist/server/index.js +5 -2
  96. package/dist/features/lists/checklist/server/index.js.map +1 -1
  97. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  98. package/dist/features/lists/orderedList/server/index.js +5 -2
  99. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  100. package/dist/features/lists/shared/constants.d.ts +2 -0
  101. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  102. package/dist/features/lists/shared/constants.js +2 -0
  103. package/dist/features/lists/shared/constants.js.map +1 -0
  104. package/dist/features/lists/shared/validate.d.ts +5 -0
  105. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  106. package/dist/features/lists/shared/validate.js +15 -0
  107. package/dist/features/lists/shared/validate.js.map +1 -0
  108. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  109. package/dist/features/lists/unorderedList/server/index.js +5 -2
  110. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  111. package/dist/features/relationship/client/index.d.ts +2 -2
  112. package/dist/features/relationship/client/index.d.ts.map +1 -1
  113. package/dist/features/relationship/client/index.js.map +1 -1
  114. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  115. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  116. package/dist/features/relationship/client/plugins/index.js +27 -31
  117. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  118. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  119. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  120. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  121. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  122. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  123. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  124. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  125. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  126. package/dist/features/relationship/server/index.d.ts +8 -1
  127. package/dist/features/relationship/server/index.d.ts.map +1 -1
  128. package/dist/features/relationship/server/index.js +28 -11
  129. package/dist/features/relationship/server/index.js.map +1 -1
  130. package/dist/features/relationship/server/schema.d.ts +2 -2
  131. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  132. package/dist/features/relationship/server/schema.js +5 -10
  133. package/dist/features/relationship/server/schema.js.map +1 -1
  134. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  135. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  136. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  137. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  138. package/dist/features/table/client/index.d.ts.map +1 -0
  139. package/dist/features/table/client/index.js.map +1 -0
  140. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  141. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  142. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  143. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  144. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  145. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  146. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  147. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  148. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  149. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  150. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  151. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  152. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  153. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  154. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  155. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  156. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  157. package/dist/features/table/client/utils/debounce.js.map +1 -0
  158. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  159. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  160. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  161. package/dist/features/table/markdownTransformer.js.map +1 -0
  162. package/dist/features/table/server/index.d.ts +3 -0
  163. package/dist/features/table/server/index.d.ts.map +1 -0
  164. package/dist/features/{experimental_table → table}/server/index.js +4 -4
  165. package/dist/features/table/server/index.js.map +1 -0
  166. package/dist/features/table/server/schema.d.ts.map +1 -0
  167. package/dist/features/table/server/schema.js.map +1 -0
  168. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  169. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  170. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  171. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  172. package/dist/features/toolbars/fixed/client/Toolbar/index.css +78 -6
  173. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  174. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  175. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  176. package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
  177. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  178. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  179. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  180. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  181. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  182. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  183. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -13
  184. package/dist/features/typesServer.d.ts +1 -1
  185. package/dist/features/typesServer.d.ts.map +1 -1
  186. package/dist/features/typesServer.js.map +1 -1
  187. package/dist/features/upload/client/component/index.js +2 -1
  188. package/dist/features/upload/client/component/index.js.map +1 -1
  189. package/dist/features/upload/client/index.d.ts +3 -2
  190. package/dist/features/upload/client/index.d.ts.map +1 -1
  191. package/dist/features/upload/client/index.js.map +1 -1
  192. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  193. package/dist/features/upload/client/plugin/index.js +47 -52
  194. package/dist/features/upload/client/plugin/index.js.map +1 -1
  195. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  196. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  197. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  198. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  199. package/dist/features/upload/server/index.d.ts +6 -2
  200. package/dist/features/upload/server/index.d.ts.map +1 -1
  201. package/dist/features/upload/server/index.js +20 -16
  202. package/dist/features/upload/server/index.js.map +1 -1
  203. package/dist/features/upload/server/schema.d.ts +2 -2
  204. package/dist/features/upload/server/schema.d.ts.map +1 -1
  205. package/dist/features/upload/server/schema.js +4 -8
  206. package/dist/features/upload/server/schema.js.map +1 -1
  207. package/dist/features/upload/server/validate.d.ts +2 -2
  208. package/dist/features/upload/server/validate.d.ts.map +1 -1
  209. package/dist/features/upload/server/validate.js +3 -0
  210. package/dist/features/upload/server/validate.js.map +1 -1
  211. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  212. package/dist/field/Diff/converters/listitem/index.js +2 -1
  213. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  214. package/dist/field/Diff/index.d.ts +3 -2
  215. package/dist/field/Diff/index.d.ts.map +1 -1
  216. package/dist/field/Diff/index.js +1 -0
  217. package/dist/field/Diff/index.js.map +1 -1
  218. package/dist/field/RenderLexical/index.d.ts +3 -1
  219. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  220. package/dist/field/RenderLexical/index.js +23 -23
  221. package/dist/field/RenderLexical/index.js.map +1 -1
  222. package/dist/field/ViewSelector.d.ts.map +1 -1
  223. package/dist/field/ViewSelector.js +1 -0
  224. package/dist/field/ViewSelector.js.map +1 -1
  225. package/dist/field/bundled.css +1 -1
  226. package/dist/field/index.css +10 -10
  227. package/dist/i18n.d.ts.map +1 -1
  228. package/dist/i18n.js +68 -0
  229. package/dist/i18n.js.map +1 -1
  230. package/dist/index.d.ts +2 -2
  231. package/dist/index.d.ts.map +1 -1
  232. package/dist/index.js +5 -5
  233. package/dist/index.js.map +1 -1
  234. package/dist/lexical/LexicalEditor.css +29 -20
  235. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  236. package/dist/lexical/LexicalEditor.js +61 -64
  237. package/dist/lexical/LexicalEditor.js.map +1 -1
  238. package/dist/lexical/config/server/loader.d.ts +1 -1
  239. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  240. package/dist/lexical/config/server/loader.js +2 -2
  241. package/dist/lexical/config/server/loader.js.map +1 -1
  242. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  243. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  244. package/dist/lexical/config/server/sanitize.js +2 -2
  245. package/dist/lexical/config/server/sanitize.js.map +1 -1
  246. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  247. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  248. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  249. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  250. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  251. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  252. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  253. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  254. package/dist/lexical/plugins/SlashMenu/index.css +0 -1
  255. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  256. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  257. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  258. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +1 -0
  259. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  260. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -2
  261. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  262. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  263. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  264. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  265. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  266. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  267. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  268. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  269. package/dist/lexical/ui/ContentEditable.css +16 -15
  270. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  271. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  272. package/dist/lexical/ui/ContentEditable.js +9 -6
  273. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  274. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  275. package/dist/lexical/ui/icons/H3/index.js +13 -6
  276. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  277. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  278. package/dist/lexical/ui/icons/H4/index.js +13 -6
  279. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  280. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  281. package/dist/lexical/ui/icons/H5/index.js +13 -6
  282. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  283. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  284. package/dist/lexical/ui/icons/H6/index.js +13 -6
  285. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  286. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  287. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  288. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  289. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  290. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  291. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  292. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  293. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  294. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  295. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  296. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  297. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  298. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  299. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  300. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  301. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  302. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  303. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  304. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  305. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  306. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  307. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  308. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  309. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  310. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  311. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  312. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  313. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  314. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  315. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  316. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  317. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  318. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  319. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  320. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  321. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  322. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  323. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  324. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  325. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  326. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  327. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  328. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  329. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  330. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  331. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  332. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  333. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  334. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  335. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  336. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  337. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  338. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  339. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  340. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  341. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  342. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  343. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  344. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  345. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  346. package/dist/types/index.d.ts +1 -1
  347. package/dist/types/index.d.ts.map +1 -1
  348. package/dist/types/index.js.map +1 -1
  349. package/dist/types/nodeTypes.d.ts +1 -1
  350. package/dist/types/nodeTypes.d.ts.map +1 -1
  351. package/dist/types/nodeTypes.js.map +1 -1
  352. package/dist/utilities/createServerFeature.d.ts +1 -1
  353. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  354. package/dist/utilities/createServerFeature.js +2 -2
  355. package/dist/utilities/createServerFeature.js.map +1 -1
  356. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  357. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  358. package/dist/utilities/editorConfigFactory.js +9 -9
  359. package/dist/utilities/editorConfigFactory.js.map +1 -1
  360. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  361. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  362. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  363. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  364. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  365. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  366. package/package.json +97 -23
  367. package/dist/dependencyChecker.spec.js +0 -16
  368. package/dist/dependencyChecker.spec.js.map +0 -1
  369. package/dist/exports/client/Field-QGSHF22S.js +0 -2
  370. package/dist/exports/client/Field-QGSHF22S.js.map +0 -7
  371. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  372. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  373. package/dist/exports/client/chunk-X3D4LZS7.js +0 -2
  374. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  375. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  376. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  377. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  378. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  379. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  380. package/dist/features/experimental_table/client/index.js.map +0 -1
  381. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  382. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  383. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  384. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  385. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  386. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  387. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  388. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  389. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  390. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  391. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  392. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  393. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  394. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  395. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  396. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  397. package/dist/features/experimental_table/server/index.d.ts +0 -3
  398. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  399. package/dist/features/experimental_table/server/index.js.map +0 -1
  400. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  401. package/dist/features/experimental_table/server/schema.js.map +0 -1
  402. package/dist/features/link/markdownTransformer.spec.js +0 -195
  403. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  404. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  405. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  406. package/dist/lexical/utils/url.spec.js +0 -114
  407. package/dist/lexical/utils/url.spec.js.map +0 -1
  408. package/dist/utilities/jsx/jsx.spec.js +0 -178
  409. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  410. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-55HZXGUS.js.map} +0 -0
  411. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  412. /package/dist/features/{experimental_table → table}/client/index.js +0 -0
  413. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  414. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  415. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  416. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  417. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  418. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  419. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  420. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  421. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  422. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  423. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  424. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  425. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  426. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  427. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  428. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  429. /package/dist/features/{experimental_table → table}/markdownTransformer.d.ts +0 -0
  430. /package/dist/features/{experimental_table → table}/markdownTransformer.js +0 -0
  431. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  432. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"createServerFeature.js","names":["createServerFeature","dependencies","dependenciesPriority","dependenciesSoft","feature","key","featureProviderProviderServer","props","featureProviderServer","serverFeatureProps","config","featureProviderMap","isRoot","parentIsLocalized","resolvedFeatures","unSanitizedEditorConfig","toReturn","sanitizedServerFeatureProps","newFeature"],"sources":["../../src/utilities/createServerFeature.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n FeatureProviderProviderServer,\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n ServerFeature,\n ServerFeatureProviderMap,\n} from '../features/typesServer.js'\nimport type { ServerEditorConfig } from '../lexical/config/types.js'\n\nexport type CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps> = {\n feature:\n | ((props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n parentIsLocalized: boolean\n props: UnSanitizedProps\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<SanitizedProps, ClientProps>>\n | ServerFeature<SanitizedProps, ClientProps>)\n | Omit<ServerFeature<SanitizedProps, ClientProps>, 'sanitizedServerFeatureProps'>\n} & Pick<\n FeatureProviderServer<UnSanitizedProps, ClientProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n>\n\nexport const createServerFeature: <\n UnSanitizedProps = undefined,\n SanitizedProps = UnSanitizedProps,\n ClientProps = undefined,\n>(\n args: CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps>,\n) => FeatureProviderProviderServer<UnSanitizedProps, SanitizedProps, ClientProps> = ({\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n feature,\n key,\n}) => {\n const featureProviderProviderServer: FeatureProviderProviderServer<any, any, any> = (props) => {\n const featureProviderServer: Partial<FeatureProviderServer<any, any, any>> = {\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n key,\n serverFeatureProps: props,\n }\n\n if (typeof feature === 'function') {\n featureProviderServer.feature = async ({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n resolvedFeatures,\n unSanitizedEditorConfig,\n }) => {\n const toReturn = await feature({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n props,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n\n if (toReturn.sanitizedServerFeatureProps === null) {\n toReturn.sanitizedServerFeatureProps = props\n }\n return toReturn\n }\n } else {\n // For explanation why we have to spread feature, see createClientFeature.ts\n const newFeature: ServerFeature<any, any> = { ...feature }\n\n newFeature.sanitizedServerFeatureProps = props\n featureProviderServer.feature = newFeature\n }\n return featureProviderServer as FeatureProviderServer<any, any, any>\n }\n\n return featureProviderProviderServer\n}\n"],"mappings":"AAiCA,OAAO,MAAMA,mBAAA,GAMuEA,CAAC;EACnFC,YAAY;EACZC,oBAAoB;EACpBC,gBAAgB;EAChBC,OAAO;EACPC;AAAG,CACJ;EACC,MAAMC,6BAAA,GAA+EC,KAAA;IACnF,MAAMC,qBAAA,GAAuE;MAC3EP,YAAA;MACAC,oBAAA;MACAC,gBAAA;MACAE,GAAA;MACAI,kBAAA,EAAoBF;IACtB;IAEA,IAAI,OAAOH,OAAA,KAAY,YAAY;MACjCI,qBAAA,CAAsBJ,OAAO,GAAG,OAAO;QACrCM,MAAM;QACNC,kBAAkB;QAClBC,MAAM;QACNC,iBAAiB;QACjBC,gBAAgB;QAChBC;MAAuB,CACxB;QACC,MAAMC,QAAA,GAAW,MAAMZ,OAAA,CAAQ;UAC7BM,MAAA;UACAC,kBAAA;UACAC,MAAA;UACAC,iBAAA;UACAN,KAAA;UACAO,gBAAA;UACAC;QACF;QAEA,IAAIC,QAAA,CAASC,2BAA2B,KAAK,MAAM;UACjDD,QAAA,CAASC,2BAA2B,GAAGV,KAAA;QACzC;QACA,OAAOS,QAAA;MACT;IACF,OAAO;MACL;MACA,MAAME,UAAA,GAAsC;QAAE,GAAGd;MAAQ;MAEzDc,UAAA,CAAWD,2BAA2B,GAAGV,KAAA;MACzCC,qBAAA,CAAsBJ,OAAO,GAAGc,UAAA;IAClC;IACA,OAAOV,qBAAA;EACT;EAEA,OAAOF,6BAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"createServerFeature.js","names":["createServerFeature","dependencies","dependenciesPriority","dependenciesSoft","feature","key","featureProviderProviderServer","props","featureProviderServer","serverFeatureProps","config","featureProviderMap","isRoot","parentIsLocalized","resolvedFeatures","unSanitizedEditorConfig","toReturn","sanitizedServerFeatureProps","newFeature"],"sources":["../../src/utilities/createServerFeature.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n FeatureProviderProviderServer,\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n ServerFeature,\n ServerFeatureProviderMap,\n} from '../features/typesServer.js'\nimport type { ServerEditorConfig } from '../lexical/config/types.js'\n\nexport type CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps> = {\n feature:\n | ((props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n parentIsLocalized: boolean\n props: UnSanitizedProps\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) => ServerFeature<SanitizedProps, ClientProps>)\n | Omit<ServerFeature<SanitizedProps, ClientProps>, 'sanitizedServerFeatureProps'>\n} & Pick<\n FeatureProviderServer<UnSanitizedProps, ClientProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n>\n\nexport const createServerFeature: <\n UnSanitizedProps = undefined,\n SanitizedProps = UnSanitizedProps,\n ClientProps = undefined,\n>(\n args: CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps>,\n) => FeatureProviderProviderServer<UnSanitizedProps, SanitizedProps, ClientProps> = ({\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n feature,\n key,\n}) => {\n const featureProviderProviderServer: FeatureProviderProviderServer<any, any, any> = (props) => {\n const featureProviderServer: Partial<FeatureProviderServer<any, any, any>> = {\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n key,\n serverFeatureProps: props,\n }\n\n if (typeof feature === 'function') {\n featureProviderServer.feature = ({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n resolvedFeatures,\n unSanitizedEditorConfig,\n }) => {\n const toReturn = feature({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n props,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n\n if (toReturn.sanitizedServerFeatureProps === null) {\n toReturn.sanitizedServerFeatureProps = props\n }\n return toReturn\n }\n } else {\n // For explanation why we have to spread feature, see createClientFeature.ts\n const newFeature: ServerFeature<any, any> = { ...feature }\n\n newFeature.sanitizedServerFeatureProps = props\n featureProviderServer.feature = newFeature\n }\n return featureProviderServer as FeatureProviderServer<any, any, any>\n }\n\n return featureProviderProviderServer\n}\n"],"mappings":"AA+BA,OAAO,MAAMA,mBAAA,GAMuEA,CAAC;EACnFC,YAAY;EACZC,oBAAoB;EACpBC,gBAAgB;EAChBC,OAAO;EACPC;AAAG,CACJ;EACC,MAAMC,6BAAA,GAA+EC,KAAA;IACnF,MAAMC,qBAAA,GAAuE;MAC3EP,YAAA;MACAC,oBAAA;MACAC,gBAAA;MACAE,GAAA;MACAI,kBAAA,EAAoBF;IACtB;IAEA,IAAI,OAAOH,OAAA,KAAY,YAAY;MACjCI,qBAAA,CAAsBJ,OAAO,GAAG,CAAC;QAC/BM,MAAM;QACNC,kBAAkB;QAClBC,MAAM;QACNC,iBAAiB;QACjBC,gBAAgB;QAChBC;MAAuB,CACxB;QACC,MAAMC,QAAA,GAAWZ,OAAA,CAAQ;UACvBM,MAAA;UACAC,kBAAA;UACAC,MAAA;UACAC,iBAAA;UACAN,KAAA;UACAO,gBAAA;UACAC;QACF;QAEA,IAAIC,QAAA,CAASC,2BAA2B,KAAK,MAAM;UACjDD,QAAA,CAASC,2BAA2B,GAAGV,KAAA;QACzC;QACA,OAAOS,QAAA;MACT;IACF,OAAO;MACL;MACA,MAAME,UAAA,GAAsC;QAAE,GAAGd;MAAQ;MAEzDc,UAAA,CAAWD,2BAA2B,GAAGV,KAAA;MACzCC,qBAAA,CAAsBJ,OAAO,GAAGc,UAAA;IAClC;IACA,OAAOV,qBAAA;EACT;EAEA,OAAOF,6BAAA;AACT","ignoreList":[]}
@@ -7,7 +7,7 @@ export declare const editorConfigFactory: {
7
7
  default: (args: {
8
8
  config: SanitizedConfig;
9
9
  parentIsLocalized?: boolean;
10
- }) => Promise<SanitizedServerEditorConfig>;
10
+ }) => SanitizedServerEditorConfig;
11
11
  /**
12
12
  * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),
13
13
  * you can extract the editor config from it.
@@ -22,7 +22,7 @@ export declare const editorConfigFactory: {
22
22
  isRoot?: boolean;
23
23
  lexical?: LexicalEditorConfig;
24
24
  parentIsLocalized?: boolean;
25
- }) => Promise<SanitizedServerEditorConfig>;
25
+ }) => SanitizedServerEditorConfig;
26
26
  /**
27
27
  * Create a new editor config - behaves just like instantiating a new `lexicalEditor`
28
28
  */
@@ -32,7 +32,7 @@ export declare const editorConfigFactory: {
32
32
  isRoot?: boolean;
33
33
  lexical?: LexicalEditorConfig;
34
34
  parentIsLocalized?: boolean;
35
- }) => Promise<SanitizedServerEditorConfig>;
35
+ }) => SanitizedServerEditorConfig;
36
36
  fromField: (args: {
37
37
  field: RichTextField;
38
38
  }) => SanitizedServerEditorConfig;
@@ -41,7 +41,7 @@ export declare const editorConfigFactory: {
41
41
  field: RichTextField;
42
42
  isRoot?: boolean;
43
43
  parentIsLocalized?: boolean;
44
- }) => Promise<SanitizedServerEditorConfig>;
44
+ }) => SanitizedServerEditorConfig;
45
45
  };
46
46
  export declare const featuresInputToEditorConfig: (args: {
47
47
  config: SanitizedConfig;
@@ -49,9 +49,9 @@ export declare const featuresInputToEditorConfig: (args: {
49
49
  isRoot?: boolean;
50
50
  lexical?: LexicalEditorConfig;
51
51
  parentIsLocalized?: boolean;
52
- }) => Promise<{
52
+ }) => {
53
53
  features: FeatureProviderServer<unknown, unknown, unknown>[];
54
54
  resolvedFeatureMap: ResolvedServerFeatureMap;
55
55
  sanitizedConfig: SanitizedServerEditorConfig;
56
- }>;
56
+ };
57
57
  //# sourceMappingURL=editorConfigFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editorConfigFactory.d.ts","sourceRoot":"","sources":["../../src/utilities/editorConfigFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,KAAK,EAA2B,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEtF,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACjG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,KAAK,EACV,aAAa,EAEb,8BAA8B,EAC/B,MAA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G,2BAA2B;IAMxE,oBAAoB,SAAS;QAC3B,MAAM,EAAE,eAAe,CAAA;QACvB,KAAK,EAAE,aAAa,CAAA;QACpB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,2BAA2B;CAahC,CAAA;AAED,eAAO,MAAM,2BAA2B,SAAU;IAChD,MAAM,EAAE,eAAe,CAAA;IACvB,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,KAAG;IACF,QAAQ,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAAA;IAC5D,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,eAAe,EAAE,2BAA2B,CAAA;CA0C7C,CAAA"}
@@ -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;IA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AAA,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,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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":[]}
@@ -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,SAAgB;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":[]}
@@ -54,7 +54,8 @@ async function upgradeGlobal({
54
54
  slug: global.slug,
55
55
  data: document,
56
56
  depth: 0,
57
- locale: locale || undefined
57
+ locale: locale || undefined,
58
+ overrideAccess: true
58
59
  });
59
60
  }
60
61
  }
@@ -68,7 +69,8 @@ async function upgradeCollection({
68
69
  console.log(`Lexical Upgrade: ${locale}: Upgrading collection:`, collection.slug, '(' + cur + '/' + max + ')');
69
70
  const documentCount = (await payload.count({
70
71
  collection: collection.slug,
71
- locale: locale || undefined
72
+ locale: locale || undefined,
73
+ overrideAccess: true
72
74
  })).totalDocs;
73
75
  let page = 1;
74
76
  let upgraded = 0;
@@ -95,7 +97,8 @@ async function upgradeCollection({
95
97
  collection: collection.slug,
96
98
  data: document,
97
99
  depth: 0,
98
- locale: locale || undefined
100
+ locale: locale || undefined,
101
+ overrideAccess: true
99
102
  });
100
103
  }
101
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["upgradeDocumentFieldsRecursively","upgradeLexicalData","payload","collections","config","allLocales","localization","localeCodes","totalCollections","length","locale","curCollection","collection","upgradeCollection","cur","max","global","globals","upgradeGlobal","console","log","slug","document","findGlobal","depth","undefined","overrideAccess","found","upgradeDocument","fields","updateGlobal","data","documentCount","count","totalDocs","page","upgraded","documents","find","pagination","docs","id","update"],"sources":["../../../src/utilities/upgradeLexicalData/index.ts"],"sourcesContent":["import type { CollectionConfig, Field, GlobalConfig, Payload } from 'payload'\n\nimport { upgradeDocumentFieldsRecursively } from './upgradeDocumentFieldsRecursively.js'\n\n/**\n * This goes through every single document in your payload app and re-saves it, if it has a lexical editor.\n * This way, the data is automatically converted to the new format, and that automatic conversion gets applied to every single document in your app.\n *\n * @param payload\n */\nexport async function upgradeLexicalData({ payload }: { payload: Payload }) {\n const collections = payload.config.collections\n\n const allLocales = payload.config.localization ? payload.config.localization.localeCodes : [null]\n\n const totalCollections = collections.length\n for (const locale of allLocales) {\n let curCollection = 0\n for (const collection of collections) {\n curCollection++\n await upgradeCollection({\n collection,\n cur: curCollection,\n locale,\n max: totalCollections,\n payload,\n })\n }\n for (const global of payload.config.globals) {\n await upgradeGlobal({\n global,\n locale,\n payload,\n })\n }\n }\n}\n\nasync function upgradeGlobal({\n global,\n locale,\n payload,\n}: {\n global: GlobalConfig\n locale: null | string\n payload: Payload\n}) {\n console.log(`Lexical Upgrader: ${locale}: Upgrading global:`, global.slug)\n\n const document = await payload.findGlobal({\n slug: global.slug,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n })\n\n const found = upgradeDocument({\n document,\n fields: global.fields,\n payload,\n })\n\n if (found) {\n await payload.updateGlobal({\n slug: global.slug,\n data: document,\n depth: 0,\n locale: locale || undefined,\n })\n }\n}\n\nasync function upgradeCollection({\n collection,\n cur,\n locale,\n max,\n payload,\n}: {\n collection: CollectionConfig\n cur: number\n locale: null | string\n max: number\n payload: Payload\n}) {\n console.log(\n `Lexical Upgrade: ${locale}: Upgrading collection:`,\n collection.slug,\n '(' + cur + '/' + max + ')',\n )\n\n const documentCount = (\n await payload.count({\n collection: collection.slug,\n locale: locale || undefined,\n })\n ).totalDocs\n\n let page = 1\n let upgraded = 0\n\n while (upgraded < documentCount) {\n const documents = await payload.find({\n collection: collection.slug,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n page,\n pagination: true,\n })\n\n for (const document of documents.docs) {\n upgraded++\n console.log(\n `Lexical Upgrade: ${locale}: Upgrading collection:`,\n collection.slug,\n '(' +\n cur +\n '/' +\n max +\n ') - Upgrading Document: ' +\n document.id +\n ' (' +\n upgraded +\n '/' +\n documentCount +\n ')',\n )\n const found = upgradeDocument({\n document,\n fields: collection.fields,\n payload,\n })\n\n if (found) {\n await payload.update({\n id: document.id,\n collection: collection.slug,\n data: document,\n depth: 0,\n locale: locale || undefined,\n })\n }\n }\n page++\n }\n}\n\nfunction upgradeDocument({\n document,\n fields,\n payload,\n}: {\n document: Record<string, unknown>\n fields: Field[]\n payload: Payload\n}): boolean {\n return !!upgradeDocumentFieldsRecursively({\n data: document,\n fields,\n found: 0,\n payload,\n })\n}\n"],"mappings":"AAEA,SAASA,gCAAgC,QAAQ;AAEjD;;;;;;AAMA,OAAO,eAAeC,mBAAmB;EAAEC;AAAO,CAAwB;EACxE,MAAMC,WAAA,GAAcD,OAAA,CAAQE,MAAM,CAACD,WAAW;EAE9C,MAAME,UAAA,GAAaH,OAAA,CAAQE,MAAM,CAACE,YAAY,GAAGJ,OAAA,CAAQE,MAAM,CAACE,YAAY,CAACC,WAAW,GAAG,CAAC,KAAK;EAEjG,MAAMC,gBAAA,GAAmBL,WAAA,CAAYM,MAAM;EAC3C,KAAK,MAAMC,MAAA,IAAUL,UAAA,EAAY;IAC/B,IAAIM,aAAA,GAAgB;IACpB,KAAK,MAAMC,UAAA,IAAcT,WAAA,EAAa;MACpCQ,aAAA;MACA,MAAME,iBAAA,CAAkB;QACtBD,UAAA;QACAE,GAAA,EAAKH,aAAA;QACLD,MAAA;QACAK,GAAA,EAAKP,gBAAA;QACLN;MACF;IACF;IACA,KAAK,MAAMc,MAAA,IAAUd,OAAA,CAAQE,MAAM,CAACa,OAAO,EAAE;MAC3C,MAAMC,aAAA,CAAc;QAClBF,MAAA;QACAN,MAAA;QACAR;MACF;IACF;EACF;AACF;AAEA,eAAegB,cAAc;EAC3BF,MAAM;EACNN,MAAM;EACNR;AAAO,C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gB;MAChBS,IAAA;MACAI,UAAA,EAAY;IACd;IAEA,KAAK,MAAMjB,QAAA,IAAYe,SAAA,CAAUG,IAAI,EAAE;MACrCJ,QAAA;MACAjB,OAAA,CAAQC,GAAG,CACT,oBAAoBV,MAAA,yBAA+B,EACnDE,UAAA,CAAWS,IAAI,EACf,MACEP,GAAA,GACA,MACAC,GAAA,GACA,6BACAO,QAAA,CAASmB,EAAE,GACX,OACAL,QAAA,GACA,MACAJ,aAAA,GACA;MAEJ,MAAML,KAAA,GAAQC,eAAA,CAAgB;QAC5BN,QAAA;QACAO,MAAA,EAAQjB,UAAA,CAAWiB,MAAM;QACzB3B;MACF;MAEA,IAAIyB,KAAA,EAAO;QACT,MAAMzB,OAAA,CAAQwC,MAAM,CAAC;UACnBD,EAAA,EAAInB,QAAA,CAASmB,EAAE;UACf7B,UAAA,EAAYA,UAAA,CAAWS,IAAI;UAC3BU,IAAA,EAAMT,QAAA;UACNE,KAAA,EAAO;UACPd,MAAA,EAAQA,MAAA,IAAUe;QACpB;MACF;IACF;IACAU,IAAA;EACF;AACF;AAEA,SAASP,gBAAgB;EACvBN,QAAQ;EACRO,MAAM;EACN3B;AAAO,CAKR;EACC,OAAO,CAAC,CAACF,gCAAA,CAAiC;IACxC+B,IAAA,EAAMT,QAAA;IACNO,MAAA;IACAF,KAAA,EAAO;IACPzB;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["upgradeDocumentFieldsRecursively","upgradeLexicalData","payload","collections","config","allLocales","localization","localeCodes","totalCollections","length","locale","curCollection","collection","upgradeCollection","cur","max","global","globals","upgradeGlobal","console","log","slug","document","findGlobal","depth","undefined","overrideAccess","found","upgradeDocument","fields","updateGlobal","data","documentCount","count","totalDocs","page","upgraded","documents","find","pagination","docs","id","update"],"sources":["../../../src/utilities/upgradeLexicalData/index.ts"],"sourcesContent":["import type { CollectionConfig, Field, GlobalConfig, Payload } from 'payload'\n\nimport { upgradeDocumentFieldsRecursively } from './upgradeDocumentFieldsRecursively.js'\n\n/**\n * This goes through every single document in your payload app and re-saves it, if it has a lexical editor.\n * This way, the data is automatically converted to the new format, and that automatic conversion gets applied to every single document in your app.\n *\n * @param payload\n */\nexport async function upgradeLexicalData({ payload }: { payload: Payload }) {\n const collections = payload.config.collections\n\n const allLocales = payload.config.localization ? payload.config.localization.localeCodes : [null]\n\n const totalCollections = collections.length\n for (const locale of allLocales) {\n let curCollection = 0\n for (const collection of collections) {\n curCollection++\n await upgradeCollection({\n collection,\n cur: curCollection,\n locale,\n max: totalCollections,\n payload,\n })\n }\n for (const global of payload.config.globals) {\n await upgradeGlobal({\n global,\n locale,\n payload,\n })\n }\n }\n}\n\nasync function upgradeGlobal({\n global,\n locale,\n payload,\n}: {\n global: GlobalConfig\n locale: null | string\n payload: Payload\n}) {\n console.log(`Lexical Upgrader: ${locale}: Upgrading global:`, global.slug)\n\n const document = await payload.findGlobal({\n slug: global.slug,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n })\n\n const found = upgradeDocument({\n document,\n fields: global.fields,\n payload,\n })\n\n if (found) {\n await payload.updateGlobal({\n slug: global.slug,\n data: document,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n })\n }\n}\n\nasync function upgradeCollection({\n collection,\n cur,\n locale,\n max,\n payload,\n}: {\n collection: CollectionConfig\n cur: number\n locale: null | string\n max: number\n payload: Payload\n}) {\n console.log(\n `Lexical Upgrade: ${locale}: Upgrading collection:`,\n collection.slug,\n '(' + cur + '/' + max + ')',\n )\n\n const documentCount = (\n await payload.count({\n collection: collection.slug,\n locale: locale || undefined,\n overrideAccess: true,\n })\n ).totalDocs\n\n let page = 1\n let upgraded = 0\n\n while (upgraded < documentCount) {\n const documents = await payload.find({\n collection: collection.slug,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n page,\n pagination: true,\n })\n\n for (const document of documents.docs) {\n upgraded++\n console.log(\n `Lexical Upgrade: ${locale}: Upgrading collection:`,\n collection.slug,\n '(' +\n cur +\n '/' +\n max +\n ') - Upgrading Document: ' +\n document.id +\n ' (' +\n upgraded +\n '/' +\n documentCount +\n ')',\n )\n const found = upgradeDocument({\n document,\n fields: collection.fields,\n payload,\n })\n\n if (found) {\n await payload.update({\n id: document.id,\n collection: collection.slug,\n data: document,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n })\n }\n }\n page++\n }\n}\n\nfunction upgradeDocument({\n document,\n fields,\n payload,\n}: {\n document: Record<string, unknown>\n fields: Field[]\n payload: Payload\n}): boolean {\n return !!upgradeDocumentFieldsRecursively({\n data: document,\n fields,\n found: 0,\n payload,\n })\n}\n"],"mappings":"AAEA,SAASA,gCAAgC,QAAQ;AAEjD;;;;;;AAMA,OAAO,eAAeC,mBAAmB;EAAEC;AAAO,CAAwB;EACxE,MAAMC,WAAA,GAAcD,OAAA,CAAQE,MAAM,CAACD,WAAW;EAE9C,MAAME,UAAA,GAAaH,OAAA,CAAQE,MAAM,CAACE,YAAY,GAAGJ,OAAA,CAAQE,MAAM,CAACE,YAAY,CAACC,WAAW,GAAG,CAAC,KAAK;EAEjG,MAAMC,gBAAA,GAAmBL,WAAA,CAAYM,MAAM;EAC3C,KAAK,MAAMC,MAAA,IAAUL,UAAA,EAAY;IAC/B,IAAIM,aAAA,GAAgB;IACpB,KAAK,MAAMC,UAAA,IAAcT,WAAA,EAAa;MACpCQ,aAAA;MACA,MAAME,iBAAA,CAAkB;QACtBD,UAAA;QACAE,GAAA,EAAKH,aAAA;QACLD,MAAA;QACAK,GAAA,EAAKP,gBAAA;QACLN;MACF;IACF;IACA,KAAK,MAAMc,MAAA,IAAUd,OAAA,CAAQE,MAAM,CAACa,OAAO,EAAE;MAC3C,MAAMC,aAAA,CAAc;QAClBF,MAAA;QACAN,MAAA;QACAR;MACF;IACF;EACF;AACF;AAEA,eAAegB,cAAc;EAC3BF,MAAM;EACNN,MAAM;EACNR;AAAO,CAKR;EACCiB,OAAA,CAAQC,GAAG,CAAC,qBAAqBV,MAAA,qBAA2B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BS,IAAA;MACAI,UAAA,EAAY;IACd;IAEA,KAAK,MAAMjB,QAAA,IAAYe,SAAA,CAAUG,IAAI,EAAE;MACrCJ,QAAA;MACAjB,OAAA,CAAQC,GAAG,CACT,oBAAoBV,MAAA,yBAA+B,EACnDE,UAAA,CAAWS,IAAI,EACf,MACEP,GAAA,GACA,MACAC,GAAA,GACA,6BACAO,QAAA,CAASmB,EAAE,GACX,OACAL,QAAA,GACA,MACAJ,aAAA,GACA;MAEJ,MAAML,KAAA,GAAQC,eAAA,CAAgB;QAC5BN,QAAA;QACAO,MAAA,EAAQjB,UAAA,CAAWiB,MAAM;QACzB3B;MACF;MAEA,IAAIyB,KAAA,EAAO;QACT,MAAMzB,OAAA,CAAQwC,MAAM,CAAC;UACnBD,EAAA,EAAInB,QAAA,CAASmB,EAAE;UACf7B,UAAA,EAAYA,UAAA,CAAWS,IAAI;UAC3BU,IAAA,EAAMT,QAAA;UACNE,KAAA,EAAO;UACPd,MAAA,EAAQA,MAAA,IAAUe,SAAA;UAClBC,cAAA,EAAgB;QAClB;MACF;IACF;IACAS,IAAA;EACF;AACF;AAEA,SAASP,gBAAgB;EACvBN,QAAQ;EACRO,MAAM;EACN3B;AAAO,CAKR;EACC,OAAO,CAAC,CAACF,gCAAA,CAAiC;IACxC+B,IAAA,EAAMT,QAAA;IACNO,MAAA;IACAF,KAAA,EAAO;IACPzB;EACF;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "4.0.0-internal.c7d5de4",
3
+ "version": "4.0.0-internal.cb69780",
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",
@@ -113,6 +112,11 @@
113
112
  "types": "./dist/lexical-proxy/@lexical-utils.d.ts",
114
113
  "default": "./dist/lexical-proxy/@lexical-utils.js"
115
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
+ },
116
120
  "./lexical/react/LexicalAutoEmbedPlugin": {
117
121
  "import": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js",
118
122
  "types": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts",
@@ -178,6 +182,16 @@
178
182
  "types": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts",
179
183
  "default": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.js"
180
184
  },
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"
194
+ },
181
195
  "./lexical/react/LexicalNodeContextMenuPlugin": {
182
196
  "import": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js",
183
197
  "types": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.d.ts",
@@ -268,6 +282,11 @@
268
282
  "types": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts",
269
283
  "default": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js"
270
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
+ },
271
290
  "./lexical/react/LexicalTabIndentationPlugin": {
272
291
  "import": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js",
273
292
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts",
@@ -293,11 +312,56 @@
293
312
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts",
294
313
  "default": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js"
295
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
+ },
296
350
  "./lexical/react/useLexicalEditable": {
297
351
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js",
298
352
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts",
299
353
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js"
300
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
+ },
301
365
  "./lexical/react/useLexicalIsTextContentEmpty": {
302
366
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js",
303
367
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts",
@@ -308,6 +372,16 @@
308
372
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts",
309
373
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js"
310
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
+ },
311
385
  "./lexical/react/useLexicalSubscription": {
312
386
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.js",
313
387
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts",
@@ -343,25 +417,25 @@
343
417
  ]
344
418
  },
345
419
  "dependencies": {
346
- "@lexical/clipboard": "0.45.0",
347
- "@lexical/headless": "0.45.0",
348
- "@lexical/html": "0.45.0",
349
- "@lexical/link": "0.45.0",
350
- "@lexical/list": "0.45.0",
351
- "@lexical/mark": "0.45.0",
352
- "@lexical/markdown": "0.45.0",
353
- "@lexical/react": "0.45.0",
354
- "@lexical/rich-text": "0.45.0",
355
- "@lexical/selection": "0.45.0",
356
- "@lexical/table": "0.45.0",
357
- "@lexical/utils": "0.45.0",
420
+ "@lexical/clipboard": "0.50.0",
421
+ "@lexical/headless": "0.50.0",
422
+ "@lexical/html": "0.50.0",
423
+ "@lexical/link": "0.50.0",
424
+ "@lexical/list": "0.50.0",
425
+ "@lexical/mark": "0.50.0",
426
+ "@lexical/markdown": "0.50.0",
427
+ "@lexical/react": "0.50.0",
428
+ "@lexical/rich-text": "0.50.0",
429
+ "@lexical/selection": "0.50.0",
430
+ "@lexical/table": "0.50.0",
431
+ "@lexical/utils": "0.50.0",
358
432
  "acorn": "8.16.0",
359
433
  "bson-objectid": "2.0.4",
360
434
  "csstype": "3.2.3",
361
435
  "dequal": "2.0.3",
362
436
  "escape-html": "1.0.3",
363
437
  "jsox": "1.2.125",
364
- "lexical": "0.45.0",
438
+ "lexical": "0.50.0",
365
439
  "mdast-util-from-markdown": "2.0.3",
366
440
  "mdast-util-mdx-jsx": "3.2.0",
367
441
  "micromark-extension-mdx-jsx": "3.0.2",
@@ -369,8 +443,8 @@
369
443
  "react-error-boundary": "6.1.1",
370
444
  "ts-essentials": "10.0.3",
371
445
  "uuid": "14.0.0",
372
- "@payloadcms/translations": "4.0.0-internal.c7d5de4",
373
- "@payloadcms/ui": "4.0.0-internal.c7d5de4"
446
+ "@payloadcms/ui": "4.0.0-internal.cb69780",
447
+ "@payloadcms/translations": "4.0.0-internal.cb69780"
374
448
  },
375
449
  "devDependencies": {
376
450
  "@babel/cli": "7.27.2",
@@ -378,7 +452,7 @@
378
452
  "@babel/preset-env": "7.27.2",
379
453
  "@babel/preset-react": "7.27.1",
380
454
  "@babel/preset-typescript": "7.27.1",
381
- "@lexical/eslint-plugin": "0.45.0",
455
+ "@lexical/eslint-plugin": "0.50.0",
382
456
  "@types/escape-html": "1.0.4",
383
457
  "@types/json-schema": "7.0.15",
384
458
  "@types/node": "24.12.3",
@@ -389,15 +463,15 @@
389
463
  "esbuild": "0.27.1",
390
464
  "esbuild-sass-plugin": "3.3.1",
391
465
  "swc-plugin-transform-remove-imports": "8.3.0",
392
- "@payloadcms/eslint-config": "3.28.0",
393
- "payload": "4.0.0-internal.c7d5de4"
466
+ "payload": "4.0.0-internal.cb69780",
467
+ "@payloadcms/eslint-config": "3.28.0"
394
468
  },
395
469
  "peerDependencies": {
396
470
  "@faceless-ui/modal": "3.0.1",
397
471
  "@faceless-ui/scroll-info": "2.0.0",
398
472
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
399
473
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
400
- "payload": "4.0.0-internal.c7d5de4"
474
+ "payload": "4.0.0-internal.cb69780"
401
475
  },
402
476
  "engines": {
403
477
  "node": ">=24.15.0"
@@ -419,8 +493,8 @@
419
493
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
420
494
  "build:without_reactcompiler": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && pnpm copyfiles && pnpm build:types && pnpm build:swc && pnpm build:esbuild && pnpm build:esbuild:postproces && rm -rf dist/exports/client && mv dist/exports/client_unoptimized dist/exports/client",
421
495
  "clean": "rimraf -g {dist,*.tsbuildinfo,esbuild}",
422
- "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
423
- "copyfiles:debug": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
496
+ "copyfiles": "copyfiles -u 1 -e \"**/*.spec.*\" \"src/**/*.{html,css,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
497
+ "copyfiles:debug": "copyfiles -u 1 -e \"**/*.spec.*\" \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
424
498
  "lint": "eslint .",
425
499
  "lint:fix": "eslint . --fix"
426
500
  }
@@ -1,16 +0,0 @@
1
- import { lexicalTargetVersion } from './index';
2
- import { fileURLToPath } from 'url';
3
- import path from 'path';
4
- import fs from 'fs/promises';
5
- import { describe, it, expect } from 'vitest';
6
- const filename = fileURLToPath(import.meta.url);
7
- const dirname = path.dirname(filename);
8
- describe('Lexical dependency checker', () => {
9
- it('ensure lexical version installed in package.json matches dependency checker version', async () => {
10
- const packageJsonString = await fs.readFile(path.resolve(dirname, '../package.json'), 'utf-8');
11
- const packageJson = JSON.parse(packageJsonString);
12
- const packageJsonLexicalVersion = packageJson.dependencies['lexical'];
13
- expect(packageJsonLexicalVersion).toBe(lexicalTargetVersion);
14
- });
15
- });
16
- //# sourceMappingURL=dependencyChecker.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependencyChecker.spec.js","names":["lexicalTargetVersion","fileURLToPath","path","fs","describe","it","expect","filename","import","meta","url","dirname","packageJsonString","readFile","resolve","packageJson","JSON","parse","packageJsonLexicalVersion","dependencies","toBe"],"sources":["../src/dependencyChecker.spec.ts"],"sourcesContent":["import { lexicalTargetVersion } from './index'\nimport { fileURLToPath } from 'url'\nimport path from 'path'\nimport fs from 'fs/promises'\nimport { describe, it, expect } from 'vitest'\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\ndescribe('Lexical dependency checker', () => {\n it('ensure lexical version installed in package.json matches dependency checker version', async () => {\n const packageJsonString = await fs.readFile(path.resolve(dirname, '../package.json'), 'utf-8')\n const packageJson = JSON.parse(packageJsonString)\n const packageJsonLexicalVersion = packageJson.dependencies['lexical']\n\n expect(packageJsonLexicalVersion).toBe(lexicalTargetVersion)\n })\n})\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,aAAa,QAAQ;AAC9B,OAAOC,IAAA,MAAU;AACjB,OAAOC,EAAA,MAAQ;AACf,SAASC,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ;AAErC,MAAMC,QAAA,GAAWN,aAAA,CAAcO,MAAA,CAAAC,IAAA,CAAYC,GAAG;AAC9C,MAAMC,OAAA,GAAUT,IAAA,CAAKS,OAAO,CAACJ,QAAA;AAE7BH,QAAA,CAAS,8BAA8B;EACrCC,EAAA,CAAG,uFAAuF;IACxF,MAAMO,iBAAA,GAAoB,MAAMT,EAAA,CAAGU,QAAQ,CAACX,IAAA,CAAKY,OAAO,CAACH,OAAA,EAAS,oBAAoB;IACtF,MAAMI,WAAA,GAAcC,IAAA,CAAKC,KAAK,CAACL,iBAAA;IAC/B,MAAMM,yBAAA,GAA4BH,WAAA,CAAYI,YAAY,CAAC,UAAU;IAErEb,MAAA,CAAOY,yBAAA,EAA2BE,IAAI,CAACpB,oBAAA;EACzC;AACF","ignoreList":[]}