@payloadcms/richtext-lexical 4.0.0-internal.e7d4ebc → 4.0.0-internal.ea6e8f8

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 (525) hide show
  1. package/dist/exports/client/Field-MT4FK3IP.js +2 -0
  2. package/dist/exports/client/Field-MT4FK3IP.js.map +7 -0
  3. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  4. package/dist/exports/client/{chunk-X3D4LZS7.js.map → chunk-3LRZDIIG.js.map} +4 -4
  5. package/dist/exports/client/chunk-E6LSRRP2.js +2 -0
  6. package/dist/exports/client/chunk-E6LSRRP2.js.map +7 -0
  7. package/dist/exports/client/chunk-ZQX5HXUL.js +2 -0
  8. package/dist/exports/client/chunk-ZQX5HXUL.js.map +7 -0
  9. package/dist/exports/client/component-6DQLENIE.js +2 -0
  10. package/dist/exports/client/component-6DQLENIE.js.map +7 -0
  11. package/dist/exports/client/componentInline-HNE5G4TE.js +2 -0
  12. package/dist/exports/client/index.d.ts +1 -1
  13. package/dist/exports/client/index.d.ts.map +1 -1
  14. package/dist/exports/client/index.js +23 -23
  15. package/dist/exports/client/index.js.map +4 -4
  16. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  17. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  18. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  19. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  20. package/dist/features/blocks/client/component/index.d.ts +0 -6
  21. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  22. package/dist/features/blocks/client/component/index.js +169 -101
  23. package/dist/features/blocks/client/component/index.js.map +1 -1
  24. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  25. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  26. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  27. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  28. package/dist/features/blocks/client/componentInline/index.css +0 -1
  29. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  30. package/dist/features/blocks/client/componentInline/index.js +30 -22
  31. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  32. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  33. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  34. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  35. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  36. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  37. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  38. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  39. package/dist/features/blocks/server/index.js +2 -2
  40. package/dist/features/blocks/server/index.js.map +1 -1
  41. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  42. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  43. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  44. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  45. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  46. package/dist/features/blocks/server/schema.d.ts +2 -0
  47. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  48. package/dist/features/blocks/server/schema.js +7 -9
  49. package/dist/features/blocks/server/schema.js.map +1 -1
  50. package/dist/features/blocks/server/validate.js +1 -1
  51. package/dist/features/blocks/server/validate.js.map +1 -1
  52. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  53. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  54. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  55. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  56. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  57. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  58. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  59. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  60. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  61. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  62. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  63. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  64. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  65. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  66. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  67. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  68. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  69. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  70. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  71. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  72. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  73. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  74. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  75. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  76. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  77. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  78. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  79. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  80. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  81. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  82. package/dist/features/heading/constants.d.ts +2 -0
  83. package/dist/features/heading/constants.d.ts.map +1 -0
  84. package/dist/features/heading/constants.js +2 -0
  85. package/dist/features/heading/constants.js.map +1 -0
  86. package/dist/features/heading/server/index.d.ts.map +1 -1
  87. package/dist/features/heading/server/index.js +5 -1
  88. package/dist/features/heading/server/index.js.map +1 -1
  89. package/dist/features/heading/server/validate.d.ts +6 -0
  90. package/dist/features/heading/server/validate.d.ts.map +1 -0
  91. package/dist/features/heading/server/validate.js +15 -0
  92. package/dist/features/heading/server/validate.js.map +1 -0
  93. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
  94. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  95. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  96. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  97. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  98. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  99. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  100. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  101. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  102. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  103. package/dist/features/horizontalRule/server/schema.js +6 -5
  104. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  105. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  106. package/dist/features/indent/client/IndentPlugin.js +122 -1
  107. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  108. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  109. package/dist/features/indent/server/i18n.js +74 -37
  110. package/dist/features/indent/server/i18n.js.map +1 -1
  111. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  112. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +8 -5
  113. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  114. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -2
  115. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  116. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  117. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  118. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  119. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  120. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  121. package/dist/features/link/nodes/LinkNode.js +2 -15
  122. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  123. package/dist/features/link/server/index.js +2 -2
  124. package/dist/features/link/server/index.js.map +1 -1
  125. package/dist/features/link/server/validate.js +1 -1
  126. package/dist/features/link/server/validate.js.map +1 -1
  127. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  128. package/dist/features/lists/checklist/server/index.js +5 -2
  129. package/dist/features/lists/checklist/server/index.js.map +1 -1
  130. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  131. package/dist/features/lists/orderedList/server/index.js +5 -2
  132. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  133. package/dist/features/lists/shared/constants.d.ts +2 -0
  134. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  135. package/dist/features/lists/shared/constants.js +2 -0
  136. package/dist/features/lists/shared/constants.js.map +1 -0
  137. package/dist/features/lists/shared/validate.d.ts +5 -0
  138. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  139. package/dist/features/lists/shared/validate.js +15 -0
  140. package/dist/features/lists/shared/validate.js.map +1 -0
  141. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  142. package/dist/features/lists/unorderedList/server/index.js +5 -2
  143. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  144. package/dist/features/relationship/client/components/index.css +3 -6
  145. package/dist/features/relationship/client/index.d.ts +2 -2
  146. package/dist/features/relationship/client/index.d.ts.map +1 -1
  147. package/dist/features/relationship/client/index.js.map +1 -1
  148. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  149. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  150. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  151. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  152. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  153. package/dist/features/relationship/client/plugins/index.js +27 -31
  154. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  155. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  156. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  157. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  158. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  159. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  160. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  161. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  162. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  163. package/dist/features/relationship/server/index.d.ts +8 -1
  164. package/dist/features/relationship/server/index.d.ts.map +1 -1
  165. package/dist/features/relationship/server/index.js +28 -11
  166. package/dist/features/relationship/server/index.js.map +1 -1
  167. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  168. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  169. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  170. package/dist/features/relationship/server/schema.d.ts +3 -2
  171. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  172. package/dist/features/relationship/server/schema.js +9 -12
  173. package/dist/features/relationship/server/schema.js.map +1 -1
  174. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  175. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  176. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  177. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  178. package/dist/features/table/client/index.d.ts.map +1 -0
  179. package/dist/features/table/client/index.js.map +1 -0
  180. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  181. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  182. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  183. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  184. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -1
  185. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  186. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  187. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  188. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  189. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  190. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  191. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  192. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  193. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  194. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  195. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  196. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  197. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  198. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  199. package/dist/features/table/client/utils/debounce.js.map +1 -0
  200. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  201. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  202. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  203. package/dist/features/table/markdownTransformer.js.map +1 -0
  204. package/dist/features/table/server/index.d.ts +3 -0
  205. package/dist/features/table/server/index.d.ts.map +1 -0
  206. package/dist/features/{experimental_table → table}/server/index.js +4 -4
  207. package/dist/features/table/server/index.js.map +1 -0
  208. package/dist/features/table/server/schema.d.ts.map +1 -0
  209. package/dist/features/table/server/schema.js.map +1 -0
  210. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  211. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  212. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  213. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  214. package/dist/features/toolbars/fixed/client/Toolbar/index.css +77 -3
  215. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  216. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  217. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  218. package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
  219. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  220. package/dist/features/toolbars/inline/client/Toolbar/index.js +2 -2
  221. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  222. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  223. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  224. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  225. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  226. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  227. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  228. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -14
  229. package/dist/features/typesServer.d.ts +17 -12
  230. package/dist/features/typesServer.d.ts.map +1 -1
  231. package/dist/features/typesServer.js.map +1 -1
  232. package/dist/features/upload/client/component/index.css +0 -2
  233. package/dist/features/upload/client/component/index.js +2 -1
  234. package/dist/features/upload/client/component/index.js.map +1 -1
  235. package/dist/features/upload/client/index.d.ts +3 -2
  236. package/dist/features/upload/client/index.d.ts.map +1 -1
  237. package/dist/features/upload/client/index.js.map +1 -1
  238. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  239. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  240. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  241. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  242. package/dist/features/upload/client/plugin/index.js +50 -53
  243. package/dist/features/upload/client/plugin/index.js.map +1 -1
  244. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  245. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  246. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  247. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  248. package/dist/features/upload/server/index.d.ts +7 -3
  249. package/dist/features/upload/server/index.d.ts.map +1 -1
  250. package/dist/features/upload/server/index.js +20 -16
  251. package/dist/features/upload/server/index.js.map +1 -1
  252. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  253. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  254. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  255. package/dist/features/upload/server/schema.d.ts +4 -16
  256. package/dist/features/upload/server/schema.d.ts.map +1 -1
  257. package/dist/features/upload/server/schema.js +8 -10
  258. package/dist/features/upload/server/schema.js.map +1 -1
  259. package/dist/features/upload/server/validate.d.ts +2 -2
  260. package/dist/features/upload/server/validate.d.ts.map +1 -1
  261. package/dist/features/upload/server/validate.js +4 -1
  262. package/dist/features/upload/server/validate.js.map +1 -1
  263. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  264. package/dist/field/Diff/converters/listitem/index.js +2 -1
  265. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  266. package/dist/field/Diff/converters/relationship/index.css +0 -1
  267. package/dist/field/Diff/converters/unknown/index.css +0 -1
  268. package/dist/field/Diff/converters/upload/index.css +0 -1
  269. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  270. package/dist/field/Diff/index.css +0 -2
  271. package/dist/field/Diff/index.d.ts +3 -2
  272. package/dist/field/Diff/index.d.ts.map +1 -1
  273. package/dist/field/Diff/index.js +3 -2
  274. package/dist/field/Diff/index.js.map +1 -1
  275. package/dist/field/Field.d.ts.map +1 -1
  276. package/dist/field/Field.js +8 -1
  277. package/dist/field/Field.js.map +1 -1
  278. package/dist/field/RenderLexical/index.d.ts +3 -1
  279. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  280. package/dist/field/RenderLexical/index.js +23 -23
  281. package/dist/field/RenderLexical/index.js.map +1 -1
  282. package/dist/field/ViewSelector.d.ts.map +1 -1
  283. package/dist/field/ViewSelector.js +1 -0
  284. package/dist/field/ViewSelector.js.map +1 -1
  285. package/dist/field/bundled.css +1 -1
  286. package/dist/field/index.css +10 -11
  287. package/dist/i18n.d.ts.map +1 -1
  288. package/dist/i18n.js +68 -0
  289. package/dist/i18n.js.map +1 -1
  290. package/dist/index.d.ts +2 -2
  291. package/dist/index.d.ts.map +1 -1
  292. package/dist/index.js +27 -5
  293. package/dist/index.js.map +1 -1
  294. package/dist/lexical/LexicalEditor.css +21 -10
  295. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  296. package/dist/lexical/LexicalEditor.js +61 -64
  297. package/dist/lexical/LexicalEditor.js.map +1 -1
  298. package/dist/lexical/config/server/loader.d.ts +1 -1
  299. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  300. package/dist/lexical/config/server/loader.js +2 -2
  301. package/dist/lexical/config/server/loader.js.map +1 -1
  302. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  303. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  304. package/dist/lexical/config/server/sanitize.js +2 -2
  305. package/dist/lexical/config/server/sanitize.js.map +1 -1
  306. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  307. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  308. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  309. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  310. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  311. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  312. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  313. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  314. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  315. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  316. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  317. package/dist/lexical/plugins/SlashMenu/index.css +0 -2
  318. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  319. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  320. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  321. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +1 -0
  322. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  323. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -2
  324. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  325. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  326. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  327. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  328. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  329. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  330. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  331. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  332. package/dist/lexical/theme/EditorTheme.css +0 -2
  333. package/dist/lexical/ui/ContentEditable.css +0 -4
  334. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  335. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  336. package/dist/lexical/ui/ContentEditable.js +21 -7
  337. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  338. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  339. package/dist/lexical/ui/icons/H3/index.js +13 -6
  340. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  341. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  342. package/dist/lexical/ui/icons/H4/index.js +13 -6
  343. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  344. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  345. package/dist/lexical/ui/icons/H5/index.js +13 -6
  346. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  347. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  348. package/dist/lexical/ui/icons/H6/index.js +13 -6
  349. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  350. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  351. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  352. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  353. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  354. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  355. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  356. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  357. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  358. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  359. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  360. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  361. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  362. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  363. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  364. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  365. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  366. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  367. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  368. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  369. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  370. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  371. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  372. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  373. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  374. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  375. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  376. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  377. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  378. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  379. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  380. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  381. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  382. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  383. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  384. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  385. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  386. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  387. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  388. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  389. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  390. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  391. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  392. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  393. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  394. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  395. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  396. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  397. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  398. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  399. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  400. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  401. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  402. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  403. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  404. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  405. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  406. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  407. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  408. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  409. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  410. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  411. package/dist/populateGraphQL/populate.js +2 -1
  412. package/dist/populateGraphQL/populate.js.map +1 -1
  413. package/dist/presets/llmInstructions.d.ts +2 -0
  414. package/dist/presets/llmInstructions.d.ts.map +1 -0
  415. package/dist/presets/llmInstructions.js +13 -0
  416. package/dist/presets/llmInstructions.js.map +1 -0
  417. package/dist/types/builtInNodes.d.ts +1 -1
  418. package/dist/types/builtInNodes.d.ts.map +1 -1
  419. package/dist/types/builtInNodes.js +8 -3
  420. package/dist/types/builtInNodes.js.map +1 -1
  421. package/dist/types/index.d.ts +3 -3
  422. package/dist/types/index.d.ts.map +1 -1
  423. package/dist/types/index.js.map +1 -1
  424. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  425. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  426. package/dist/types/jsonSchemaHelpers.js +7 -2
  427. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  428. package/dist/types/nodeTypes.d.ts +6 -1
  429. package/dist/types/nodeTypes.d.ts.map +1 -1
  430. package/dist/types/nodeTypes.js.map +1 -1
  431. package/dist/utilities/buildInitialState.d.ts +3 -2
  432. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  433. package/dist/utilities/buildInitialState.js +1 -0
  434. package/dist/utilities/buildInitialState.js.map +1 -1
  435. package/dist/utilities/createServerFeature.d.ts +1 -1
  436. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  437. package/dist/utilities/createServerFeature.js +2 -2
  438. package/dist/utilities/createServerFeature.js.map +1 -1
  439. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  440. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  441. package/dist/utilities/editorConfigFactory.js +9 -9
  442. package/dist/utilities/editorConfigFactory.js.map +1 -1
  443. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  444. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  445. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  446. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  447. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  448. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  449. package/dist/validate/hasText.d.ts +2 -2
  450. package/dist/validate/hasText.d.ts.map +1 -1
  451. package/dist/validate/hasText.js.map +1 -1
  452. package/dist/validate/index.d.ts +1 -1
  453. package/dist/validate/index.d.ts.map +1 -1
  454. package/package.json +99 -25
  455. package/dist/dependencyChecker.spec.js +0 -16
  456. package/dist/dependencyChecker.spec.js.map +0 -1
  457. package/dist/exports/client/Field-QGSHF22S.js +0 -2
  458. package/dist/exports/client/Field-QGSHF22S.js.map +0 -7
  459. package/dist/exports/client/bundled.css +0 -1
  460. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  461. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  462. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  463. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  464. package/dist/exports/client/chunk-X3D4LZS7.js +0 -2
  465. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  466. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  467. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  468. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  469. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  470. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  471. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  472. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  473. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  474. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  475. package/dist/features/experimental_table/client/index.js.map +0 -1
  476. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  477. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  478. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  479. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  480. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  481. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  482. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  483. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  484. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  485. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  486. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  487. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  488. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  489. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  490. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  491. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  492. package/dist/features/experimental_table/server/index.d.ts +0 -3
  493. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  494. package/dist/features/experimental_table/server/index.js.map +0 -1
  495. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  496. package/dist/features/experimental_table/server/schema.js.map +0 -1
  497. package/dist/features/link/markdownTransformer.spec.js +0 -195
  498. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  499. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  500. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  501. package/dist/lexical/utils/url.spec.js +0 -114
  502. package/dist/lexical/utils/url.spec.js.map +0 -1
  503. package/dist/utilities/jsx/jsx.spec.js +0 -178
  504. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  505. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-HNE5G4TE.js.map} +0 -0
  506. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  507. /package/dist/features/{experimental_table → table}/client/index.js +0 -0
  508. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  509. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  510. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  511. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  512. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  513. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  514. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  515. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  516. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  517. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  518. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  519. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  520. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  521. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  522. /package/dist/features/{experimental_table → table}/markdownTransformer.d.ts +0 -0
  523. /package/dist/features/{experimental_table → table}/markdownTransformer.js +0 -0
  524. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  525. /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,MAAM,mBAAmB,CAAA;AAO1B,eAAO,MAAM,mBAAmB;IAC9B,OAAO,SAAe;QACpB,MAAM,EAAE,eAAe,CAAA;QACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,OAAO,CAAC,2BAA2B,CAAC;IAMxC;;;;;;;OAOG;IACH,UAAU,SAAe;QACvB,MAAM,EAAE,eAAe,CAAA;QACvB,MAAM,EAAE,8BAA8B,CAAA;QACtC,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;QAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,OAAO,CAAC,2BAA2B,CAAC;IAUxC;;OAEG;IACH,YAAY,SAAe;QACzB,MAAM,EAAE,eAAe,CAAA;QACvB,QAAQ,CAAC,EAAE,aAAa,CAAA;QACxB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;QAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,OAAO,CAAC,2BAA2B,CAAC;IAGxC,SAAS,SAAS;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,KAAG,2BAA2B;IAMxE,oBAAoB,SAAe;QACjC,MAAM,EAAE,eAAe,CAAA;QACvB,KAAK,EAAE,aAAa,CAAA;QACpB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,OAAO,CAAC,2BAA2B,CAAC;CAazC,CAAA;AAED,eAAO,MAAM,2BAA2B,SAAgB;IACtD,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,OAAO,CAAC;IACV,QAAQ,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAAA;IAC5D,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,eAAe,EAAE,2BAA2B,CAAA;CAC7C,CAyCA,CAAA"}
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,MAAM,mBAAmB,CAAA;AAO1B,eAAO,MAAM,mBAAmB;IAC9B,OAAO,SAAS;QACd,MAAM,EAAE,eAAe,CAAA;QACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,2BAA2B;IAM/B;;;;;;;OAOG;IACH,UAAU,SAAS;QACjB,MAAM,EAAE,eAAe,CAAA;QACvB,MAAM,EAAE,8BAA8B,CAAA;QACtC,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;QAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,2BAA2B;IAU/B;;OAEG;IACH,YAAY,SAAS;QACnB,MAAM,EAAE,eAAe,CAAA;QACvB,QAAQ,CAAC,EAAE,aAAa,CAAA;QACxB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;QAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,2BAA2B;IAG/B,SAAS,SAAS;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,KAAG,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":"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","ignoreList":[]}
1
+ {"version":3,"file":"editorConfigFactory.js","names":["defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerFeatures","getDefaultSanitizedEditorConfig","editorConfigFactory","default","args","config","parentIsLocalized","fromEditor","lexicalAdapter","editor","isRoot","sanitizedServerEditorConfig","editorConfig","fromFeatures","featuresInputToEditorConfig","sanitizedConfig","fromField","field","fromUnsanitizedField","lexicalAdapterProvider","features","rootEditor","rootEditorFeatures","defaultFeatures","rootFeatures","lexical","resolvedFeatureMap","unSanitizedEditorConfig"],"sources":["../../src/utilities/editorConfigFactory.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { RichTextAdapterProvider, RichTextField, SanitizedConfig } from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type {\n FeaturesInput,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from '../types/index.js'\n\nimport { defaultEditorConfig, defaultEditorFeatures } from '../lexical/config/server/default.js'\nimport { loadFeatures } from '../lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js'\nimport { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js'\n\nexport const editorConfigFactory = {\n default: (args: {\n config: SanitizedConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n return getDefaultSanitizedEditorConfig({\n config: args.config,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n },\n /**\n * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),\n * you can extract the editor config from it.\n * This is common if you define the editor in a re-usable module scope variable and pass it to the richText field.\n *\n * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg\n * into a separate variable and use `fromFeatures` instead.\n */\n fromEditor: (args: {\n config: SanitizedConfig\n editor: LexicalRichTextAdapterProvider\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.editor({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n /**\n * Create a new editor config - behaves just like instantiating a new `lexicalEditor`\n */\n fromFeatures: (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n return featuresInputToEditorConfig(args).sanitizedConfig\n },\n fromField: (args: { field: RichTextField }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.field.editor as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n fromUnsanitizedField: (args: {\n config: SanitizedConfig\n field: RichTextField\n isRoot?: boolean\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n const lexicalAdapterProvider: RichTextAdapterProvider = args.field\n .editor as RichTextAdapterProvider\n\n const lexicalAdapter: LexicalRichTextAdapter = lexicalAdapterProvider({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n }) as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n}\n\nexport const featuresInputToEditorConfig = (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n}): {\n features: FeatureProviderServer<unknown, unknown, unknown>[]\n resolvedFeatureMap: ResolvedServerFeatureMap\n sanitizedConfig: SanitizedServerEditorConfig\n} => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (args.features && typeof args.features === 'function') {\n const rootEditor = args.config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n features = args.features({\n defaultFeatures: defaultEditorFeatures,\n rootFeatures: rootEditorFeatures,\n })\n } else {\n features = args.features as FeatureProviderServer<unknown, unknown, unknown>[]\n }\n\n if (!features) {\n features = defaultEditorFeatures\n }\n\n const lexical = args.lexical ?? defaultEditorConfig.lexical\n\n const resolvedFeatureMap = loadFeatures({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n return {\n features,\n resolvedFeatureMap,\n sanitizedConfig: {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: args.lexical,\n resolvedFeatureMap,\n },\n }\n}\n"],"mappings":"AAWA,SAASA,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAsB;EACjCC,OAAA,EAAUC,IAAA;IAIR,OAAOH,+BAAA,CAAgC;MACrCI,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBC,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;EACF;EACA;;;;;;;;EAQAC,UAAA,EAAaH,IAAA;IAOX,MAAMI,cAAA,GAAyCJ,IAAA,CAAKK,MAAM,CAAC;MACzDJ,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACA;;;EAGAE,YAAA,EAAeT,IAAA;IAOb,OAAOU,2BAAA,CAA4BV,IAAA,EAAMW,eAAe;EAC1D;EACAC,SAAA,EAAYZ,IAAA;IACV,MAAMI,cAAA,GAAyCJ,IAAA,CAAKa,KAAK,CAACR,MAAM;IAEhE,MAAME,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACAO,oBAAA,EAAuBd,IAAA;IAMrB,MAAMe,sBAAA,GAAkDf,IAAA,CAAKa,KAAK,CAC/DR,MAAM;IAET,MAAMD,cAAA,GAAyCW,sBAAA,CAAuB;MACpEd,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;AACF;AAEA,OAAO,MAAMG,2BAAA,GAA+BV,IAAA;EAW1C,IAAIgB,QAAA,GAA+D,EAAE;EACrE,IAAIhB,IAAA,CAAKgB,QAAQ,IAAI,OAAOhB,IAAA,CAAKgB,QAAQ,KAAK,YAAY;IACxD,MAAMC,UAAA,GAAajB,IAAA,CAAKC,MAAM,CAACI,MAAM;IACrC,IAAIa,kBAAA,GAAyE,EAAE;IAC/E,IAAI,OAAOD,UAAA,KAAe,YAAY,cAAcA,UAAA,EAAY;MAC9DC,kBAAA,GAAqBD,UAAC,CAAsCD,QAAQ;IACtE;IACAA,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ,CAAC;MACvBG,eAAA,EAAiBzB,qBAAA;MACjB0B,YAAA,EAAcF;IAChB;EACF,OAAO;IACLF,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ;EAC1B;EAEA,IAAI,CAACA,QAAA,EAAU;IACbA,QAAA,GAAWtB,qBAAA;EACb;EAEA,MAAM2B,OAAA,GAAUrB,IAAA,CAAKqB,OAAO,IAAI5B,mBAAA,CAAoB4B,OAAO;EAE3D,MAAMC,kBAAA,GAAqB3B,YAAA,CAAa;IACtCM,MAAA,EAAQD,IAAA,CAAKC,MAAM;IACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;IACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC7CqB,uBAAA,EAAyB;MACvBP,QAAA;MACAK;IACF;EACF;EAEA,OAAO;IACLL,QAAA;IACAM,kBAAA;IACAX,eAAA,EAAiB;MACfK,QAAA,EAAUpB,sBAAA,CAAuB0B,kBAAA;MACjCD,OAAA,EAASrB,IAAA,CAAKqB,OAAO;MACrBC;IACF;EACF;AACF","ignoreList":[]}
@@ -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":"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","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":"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","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import type { SerializedEditorState, SerializedLexicalNode } from 'lexical';
1
+ import type { SerializedEditorState } from 'lexical';
2
2
  /**
3
3
  * This function checks if the editor state is empty (has any text). If the editor state has no nodes,
4
4
  * or only an empty paragraph node (no TextNode with length > 0), it returns false.
5
5
  * Otherwise, it returns true.
6
6
  */
7
- export declare function hasText(value: null | SerializedEditorState<SerializedLexicalNode> | undefined): value is SerializedEditorState<SerializedLexicalNode>;
7
+ export declare function hasText(value: null | SerializedEditorState | undefined): value is SerializedEditorState;
8
8
  //# sourceMappingURL=hasText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasText.d.ts","sourceRoot":"","sources":["../../src/validate/hasText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAGtB,MAAM,SAAS,CAAA;AAEhB;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,IAAI,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,GAAG,SAAS,GACrE,KAAK,IAAI,qBAAqB,CAAC,qBAAqB,CAAC,CA6BvD"}
1
+ {"version":3,"file":"hasText.d.ts","sourceRoot":"","sources":["../../src/validate/hasText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAA+C,MAAM,SAAS,CAAA;AAEjG;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,IAAI,GAAG,qBAAqB,GAAG,SAAS,GAC9C,KAAK,IAAI,qBAAqB,CA6BhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hasText.js","names":["hasText","value","hasChildren","root","children","length","hasOnlyEmptyParagraph","type","paragraphNode","paragraphNodeChild"],"sources":["../../src/validate/hasText.ts"],"sourcesContent":["import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\n/**\n * This function checks if the editor state is empty (has any text). If the editor state has no nodes,\n * or only an empty paragraph node (no TextNode with length > 0), it returns false.\n * Otherwise, it returns true.\n */\nexport function hasText(\n value: null | SerializedEditorState<SerializedLexicalNode> | undefined,\n): value is SerializedEditorState<SerializedLexicalNode> {\n const hasChildren = !!value?.root?.children?.length\n if (!hasChildren) {\n return false\n }\n\n let hasOnlyEmptyParagraph = false\n if (value?.root?.children?.length === 1) {\n if (value?.root?.children[0]?.type === 'paragraph') {\n const paragraphNode = value?.root?.children[0] as SerializedParagraphNode\n\n if (!paragraphNode?.children || paragraphNode?.children?.length === 0) {\n hasOnlyEmptyParagraph = true\n } else if (paragraphNode?.children?.length === 1) {\n const paragraphNodeChild = paragraphNode?.children[0]\n if (paragraphNodeChild?.type === 'text') {\n if (!(paragraphNodeChild as SerializedTextNode | undefined)?.['text']?.length) {\n hasOnlyEmptyParagraph = true\n }\n }\n }\n }\n }\n\n if (hasOnlyEmptyParagraph) {\n return false\n }\n\n return true\n}\n"],"mappings":"AAOA;;;;GAKA,OAAO,SAASA,QACdC,KAAsE;EAEtE,MAAMC,WAAA,GAAc,CAAC,CAACD,KAAA,EAAOE,IAAA,EAAMC,QAAA,EAAUC,MAAA;EAC7C,IAAI,CAACH,WAAA,EAAa;IAChB,OAAO;EACT;EAEA,IAAII,qBAAA,GAAwB;EAC5B,IAAIL,KAAA,EAAOE,IAAA,EAAMC,QAAA,EAAUC,MAAA,KAAW,GAAG;IACvC,IAAIJ,KAAA,EAAOE,IAAA,EAAMC,QAAQ,CAAC,EAAE,EAAEG,IAAA,KAAS,aAAa;MAClD,MAAMC,aAAA,GAAgBP,KAAA,EAAOE,IAAA,EAAMC,QAAQ,CAAC,EAAE;MAE9C,IAAI,CAACI,aAAA,EAAeJ,QAAA,IAAYI,aAAA,EAAeJ,QAAA,EAAUC,MAAA,KAAW,GAAG;QACrEC,qBAAA,GAAwB;MAC1B,OAAO,IAAIE,aAAA,EAAeJ,QAAA,EAAUC,MAAA,KAAW,GAAG;QAChD,MAAMI,kBAAA,GAAqBD,aAAA,EAAeJ,QAAQ,CAAC,EAAE;QACrD,IAAIK,kBAAA,EAAoBF,IAAA,KAAS,QAAQ;UACvC,IAAI,CAAEE,kBAAA,GAAwD,OAAO,EAAEJ,MAAA,EAAQ;YAC7EC,qBAAA,GAAwB;UAC1B;QACF;MACF;IACF;EACF;EAEA,IAAIA,qBAAA,EAAuB;IACzB,OAAO;EACT;EAEA,OAAO;AACT","ignoreList":[]}
1
+ {"version":3,"file":"hasText.js","names":["hasText","value","hasChildren","root","children","length","hasOnlyEmptyParagraph","type","paragraphNode","paragraphNodeChild"],"sources":["../../src/validate/hasText.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode, SerializedTextNode } from 'lexical'\n\n/**\n * This function checks if the editor state is empty (has any text). If the editor state has no nodes,\n * or only an empty paragraph node (no TextNode with length > 0), it returns false.\n * Otherwise, it returns true.\n */\nexport function hasText(\n value: null | SerializedEditorState | undefined,\n): value is SerializedEditorState {\n const hasChildren = !!value?.root?.children?.length\n if (!hasChildren) {\n return false\n }\n\n let hasOnlyEmptyParagraph = false\n if (value?.root?.children?.length === 1) {\n if (value?.root?.children[0]?.type === 'paragraph') {\n const paragraphNode = value?.root?.children[0] as SerializedParagraphNode\n\n if (!paragraphNode?.children || paragraphNode?.children?.length === 0) {\n hasOnlyEmptyParagraph = true\n } else if (paragraphNode?.children?.length === 1) {\n const paragraphNodeChild = paragraphNode?.children[0]\n if (paragraphNodeChild?.type === 'text') {\n if (!(paragraphNodeChild as SerializedTextNode | undefined)?.['text']?.length) {\n hasOnlyEmptyParagraph = true\n }\n }\n }\n }\n }\n\n if (hasOnlyEmptyParagraph) {\n return false\n }\n\n return true\n}\n"],"mappings":"AAEA;;;;GAKA,OAAO,SAASA,QACdC,KAA+C;EAE/C,MAAMC,WAAA,GAAc,CAAC,CAACD,KAAA,EAAOE,IAAA,EAAMC,QAAA,EAAUC,MAAA;EAC7C,IAAI,CAACH,WAAA,EAAa;IAChB,OAAO;EACT;EAEA,IAAII,qBAAA,GAAwB;EAC5B,IAAIL,KAAA,EAAOE,IAAA,EAAMC,QAAA,EAAUC,MAAA,KAAW,GAAG;IACvC,IAAIJ,KAAA,EAAOE,IAAA,EAAMC,QAAQ,CAAC,EAAE,EAAEG,IAAA,KAAS,aAAa;MAClD,MAAMC,aAAA,GAAgBP,KAAA,EAAOE,IAAA,EAAMC,QAAQ,CAAC,EAAE;MAE9C,IAAI,CAACI,aAAA,EAAeJ,QAAA,IAAYI,aAAA,EAAeJ,QAAA,EAAUC,MAAA,KAAW,GAAG;QACrEC,qBAAA,GAAwB;MAC1B,OAAO,IAAIE,aAAA,EAAeJ,QAAA,EAAUC,MAAA,KAAW,GAAG;QAChD,MAAMI,kBAAA,GAAqBD,aAAA,EAAeJ,QAAQ,CAAC,EAAE;QACrD,IAAIK,kBAAA,EAAoBF,IAAA,KAAS,QAAQ;UACvC,IAAI,CAAEE,kBAAA,GAAwD,OAAO,EAAEJ,MAAA,EAAQ;YAC7EC,qBAAA,GAAwB;UAC1B;QACF;MACF;IACF;EACF;EAEA,IAAIA,qBAAA,EAAuB;IACzB,OAAO;EACT;EAEA,OAAO;AACT","ignoreList":[]}
@@ -3,5 +3,5 @@ import type { RichTextField, Validate } from 'payload';
3
3
  import type { SanitizedServerEditorConfig } from '../lexical/config/types.js';
4
4
  export declare const richTextValidateHOC: ({ editorConfig, }: {
5
5
  editorConfig: SanitizedServerEditorConfig;
6
- }) => Validate<SerializedEditorState<import("lexical").SerializedLexicalNode>, unknown, unknown, RichTextField>;
6
+ }) => Validate<SerializedEditorState, unknown, unknown, RichTextField>;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAiCA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,qEAiCA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "4.0.0-internal.e7d4ebc",
3
+ "version": "4.0.0-internal.ea6e8f8",
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.52.0",
421
+ "@lexical/headless": "0.52.0",
422
+ "@lexical/html": "0.52.0",
423
+ "@lexical/link": "0.52.0",
424
+ "@lexical/list": "0.52.0",
425
+ "@lexical/mark": "0.52.0",
426
+ "@lexical/markdown": "0.52.0",
427
+ "@lexical/react": "0.52.0",
428
+ "@lexical/rich-text": "0.52.0",
429
+ "@lexical/selection": "0.52.0",
430
+ "@lexical/table": "0.52.0",
431
+ "@lexical/utils": "0.52.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.52.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/ui": "4.0.0-internal.e7d4ebc",
373
- "@payloadcms/translations": "4.0.0-internal.e7d4ebc"
446
+ "@payloadcms/translations": "4.0.0-internal.ea6e8f8",
447
+ "@payloadcms/ui": "4.0.0-internal.ea6e8f8"
374
448
  },
375
449
  "devDependencies": {
376
450
  "@babel/cli": "7.27.2",
@@ -378,26 +452,26 @@
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.52.0",
382
456
  "@types/escape-html": "1.0.4",
383
457
  "@types/json-schema": "7.0.15",
384
458
  "@types/node": "24.12.3",
385
- "@types/react": "19.2.14",
386
- "@types/react-dom": "19.2.3",
459
+ "@types/react": "19.3.0",
460
+ "@types/react-dom": "19.3.0",
387
461
  "babel-plugin-react-compiler": "19.1.0-rc.3",
388
462
  "babel-plugin-transform-remove-imports": "^1.8.0",
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
466
  "@payloadcms/eslint-config": "3.28.0",
393
- "payload": "4.0.0-internal.e7d4ebc"
467
+ "payload": "4.0.0-internal.ea6e8f8"
394
468
  },
395
469
  "peerDependencies": {
396
- "@faceless-ui/modal": "3.0.1",
470
+ "@faceless-ui/modal": "3.0.2",
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.e7d4ebc"
474
+ "payload": "4.0.0-internal.ea6e8f8"
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":[]}