@payloadcms/richtext-lexical 4.0.0-internal.5d5a2b2 → 4.0.0-internal.5e065b3

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 (764) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-MT4FK3IP.js +2 -0
  3. package/dist/exports/client/Field-MT4FK3IP.js.map +7 -0
  4. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  5. package/dist/exports/client/chunk-3LRZDIIG.js.map +7 -0
  6. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  7. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  8. package/dist/exports/client/chunk-ATPSL6IX.js +2 -0
  9. package/dist/exports/client/chunk-ATPSL6IX.js.map +7 -0
  10. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  11. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  12. package/dist/exports/client/componentInline-ZEP5JPTC.js +2 -0
  13. package/dist/exports/client/index.d.ts +1 -3
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +27 -28
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  18. package/dist/features/blockquote/client/index.js +2 -2
  19. package/dist/features/blockquote/client/index.js.map +1 -1
  20. package/dist/features/blockquote/server/index.js +2 -2
  21. package/dist/features/blockquote/server/index.js.map +1 -1
  22. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  23. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  24. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  25. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  26. package/dist/features/blocks/client/component/index.css +2 -2
  27. package/dist/features/blocks/client/component/index.d.ts +0 -6
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +169 -100
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  32. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  33. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  34. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  35. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  36. package/dist/features/blocks/client/componentInline/index.css +8 -9
  37. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  38. package/dist/features/blocks/client/componentInline/index.js +32 -23
  39. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  40. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  41. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  42. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  43. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  44. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  45. package/dist/features/blocks/client/index.d.ts.map +1 -1
  46. package/dist/features/blocks/client/index.js +4 -2
  47. package/dist/features/blocks/client/index.js.map +1 -1
  48. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  49. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  50. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  51. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  52. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  53. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  54. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  55. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  56. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  57. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  58. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  59. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  60. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  62. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  63. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  64. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  65. package/dist/features/blocks/server/index.d.ts.map +1 -1
  66. package/dist/features/blocks/server/index.js +6 -8
  67. package/dist/features/blocks/server/index.js.map +1 -1
  68. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  69. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  70. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  71. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  72. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  73. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  74. package/dist/features/blocks/server/schema.js +3 -2
  75. package/dist/features/blocks/server/schema.js.map +1 -1
  76. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  77. package/dist/features/blocks/server/validate.js +1 -1
  78. package/dist/features/blocks/server/validate.js.map +1 -1
  79. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  80. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  81. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  82. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  84. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  85. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  86. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  87. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  90. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  91. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  92. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  93. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  94. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  95. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  96. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  97. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  98. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  99. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  100. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  101. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  102. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  103. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  104. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -4
  105. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  106. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  107. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  108. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  109. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  110. package/dist/features/converters/markdownToLexical/index.js +5 -2
  111. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  112. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  113. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  114. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  115. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  116. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  117. package/dist/features/format/bold/feature.client.js +1 -1
  118. package/dist/features/format/bold/feature.client.js.map +1 -1
  119. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  120. package/dist/features/format/bold/feature.server.js +1 -1
  121. package/dist/features/format/bold/feature.server.js.map +1 -1
  122. package/dist/features/format/inlineCode/feature.client.js +1 -1
  123. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  124. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  125. package/dist/features/format/inlineCode/feature.server.js +1 -1
  126. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  127. package/dist/features/format/italic/feature.client.js +1 -1
  128. package/dist/features/format/italic/feature.client.js.map +1 -1
  129. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  130. package/dist/features/format/italic/feature.server.js +1 -1
  131. package/dist/features/format/italic/feature.server.js.map +1 -1
  132. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  133. package/dist/features/format/strikethrough/feature.client.js +1 -1
  134. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  135. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  136. package/dist/features/format/strikethrough/feature.server.js +1 -1
  137. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  138. package/dist/features/heading/client/index.js +2 -2
  139. package/dist/features/heading/client/index.js.map +1 -1
  140. package/dist/features/heading/constants.d.ts +2 -0
  141. package/dist/features/heading/constants.d.ts.map +1 -0
  142. package/dist/features/heading/constants.js +2 -0
  143. package/dist/features/heading/constants.js.map +1 -0
  144. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  145. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  146. package/dist/features/heading/markdownTransformer.js +6 -19
  147. package/dist/features/heading/markdownTransformer.js.map +1 -1
  148. package/dist/features/heading/server/index.d.ts.map +1 -1
  149. package/dist/features/heading/server/index.js +7 -3
  150. package/dist/features/heading/server/index.js.map +1 -1
  151. package/dist/features/heading/server/schema.d.ts.map +1 -1
  152. package/dist/features/heading/server/validate.d.ts +6 -0
  153. package/dist/features/heading/server/validate.d.ts.map +1 -0
  154. package/dist/features/heading/server/validate.js +15 -0
  155. package/dist/features/heading/server/validate.js.map +1 -0
  156. package/dist/features/horizontalRule/client/index.js +2 -2
  157. package/dist/features/horizontalRule/client/index.js.map +1 -1
  158. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  159. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  160. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  161. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  162. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  163. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  164. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  165. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  166. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  167. package/dist/features/horizontalRule/server/index.js +2 -2
  168. package/dist/features/horizontalRule/server/index.js.map +1 -1
  169. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  170. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  171. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  172. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  173. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  174. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  175. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  176. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  177. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  178. package/dist/features/indent/client/IndentPlugin.js +122 -1
  179. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  180. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  181. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  182. package/dist/features/indent/server/i18n.js +74 -37
  183. package/dist/features/indent/server/i18n.js.map +1 -1
  184. package/dist/features/link/client/index.js +2 -2
  185. package/dist/features/link/client/index.js.map +1 -1
  186. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  187. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  188. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +11 -8
  189. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  190. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -13
  191. package/dist/features/link/markdownTransformer.d.ts +4 -4
  192. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  193. package/dist/features/link/markdownTransformer.js +2 -2
  194. package/dist/features/link/markdownTransformer.js.map +1 -1
  195. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  196. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  197. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  198. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  199. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  200. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  201. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  202. package/dist/features/link/server/baseFields.js.map +1 -1
  203. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  204. package/dist/features/link/server/index.js +4 -4
  205. package/dist/features/link/server/index.js.map +1 -1
  206. package/dist/features/link/server/schema.d.ts.map +1 -1
  207. package/dist/features/link/server/schema.js +4 -2
  208. package/dist/features/link/server/schema.js.map +1 -1
  209. package/dist/features/link/server/validate.d.ts.map +1 -1
  210. package/dist/features/link/server/validate.js +1 -1
  211. package/dist/features/link/server/validate.js.map +1 -1
  212. package/dist/features/lists/checklist/client/index.js +1 -1
  213. package/dist/features/lists/checklist/client/index.js.map +1 -1
  214. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  215. package/dist/features/lists/checklist/server/index.js +6 -3
  216. package/dist/features/lists/checklist/server/index.js.map +1 -1
  217. package/dist/features/lists/orderedList/client/index.js +1 -1
  218. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  219. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  220. package/dist/features/lists/orderedList/server/index.js +6 -3
  221. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  222. package/dist/features/lists/shared/constants.d.ts +2 -0
  223. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  224. package/dist/features/lists/shared/constants.js +2 -0
  225. package/dist/features/lists/shared/constants.js.map +1 -0
  226. package/dist/features/lists/shared/validate.d.ts +5 -0
  227. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  228. package/dist/features/lists/shared/validate.js +15 -0
  229. package/dist/features/lists/shared/validate.js.map +1 -0
  230. package/dist/features/lists/unorderedList/client/index.js +1 -1
  231. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  232. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  233. package/dist/features/lists/unorderedList/server/index.js +6 -3
  234. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  235. package/dist/features/relationship/client/components/index.css +3 -6
  236. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  237. package/dist/features/relationship/client/index.d.ts +2 -2
  238. package/dist/features/relationship/client/index.d.ts.map +1 -1
  239. package/dist/features/relationship/client/index.js.map +1 -1
  240. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  241. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  242. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  243. package/dist/features/relationship/client/plugins/index.js +27 -31
  244. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  245. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  246. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  247. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  248. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  249. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  250. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  251. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  252. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  253. package/dist/features/relationship/server/index.d.ts +8 -1
  254. package/dist/features/relationship/server/index.d.ts.map +1 -1
  255. package/dist/features/relationship/server/index.js +28 -11
  256. package/dist/features/relationship/server/index.js.map +1 -1
  257. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  258. package/dist/features/relationship/server/schema.d.ts +5 -5
  259. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  260. package/dist/features/relationship/server/schema.js +27 -15
  261. package/dist/features/relationship/server/schema.js.map +1 -1
  262. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  263. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  264. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  265. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  266. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  267. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  268. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  269. package/dist/features/table/client/index.d.ts.map +1 -0
  270. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  271. package/dist/features/table/client/index.js.map +1 -0
  272. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  273. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  274. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  275. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  276. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -1
  277. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  278. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  279. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  280. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  281. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  282. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  283. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  284. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  285. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  286. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  287. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  288. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  289. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  290. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  291. package/dist/features/table/client/utils/debounce.js.map +1 -0
  292. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  293. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  294. package/dist/features/table/markdownTransformer.d.ts +5 -0
  295. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  296. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  297. package/dist/features/table/markdownTransformer.js.map +1 -0
  298. package/dist/features/table/server/index.d.ts +3 -0
  299. package/dist/features/table/server/index.d.ts.map +1 -0
  300. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  301. package/dist/features/table/server/index.js.map +1 -0
  302. package/dist/features/table/server/schema.d.ts.map +1 -0
  303. package/dist/features/table/server/schema.js.map +1 -0
  304. package/dist/features/textState/feature.client.js +1 -1
  305. package/dist/features/textState/feature.client.js.map +1 -1
  306. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  307. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  308. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  309. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  310. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  311. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  312. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  313. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  314. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  315. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  316. package/dist/features/toolbars/inline/client/Toolbar/index.js +2 -2
  317. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  318. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  319. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  320. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  321. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  322. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  323. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  324. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +23 -25
  325. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  326. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  327. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  328. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  329. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  330. package/dist/features/typesClient.d.ts +1 -1
  331. package/dist/features/typesClient.d.ts.map +1 -1
  332. package/dist/features/typesClient.js.map +1 -1
  333. package/dist/features/typesServer.d.ts +19 -14
  334. package/dist/features/typesServer.d.ts.map +1 -1
  335. package/dist/features/typesServer.js.map +1 -1
  336. package/dist/features/upload/client/component/index.css +9 -11
  337. package/dist/features/upload/client/component/index.js +2 -1
  338. package/dist/features/upload/client/component/index.js.map +1 -1
  339. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  340. package/dist/features/upload/client/index.d.ts +3 -2
  341. package/dist/features/upload/client/index.d.ts.map +1 -1
  342. package/dist/features/upload/client/index.js.map +1 -1
  343. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  344. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  345. package/dist/features/upload/client/plugin/index.js +53 -56
  346. package/dist/features/upload/client/plugin/index.js.map +1 -1
  347. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  348. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  349. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  350. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  351. package/dist/features/upload/server/index.d.ts +6 -2
  352. package/dist/features/upload/server/index.d.ts.map +1 -1
  353. package/dist/features/upload/server/index.js +22 -18
  354. package/dist/features/upload/server/index.js.map +1 -1
  355. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  356. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  357. package/dist/features/upload/server/markdownTransformer.js +1 -1
  358. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  359. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  360. package/dist/features/upload/server/schema.d.ts +6 -6
  361. package/dist/features/upload/server/schema.d.ts.map +1 -1
  362. package/dist/features/upload/server/schema.js +30 -14
  363. package/dist/features/upload/server/schema.js.map +1 -1
  364. package/dist/features/upload/server/validate.d.ts +2 -2
  365. package/dist/features/upload/server/validate.d.ts.map +1 -1
  366. package/dist/features/upload/server/validate.js +4 -1
  367. package/dist/features/upload/server/validate.js.map +1 -1
  368. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  369. package/dist/field/Diff/converters/listitem/index.js +2 -1
  370. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  371. package/dist/field/Diff/converters/relationship/index.css +0 -1
  372. package/dist/field/Diff/converters/unknown/index.css +1 -2
  373. package/dist/field/Diff/converters/upload/index.css +0 -1
  374. package/dist/field/Diff/index.css +0 -2
  375. package/dist/field/Diff/index.d.ts +3 -2
  376. package/dist/field/Diff/index.d.ts.map +1 -1
  377. package/dist/field/Diff/index.js +1 -0
  378. package/dist/field/Diff/index.js.map +1 -1
  379. package/dist/field/Field.d.ts.map +1 -1
  380. package/dist/field/Field.js +26 -16
  381. package/dist/field/Field.js.map +1 -1
  382. package/dist/field/RenderLexical/index.d.ts +3 -1
  383. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  384. package/dist/field/RenderLexical/index.js +23 -23
  385. package/dist/field/RenderLexical/index.js.map +1 -1
  386. package/dist/field/ViewSelector.css +1 -1
  387. package/dist/field/ViewSelector.d.ts.map +1 -1
  388. package/dist/field/ViewSelector.js +1 -0
  389. package/dist/field/ViewSelector.js.map +1 -1
  390. package/dist/field/bundled.css +1 -1
  391. package/dist/field/index.css +7 -5
  392. package/dist/i18n.d.ts.map +1 -1
  393. package/dist/i18n.js +68 -0
  394. package/dist/i18n.js.map +1 -1
  395. package/dist/index.d.ts +3 -3
  396. package/dist/index.d.ts.map +1 -1
  397. package/dist/index.js +33 -54
  398. package/dist/index.js.map +1 -1
  399. package/dist/lexical/LexicalEditor.css +30 -19
  400. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  401. package/dist/lexical/LexicalEditor.js +62 -99
  402. package/dist/lexical/LexicalEditor.js.map +1 -1
  403. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  404. package/dist/lexical/LexicalProvider.js +7 -22
  405. package/dist/lexical/LexicalProvider.js.map +1 -1
  406. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  407. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  408. package/dist/lexical/config/server/loader.d.ts +1 -1
  409. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  410. package/dist/lexical/config/server/loader.js +2 -2
  411. package/dist/lexical/config/server/loader.js.map +1 -1
  412. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  413. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  414. package/dist/lexical/config/server/sanitize.js +2 -2
  415. package/dist/lexical/config/server/sanitize.js.map +1 -1
  416. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  417. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  418. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  419. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  420. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  421. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  422. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  423. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  424. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  425. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  426. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  427. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  428. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  429. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  430. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  431. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  432. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  433. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  434. package/dist/lexical/plugins/SlashMenu/index.css +1 -7
  435. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +2 -1
  436. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  437. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  438. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  439. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +5 -3
  440. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  441. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +17 -3
  442. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  443. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  444. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  445. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  446. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  447. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  448. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  449. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  450. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  451. package/dist/lexical/theme/EditorTheme.css +18 -21
  452. package/dist/lexical/ui/ContentEditable.css +22 -17
  453. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  454. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  455. package/dist/lexical/ui/ContentEditable.js +21 -7
  456. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  457. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  458. package/dist/lexical/ui/icons/H3/index.js +13 -6
  459. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  460. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  461. package/dist/lexical/ui/icons/H4/index.js +13 -6
  462. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  463. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  464. package/dist/lexical/ui/icons/H5/index.js +13 -6
  465. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  466. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  467. package/dist/lexical/ui/icons/H6/index.js +13 -6
  468. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  469. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  470. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  471. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  472. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  473. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  474. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  475. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  476. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  477. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  478. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  479. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  480. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  481. package/dist/lexical/utils/point.d.ts.map +1 -1
  482. package/dist/lexical/utils/rect.d.ts.map +1 -1
  483. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  484. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  485. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  486. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  487. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  488. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  489. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  490. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  491. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  492. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  493. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  494. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  495. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  496. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  497. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  498. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  499. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  500. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  501. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  502. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  503. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  504. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  505. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  506. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  507. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  508. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  509. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  510. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  511. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  512. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  513. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  514. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  515. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  516. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  517. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  518. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  519. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  520. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  521. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  522. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  523. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  524. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  525. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  526. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  527. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  528. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  529. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  530. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  531. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  532. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  533. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  534. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  535. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  536. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  537. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  538. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  539. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  540. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  541. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  542. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  543. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  544. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  545. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  546. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  547. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  548. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  549. package/dist/presets/llmInstructions.d.ts +2 -0
  550. package/dist/presets/llmInstructions.d.ts.map +1 -0
  551. package/dist/presets/llmInstructions.js +13 -0
  552. package/dist/presets/llmInstructions.js.map +1 -0
  553. package/dist/types/index.d.ts +3 -3
  554. package/dist/types/index.d.ts.map +1 -1
  555. package/dist/types/index.js.map +1 -1
  556. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  557. package/dist/types/nodeTypes.d.ts +1 -1
  558. package/dist/types/nodeTypes.d.ts.map +1 -1
  559. package/dist/types/nodeTypes.js.map +1 -1
  560. package/dist/types/schema.d.ts.map +1 -1
  561. package/dist/types/schema.js +12 -5
  562. package/dist/types/schema.js.map +1 -1
  563. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  564. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  565. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  566. package/dist/utilities/buildInitialState.d.ts +3 -2
  567. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  568. package/dist/utilities/buildInitialState.js +1 -0
  569. package/dist/utilities/buildInitialState.js.map +1 -1
  570. package/dist/utilities/createServerFeature.d.ts +1 -1
  571. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  572. package/dist/utilities/createServerFeature.js +2 -2
  573. package/dist/utilities/createServerFeature.js.map +1 -1
  574. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  575. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  576. package/dist/utilities/editorConfigFactory.js +9 -9
  577. package/dist/utilities/editorConfigFactory.js.map +1 -1
  578. package/dist/utilities/fieldsDrawer/index.css +4 -4
  579. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  580. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  581. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  582. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  583. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  584. package/dist/utilities/generateImportMap.d.ts +1 -1
  585. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  586. package/dist/utilities/generateImportMap.js +3 -7
  587. package/dist/utilities/generateImportMap.js.map +1 -1
  588. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  589. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  590. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  591. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  592. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  593. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  594. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  595. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  596. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  597. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  598. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  599. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  600. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  601. package/dist/validate/hasText.d.ts +2 -2
  602. package/dist/validate/hasText.d.ts.map +1 -1
  603. package/dist/validate/hasText.js.map +1 -1
  604. package/dist/validate/index.d.ts +1 -1
  605. package/dist/validate/index.d.ts.map +1 -1
  606. package/package.json +98 -30
  607. package/dist/@types/assets.d.js +0 -2
  608. package/dist/@types/assets.d.js.map +0 -1
  609. package/dist/dependencyChecker.spec.js +0 -16
  610. package/dist/dependencyChecker.spec.js.map +0 -1
  611. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  612. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  613. package/dist/exports/client/bundled.css +0 -1
  614. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  615. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  616. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  617. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  618. package/dist/exports/client/chunk-ZYXHC5CY.js +0 -2
  619. package/dist/exports/client/chunk-ZYXHC5CY.js.map +0 -7
  620. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  621. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  622. package/dist/exports/client/componentInline-R3EPNYWF.js +0 -2
  623. package/dist/exports/server/rsc.browser.d.ts +0 -11
  624. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  625. package/dist/exports/server/rsc.browser.js +0 -10
  626. package/dist/exports/server/rsc.browser.js.map +0 -1
  627. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  628. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  629. package/dist/features/blockquote/markdownTransformer.js +0 -33
  630. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  631. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  632. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  633. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  634. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  635. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  636. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  637. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  638. package/dist/features/experimental_table/client/index.js.map +0 -1
  639. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  640. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  641. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  642. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  643. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  644. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  645. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  646. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  647. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  648. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  649. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  650. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  651. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  652. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  653. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  654. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  655. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  656. package/dist/features/experimental_table/server/index.d.ts +0 -3
  657. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  658. package/dist/features/experimental_table/server/index.js.map +0 -1
  659. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  660. package/dist/features/experimental_table/server/schema.js.map +0 -1
  661. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  662. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  663. package/dist/features/format/bold/markdownTransformers.js +0 -23
  664. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  665. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  666. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  667. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  668. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  669. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  670. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  671. package/dist/features/format/italic/markdownTransformers.js +0 -12
  672. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  673. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  674. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  675. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  676. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  677. package/dist/features/link/markdownTransformer.spec.js +0 -195
  678. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  679. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  680. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  681. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  682. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  683. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  684. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  685. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  686. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  687. package/dist/features/lists/shared/markdown.d.ts +0 -6
  688. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  689. package/dist/features/lists/shared/markdown.js +0 -57
  690. package/dist/features/lists/shared/markdown.js.map +0 -1
  691. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  692. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  693. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  694. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  695. package/dist/field/clientEntry.d.ts +0 -29
  696. package/dist/field/clientEntry.d.ts.map +0 -1
  697. package/dist/field/clientEntry.js +0 -86
  698. package/dist/field/clientEntry.js.map +0 -1
  699. package/dist/lexical/utils/guard.d.ts +0 -5
  700. package/dist/lexical/utils/guard.d.ts.map +0 -1
  701. package/dist/lexical/utils/guard.js +0 -9
  702. package/dist/lexical/utils/guard.js.map +0 -1
  703. package/dist/lexical/utils/url.spec.js +0 -114
  704. package/dist/lexical/utils/url.spec.js.map +0 -1
  705. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  706. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  707. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  708. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  709. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  710. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  711. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  712. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  713. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  714. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  715. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  716. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  717. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  718. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  719. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  720. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  721. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  722. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  723. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  724. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  725. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  726. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  727. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  728. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  729. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  730. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  731. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  732. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  733. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  734. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  735. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  736. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  737. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  738. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  739. package/dist/packages/@lexical/markdown/index.js +0 -39
  740. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  741. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  742. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  743. package/dist/packages/@lexical/markdown/utils.js +0 -267
  744. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  745. package/dist/utilities/jsx/jsx.spec.js +0 -178
  746. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  747. /package/dist/exports/client/{componentInline-R3EPNYWF.js.map → componentInline-ZEP5JPTC.js.map} +0 -0
  748. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  749. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  750. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  751. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  752. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  753. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  754. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  755. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  756. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  757. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  758. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  759. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  760. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  761. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  762. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  763. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  764. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1,195 +0,0 @@
1
- import { createHeadlessEditor } from '@lexical/headless';
2
- import { $createParagraphNode, $createTextNode, $getRoot } from 'lexical';
3
- import { describe, expect, it } from 'vitest';
4
- import { $convertToMarkdownString } from '../../packages/@lexical/markdown/index.js';
5
- import { AutoLinkNode } from './nodes/AutoLinkNode.js';
6
- import { $createLinkNode, LinkNode } from './nodes/LinkNode.js';
7
- import { LinkMarkdownTransformer, createLinkMarkdownTransformer } from './markdownTransformer.js';
8
- function createEditor() {
9
- return createHeadlessEditor({
10
- nodes: [LinkNode, AutoLinkNode]
11
- });
12
- }
13
- function toMarkdown(setupFn, transformer = LinkMarkdownTransformer) {
14
- const editor = createEditor();
15
- editor.update(setupFn, {
16
- discrete: true
17
- });
18
- let markdown = '';
19
- editor.getEditorState().read(() => {
20
- markdown = $convertToMarkdownString([transformer]);
21
- });
22
- return markdown;
23
- }
24
- describe('createLinkMarkdownTransformer', () => {
25
- describe('custom links', () => {
26
- it('should export a custom link with its url', () => {
27
- const markdown = toMarkdown(() => {
28
- const link = $createLinkNode({
29
- fields: {
30
- linkType: 'custom',
31
- url: 'https://payloadcms.com',
32
- newTab: false,
33
- doc: null
34
- }
35
- });
36
- link.append($createTextNode('Payload'));
37
- $getRoot().append($createParagraphNode().append(link));
38
- });
39
- expect(markdown).toBe('[Payload](https://payloadcms.com)');
40
- });
41
- it('should export a custom link that opens in a new tab', () => {
42
- // newTab is a Payload field — markdown has no equivalent, so it is intentionally dropped
43
- const markdown = toMarkdown(() => {
44
- const link = $createLinkNode({
45
- fields: {
46
- linkType: 'custom',
47
- url: 'https://payloadcms.com',
48
- newTab: true,
49
- doc: null
50
- }
51
- });
52
- link.append($createTextNode('Payload'));
53
- $getRoot().append($createParagraphNode().append(link));
54
- });
55
- expect(markdown).toBe('[Payload](https://payloadcms.com)');
56
- });
57
- it('should produce an empty href when url is null or undefined', () => {
58
- const markdownNull = toMarkdown(() => {
59
- const link = $createLinkNode({
60
- fields: {
61
- linkType: 'custom',
62
- url: null,
63
- newTab: false,
64
- doc: null
65
- }
66
- });
67
- link.append($createTextNode('Broken'));
68
- $getRoot().append($createParagraphNode().append(link));
69
- });
70
- const markdownUndefined = toMarkdown(() => {
71
- const link = $createLinkNode({
72
- fields: {
73
- linkType: 'custom',
74
- newTab: false,
75
- doc: null
76
- }
77
- });
78
- link.append($createTextNode('Broken'));
79
- $getRoot().append($createParagraphNode().append(link));
80
- });
81
- expect(markdownNull).toBe('[Broken]()');
82
- expect(markdownUndefined).toBe('[Broken]()');
83
- });
84
- });
85
- describe('internal links', () => {
86
- it('should export an empty href when no internalDocToHref is provided', () => {
87
- const markdown = toMarkdown(() => {
88
- const link = $createLinkNode({
89
- fields: {
90
- linkType: 'internal',
91
- doc: {
92
- relationTo: 'pages',
93
- value: {
94
- id: '1',
95
- slug: 'about'
96
- }
97
- },
98
- newTab: false
99
- }
100
- });
101
- link.append($createTextNode('About'));
102
- $getRoot().append($createParagraphNode().append(link));
103
- });
104
- expect(markdown).toBe('[About]()');
105
- });
106
- it('should call internalDocToHref and use the returned url', () => {
107
- const transformer = createLinkMarkdownTransformer({
108
- internalDocToHref: ({
109
- linkNode
110
- }) => {
111
- const value = linkNode.fields.doc?.value;
112
- if (value && typeof value === 'object' && 'slug' in value) {
113
- return `/${value.slug}`;
114
- }
115
- return '/';
116
- }
117
- });
118
- const markdown = toMarkdown(() => {
119
- const link = $createLinkNode({
120
- fields: {
121
- linkType: 'internal',
122
- doc: {
123
- relationTo: 'pages',
124
- value: {
125
- id: '1',
126
- slug: 'about'
127
- }
128
- },
129
- newTab: false
130
- }
131
- });
132
- link.append($createTextNode('About'));
133
- $getRoot().append($createParagraphNode().append(link));
134
- }, transformer);
135
- expect(markdown).toBe('[About](/about)');
136
- });
137
- it('should pass the full serialized link node to internalDocToHref', () => {
138
- let capturedLinkNode = null;
139
- const transformer = createLinkMarkdownTransformer({
140
- internalDocToHref: ({
141
- linkNode
142
- }) => {
143
- capturedLinkNode = linkNode;
144
- return '/captured';
145
- }
146
- });
147
- toMarkdown(() => {
148
- const link = $createLinkNode({
149
- fields: {
150
- linkType: 'internal',
151
- doc: {
152
- relationTo: 'pages',
153
- value: {
154
- id: '42',
155
- title: 'Home'
156
- }
157
- },
158
- newTab: true
159
- }
160
- });
161
- link.append($createTextNode('Home'));
162
- $getRoot().append($createParagraphNode().append(link));
163
- }, transformer);
164
- expect(capturedLinkNode).not.toBeNull();
165
- expect(capturedLinkNode.fields.linkType).toBe('internal');
166
- expect(capturedLinkNode.fields.doc?.relationTo).toBe('pages');
167
- expect(capturedLinkNode.fields.doc?.value).toMatchObject({
168
- id: '42',
169
- title: 'Home'
170
- });
171
- expect(capturedLinkNode.fields.newTab).toBe(true);
172
- });
173
- });
174
- describe('LinkMarkdownTransformer (static export)', () => {
175
- it('should behave identically to createLinkMarkdownTransformer() with no args', () => {
176
- const setup = () => {
177
- const link = $createLinkNode({
178
- fields: {
179
- linkType: 'custom',
180
- url: 'https://example.com',
181
- newTab: false,
182
- doc: null
183
- }
184
- });
185
- link.append($createTextNode('Example'));
186
- $getRoot().append($createParagraphNode().append(link));
187
- };
188
- const fromStatic = toMarkdown(setup, LinkMarkdownTransformer);
189
- const fromFactory = toMarkdown(setup, createLinkMarkdownTransformer());
190
- expect(fromStatic).toBe(fromFactory);
191
- expect(fromStatic).toBe('[Example](https://example.com)');
192
- });
193
- });
194
- });
195
- //# sourceMappingURL=markdownTransformer.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.spec.js","names":["createHeadlessEditor","$createParagraphNode","$createTextNode","$getRoot","describe","expect","it","$convertToMarkdownString","AutoLinkNode","$createLinkNode","LinkNode","LinkMarkdownTransformer","createLinkMarkdownTransformer","createEditor","nodes","toMarkdown","setupFn","transformer","editor","update","discrete","markdown","getEditorState","read","link","fields","linkType","url","newTab","doc","append","toBe","markdownNull","markdownUndefined","relationTo","value","id","slug","internalDocToHref","linkNode","capturedLinkNode","title","not","toBeNull","toMatchObject","setup","fromStatic","fromFactory"],"sources":["../../../src/features/link/markdownTransformer.spec.ts"],"sourcesContent":["import { createHeadlessEditor } from '@lexical/headless'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport { describe, expect, it } from 'vitest'\n\nimport { $convertToMarkdownString } from '../../packages/@lexical/markdown/index.js'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { $createLinkNode, LinkNode } from './nodes/LinkNode.js'\nimport type { SerializedLinkNode } from './server/schema.js'\nimport { LinkMarkdownTransformer, createLinkMarkdownTransformer } from './markdownTransformer.js'\n\nfunction createEditor() {\n return createHeadlessEditor({ nodes: [LinkNode, AutoLinkNode] })\n}\n\nfunction toMarkdown(setupFn: () => void, transformer = LinkMarkdownTransformer): string {\n const editor = createEditor()\n editor.update(setupFn, { discrete: true })\n let markdown = ''\n editor.getEditorState().read(() => {\n markdown = $convertToMarkdownString([transformer])\n })\n return markdown\n}\n\ndescribe('createLinkMarkdownTransformer', () => {\n describe('custom links', () => {\n it('should export a custom link with its url', () => {\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: 'https://payloadcms.com', newTab: false, doc: null },\n })\n link.append($createTextNode('Payload'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdown).toBe('[Payload](https://payloadcms.com)')\n })\n\n it('should export a custom link that opens in a new tab', () => {\n // newTab is a Payload field — markdown has no equivalent, so it is intentionally dropped\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: 'https://payloadcms.com', newTab: true, doc: null },\n })\n link.append($createTextNode('Payload'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdown).toBe('[Payload](https://payloadcms.com)')\n })\n\n it('should produce an empty href when url is null or undefined', () => {\n const markdownNull = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: null as unknown as string, newTab: false, doc: null },\n })\n link.append($createTextNode('Broken'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n const markdownUndefined = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', newTab: false, doc: null },\n })\n link.append($createTextNode('Broken'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdownNull).toBe('[Broken]()')\n expect(markdownUndefined).toBe('[Broken]()')\n })\n })\n\n describe('internal links', () => {\n it('should export an empty href when no internalDocToHref is provided', () => {\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: {\n linkType: 'internal',\n doc: { relationTo: 'pages', value: { id: '1', slug: 'about' } },\n newTab: false,\n },\n })\n link.append($createTextNode('About'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdown).toBe('[About]()')\n })\n\n it('should call internalDocToHref and use the returned url', () => {\n const transformer = createLinkMarkdownTransformer({\n internalDocToHref: ({ linkNode }) => {\n const value = linkNode.fields.doc?.value\n if (value && typeof value === 'object' && 'slug' in value) {\n return `/${value.slug}`\n }\n return '/'\n },\n })\n\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: {\n linkType: 'internal',\n doc: { relationTo: 'pages', value: { id: '1', slug: 'about' } },\n newTab: false,\n },\n })\n link.append($createTextNode('About'))\n $getRoot().append($createParagraphNode().append(link))\n }, transformer)\n\n expect(markdown).toBe('[About](/about)')\n })\n\n it('should pass the full serialized link node to internalDocToHref', () => {\n let capturedLinkNode: SerializedLinkNode | null = null\n\n const transformer = createLinkMarkdownTransformer({\n internalDocToHref: ({ linkNode }) => {\n capturedLinkNode = linkNode\n return '/captured'\n },\n })\n\n toMarkdown(() => {\n const link = $createLinkNode({\n fields: {\n linkType: 'internal',\n doc: { relationTo: 'pages', value: { id: '42', title: 'Home' } },\n newTab: true,\n },\n })\n link.append($createTextNode('Home'))\n $getRoot().append($createParagraphNode().append(link))\n }, transformer)\n\n expect(capturedLinkNode).not.toBeNull()\n expect(capturedLinkNode!.fields.linkType).toBe('internal')\n expect(capturedLinkNode!.fields.doc?.relationTo).toBe('pages')\n expect(capturedLinkNode!.fields.doc?.value).toMatchObject({ id: '42', title: 'Home' })\n expect(capturedLinkNode!.fields.newTab).toBe(true)\n })\n })\n\n describe('LinkMarkdownTransformer (static export)', () => {\n it('should behave identically to createLinkMarkdownTransformer() with no args', () => {\n const setup = () => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: 'https://example.com', newTab: false, doc: null },\n })\n link.append($createTextNode('Example'))\n $getRoot().append($createParagraphNode().append(link))\n }\n\n const fromStatic = toMarkdown(setup, LinkMarkdownTransformer)\n const fromFactory = toMarkdown(setup, createLinkMarkdownTransformer())\n\n expect(fromStatic).toBe(fromFactory)\n expect(fromStatic).toBe('[Example](https://example.com)')\n })\n })\n})\n"],"mappings":"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","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const CHECK_LIST: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/checklist/markdownTransformers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAIrG,eAAO,MAAM,UAAU,EAAE,kBAQxB,CAAA"}
@@ -1,12 +0,0 @@
1
- import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
2
- import { listExport, listReplace } from '../shared/markdown.js';
3
- export const CHECK_LIST = {
4
- type: 'element',
5
- dependencies: [ListNode, ListItemNode],
6
- export: (node, exportChildren) => {
7
- return $isListNode(node) ? listExport(node, exportChildren, 0) : null;
8
- },
9
- regExp: /^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,
10
- replace: listReplace('check')
11
- };
12
- //# sourceMappingURL=markdownTransformers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.js","names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","CHECK_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"sources":["../../../../src/features/lists/checklist/markdownTransformers.ts"],"sourcesContent":["import { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,\n replace: listReplace('check'),\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAIpD,SAASC,UAAU,EAAEC,WAAW,QAAQ;AAExC,OAAO,MAAMC,UAAA,GAAiC;EAC5CC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACL,QAAA,EAAUD,YAAA,CAAa;EACtCO,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,OAAOV,WAAA,CAAYS,IAAA,IAAQN,UAAA,CAAWM,IAAA,EAAMC,cAAA,EAAgB,KAAK;EACnE;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASR,WAAA,CAAY;AACvB","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const ORDERED_LIST: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/orderedList/markdownTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAIrG,eAAO,MAAM,YAAY,EAAE,kBAQ1B,CAAA"}
@@ -1,12 +0,0 @@
1
- import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
2
- import { listExport, listReplace } from '../shared/markdown.js';
3
- export const ORDERED_LIST = {
4
- type: 'element',
5
- dependencies: [ListNode, ListItemNode],
6
- export: (node, exportChildren) => {
7
- return $isListNode(node) ? listExport(node, exportChildren, 0) : null;
8
- },
9
- regExp: /^(\s*)(\d+)\.\s/,
10
- replace: listReplace('number')
11
- };
12
- //# sourceMappingURL=markdownTransformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","ORDERED_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"sources":["../../../../src/features/lists/orderedList/markdownTransformer.ts"],"sourcesContent":["import { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(\\d+)\\.\\s/,\n replace: listReplace('number'),\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAIpD,SAASC,UAAU,EAAEC,WAAW,QAAQ;AAExC,OAAO,MAAMC,YAAA,GAAmC;EAC9CC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACL,QAAA,EAAUD,YAAA,CAAa;EACtCO,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,OAAOV,WAAA,CAAYS,IAAA,IAAQN,UAAA,CAAWM,IAAA,EAAMC,cAAA,EAAgB,KAAK;EACnE;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASR,WAAA,CAAY;AACvB","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- import type { ListNode, ListType } from '@lexical/list';
2
- import type { ElementNode } from 'lexical';
3
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
4
- export declare const listReplace: (listType: ListType) => ElementTransformer["replace"];
5
- export declare const listExport: (listNode: ListNode, exportChildren: (node: ElementNode) => string, depth: number) => string;
6
- //# sourceMappingURL=markdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAKrG,eAAO,MAAM,WAAW,GAAI,UAAU,QAAQ,KAAG,kBAAkB,CAAC,SAAS,CA6B5E,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,UAAU,QAAQ,EAClB,gBAAgB,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAC7C,OAAO,MAAM,KACZ,MA2BF,CAAA"}
@@ -1,57 +0,0 @@
1
- // Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1
2
- import { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list';
3
- // Amount of spaces that define indentation level
4
- const LIST_INDENT_SIZE = 4;
5
- export const listReplace = listType => {
6
- return (parentNode, children, match) => {
7
- const previousNode = parentNode.getPreviousSibling();
8
- const nextNode = parentNode.getNextSibling();
9
- const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined);
10
- if ($isListNode(nextNode) && nextNode.getListType() === listType) {
11
- const firstChild = nextNode.getFirstChild();
12
- if (firstChild !== null) {
13
- firstChild.insertBefore(listItem);
14
- } else {
15
- // should never happen, but let's handle gracefully, just in case.
16
- nextNode.append(listItem);
17
- }
18
- parentNode.remove();
19
- } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {
20
- previousNode.append(listItem);
21
- parentNode.remove();
22
- } else {
23
- const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined);
24
- list.append(listItem);
25
- parentNode.replace(list);
26
- }
27
- listItem.append(...children);
28
- listItem.select(0, 0);
29
- const indent = Math.floor(match[1].length / LIST_INDENT_SIZE);
30
- if (indent) {
31
- listItem.setIndent(indent);
32
- }
33
- };
34
- };
35
- export const listExport = (listNode, exportChildren, depth) => {
36
- const output = [];
37
- const children = listNode.getChildren();
38
- let index = 0;
39
- for (const listItemNode of children) {
40
- if ($isListItemNode(listItemNode)) {
41
- if (listItemNode.getChildrenSize() === 1) {
42
- const firstChild = listItemNode.getFirstChild();
43
- if ($isListNode(firstChild)) {
44
- output.push(listExport(firstChild, exportChildren, depth + 1));
45
- continue;
46
- }
47
- }
48
- const indent = ' '.repeat(depth * LIST_INDENT_SIZE);
49
- const listType = listNode.getListType();
50
- const prefix = listType === 'number' ? `${listNode.getStart() + index}. ` : listType === 'check' ? `- [${listItemNode.getChecked() ? 'x' : ' '}] ` : '- ';
51
- output.push(indent + prefix + exportChildren(listItemNode));
52
- index++;
53
- }
54
- }
55
- return output.join('\n');
56
- };
57
- //# sourceMappingURL=markdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.js","names":["$createListItemNode","$createListNode","$isListItemNode","$isListNode","LIST_INDENT_SIZE","listReplace","listType","parentNode","children","match","previousNode","getPreviousSibling","nextNode","getNextSibling","listItem","undefined","getListType","firstChild","getFirstChild","insertBefore","append","remove","list","Number","replace","select","indent","Math","floor","length","setIndent","listExport","listNode","exportChildren","depth","output","getChildren","index","listItemNode","getChildrenSize","push","repeat","prefix","getStart","getChecked","join"],"sources":["../../../../src/features/lists/shared/markdown.ts"],"sourcesContent":["// Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1\n\nimport type { ListNode, ListType } from '@lexical/list'\nimport type { ElementNode } from 'lexical'\n\nimport { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\n// Amount of spaces that define indentation level\nconst LIST_INDENT_SIZE = 4\n\nexport const listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = Math.floor(match[1]!.length / LIST_INDENT_SIZE)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nexport const listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output: string[] = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n"],"mappings":"AAAA;AAKA,SAASA,mBAAmB,EAAEC,eAAe,EAAEC,eAAe,EAAEC,WAAW,QAAQ;AAInF;AACA,MAAMC,gBAAA,GAAmB;AAEzB,OAAO,MAAMC,WAAA,GAAeC,QAAA;EAC1B,OAAO,CAACC,UAAA,EAAYC,QAAA,EAAUC,KAAA;IAC5B,MAAMC,YAAA,GAAeH,UAAA,CAAWI,kBAAkB;IAClD,MAAMC,QAAA,GAAWL,UAAA,CAAWM,cAAc;IAC1C,MAAMC,QAAA,GAAWd,mBAAA,CAAoBM,QAAA,KAAa,UAAUG,KAAK,CAAC,EAAE,KAAK,MAAMM,SAAA;IAC/E,IAAIZ,WAAA,CAAYS,QAAA,KAAaA,QAAA,CAASI,WAAW,OAAOV,QAAA,EAAU;MAChE,MAAMW,UAAA,GAAaL,QAAA,CAASM,aAAa;MACzC,IAAID,UAAA,KAAe,MAAM;QACvBA,UAAA,CAAWE,YAAY,CAACL,QAAA;MAC1B,OAAO;QACL;QACAF,QAAA,CAASQ,MAAM,CAACN,QAAA;MAClB;MACAP,UAAA,CAAWc,MAAM;IACnB,OAAO,IAAIlB,WAAA,CAAYO,YAAA,KAAiBA,YAAA,CAAaM,WAAW,OAAOV,QAAA,EAAU;MAC/EI,YAAA,CAAaU,MAAM,CAACN,QAAA;MACpBP,UAAA,CAAWc,MAAM;IACnB,OAAO;MACL,MAAMC,IAAA,GAAOrB,eAAA,CAAgBK,QAAA,EAAUA,QAAA,KAAa,WAAWiB,MAAA,CAAOd,KAAK,CAAC,EAAE,IAAIM,SAAA;MAClFO,IAAA,CAAKF,MAAM,CAACN,QAAA;MACZP,UAAA,CAAWiB,OAAO,CAACF,IAAA;IACrB;IACAR,QAAA,CAASM,MAAM,IAAIZ,QAAA;IACnBM,QAAA,CAASW,MAAM,CAAC,GAAG;IACnB,MAAMC,MAAA,GAASC,IAAA,CAAKC,KAAK,CAACnB,KAAK,CAAC,EAAE,CAAEoB,MAAM,GAAGzB,gBAAA;IAC7C,IAAIsB,MAAA,EAAQ;MACVZ,QAAA,CAASgB,SAAS,CAACJ,MAAA;IACrB;EACF;AACF;AAEA,OAAO,MAAMK,UAAA,GAAaA,CACxBC,QAAA,EACAC,cAAA,EACAC,KAAA;EAEA,MAAMC,MAAA,GAAmB,EAAE;EAC3B,MAAM3B,QAAA,GAAWwB,QAAA,CAASI,WAAW;EACrC,IAAIC,KAAA,GAAQ;EACZ,KAAK,MAAMC,YAAA,IAAgB9B,QAAA,EAAU;IACnC,IAAIN,eAAA,CAAgBoC,YAAA,GAAe;MACjC,IAAIA,YAAA,CAAaC,eAAe,OAAO,GAAG;QACxC,MAAMtB,UAAA,GAAaqB,YAAA,CAAapB,aAAa;QAC7C,IAAIf,WAAA,CAAYc,UAAA,GAAa;UAC3BkB,MAAA,CAAOK,IAAI,CAACT,UAAA,CAAWd,UAAA,EAAYgB,cAAA,EAAgBC,KAAA,GAAQ;UAC3D;QACF;MACF;MACA,MAAMR,MAAA,GAAS,IAAIe,MAAM,CAACP,KAAA,GAAQ9B,gBAAA;MAClC,MAAME,QAAA,GAAW0B,QAAA,CAAShB,WAAW;MACrC,MAAM0B,MAAA,GACJpC,QAAA,KAAa,WACT,GAAG0B,QAAA,CAASW,QAAQ,KAAKN,KAAA,IAAS,GAClC/B,QAAA,KAAa,UACX,MAAMgC,YAAA,CAAaM,UAAU,KAAK,MAAM,OAAO,GAC/C;MACRT,MAAA,CAAOK,IAAI,CAACd,MAAA,GAASgB,MAAA,GAAST,cAAA,CAAeK,YAAA;MAC7CD,KAAA;IACF;EACF;EAEA,OAAOF,MAAA,CAAOU,IAAI,CAAC;AACrB","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const UNORDERED_LIST: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/unorderedList/markdownTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAIrG,eAAO,MAAM,cAAc,EAAE,kBAQ5B,CAAA"}
@@ -1,12 +0,0 @@
1
- import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
2
- import { listExport, listReplace } from '../shared/markdown.js';
3
- export const UNORDERED_LIST = {
4
- type: 'element',
5
- dependencies: [ListNode, ListItemNode],
6
- export: (node, exportChildren) => {
7
- return $isListNode(node) ? listExport(node, exportChildren, 0) : null;
8
- },
9
- regExp: /^(\s*)[-*+]\s/,
10
- replace: listReplace('bullet')
11
- };
12
- //# sourceMappingURL=markdownTransformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","UNORDERED_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"sources":["../../../../src/features/lists/unorderedList/markdownTransformer.ts"],"sourcesContent":["import { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const UNORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)[-*+]\\s/,\n replace: listReplace('bullet'),\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAIpD,SAASC,UAAU,EAAEC,WAAW,QAAQ;AAExC,OAAO,MAAMC,cAAA,GAAqC;EAChDC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACL,QAAA,EAAUD,YAAA,CAAa;EACtCO,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,OAAOV,WAAA,CAAYS,IAAA,IAAQN,UAAA,CAAWM,IAAA,EAAMC,cAAA,EAAgB,KAAK;EACnE;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASR,WAAA,CAAY;AACvB","ignoreList":[]}
@@ -1,29 +0,0 @@
1
- import type { ImportMap, RichTextFieldClientProps } from 'payload';
2
- import React from 'react';
3
- import type { FeatureClientSchemaMap } from '../types/index.js';
4
- type SerializedFeatureMetadata = {
5
- ClientFeature?: {
6
- clientProps?: Record<string, any>;
7
- path: string;
8
- } | string;
9
- clientFeatureProps?: Record<string, any>;
10
- componentImports?: Record<string, {
11
- clientProps?: Record<string, any>;
12
- path: string;
13
- } | string>;
14
- key: string;
15
- order: number;
16
- };
17
- export type ClientEntryLexicalFieldProps = {
18
- featureClientSchemaMap?: FeatureClientSchemaMap;
19
- features?: Record<string, SerializedFeatureMetadata>;
20
- importMap: ImportMap;
21
- } & RichTextFieldClientProps;
22
- /**
23
- * Client-only entry point for the Lexical rich text field.
24
- * Resolves feature providers and component imports from the import map on the client,
25
- * bypassing the RSC entry point that requires server-only data.
26
- */
27
- export declare const ClientEntryLexicalField: React.FC<ClientEntryLexicalFieldProps>;
28
- export {};
29
- //# sourceMappingURL=clientEntry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientEntry.d.ts","sourceRoot":"","sources":["../../src/field/clientEntry.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAuB,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAGvF,OAAO,KAAkB,MAAM,OAAO,CAAA;AAMtC,OAAO,KAAK,EAAE,sBAAsB,EAA6B,MAAM,mBAAmB,CAAA;AAI1F,KAAK,yBAAyB,GAAG;IAC/B,aAAa,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAA;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,CAAA;IAC/F,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAA;IACpD,SAAS,EAAE,SAAS,CAAA;CACrB,GAAG,wBAAwB,CAAA;AAE5B;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAqF1E,CAAA"}
@@ -1,86 +0,0 @@
1
- 'use client';
2
-
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { getFromImportMap } from 'payload/shared';
5
- import React, { useMemo } from 'react';
6
- import { RichTextField } from './index.js';
7
- /**
8
- * Client-only entry point for the Lexical rich text field.
9
- * Resolves feature providers and component imports from the import map on the client,
10
- * bypassing the RSC entry point that requires server-only data.
11
- */
12
- export const ClientEntryLexicalField = props => {
13
- const {
14
- featureClientSchemaMap = {},
15
- features = {},
16
- field,
17
- forceRender,
18
- importMap,
19
- path,
20
- permissions,
21
- readOnly,
22
- schemaPath
23
- } = props;
24
- const {
25
- clientFeatures,
26
- featureClientImportMap
27
- } = useMemo(() => {
28
- const resolvedClientFeatures = {};
29
- const resolvedFeatureImportMap = {};
30
- const sortedFeatures = Object.entries(features).sort(([, a], [, b]) => a.order - b.order);
31
- for (const [featureKey, featureMeta] of sortedFeatures) {
32
- resolvedClientFeatures[featureKey] = {};
33
- if (featureMeta.ClientFeature) {
34
- const clientFeatureProvider = getFromImportMap({
35
- importMap,
36
- PayloadComponent: featureMeta.ClientFeature,
37
- schemaPath: 'lexical-clientComponent',
38
- silent: true
39
- });
40
- if (clientFeatureProvider) {
41
- const clientFeatureProps = {
42
- ...(featureMeta.clientFeatureProps ?? {}),
43
- featureKey: featureMeta.key,
44
- order: featureMeta.order
45
- };
46
- if (typeof featureMeta.ClientFeature === 'object' && featureMeta.ClientFeature.clientProps) {
47
- clientFeatureProps.clientProps = featureMeta.ClientFeature.clientProps;
48
- }
49
- resolvedClientFeatures[featureKey] = {
50
- clientFeatureProps,
51
- clientFeatureProvider
52
- };
53
- }
54
- }
55
- if (featureMeta.componentImports && typeof featureMeta.componentImports === 'object') {
56
- for (const [importKey, payloadComponent] of Object.entries(featureMeta.componentImports)) {
57
- const resolvedComponent = getFromImportMap({
58
- importMap,
59
- PayloadComponent: payloadComponent,
60
- schemaPath: 'lexical-clientComponent',
61
- silent: true
62
- });
63
- if (resolvedComponent) {
64
- resolvedFeatureImportMap[`${featureKey}.${importKey}`] = resolvedComponent;
65
- }
66
- }
67
- }
68
- }
69
- return {
70
- clientFeatures: resolvedClientFeatures,
71
- featureClientImportMap: resolvedFeatureImportMap
72
- };
73
- }, [features, importMap]);
74
- return /*#__PURE__*/_jsx(RichTextField, {
75
- clientFeatures: clientFeatures,
76
- featureClientImportMap: featureClientImportMap,
77
- featureClientSchemaMap: featureClientSchemaMap,
78
- field: field,
79
- forceRender: forceRender,
80
- path: path,
81
- permissions: permissions,
82
- readOnly: readOnly,
83
- schemaPath: schemaPath
84
- });
85
- };
86
- //# sourceMappingURL=clientEntry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientEntry.js","names":["getFromImportMap","React","useMemo","RichTextField","ClientEntryLexicalField","props","featureClientSchemaMap","features","field","forceRender","importMap","path","permissions","readOnly","schemaPath","clientFeatures","featureClientImportMap","resolvedClientFeatures","resolvedFeatureImportMap","sortedFeatures","Object","entries","sort","a","b","order","featureKey","featureMeta","ClientFeature","clientFeatureProvider","PayloadComponent","silent","clientFeatureProps","key","clientProps","componentImports","importKey","payloadComponent","resolvedComponent","_jsx"],"sources":["../../src/field/clientEntry.tsx"],"sourcesContent":["'use client'\n\nimport type { ImportMap, RichTextFieldClient, RichTextFieldClientProps } from 'payload'\n\nimport { getFromImportMap } from 'payload/shared'\nimport React, { useMemo } from 'react'\n\nimport type {\n BaseClientFeatureProps,\n FeatureProviderProviderClient,\n} from '../features/typesClient.js'\nimport type { FeatureClientSchemaMap, LexicalRichTextFieldProps } from '../types/index.js'\n\nimport { RichTextField } from './index.js'\n\ntype SerializedFeatureMetadata = {\n ClientFeature?: { clientProps?: Record<string, any>; path: string } | string\n clientFeatureProps?: Record<string, any>\n componentImports?: Record<string, { clientProps?: Record<string, any>; path: string } | string>\n key: string\n order: number\n}\n\nexport type ClientEntryLexicalFieldProps = {\n featureClientSchemaMap?: FeatureClientSchemaMap\n features?: Record<string, SerializedFeatureMetadata>\n importMap: ImportMap\n} & RichTextFieldClientProps\n\n/**\n * Client-only entry point for the Lexical rich text field.\n * Resolves feature providers and component imports from the import map on the client,\n * bypassing the RSC entry point that requires server-only data.\n */\nexport const ClientEntryLexicalField: React.FC<ClientEntryLexicalFieldProps> = (props) => {\n const {\n featureClientSchemaMap = {},\n features = {},\n field,\n forceRender,\n importMap,\n path,\n permissions,\n readOnly,\n schemaPath,\n } = props\n\n const { clientFeatures, featureClientImportMap } = useMemo(() => {\n const resolvedClientFeatures: LexicalRichTextFieldProps['clientFeatures'] = {}\n const resolvedFeatureImportMap: Record<string, any> = {}\n\n const sortedFeatures = Object.entries(features).sort(([, a], [, b]) => a.order - b.order)\n\n for (const [featureKey, featureMeta] of sortedFeatures) {\n resolvedClientFeatures[featureKey] = {}\n\n if (featureMeta.ClientFeature) {\n const clientFeatureProvider = getFromImportMap<FeatureProviderProviderClient | undefined>({\n importMap,\n PayloadComponent: featureMeta.ClientFeature,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n\n if (clientFeatureProvider) {\n const clientFeatureProps: BaseClientFeatureProps<Record<string, any>> = {\n ...(featureMeta.clientFeatureProps ?? {}),\n featureKey: featureMeta.key,\n order: featureMeta.order,\n }\n\n if (\n typeof featureMeta.ClientFeature === 'object' &&\n featureMeta.ClientFeature.clientProps\n ) {\n clientFeatureProps.clientProps = (featureMeta.ClientFeature as any).clientProps\n }\n\n resolvedClientFeatures[featureKey] = {\n clientFeatureProps,\n clientFeatureProvider,\n }\n }\n }\n\n if (featureMeta.componentImports && typeof featureMeta.componentImports === 'object') {\n for (const [importKey, payloadComponent] of Object.entries(featureMeta.componentImports)) {\n const resolvedComponent = getFromImportMap({\n importMap,\n PayloadComponent: payloadComponent,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n if (resolvedComponent) {\n resolvedFeatureImportMap[`${featureKey}.${importKey}`] = resolvedComponent\n }\n }\n }\n }\n\n return {\n clientFeatures: resolvedClientFeatures,\n featureClientImportMap: resolvedFeatureImportMap,\n }\n }, [features, importMap])\n\n return (\n <RichTextField\n clientFeatures={clientFeatures}\n featureClientImportMap={featureClientImportMap}\n featureClientSchemaMap={featureClientSchemaMap}\n field={field as RichTextFieldClient}\n forceRender={forceRender}\n path={path}\n permissions={permissions as LexicalRichTextFieldProps['permissions']}\n readOnly={readOnly}\n schemaPath={schemaPath}\n />\n )\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,gBAAgB,QAAQ;AACjC,OAAOC,KAAA,IAASC,OAAO,QAAQ;AAQ/B,SAASC,aAAa,QAAQ;AAgB9B;;;;;AAKA,OAAO,MAAMC,uBAAA,GAAmEC,KAAA;EAC9E,MAAM;IACJC,sBAAA,GAAyB,CAAC,CAAC;IAC3BC,QAAA,GAAW,CAAC,CAAC;IACbC,KAAK;IACLC,WAAW;IACXC,SAAS;IACTC,IAAI;IACJC,WAAW;IACXC,QAAQ;IACRC;EAAU,CACX,GAAGT,KAAA;EAEJ,MAAM;IAAEU,cAAc;IAAEC;EAAsB,CAAE,GAAGd,OAAA,CAAQ;IACzD,MAAMe,sBAAA,GAAsE,CAAC;IAC7E,MAAMC,wBAAA,GAAgD,CAAC;IAEvD,MAAMC,cAAA,GAAiBC,MAAA,CAAOC,OAAO,CAACd,QAAA,EAAUe,IAAI,CAAC,CAAC,GAAGC,CAAA,CAAE,EAAE,GAAGC,CAAA,CAAE,KAAKD,CAAA,CAAEE,KAAK,GAAGD,CAAA,CAAEC,KAAK;IAExF,KAAK,MAAM,CAACC,UAAA,EAAYC,WAAA,CAAY,IAAIR,cAAA,EAAgB;MACtDF,sBAAsB,CAACS,UAAA,CAAW,GAAG,CAAC;MAEtC,IAAIC,WAAA,CAAYC,aAAa,EAAE;QAC7B,MAAMC,qBAAA,GAAwB7B,gBAAA,CAA4D;UACxFU,SAAA;UACAoB,gBAAA,EAAkBH,WAAA,CAAYC,aAAa;UAC3Cd,UAAA,EAAY;UACZiB,MAAA,EAAQ;QACV;QAEA,IAAIF,qBAAA,EAAuB;UACzB,MAAMG,kBAAA,GAAkE;YACtE,IAAIL,WAAA,CAAYK,kBAAkB,IAAI,CAAC,CAAC;YACxCN,UAAA,EAAYC,WAAA,CAAYM,GAAG;YAC3BR,KAAA,EAAOE,WAAA,CAAYF;UACrB;UAEA,IACE,OAAOE,WAAA,CAAYC,aAAa,KAAK,YACrCD,WAAA,CAAYC,aAAa,CAACM,WAAW,EACrC;YACAF,kBAAA,CAAmBE,WAAW,GAAGP,WAAC,CAAYC,aAAa,CAASM,WAAW;UACjF;UAEAjB,sBAAsB,CAACS,UAAA,CAAW,GAAG;YACnCM,kBAAA;YACAH;UACF;QACF;MACF;MAEA,IAAIF,WAAA,CAAYQ,gBAAgB,IAAI,OAAOR,WAAA,CAAYQ,gBAAgB,KAAK,UAAU;QACpF,KAAK,MAAM,CAACC,SAAA,EAAWC,gBAAA,CAAiB,IAAIjB,MAAA,CAAOC,OAAO,CAACM,WAAA,CAAYQ,gBAAgB,GAAG;UACxF,MAAMG,iBAAA,GAAoBtC,gBAAA,CAAiB;YACzCU,SAAA;YACAoB,gBAAA,EAAkBO,gBAAA;YAClBvB,UAAA,EAAY;YACZiB,MAAA,EAAQ;UACV;UACA,IAAIO,iBAAA,EAAmB;YACrBpB,wBAAwB,CAAC,GAAGQ,UAAA,IAAcU,SAAA,EAAW,CAAC,GAAGE,iBAAA;UAC3D;QACF;MACF;IACF;IAEA,OAAO;MACLvB,cAAA,EAAgBE,sBAAA;MAChBD,sBAAA,EAAwBE;IAC1B;EACF,GAAG,CAACX,QAAA,EAAUG,SAAA,CAAU;EAExB,oBACE6B,IAAA,CAACpC,aAAA;IACCY,cAAA,EAAgBA,cAAA;IAChBC,sBAAA,EAAwBA,sBAAA;IACxBV,sBAAA,EAAwBA,sBAAA;IACxBE,KAAA,EAAOA,KAAA;IACPC,WAAA,EAAaA,WAAA;IACbE,IAAA,EAAMA,IAAA;IACNC,WAAA,EAAaA,WAAA;IACbC,QAAA,EAAUA,QAAA;IACVC,UAAA,EAAYA;;AAGlB","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated - remove in 4.0. lexical already exports an isHTMLElement utility
3
- */
4
- export declare function isHTMLElement(x: unknown): x is HTMLElement;
5
- //# sourceMappingURL=guard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../src/lexical/utils/guard.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,WAAW,CAE1D"}
@@ -1,9 +0,0 @@
1
- 'use client';
2
-
3
- /**
4
- * @deprecated - remove in 4.0. lexical already exports an isHTMLElement utility
5
- */
6
- export function isHTMLElement(x) {
7
- return x instanceof HTMLElement;
8
- }
9
- //# sourceMappingURL=guard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guard.js","names":["isHTMLElement","x","HTMLElement"],"sources":["../../../src/lexical/utils/guard.ts"],"sourcesContent":["'use client'\n\n/**\n * @deprecated - remove in 4.0. lexical already exports an isHTMLElement utility\n */\nexport function isHTMLElement(x: unknown): x is HTMLElement {\n return x instanceof HTMLElement\n}\n"],"mappings":"AAAA;;AAEA;;;AAGA,OAAO,SAASA,cAAcC,CAAU;EACtC,OAAOA,CAAA,YAAaC,WAAA;AACtB","ignoreList":[]}