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

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 (611) hide show
  1. package/dist/exports/client/Field-334JNLRF.js +2 -0
  2. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  3. package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
  4. package/dist/exports/client/chunk-BEKGION5.js +2 -0
  5. package/dist/exports/client/chunk-BEKGION5.js.map +7 -0
  6. package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
  7. package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
  8. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  9. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  10. package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
  11. package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
  12. package/dist/exports/client/chunk-SE5IITBK.js +2 -0
  13. package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
  14. package/dist/exports/client/component-QENB4QTS.js +2 -0
  15. package/dist/exports/client/component-QENB4QTS.js.map +7 -0
  16. package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
  17. package/dist/exports/client/index.d.ts +1 -1
  18. package/dist/exports/client/index.d.ts.map +1 -1
  19. package/dist/exports/client/index.js +26 -26
  20. package/dist/exports/client/index.js.map +4 -4
  21. package/dist/features/align/client/index.js.map +1 -1
  22. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  23. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  24. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  25. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  26. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  27. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  28. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  29. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  30. package/dist/features/blocks/client/component/index.d.ts +0 -6
  31. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  32. package/dist/features/blocks/client/component/index.js +199 -109
  33. package/dist/features/blocks/client/component/index.js.map +1 -1
  34. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  35. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  36. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  37. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  38. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  39. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  40. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  41. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  42. package/dist/features/blocks/client/componentInline/index.css +0 -1
  43. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  44. package/dist/features/blocks/client/componentInline/index.js +32 -30
  45. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  46. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  47. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  48. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  49. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  50. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  51. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  52. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  53. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  54. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
  55. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  56. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  57. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  58. package/dist/features/blocks/server/index.js +2 -2
  59. package/dist/features/blocks/server/index.js.map +1 -1
  60. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  62. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  63. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  64. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  65. package/dist/features/blocks/server/schema.d.ts +2 -0
  66. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  67. package/dist/features/blocks/server/schema.js +7 -9
  68. package/dist/features/blocks/server/schema.js.map +1 -1
  69. package/dist/features/blocks/server/validate.js +1 -1
  70. package/dist/features/blocks/server/validate.js.map +1 -1
  71. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  72. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  73. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  74. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  75. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  76. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  77. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  78. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  79. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  80. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  81. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  82. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  84. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  85. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  86. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  87. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  90. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  91. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  92. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  93. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  94. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  95. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  96. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  97. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  98. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  99. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  100. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  101. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  102. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  103. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  104. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  105. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  106. package/dist/features/heading/client/index.js.map +1 -1
  107. package/dist/features/heading/constants.d.ts +2 -0
  108. package/dist/features/heading/constants.d.ts.map +1 -0
  109. package/dist/features/heading/constants.js +2 -0
  110. package/dist/features/heading/constants.js.map +1 -0
  111. package/dist/features/heading/server/index.d.ts.map +1 -1
  112. package/dist/features/heading/server/index.js +5 -1
  113. package/dist/features/heading/server/index.js.map +1 -1
  114. package/dist/features/heading/server/validate.d.ts +6 -0
  115. package/dist/features/heading/server/validate.d.ts.map +1 -0
  116. package/dist/features/heading/server/validate.js +15 -0
  117. package/dist/features/heading/server/validate.js.map +1 -0
  118. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
  119. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  120. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  121. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  122. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  123. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  124. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  125. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  126. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  127. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  128. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  129. package/dist/features/horizontalRule/server/schema.js +6 -5
  130. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  131. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  132. package/dist/features/indent/client/IndentPlugin.js +122 -1
  133. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  134. package/dist/features/indent/client/index.d.ts.map +1 -1
  135. package/dist/features/indent/client/index.js +0 -2
  136. package/dist/features/indent/client/index.js.map +1 -1
  137. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  138. package/dist/features/indent/server/i18n.js +74 -37
  139. package/dist/features/indent/server/i18n.js.map +1 -1
  140. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  141. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  142. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +18 -7
  143. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  144. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -2
  145. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  146. package/dist/features/link/markdownTransformer.js +2 -2
  147. package/dist/features/link/markdownTransformer.js.map +1 -1
  148. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  149. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  150. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  151. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  152. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  153. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  154. package/dist/features/link/nodes/LinkNode.js +2 -15
  155. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  156. package/dist/features/link/server/baseFields.js.map +1 -1
  157. package/dist/features/link/server/index.js +2 -2
  158. package/dist/features/link/server/index.js.map +1 -1
  159. package/dist/features/link/server/validate.js +1 -1
  160. package/dist/features/link/server/validate.js.map +1 -1
  161. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  162. package/dist/features/lists/checklist/server/index.js +5 -2
  163. package/dist/features/lists/checklist/server/index.js.map +1 -1
  164. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  165. package/dist/features/lists/orderedList/server/index.js +5 -2
  166. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  167. package/dist/features/lists/shared/constants.d.ts +2 -0
  168. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  169. package/dist/features/lists/shared/constants.js +2 -0
  170. package/dist/features/lists/shared/constants.js.map +1 -0
  171. package/dist/features/lists/shared/schema.d.ts.map +1 -1
  172. package/dist/features/lists/shared/schema.js.map +1 -1
  173. package/dist/features/lists/shared/validate.d.ts +5 -0
  174. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  175. package/dist/features/lists/shared/validate.js +15 -0
  176. package/dist/features/lists/shared/validate.js.map +1 -0
  177. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  178. package/dist/features/lists/unorderedList/server/index.js +5 -2
  179. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  180. package/dist/features/relationship/client/components/index.css +3 -6
  181. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  182. package/dist/features/relationship/client/index.d.ts +2 -2
  183. package/dist/features/relationship/client/index.d.ts.map +1 -1
  184. package/dist/features/relationship/client/index.js.map +1 -1
  185. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  186. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  187. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  188. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  189. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  190. package/dist/features/relationship/client/plugins/index.js +27 -31
  191. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  192. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  193. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  194. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  195. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  196. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  197. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  198. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  199. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  200. package/dist/features/relationship/server/index.d.ts +8 -1
  201. package/dist/features/relationship/server/index.d.ts.map +1 -1
  202. package/dist/features/relationship/server/index.js +28 -11
  203. package/dist/features/relationship/server/index.js.map +1 -1
  204. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  205. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  206. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  207. package/dist/features/relationship/server/schema.d.ts +3 -2
  208. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  209. package/dist/features/relationship/server/schema.js +9 -12
  210. package/dist/features/relationship/server/schema.js.map +1 -1
  211. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  212. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  213. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  214. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  215. package/dist/features/table/client/index.d.ts.map +1 -0
  216. package/dist/features/table/client/index.js.map +1 -0
  217. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  218. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  219. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  220. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  221. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +1 -2
  222. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  223. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  224. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  225. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  226. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +47 -24
  227. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  228. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  229. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  230. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  231. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  232. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  233. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  234. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +54 -18
  235. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  236. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  237. package/dist/features/table/client/utils/debounce.js.map +1 -0
  238. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  239. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  240. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  241. package/dist/features/table/markdownTransformer.js.map +1 -0
  242. package/dist/features/table/server/index.d.ts +3 -0
  243. package/dist/features/table/server/index.d.ts.map +1 -0
  244. package/dist/features/{experimental_table → table}/server/index.js +4 -4
  245. package/dist/features/table/server/index.js.map +1 -0
  246. package/dist/features/table/server/schema.d.ts.map +1 -0
  247. package/dist/features/table/server/schema.js.map +1 -0
  248. package/dist/features/textState/defaultColors.js +1 -1
  249. package/dist/features/textState/defaultColors.js.map +1 -1
  250. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  251. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  252. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  253. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  254. package/dist/features/toolbars/fixed/client/Toolbar/index.css +77 -3
  255. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  256. package/dist/features/toolbars/fixed/client/Toolbar/index.js +145 -71
  257. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  258. package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
  259. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  260. package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
  261. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  262. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  263. package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
  264. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  265. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  266. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
  267. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  268. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -14
  269. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  270. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
  271. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  272. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  273. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  274. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  275. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  276. package/dist/features/typesServer.d.ts +17 -12
  277. package/dist/features/typesServer.d.ts.map +1 -1
  278. package/dist/features/typesServer.js.map +1 -1
  279. package/dist/features/upload/client/component/index.css +0 -2
  280. package/dist/features/upload/client/component/index.js +2 -1
  281. package/dist/features/upload/client/component/index.js.map +1 -1
  282. package/dist/features/upload/client/drawer/index.js.map +1 -1
  283. package/dist/features/upload/client/index.d.ts +3 -2
  284. package/dist/features/upload/client/index.d.ts.map +1 -1
  285. package/dist/features/upload/client/index.js.map +1 -1
  286. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  287. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  288. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  289. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  290. package/dist/features/upload/client/plugin/index.js +50 -53
  291. package/dist/features/upload/client/plugin/index.js.map +1 -1
  292. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  293. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  294. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  295. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  296. package/dist/features/upload/server/index.d.ts +7 -3
  297. package/dist/features/upload/server/index.d.ts.map +1 -1
  298. package/dist/features/upload/server/index.js +20 -16
  299. package/dist/features/upload/server/index.js.map +1 -1
  300. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  301. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  302. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  303. package/dist/features/upload/server/schema.d.ts +4 -16
  304. package/dist/features/upload/server/schema.d.ts.map +1 -1
  305. package/dist/features/upload/server/schema.js +8 -10
  306. package/dist/features/upload/server/schema.js.map +1 -1
  307. package/dist/features/upload/server/validate.d.ts +2 -2
  308. package/dist/features/upload/server/validate.d.ts.map +1 -1
  309. package/dist/features/upload/server/validate.js +4 -1
  310. package/dist/features/upload/server/validate.js.map +1 -1
  311. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  312. package/dist/field/Diff/converters/listitem/index.js +2 -1
  313. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  314. package/dist/field/Diff/converters/relationship/index.css +0 -1
  315. package/dist/field/Diff/converters/unknown/index.css +0 -1
  316. package/dist/field/Diff/converters/upload/index.css +0 -1
  317. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  318. package/dist/field/Diff/index.css +0 -2
  319. package/dist/field/Diff/index.d.ts +3 -2
  320. package/dist/field/Diff/index.d.ts.map +1 -1
  321. package/dist/field/Diff/index.js +3 -2
  322. package/dist/field/Diff/index.js.map +1 -1
  323. package/dist/field/Field.d.ts.map +1 -1
  324. package/dist/field/Field.js +8 -1
  325. package/dist/field/Field.js.map +1 -1
  326. package/dist/field/RenderLexical/index.d.ts +3 -1
  327. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  328. package/dist/field/RenderLexical/index.js +23 -23
  329. package/dist/field/RenderLexical/index.js.map +1 -1
  330. package/dist/field/ViewSelector.d.ts.map +1 -1
  331. package/dist/field/ViewSelector.js +13 -4
  332. package/dist/field/ViewSelector.js.map +1 -1
  333. package/dist/field/bundled.css +1 -1
  334. package/dist/field/index.css +10 -11
  335. package/dist/field/index.js.map +1 -1
  336. package/dist/field/rscEntry.d.ts +2 -2
  337. package/dist/field/rscEntry.d.ts.map +1 -1
  338. package/dist/field/rscEntry.js.map +1 -1
  339. package/dist/i18n.d.ts.map +1 -1
  340. package/dist/i18n.js +112 -0
  341. package/dist/i18n.js.map +1 -1
  342. package/dist/index.d.ts +5 -5
  343. package/dist/index.d.ts.map +1 -1
  344. package/dist/index.js +27 -5
  345. package/dist/index.js.map +1 -1
  346. package/dist/lexical/LexicalEditor.css +21 -10
  347. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  348. package/dist/lexical/LexicalEditor.js +61 -64
  349. package/dist/lexical/LexicalEditor.js.map +1 -1
  350. package/dist/lexical/config/server/loader.d.ts +1 -1
  351. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  352. package/dist/lexical/config/server/loader.js +2 -2
  353. package/dist/lexical/config/server/loader.js.map +1 -1
  354. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  355. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  356. package/dist/lexical/config/server/sanitize.js +2 -2
  357. package/dist/lexical/config/server/sanitize.js.map +1 -1
  358. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  359. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  360. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  361. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  362. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  363. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  364. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  365. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  366. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  367. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  368. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  369. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  370. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +236 -108
  371. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  372. package/dist/lexical/plugins/SlashMenu/index.css +0 -2
  373. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  374. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  375. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  376. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  377. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  378. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +17 -0
  379. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  380. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +139 -37
  381. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  382. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  383. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  384. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  385. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  386. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  387. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  388. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  389. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  390. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  391. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  392. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  393. package/dist/lexical/theme/EditorTheme.css +0 -2
  394. package/dist/lexical/ui/ContentEditable.css +0 -4
  395. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  396. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  397. package/dist/lexical/ui/ContentEditable.js +32 -11
  398. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  399. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  400. package/dist/lexical/ui/icons/H3/index.js +13 -6
  401. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  402. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  403. package/dist/lexical/ui/icons/H4/index.js +13 -6
  404. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  405. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  406. package/dist/lexical/ui/icons/H5/index.js +13 -6
  407. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  408. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  409. package/dist/lexical/ui/icons/H6/index.js +13 -6
  410. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  411. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  412. package/dist/lexical/utils/nodeFormat.js +0 -2
  413. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  414. package/dist/lexical/utils/url.d.ts.map +1 -1
  415. package/dist/lexical/utils/url.js +1 -1
  416. package/dist/lexical/utils/url.js.map +1 -1
  417. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  418. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  419. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  420. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  421. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  422. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  423. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  424. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  425. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  426. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  427. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  428. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  429. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  430. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  431. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  432. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  433. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  434. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  435. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  436. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  437. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  438. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  439. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  440. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  441. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  442. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  443. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  444. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  445. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  446. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  447. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  448. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  449. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  450. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  451. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  452. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  453. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  454. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  455. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  456. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  457. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  458. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  459. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  460. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  461. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  462. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  463. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  464. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  465. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  466. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  467. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  468. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  469. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  470. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  471. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  472. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  473. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  474. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  475. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  476. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  477. package/dist/populateGraphQL/populate.js.map +1 -1
  478. package/dist/presets/llmInstructions.d.ts +2 -0
  479. package/dist/presets/llmInstructions.d.ts.map +1 -0
  480. package/dist/presets/llmInstructions.js +13 -0
  481. package/dist/presets/llmInstructions.js.map +1 -0
  482. package/dist/types/builtInNodes.d.ts +1 -1
  483. package/dist/types/builtInNodes.d.ts.map +1 -1
  484. package/dist/types/builtInNodes.js +8 -3
  485. package/dist/types/builtInNodes.js.map +1 -1
  486. package/dist/types/index.d.ts +4 -7
  487. package/dist/types/index.d.ts.map +1 -1
  488. package/dist/types/index.js.map +1 -1
  489. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  490. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  491. package/dist/types/jsonSchemaHelpers.js +7 -2
  492. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  493. package/dist/types/nodeTypes.d.ts +6 -1
  494. package/dist/types/nodeTypes.d.ts.map +1 -1
  495. package/dist/types/nodeTypes.js.map +1 -1
  496. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  497. package/dist/utilities/buildEditorState.js.map +1 -1
  498. package/dist/utilities/buildInitialState.d.ts +3 -2
  499. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  500. package/dist/utilities/buildInitialState.js +1 -0
  501. package/dist/utilities/buildInitialState.js.map +1 -1
  502. package/dist/utilities/createServerFeature.d.ts +1 -1
  503. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  504. package/dist/utilities/createServerFeature.js +2 -2
  505. package/dist/utilities/createServerFeature.js.map +1 -1
  506. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  507. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  508. package/dist/utilities/editorConfigFactory.js +9 -9
  509. package/dist/utilities/editorConfigFactory.js.map +1 -1
  510. package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
  511. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  512. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  513. package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -9
  514. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  515. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
  516. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  517. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  518. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  519. package/dist/utilities/generateImportMap.d.ts +2 -2
  520. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  521. package/dist/utilities/generateImportMap.js.map +1 -1
  522. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  523. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  524. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  525. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  526. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  527. package/dist/utilities/initLexicalFeatures.js +38 -4
  528. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  529. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  530. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  531. package/dist/utilities/useLexicalFeature.js +15 -6
  532. package/dist/utilities/useLexicalFeature.js.map +1 -1
  533. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  534. package/dist/validate/hasText.d.ts +2 -2
  535. package/dist/validate/hasText.d.ts.map +1 -1
  536. package/dist/validate/hasText.js.map +1 -1
  537. package/dist/validate/index.d.ts +1 -1
  538. package/dist/validate/index.d.ts.map +1 -1
  539. package/package.json +125 -54
  540. package/dist/dependencyChecker.spec.js +0 -16
  541. package/dist/dependencyChecker.spec.js.map +0 -1
  542. package/dist/exports/client/Field-QGSHF22S.js +0 -2
  543. package/dist/exports/client/Field-QGSHF22S.js.map +0 -7
  544. package/dist/exports/client/bundled.css +0 -1
  545. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  546. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  547. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  548. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  549. package/dist/exports/client/chunk-X3D4LZS7.js +0 -2
  550. package/dist/exports/client/chunk-X3D4LZS7.js.map +0 -7
  551. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  552. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  553. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  554. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  555. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  556. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  557. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  558. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  559. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  560. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  561. package/dist/features/experimental_table/client/index.js.map +0 -1
  562. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  563. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  564. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  565. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  566. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  567. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  568. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  569. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  570. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  571. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  572. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  573. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  574. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  575. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  576. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  577. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  578. package/dist/features/experimental_table/server/index.d.ts +0 -3
  579. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  580. package/dist/features/experimental_table/server/index.js.map +0 -1
  581. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  582. package/dist/features/experimental_table/server/schema.js.map +0 -1
  583. package/dist/features/link/markdownTransformer.spec.js +0 -195
  584. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  585. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  586. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  587. package/dist/lexical/utils/url.spec.js +0 -114
  588. package/dist/lexical/utils/url.spec.js.map +0 -1
  589. package/dist/utilities/jsx/jsx.spec.js +0 -178
  590. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  591. /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
  592. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-AU7IBNY7.js.map} +0 -0
  593. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  594. /package/dist/features/{experimental_table → table}/client/index.js +0 -0
  595. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  596. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  597. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  598. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  599. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  600. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  601. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  602. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  603. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  604. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  605. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  606. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  607. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  608. /package/dist/features/{experimental_table → table}/markdownTransformer.d.ts +0 -0
  609. /package/dist/features/{experimental_table → table}/markdownTransformer.js +0 -0
  610. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  611. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"initLexicalFeatures.js","names":["getFromImportMap","initLexicalFeatures","args","clientFeatures","resolvedFeatureMapArray","sanitizedEditorConfig","resolvedFeatureMap","sort","a","b","order","featureClientSchemaMap","featureClientImportMap","featureKey","resolvedFeature","ClientFeaturePayloadComponent","ClientFeature","clientFeatureProvider","importMap","payload","PayloadComponent","schemaPath","silent","clientFeatureProps","key","clientProps","generateSchemaMap","featureSchemaPath","entry","clientFieldSchemaMap","entries","startsWith","fields","componentImports","Array","isArray","payloadComponent","Object","resolvedComponent"],"sources":["../../src/utilities/initLexicalFeatures.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\n\nimport { type ClientFieldSchemaMap, type FieldSchemaMap, type Payload } from 'payload'\nimport { getFromImportMap } from 'payload/shared'\n\nimport type {\n BaseClientFeatureProps,\n FeatureProviderProviderClient,\n} from '../features/typesClient.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type { FeatureClientSchemaMap, LexicalRichTextFieldProps } from '../types/index.js'\ntype Args = {\n clientFieldSchemaMap: ClientFieldSchemaMap\n fieldSchemaMap: FieldSchemaMap\n i18n: I18nClient\n path: string\n payload: Payload\n sanitizedEditorConfig: SanitizedServerEditorConfig\n schemaPath: string\n}\n\nexport function initLexicalFeatures(args: Args): {\n clientFeatures: LexicalRichTextFieldProps['clientFeatures']\n featureClientImportMap: Record<string, any>\n featureClientSchemaMap: FeatureClientSchemaMap\n} {\n const clientFeatures: LexicalRichTextFieldProps['clientFeatures'] = {}\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = [...args.sanitizedEditorConfig.resolvedFeatureMap].sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n const featureClientSchemaMap: FeatureClientSchemaMap = {}\n\n /**\n * All modules added to the import map, keyed by the provided key, if feature.componentImports with type object is used\n */\n const featureClientImportMap: Record<string, any> | undefined = {}\n\n for (const [featureKey, resolvedFeature] of resolvedFeatureMapArray) {\n clientFeatures[featureKey] = {}\n\n /**\n * Handle client features\n */\n const ClientFeaturePayloadComponent = resolvedFeature.ClientFeature\n\n if (ClientFeaturePayloadComponent) {\n const clientFeatureProvider = getFromImportMap<FeatureProviderProviderClient>({\n importMap: args.payload.importMap,\n PayloadComponent: ClientFeaturePayloadComponent,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n\n if (!clientFeatureProvider) {\n continue\n }\n\n const clientFeatureProps: BaseClientFeatureProps<Record<string, any>> =\n resolvedFeature.clientFeatureProps ?? {}\n clientFeatureProps.featureKey = resolvedFeature.key\n clientFeatureProps.order = resolvedFeature.order\n if (\n typeof ClientFeaturePayloadComponent === 'object' &&\n ClientFeaturePayloadComponent.clientProps\n ) {\n clientFeatureProps.clientProps = ClientFeaturePayloadComponent.clientProps\n }\n // As clientFeatureProvider is a client function, we cannot execute it on the server here. Thus, the client will have to execute clientFeatureProvider with its props\n clientFeatures[featureKey] = { clientFeatureProps, clientFeatureProvider }\n }\n\n /**\n * Handle sub-fields (formstate of those)\n */\n // The args.fieldSchemaMap generated before in buildFormState should contain all of lexical features' sub-field schemas\n // as well, as it already called feature.generateSchemaMap for each feature.\n // We will check for the existance resolvedFeature.generateSchemaMap to skip unnecessary loops for constructing featureSchemaMap, but we don't run it here\n if (resolvedFeature.generateSchemaMap) {\n const featureSchemaPath = `${args.schemaPath}.lexical_internal_feature.${featureKey}`\n\n featureClientSchemaMap[featureKey] = {}\n\n // Like args.fieldSchemaMap, we only want to include the sub-fields of the current feature\n for (const [key, entry] of args.clientFieldSchemaMap.entries()) {\n if (key.startsWith(featureSchemaPath)) {\n featureClientSchemaMap[featureKey][key] = 'fields' in entry ? entry.fields : [entry]\n }\n }\n }\n\n if (\n resolvedFeature.componentImports &&\n typeof resolvedFeature.componentImports === 'object' &&\n !Array.isArray(resolvedFeature.componentImports)\n ) {\n for (const [key, payloadComponent] of Object.entries(resolvedFeature.componentImports)) {\n const resolvedComponent = getFromImportMap({\n importMap: args.payload.importMap,\n PayloadComponent: payloadComponent,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n\n featureClientImportMap[`${resolvedFeature.key}.${key}`] = resolvedComponent\n }\n }\n }\n return {\n clientFeatures,\n featureClientImportMap,\n featureClientSchemaMap,\n }\n}\n"],"mappings":"AAGA,SAASA,gBAAgB,QAAQ;AAkBjC,OAAO,SAASC,oBAAoBC,IAAU;EAK5C,MAAMC,cAAA,GAA8D,CAAC;EAErE;EACA,MAAMC,uBAAA,GAA0B,C,GAAIF,IAAA,CAAKG,qBAAqB,CAACC,kBAAkB,CAAC,CAACC,IAAI,CACrF,CAACC,CAAA,EAAGC,CAAA,KAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;EAGnC,MAAMC,sBAAA,GAAiD,CAAC;EAExD;;;EAGA,MAAMC,sBAAA,GAA0D,CAAC;EAEjE,KAAK,MAAM,CAACC,UAAA,EAAYC,eAAA,CAAgB,IAAIV,uBAAA,EAAyB;IACnED,cAAc,CAACU,UAAA,CAAW,GAAG,CAAC;IAE9B;;;IAGA,MAAME,6BAAA,GAAgCD,eAAA,CAAgBE,aAAa;IAEnE,IAAID,6BAAA,EAA+B;MACjC,MAAME,qBAAA,GAAwBjB,gBAAA,CAAgD;QAC5EkB,SAAA,EAAWhB,IAAA,CAAKiB,OAAO,CAACD,SAAS;QACjCE,gBAAA,EAAkBL,6BAAA;QAClBM,UAAA,EAAY;QACZC,MAAA,EAAQ;MACV;MAEA,IAAI,CAACL,qBAAA,EAAuB;QAC1B;MACF;MAEA,MAAMM,kBAAA,GACJT,eAAA,CAAgBS,kBAAkB,IAAI,CAAC;MACzCA,kBAAA,CAAmBV,UAAU,GAAGC,eAAA,CAAgBU,GAAG;MACnDD,kBAAA,CAAmBb,KAAK,GAAGI,eAAA,CAAgBJ,KAAK;MAChD,IACE,OAAOK,6BAAA,KAAkC,YACzCA,6BAAA,CAA8BU,WAAW,EACzC;QACAF,kBAAA,CAAmBE,WAAW,GAAGV,6BAAA,CAA8BU,WAAW;MAC5E;MACA;MACAtB,cAAc,CAACU,UAAA,CAAW,GAAG;QAAEU,kBAAA;QAAoBN;MAAsB;IAC3E;IAEA;;MAAA,CAGA;IACA;IACA;IACA,IAAIH,eAAA,CAAgBY,iBAAiB,EAAE;MACrC,MAAMC,iBAAA,GAAoB,GAAGzB,IAAA,CAAKmB,UAAU,6BAA6BR,UAAA,EAAY;MAErFF,sBAAsB,CAACE,UAAA,CAAW,GAAG,CAAC;MAEtC;MACA,KAAK,MAAM,CAACW,GAAA,EAAKI,KAAA,CAAM,IAAI1B,IAAA,CAAK2B,oBAAoB,CAACC,OAAO,IAAI;QAC9D,IAAIN,GAAA,CAAIO,UAAU,CAACJ,iBAAA,GAAoB;UACrChB,sBAAsB,CAACE,UAAA,CAAW,CAACW,GAAA,CAAI,GAAG,YAAYI,KAAA,GAAQA,KAAA,CAAMI,MAAM,GAAG,CAACJ,KAAA,CAAM;QACtF;MACF;IACF;IAEA,IACEd,eAAA,CAAgBmB,gBAAgB,IAChC,OAAOnB,eAAA,CAAgBmB,gBAAgB,KAAK,YAC5C,CAACC,KAAA,CAAMC,OAAO,CAACrB,eAAA,CAAgBmB,gBAAgB,GAC/C;MACA,KAAK,MAAM,CAACT,GAAA,EAAKY,gBAAA,CAAiB,IAAIC,MAAA,CAAOP,OAAO,CAAChB,eAAA,CAAgBmB,gBAAgB,GAAG;QACtF,MAAMK,iBAAA,GAAoBtC,gBAAA,CAAiB;UACzCkB,SAAA,EAAWhB,IAAA,CAAKiB,OAAO,CAACD,SAAS;UACjCE,gBAAA,EAAkBgB,gBAAA;UAClBf,UAAA,EAAY;UACZC,MAAA,EAAQ;QACV;QAEAV,sBAAsB,CAAC,GAAGE,eAAA,CAAgBU,GAAG,IAAIA,GAAA,EAAK,CAAC,GAAGc,iBAAA;MAC5D;IACF;EACF;EACA,OAAO;IACLnC,cAAA;IACAS,sBAAA;IACAD;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"initLexicalFeatures.js","names":["getFromImportMap","initLexicalFeatures","args","clientFeatures","resolvedFeatureMapArray","sanitizedEditorConfig","resolvedFeatureMap","sort","a","b","order","featureClientSchemaMap","featureClientImportMap","featureKey","resolvedFeature","ClientFeaturePayloadComponent","ClientFeature","clientFeatureProvider","importMap","payload","PayloadComponent","schemaPath","silent","clientFeatureProps","key","clientProps","generateSchemaMap","featureSchemaPath","featureEntries","getFeatureEntriesByPath","clientFieldSchemaMap","get","Map","entry","fields","componentImports","Array","isArray","payloadComponent","Object","entries","resolvedComponent","FEATURE_PATH_SEGMENT","featureEntriesCache","WeakMap","cachedEntriesByPath","entriesByPath","segmentIndex","indexOf","featureKeyStart","length","featureKeyEnd","featurePath","slice","set"],"sources":["../../src/utilities/initLexicalFeatures.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\n\nimport { type ClientFieldSchemaMap, type FieldSchemaMap, type Payload } from 'payload'\nimport { getFromImportMap } from 'payload/shared'\n\nimport type {\n BaseClientFeatureProps,\n FeatureProviderProviderClient,\n} from '../features/typesClient.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type { FeatureClientSchemaMap, LexicalRichTextFieldProps } from '../types/index.js'\ntype Args = {\n clientFieldSchemaMap: ClientFieldSchemaMap\n fieldSchemaMap: FieldSchemaMap\n i18n: I18nClient\n path: string\n payload: Payload\n sanitizedEditorConfig: SanitizedServerEditorConfig\n schemaPath: string\n}\n\nexport function initLexicalFeatures(args: Args): {\n clientFeatures: LexicalRichTextFieldProps['clientFeatures']\n featureClientImportMap: Record<string, any>\n featureClientSchemaMap: FeatureClientSchemaMap\n} {\n const clientFeatures: LexicalRichTextFieldProps['clientFeatures'] = {}\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = [...args.sanitizedEditorConfig.resolvedFeatureMap].sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n const featureClientSchemaMap: FeatureClientSchemaMap = {}\n\n /**\n * All modules added to the import map, keyed by the provided key, if feature.componentImports with type object is used\n */\n const featureClientImportMap: Record<string, any> | undefined = {}\n\n for (const [featureKey, resolvedFeature] of resolvedFeatureMapArray) {\n clientFeatures[featureKey] = {}\n\n /**\n * Handle client features\n */\n const ClientFeaturePayloadComponent = resolvedFeature.ClientFeature\n\n if (ClientFeaturePayloadComponent) {\n const clientFeatureProvider = getFromImportMap<FeatureProviderProviderClient>({\n importMap: args.payload.importMap,\n PayloadComponent: ClientFeaturePayloadComponent,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n\n if (!clientFeatureProvider) {\n continue\n }\n\n const clientFeatureProps: BaseClientFeatureProps<Record<string, any>> =\n resolvedFeature.clientFeatureProps ?? {}\n clientFeatureProps.featureKey = resolvedFeature.key\n clientFeatureProps.order = resolvedFeature.order\n if (\n typeof ClientFeaturePayloadComponent === 'object' &&\n ClientFeaturePayloadComponent.clientProps\n ) {\n clientFeatureProps.clientProps = ClientFeaturePayloadComponent.clientProps\n }\n // As clientFeatureProvider is a client function, we cannot execute it on the server here. Thus, the client will have to execute clientFeatureProvider with its props\n clientFeatures[featureKey] = { clientFeatureProps, clientFeatureProvider }\n }\n\n /**\n * Handle sub-fields (formstate of those)\n */\n // The args.fieldSchemaMap generated before in buildFormState should contain all of lexical features' sub-field schemas\n // as well, as it already called feature.generateSchemaMap for each feature.\n // We will check for the existance resolvedFeature.generateSchemaMap to skip unnecessary loops for constructing featureSchemaMap, but we don't run it here\n if (resolvedFeature.generateSchemaMap) {\n const featureSchemaPath = `${args.schemaPath}.lexical_internal_feature.${featureKey}`\n\n featureClientSchemaMap[featureKey] = {}\n\n // Like args.fieldSchemaMap, we only want to include the sub-fields of the current feature\n const featureEntries: ClientFieldSchemaMap =\n getFeatureEntriesByPath({ clientFieldSchemaMap: args.clientFieldSchemaMap }).get(\n featureSchemaPath,\n ) ?? new Map()\n\n for (const [key, entry] of featureEntries) {\n featureClientSchemaMap[featureKey][key] = 'fields' in entry ? entry.fields : [entry]\n }\n }\n\n if (\n resolvedFeature.componentImports &&\n typeof resolvedFeature.componentImports === 'object' &&\n !Array.isArray(resolvedFeature.componentImports)\n ) {\n for (const [key, payloadComponent] of Object.entries(resolvedFeature.componentImports)) {\n const resolvedComponent = getFromImportMap({\n importMap: args.payload.importMap,\n PayloadComponent: payloadComponent,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n\n featureClientImportMap[`${resolvedFeature.key}.${key}`] = resolvedComponent\n }\n }\n }\n return {\n clientFeatures,\n featureClientImportMap,\n featureClientSchemaMap,\n }\n}\n\nconst FEATURE_PATH_SEGMENT = '.lexical_internal_feature.'\n\nconst featureEntriesCache = new WeakMap<ClientFieldSchemaMap, Map<string, ClientFieldSchemaMap>>()\n\n/**\n * Groups the client field schema map entries by the lexical feature they belong to,\n * so each rich text field does not have to scan the whole client field schema map.\n */\nfunction getFeatureEntriesByPath({\n clientFieldSchemaMap,\n}: {\n clientFieldSchemaMap: ClientFieldSchemaMap\n}): Map<string, ClientFieldSchemaMap> {\n const cachedEntriesByPath = featureEntriesCache.get(clientFieldSchemaMap)\n\n if (cachedEntriesByPath) {\n return cachedEntriesByPath\n }\n\n const entriesByPath = new Map<string, ClientFieldSchemaMap>()\n\n for (const [key, entry] of clientFieldSchemaMap) {\n let segmentIndex = key.indexOf(FEATURE_PATH_SEGMENT)\n\n // An entry of a rich text field nested in a feature also belongs to each outer feature\n while (segmentIndex !== -1) {\n const featureKeyStart = segmentIndex + FEATURE_PATH_SEGMENT.length\n const featureKeyEnd = key.indexOf('.', featureKeyStart)\n const featurePath = featureKeyEnd === -1 ? key : key.slice(0, featureKeyEnd)\n\n let featureEntries = entriesByPath.get(featurePath)\n\n if (!featureEntries) {\n featureEntries = new Map()\n entriesByPath.set(featurePath, featureEntries)\n }\n\n featureEntries.set(key, entry)\n\n segmentIndex = key.indexOf(FEATURE_PATH_SEGMENT, featureKeyStart)\n }\n }\n\n featureEntriesCache.set(clientFieldSchemaMap, entriesByPath)\n\n return entriesByPath\n}\n"],"mappings":"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","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,20 +1,29 @@
1
1
  'use client';
2
2
 
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { useAddClientFunction } from '@payloadcms/ui';
4
5
  import { useEditorConfigContext } from '../lexical/config/client/EditorConfigProvider.js';
5
6
  export const useLexicalFeature = (featureKey, feature) => {
7
+ const $ = _c(1);
6
8
  const {
7
9
  fieldProps: t0
8
10
  } = useEditorConfigContext();
9
11
  const {
10
12
  schemaPath: schemaPathFromFieldProps
11
13
  } = t0;
12
- const tableCell = {
13
- cellProps: {
14
- schemaPath: []
15
- }
16
- };
17
- const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath ? tableCell?.cellProps?.schemaPath.join(".") : null;
14
+ let t1;
15
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
16
+ const tableCell = {
17
+ cellProps: {
18
+ schemaPath: []
19
+ }
20
+ };
21
+ t1 = tableCell?.cellProps?.schemaPath ? tableCell?.cellProps?.schemaPath.join(".") : null;
22
+ $[0] = t1;
23
+ } else {
24
+ t1 = $[0];
25
+ }
26
+ const schemaPathFromCellProps = t1;
18
27
  const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps;
19
28
  useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature);
20
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalFeature.js","names":["useAddClientFunction","useEditorConfigContext","useLexicalFeature","featureKey","feature","fieldProps","t0","schemaPath","schemaPathFromFieldProps","tableCell","cellProps","schemaPathFromCellProps","join"],"sources":["../../src/utilities/useLexicalFeature.tsx"],"sourcesContent":["'use client'\n\nimport { useAddClientFunction } from '@payloadcms/ui'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\n\nimport { useEditorConfigContext } from '../lexical/config/client/EditorConfigProvider.js'\n\nexport const useLexicalFeature = <ClientFeatureProps,>(\n featureKey: string,\n feature: FeatureProviderClient<ClientFeatureProps>,\n) => {\n const {\n fieldProps: { schemaPath: schemaPathFromFieldProps },\n } = useEditorConfigContext()\n const tableCell = { cellProps: { schemaPath: [] } } // TODO: get tableCell from props\n // const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n ? tableCell?.cellProps?.schemaPath.join('.')\n : null\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature)\n}\n"],"mappings":"AAAA;;AAEA,SAASA,oBAAoB,QAAQ;AAIrC,SAASC,sBAAsB,QAAQ;AAEvC,OAAO,MAAMC,iBAAA,GAAoBA,CAAAC,UAAA,EAAAC,OAAA;EAI/B;IAAAC,UAAA,EAAAC;EAAA,IAEIL,sBAAA;EADU;IAAAM,UAAA,EAAAC;EAAA,IAAAF,EAAwC;EAEtD,MAAAG,SAAA;IAAAC,SAAA;MAAAH,UAAA;IAAA;EAAA;EAGA,MAAAI,uBAAA,GAAgCF,SAAA,EAAAC,SAAA,EAAAH,UAAA,GAC5BE,SAAA,EAAAC,SAAA,EAAAH,UAAA,CAAAK,IAAA,CAAsC,WACtC;EAEJ,MAAAL,UAAA,GAAmBI,uBAAA,IAA2BH,wBAAA;EAE9CR,oBAAA,CAAqB,kBAAkBO,UAAA,IAAcJ,UAAA,EAAY,EAAEC,OAAA;AAAA,CACrE","ignoreList":[]}
1
+ {"version":3,"file":"useLexicalFeature.js","names":["c","_c","useAddClientFunction","useEditorConfigContext","useLexicalFeature","featureKey","feature","$","fieldProps","t0","schemaPath","schemaPathFromFieldProps","t1","Symbol","for","tableCell","cellProps","join","schemaPathFromCellProps"],"sources":["../../src/utilities/useLexicalFeature.tsx"],"sourcesContent":["'use client'\n\nimport { useAddClientFunction } from '@payloadcms/ui'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\n\nimport { useEditorConfigContext } from '../lexical/config/client/EditorConfigProvider.js'\n\nexport const useLexicalFeature = <ClientFeatureProps,>(\n featureKey: string,\n feature: FeatureProviderClient<ClientFeatureProps>,\n) => {\n const {\n fieldProps: { schemaPath: schemaPathFromFieldProps },\n } = useEditorConfigContext()\n const tableCell = { cellProps: { schemaPath: [] } } // TODO: get tableCell from props\n // const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n ? tableCell?.cellProps?.schemaPath.join('.')\n : null\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature)\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAEA,SAASC,oBAAoB,QAAQ;AAIrC,SAASC,sBAAsB,QAAQ;AAEvC,OAAO,MAAMC,iBAAA,GAAoBA,CAAAC,UAAA,EAAAC,OAAA;EAAA,MAAAC,CAAA,GAAAN,EAAA;EAI/B;IAAAO,UAAA,EAAAC;EAAA,IAEIN,sBAAA;EADU;IAAAO,UAAA,EAAAC;EAAA,IAAAF,EAAwC;EAAA,IAAAG,EAAA;EAAA,IAAAL,CAAA,QAAAM,MAAA,CAAAC,GAAA;IAEtD,MAAAC,SAAA,GAAkB;MAAAC,SAAA,EAAa;QAAAN,UAAA,EAAc;MAAG;IAAE;IAGlBE,EAAA,GAAAG,SAAA,EAAAC,SAAsB,EAAAN,UAElD,GADAK,SAAA,EAAAC,SAAsB,EAAAN,UAAW,CAAAO,IAAK,IACtC,IAF4B,IAE5B;IAAAV,CAAA,MAAAK,EAAA;EAAA;IAAAA,EAAA,GAAAL,CAAA;EAAA;EAFJ,MAAAW,uBAAA,GAAgCN,EAE5B;EAEJ,MAAAF,UAAA,GAAmBQ,uBAA2B,IAA3BP,wBAA2B;EAE9CT,oBAAA,CAAqB,kBAAkBQ,UAAA,IAAcL,UAAA,EAAY,EAAEC,OAAA;AAAA,CACrE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useRunDeprioritized.js","names":["c","_c","useCallback","useRef","useRunDeprioritized","t0","$","timeout","undefined","idleHandleRef","t1","fn","Promise","resolve","exec","window","current","cancelIdleCallback","requestIdleCallback","interactionResponse","then","runDeprioritized","setTimeout","requestAnimationFrame"],"sources":["../../src/utilities/useRunDeprioritized.ts"],"sourcesContent":["'use client'\nimport { useCallback, useRef } from 'react'\n\n/**\n * Simple hook that lets you run any callback once the main thread is idle\n * (via `requestIdleCallback`) or when that API is missing (Safari) - after the\n * next animation frame (`interactionResponse`).\n *\n * This will help you to avoid blocking the main thread with heavy work.\n *\n * The latest invocation wins: if a new run is queued before the previous one\n * executes, the previous task is cancelled.\n *\n * Usage:\n * ```ts\n * const runDeprioritized = useRunDeprioritized();\n *\n * const onEditorChange = (state: EditorState) => {\n * runDeprioritized(() => {\n * // heavy work here …\n * });\n * };\n * ```\n *\n * @param timeout Optional timeout (ms) for `requestIdleCallback`; defaults to 500 ms.\n * @returns A `runDeprioritized(fn)` helper.\n */\n\nexport function useRunDeprioritized(timeout = 500) {\n const idleHandleRef = useRef<number>(undefined)\n\n /**\n * Schedule `fn` and resolve when it has executed.\n */\n const runDeprioritized = useCallback(\n (fn: () => void): Promise<void> => {\n return new Promise<void>((resolve) => {\n const exec = () => {\n fn()\n resolve()\n }\n\n if ('requestIdleCallback' in window) {\n // Cancel any previously queued task so only the latest runs.\n if ('cancelIdleCallback' in window && idleHandleRef.current !== undefined) {\n // Cancel earlier scheduled value updates,\n // so that a CPU-limited event loop isn't flooded with n callbacks for n keystrokes into the rich text field,\n // but that there's only ever the latest one state update\n // dispatch task, to be executed with the next idle time,\n // or the deadline of 500ms.\n cancelIdleCallback(idleHandleRef.current)\n }\n // Schedule the state update to happen the next time the browser has sufficient resources,\n // or the latest after 500ms.\n idleHandleRef.current = requestIdleCallback(exec, { timeout })\n } else {\n // Safari fallback: rAF + setTimeout shim.\n void interactionResponse().then(exec)\n }\n })\n },\n [timeout],\n )\n\n return runDeprioritized\n}\n\nfunction interactionResponse(): Promise<unknown> {\n // Taken from https://github.com/vercel-labs/await-interaction-response/tree/main/packages/await-interaction-response/src\n\n return new Promise((resolve) => {\n setTimeout(resolve, 100) // Fallback for the case where the animation frame never fires.\n requestAnimationFrame(() => {\n setTimeout(resolve, 0)\n })\n })\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AACA,SAASC,WAAW,EAAEC,MAAM,QAAQ;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,SAAAC,oBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EAA6B,MAAAM,OAAA,GAAAF,EAAa,KAAAG,SAAA,SAAbH,EAAa;EAC/C,MAAAI,aAAA,GAAsBN,MAAA,CAAAK,SAAe;EAAA,IAAAE,EAAA;EAAA,IAAAJ,CAAA,QAAAC,OAAA;IAMnCG,EAAA,GAAAC,EAAA,QAAAC,OAAA,CAAAC,OAAA;MAEI,MAAAC,IAAA,GAAAA,CAAA;QACEH,EAAA;QACAE,OAAA;MAAA;MACF,IAEI,yBAAAE,MAAyB;QAAA,IAEvB,wBAAAA,MAAwB,IAAUN,aAAA,CAAAO,OAAA,KAAAR,SAA0B;UAM9DS,kBAAA,CAAmBR,aAAA,CAAAO,OAAqB;QAAA;QAI1CP,aAAA,CAAAO,OAAA,GAAwBE,mBAAA,CAAoBJ,IAAA;UAAAP;QAAA,CAAgB;MAAA;QAGvDY,mBAAA,GAAAC,IAAA,CAA2BN,IAAA;MAAA;IAAA;IAGtCR,CAAA,MAAAC,OAAA;IAAAD,CAAA,MAAAI,EAAA;EAAA;IAAAA,EAAA,GAAAJ,CAAA;EAAA;EA1BF,MAAAe,gBAAA,GAAyBX,EA2Bd;EAAA,OAGJW,gBAAA;AAAA;AAGT,SAASF,oBAAA;EACP;EAEA,OAAO,IAAIP,OAAA,CAASC,OAAA;IAClBS,UAAA,CAAWT,OAAA,EAAS,MAAK;IACzBU,qBAAA,CAAsB;MACpBD,UAAA,CAAWT,OAAA,EAAS;IACtB;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"useRunDeprioritized.js","names":["c","_c","useCallback","useRef","useRunDeprioritized","t0","$","timeout","undefined","idleHandleRef","t1","fn","Promise","resolve","exec","window","current","cancelIdleCallback","requestIdleCallback","interactionResponse","then","runDeprioritized","setTimeout","requestAnimationFrame"],"sources":["../../src/utilities/useRunDeprioritized.ts"],"sourcesContent":["'use client'\nimport { useCallback, useRef } from 'react'\n\n/**\n * Simple hook that lets you run any callback once the main thread is idle\n * (via `requestIdleCallback`) or when that API is missing (Safari) - after the\n * next animation frame (`interactionResponse`).\n *\n * This will help you to avoid blocking the main thread with heavy work.\n *\n * The latest invocation wins: if a new run is queued before the previous one\n * executes, the previous task is cancelled.\n *\n * Usage:\n * ```ts\n * const runDeprioritized = useRunDeprioritized();\n *\n * const onEditorChange = (state: EditorState) => {\n * runDeprioritized(() => {\n * // heavy work here …\n * });\n * };\n * ```\n *\n * @param timeout Optional timeout (ms) for `requestIdleCallback`; defaults to 500 ms.\n * @returns A `runDeprioritized(fn)` helper.\n */\n\nexport function useRunDeprioritized(timeout = 500) {\n const idleHandleRef = useRef<number>(undefined)\n\n /**\n * Schedule `fn` and resolve when it has executed.\n */\n const runDeprioritized = useCallback(\n (fn: () => void): Promise<void> => {\n return new Promise<void>((resolve) => {\n const exec = () => {\n fn()\n resolve()\n }\n\n if ('requestIdleCallback' in window) {\n // Cancel any previously queued task so only the latest runs.\n if ('cancelIdleCallback' in window && idleHandleRef.current !== undefined) {\n // Cancel earlier scheduled value updates,\n // so that a CPU-limited event loop isn't flooded with n callbacks for n keystrokes into the rich text field,\n // but that there's only ever the latest one state update\n // dispatch task, to be executed with the next idle time,\n // or the deadline of 500ms.\n cancelIdleCallback(idleHandleRef.current)\n }\n // Schedule the state update to happen the next time the browser has sufficient resources,\n // or the latest after 500ms.\n idleHandleRef.current = requestIdleCallback(exec, { timeout })\n } else {\n // Safari fallback: rAF + setTimeout shim.\n void interactionResponse().then(exec)\n }\n })\n },\n [timeout],\n )\n\n return runDeprioritized\n}\n\nfunction interactionResponse(): Promise<unknown> {\n // Taken from https://github.com/vercel-labs/await-interaction-response/tree/main/packages/await-interaction-response/src\n\n return new Promise((resolve) => {\n setTimeout(resolve, 100) // Fallback for the case where the animation frame never fires.\n requestAnimationFrame(() => {\n setTimeout(resolve, 0)\n })\n })\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AACA,SAASC,WAAW,EAAEC,MAAM,QAAQ;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,SAAAC,oBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EAA6B,MAAAM,OAAA,GAAAF,EAAa,KAAbG,SAAa,GAAb,GAAa,GAAbH,EAAa;EAC/C,MAAAI,aAAA,GAAsBN,MAAA,CAAeK,SAAA;EAAA,IAAAE,EAAA;EAAA,IAAAJ,CAAA,QAAAC,OAAA;IAMnCG,EAAA,GAAAC,EAAA,IACS,IAAIC,OAAA,CAAcC,OAAA;MACvB,MAAAC,IAAA,GAAaA,CAAA;QACXH,EAAA;QACAE,OAAA;MAAA,CACF;MAEA,IAAI,yBAAyBE,MAAA;QAE3B,IAAI,wBAAwBA,MAAoC,IAA1BN,aAAA,CAAAO,OAAqB,KAAKR,SAAA;UAM9DS,kBAAA,CAAmBR,aAAA,CAAAO,OAAqB;QAAA;QAI1CP,aAAA,CAAAO,OAAA,GAAwBE,mBAAA,CAAoBJ,IAAA,EAAM;UAAAP;QAAU,EAAvC;MAAA;QAGhBY,mBAAA,GAAAC,IAA0B,CAACN,IAAA;MAAA;IAClC,CACF,CACF;IAAAR,CAAA,MAAAC,OAAA;IAAAD,CAAA,MAAAI,EAAA;EAAA;IAAAA,EAAA,GAAAJ,CAAA;EAAA;EA1BF,MAAAe,gBAAA,GAAyBX,EA2Bd;EAAA,OAGJW,gBAAA;AAAA;AAGT,SAASF,oBAAA;EACP;EAEA,OAAO,IAAIP,OAAA,CAASC,OAAA;IAClBS,UAAA,CAAWT,OAAA,EAAS,MAAK;IACzBU,qBAAA,CAAsB;MACpBD,UAAA,CAAWT,OAAA,EAAS;IACtB;EACF;AACF","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,13 +1,8 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "4.0.0-internal.e7d4ebc",
3
+ "version": "4.0.0-internal.ee5d8bd",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/payloadcms/payload.git",
9
- "directory": "packages/richtext-lexical"
10
- },
11
6
  "license": "MIT",
12
7
  "author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
13
8
  "maintainers": [
@@ -17,11 +12,20 @@
17
12
  "url": "https://payloadcms.com"
18
13
  }
19
14
  ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/payloadcms/payload.git",
18
+ "directory": "packages/richtext-lexical"
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "type": "module",
20
24
  "sideEffects": [
21
- "*.scss",
22
25
  "*.css"
23
26
  ],
24
- "type": "module",
27
+ "main": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
25
29
  "exports": {
26
30
  ".": {
27
31
  "import": "./dist/index.js",
@@ -113,6 +117,11 @@
113
117
  "types": "./dist/lexical-proxy/@lexical-utils.d.ts",
114
118
  "default": "./dist/lexical-proxy/@lexical-utils.js"
115
119
  },
120
+ "./lexical/react/ExtensionComponent": {
121
+ "import": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js",
122
+ "types": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts",
123
+ "default": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js"
124
+ },
116
125
  "./lexical/react/LexicalAutoEmbedPlugin": {
117
126
  "import": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js",
118
127
  "types": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts",
@@ -178,6 +187,16 @@
178
187
  "types": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts",
179
188
  "default": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.js"
180
189
  },
190
+ "./lexical/react/LexicalExtensionComposer": {
191
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js",
192
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts",
193
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js"
194
+ },
195
+ "./lexical/react/LexicalExtensionEditorComposer": {
196
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js",
197
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts",
198
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js"
199
+ },
181
200
  "./lexical/react/LexicalNodeContextMenuPlugin": {
182
201
  "import": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js",
183
202
  "types": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.d.ts",
@@ -268,6 +287,11 @@
268
287
  "types": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts",
269
288
  "default": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js"
270
289
  },
290
+ "./lexical/react/LexicalSelectionAlwaysOnDisplay": {
291
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js",
292
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts",
293
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js"
294
+ },
271
295
  "./lexical/react/LexicalTabIndentationPlugin": {
272
296
  "import": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js",
273
297
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts",
@@ -293,11 +317,56 @@
293
317
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts",
294
318
  "default": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js"
295
319
  },
320
+ "./lexical/react/ReactExtension": {
321
+ "import": "./dist/lexical-proxy/@lexical-react/ReactExtension.js",
322
+ "types": "./dist/lexical-proxy/@lexical-react/ReactExtension.d.ts",
323
+ "default": "./dist/lexical-proxy/@lexical-react/ReactExtension.js"
324
+ },
325
+ "./lexical/react/ReactPluginHostExtension": {
326
+ "import": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js",
327
+ "types": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts",
328
+ "default": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js"
329
+ },
330
+ "./lexical/react/ReactProviderExtension": {
331
+ "import": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js",
332
+ "types": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts",
333
+ "default": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js"
334
+ },
335
+ "./lexical/react/TreeViewExtension": {
336
+ "import": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js",
337
+ "types": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts",
338
+ "default": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js"
339
+ },
340
+ "./lexical/react/useExtensionComponent": {
341
+ "import": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js",
342
+ "types": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts",
343
+ "default": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js"
344
+ },
345
+ "./lexical/react/useExtensionSignalValue": {
346
+ "import": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js",
347
+ "types": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts",
348
+ "default": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js"
349
+ },
350
+ "./lexical/react/useLexicalAriaLiveRegion": {
351
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js",
352
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts",
353
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js"
354
+ },
296
355
  "./lexical/react/useLexicalEditable": {
297
356
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js",
298
357
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts",
299
358
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js"
300
359
  },
360
+ "./lexical/react/useLexicalFocusManagerRef": {
361
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js",
362
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts",
363
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js"
364
+ },
365
+ "./lexical/react/useLexicalFocusTrapRef": {
366
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js",
367
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts",
368
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js"
369
+ },
301
370
  "./lexical/react/useLexicalIsTextContentEmpty": {
302
371
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js",
303
372
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts",
@@ -308,6 +377,16 @@
308
377
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts",
309
378
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js"
310
379
  },
380
+ "./lexical/react/useLexicalRovingTabIndexRef": {
381
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js",
382
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts",
383
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js"
384
+ },
385
+ "./lexical/react/useLexicalSlotRef": {
386
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js",
387
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts",
388
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js"
389
+ },
311
390
  "./lexical/react/useLexicalSubscription": {
312
391
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.js",
313
392
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts",
@@ -329,48 +408,38 @@
329
408
  "default": "./dist/exports/shared.js"
330
409
  }
331
410
  },
332
- "main": "./dist/index.js",
333
- "types": "./dist/index.d.ts",
334
- "files": [
335
- "dist"
336
- ],
337
- "lint-staged": {
338
- "**/package.json": "sort-package-json",
339
- "*.{md,mdx,yml,json}": "prettier --write",
340
- "*.{js,jsx,ts,tsx}": [
341
- "eslint --flag v10_config_lookup_from_file --cache --fix",
342
- "prettier --write"
343
- ]
411
+ "publishConfig": {
412
+ "registry": "https://registry.npmjs.org/"
344
413
  },
345
414
  "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",
415
+ "@lexical/clipboard": "0.52.0",
416
+ "@lexical/headless": "0.52.0",
417
+ "@lexical/html": "0.52.0",
418
+ "@lexical/link": "0.52.0",
419
+ "@lexical/list": "0.52.0",
420
+ "@lexical/mark": "0.52.0",
421
+ "@lexical/markdown": "0.52.0",
422
+ "@lexical/react": "0.52.0",
423
+ "@lexical/rich-text": "0.52.0",
424
+ "@lexical/selection": "0.52.0",
425
+ "@lexical/table": "0.52.0",
426
+ "@lexical/utils": "0.52.0",
427
+ "@payloadcms/translations": "4.0.0-internal.ee5d8bd",
428
+ "@payloadcms/ui": "4.0.0-internal.ee5d8bd",
358
429
  "acorn": "8.16.0",
359
430
  "bson-objectid": "2.0.4",
360
431
  "csstype": "3.2.3",
361
432
  "dequal": "2.0.3",
362
433
  "escape-html": "1.0.3",
363
434
  "jsox": "1.2.125",
364
- "lexical": "0.45.0",
435
+ "lexical": "0.52.0",
365
436
  "mdast-util-from-markdown": "2.0.3",
366
437
  "mdast-util-mdx-jsx": "3.2.0",
367
438
  "micromark-extension-mdx-jsx": "3.0.2",
368
439
  "qs-esm": "8.0.1",
369
440
  "react-error-boundary": "6.1.1",
370
441
  "ts-essentials": "10.0.3",
371
- "uuid": "14.0.0",
372
- "@payloadcms/ui": "4.0.0-internal.e7d4ebc",
373
- "@payloadcms/translations": "4.0.0-internal.e7d4ebc"
442
+ "uuid": "14.0.0"
374
443
  },
375
444
  "devDependencies": {
376
445
  "@babel/cli": "7.27.2",
@@ -378,32 +447,36 @@
378
447
  "@babel/preset-env": "7.27.2",
379
448
  "@babel/preset-react": "7.27.1",
380
449
  "@babel/preset-typescript": "7.27.1",
381
- "@lexical/eslint-plugin": "0.45.0",
450
+ "@lexical/eslint-plugin": "0.52.0",
382
451
  "@types/escape-html": "1.0.4",
383
452
  "@types/json-schema": "7.0.15",
384
453
  "@types/node": "24.12.3",
385
- "@types/react": "19.2.14",
386
- "@types/react-dom": "19.2.3",
387
- "babel-plugin-react-compiler": "19.1.0-rc.3",
454
+ "@types/react": "19.3.0",
455
+ "@types/react-dom": "19.3.0",
456
+ "babel-plugin-react-compiler": "1.0.0",
388
457
  "babel-plugin-transform-remove-imports": "^1.8.0",
389
458
  "esbuild": "0.27.1",
390
459
  "esbuild-sass-plugin": "3.3.1",
391
- "swc-plugin-transform-remove-imports": "8.3.0",
392
- "@payloadcms/eslint-config": "3.28.0",
393
- "payload": "4.0.0-internal.e7d4ebc"
460
+ "payload": "4.0.0-internal.ee5d8bd",
461
+ "swc-plugin-transform-remove-imports": "8.3.0"
394
462
  },
395
463
  "peerDependencies": {
396
- "@faceless-ui/modal": "3.0.1",
464
+ "@faceless-ui/modal": "3.0.2",
397
465
  "@faceless-ui/scroll-info": "2.0.0",
466
+ "payload": "4.0.0-internal.ee5d8bd",
398
467
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
399
- "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
400
- "payload": "4.0.0-internal.e7d4ebc"
468
+ "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1"
401
469
  },
402
- "engines": {
403
- "node": ">=24.15.0"
470
+ "lint-staged": {
471
+ "*.{cjs,css,cts,graphql,html,json,jsonc,md,mdx,mjs,mts,scss,toml,yaml,yml}": "oxfmt --no-error-on-unmatched-pattern",
472
+ ".swcrc": "oxfmt --no-error-on-unmatched-pattern",
473
+ "*.{js,jsx,ts,tsx}": [
474
+ "oxlint -c ../../oxlint.config.ts --fix --no-error-on-unmatched-pattern",
475
+ "oxfmt --no-error-on-unmatched-pattern"
476
+ ]
404
477
  },
405
- "publishConfig": {
406
- "registry": "https://registry.npmjs.org/"
478
+ "engines": {
479
+ "node": ">=24.22.1"
407
480
  },
408
481
  "scripts": {
409
482
  "build": "pnpm build:reactcompiler",
@@ -419,9 +492,7 @@
419
492
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
420
493
  "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
494
  "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/",
424
- "lint": "eslint .",
425
- "lint:fix": "eslint . --fix"
495
+ "copyfiles": "copyfiles -u 1 -e \"**/*.spec.*\" \"src/**/*.{html,css,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
496
+ "copyfiles:debug": "copyfiles -u 1 -e \"**/*.spec.*\" \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/"
426
497
  }
427
498
  }
@@ -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":[]}