@payloadcms/richtext-lexical 4.0.0-internal.2fddfc0 → 4.0.0-internal.31ba7ee

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 (725) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-TCOK744G.js +2 -0
  3. package/dist/exports/client/Field-TCOK744G.js.map +7 -0
  4. package/dist/exports/client/bundled.css +1 -1
  5. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  6. package/dist/exports/client/chunk-3LRZDIIG.js.map +7 -0
  7. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  8. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  9. package/dist/exports/client/{chunk-ESITTE3C.js → chunk-ZFGDYZDE.js} +2 -2
  10. package/dist/exports/client/{chunk-ESITTE3C.js.map → chunk-ZFGDYZDE.js.map} +2 -2
  11. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  12. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  13. package/dist/exports/client/componentInline-55HZXGUS.js +2 -0
  14. package/dist/exports/client/index.d.ts +1 -3
  15. package/dist/exports/client/index.d.ts.map +1 -1
  16. package/dist/exports/client/index.js +27 -28
  17. package/dist/exports/client/index.js.map +4 -4
  18. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  19. package/dist/features/blockquote/client/index.js +2 -2
  20. package/dist/features/blockquote/client/index.js.map +1 -1
  21. package/dist/features/blockquote/server/index.js +2 -2
  22. package/dist/features/blockquote/server/index.js.map +1 -1
  23. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  24. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  25. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  26. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  27. package/dist/features/blocks/client/component/index.css +2 -2
  28. package/dist/features/blocks/client/component/index.d.ts +0 -6
  29. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  30. package/dist/features/blocks/client/component/index.js +133 -76
  31. package/dist/features/blocks/client/component/index.js.map +1 -1
  32. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  33. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  34. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  35. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  36. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  37. package/dist/features/blocks/client/componentInline/index.css +8 -8
  38. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  39. package/dist/features/blocks/client/componentInline/index.js +2 -2
  40. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  41. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  42. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  43. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  44. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  45. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  46. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  47. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  48. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  49. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  50. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  51. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  52. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  53. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  54. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  55. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  56. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  57. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  58. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  59. package/dist/features/blocks/server/index.js +2 -2
  60. package/dist/features/blocks/server/index.js.map +1 -1
  61. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  62. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  63. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  64. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  65. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  66. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  67. package/dist/features/blocks/server/schema.js +3 -2
  68. package/dist/features/blocks/server/schema.js.map +1 -1
  69. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  70. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  71. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  72. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  73. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  74. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  75. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  76. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  77. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  78. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  79. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  80. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  81. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  82. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  84. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  85. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  86. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  87. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  88. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  90. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  91. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  92. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  93. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  94. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  95. package/dist/features/converters/markdownToLexical/index.js +5 -2
  96. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  97. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  98. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  99. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  100. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  101. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  102. package/dist/features/format/bold/feature.client.js +1 -1
  103. package/dist/features/format/bold/feature.client.js.map +1 -1
  104. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  105. package/dist/features/format/bold/feature.server.js +1 -1
  106. package/dist/features/format/bold/feature.server.js.map +1 -1
  107. package/dist/features/format/inlineCode/feature.client.js +1 -1
  108. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  109. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  110. package/dist/features/format/inlineCode/feature.server.js +1 -1
  111. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  112. package/dist/features/format/italic/feature.client.js +1 -1
  113. package/dist/features/format/italic/feature.client.js.map +1 -1
  114. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  115. package/dist/features/format/italic/feature.server.js +1 -1
  116. package/dist/features/format/italic/feature.server.js.map +1 -1
  117. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  118. package/dist/features/format/strikethrough/feature.client.js +1 -1
  119. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  120. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  121. package/dist/features/format/strikethrough/feature.server.js +1 -1
  122. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  123. package/dist/features/heading/client/index.js +2 -2
  124. package/dist/features/heading/client/index.js.map +1 -1
  125. package/dist/features/heading/constants.d.ts +2 -0
  126. package/dist/features/heading/constants.d.ts.map +1 -0
  127. package/dist/features/heading/constants.js +2 -0
  128. package/dist/features/heading/constants.js.map +1 -0
  129. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  130. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  131. package/dist/features/heading/markdownTransformer.js +6 -19
  132. package/dist/features/heading/markdownTransformer.js.map +1 -1
  133. package/dist/features/heading/server/index.d.ts.map +1 -1
  134. package/dist/features/heading/server/index.js +7 -3
  135. package/dist/features/heading/server/index.js.map +1 -1
  136. package/dist/features/heading/server/schema.d.ts.map +1 -1
  137. package/dist/features/heading/server/validate.d.ts +6 -0
  138. package/dist/features/heading/server/validate.d.ts.map +1 -0
  139. package/dist/features/heading/server/validate.js +15 -0
  140. package/dist/features/heading/server/validate.js.map +1 -0
  141. package/dist/features/horizontalRule/client/index.js +2 -2
  142. package/dist/features/horizontalRule/client/index.js.map +1 -1
  143. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  144. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  145. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  146. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  147. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  148. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  149. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  150. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  151. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  152. package/dist/features/horizontalRule/server/index.js +2 -2
  153. package/dist/features/horizontalRule/server/index.js.map +1 -1
  154. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  155. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  156. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  157. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  158. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  159. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  160. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  161. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  162. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  163. package/dist/features/indent/client/IndentPlugin.js +122 -1
  164. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  165. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  166. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  167. package/dist/features/indent/server/i18n.js +74 -37
  168. package/dist/features/indent/server/i18n.js.map +1 -1
  169. package/dist/features/link/client/index.js +2 -2
  170. package/dist/features/link/client/index.js.map +1 -1
  171. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  172. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  173. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +11 -8
  174. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  175. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  176. package/dist/features/link/markdownTransformer.d.ts +4 -4
  177. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  178. package/dist/features/link/markdownTransformer.js +2 -2
  179. package/dist/features/link/markdownTransformer.js.map +1 -1
  180. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  181. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  182. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  183. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  184. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  185. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  186. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  187. package/dist/features/link/server/baseFields.js.map +1 -1
  188. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  189. package/dist/features/link/server/index.js +4 -4
  190. package/dist/features/link/server/index.js.map +1 -1
  191. package/dist/features/link/server/schema.d.ts.map +1 -1
  192. package/dist/features/link/server/schema.js +4 -2
  193. package/dist/features/link/server/schema.js.map +1 -1
  194. package/dist/features/link/server/validate.d.ts.map +1 -1
  195. package/dist/features/lists/checklist/client/index.js +1 -1
  196. package/dist/features/lists/checklist/client/index.js.map +1 -1
  197. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  198. package/dist/features/lists/checklist/server/index.js +6 -3
  199. package/dist/features/lists/checklist/server/index.js.map +1 -1
  200. package/dist/features/lists/orderedList/client/index.js +1 -1
  201. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  202. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  203. package/dist/features/lists/orderedList/server/index.js +6 -3
  204. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  205. package/dist/features/lists/shared/constants.d.ts +2 -0
  206. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  207. package/dist/features/lists/shared/constants.js +2 -0
  208. package/dist/features/lists/shared/constants.js.map +1 -0
  209. package/dist/features/lists/shared/validate.d.ts +5 -0
  210. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  211. package/dist/features/lists/shared/validate.js +15 -0
  212. package/dist/features/lists/shared/validate.js.map +1 -0
  213. package/dist/features/lists/unorderedList/client/index.js +1 -1
  214. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  215. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  216. package/dist/features/lists/unorderedList/server/index.js +6 -3
  217. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  218. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  219. package/dist/features/relationship/client/index.d.ts +2 -2
  220. package/dist/features/relationship/client/index.d.ts.map +1 -1
  221. package/dist/features/relationship/client/index.js.map +1 -1
  222. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  223. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  224. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  225. package/dist/features/relationship/client/plugins/index.js +27 -31
  226. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  227. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  228. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  229. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  230. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  231. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  232. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  233. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  234. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  235. package/dist/features/relationship/server/index.d.ts +8 -1
  236. package/dist/features/relationship/server/index.d.ts.map +1 -1
  237. package/dist/features/relationship/server/index.js +28 -11
  238. package/dist/features/relationship/server/index.js.map +1 -1
  239. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  240. package/dist/features/relationship/server/schema.d.ts +5 -5
  241. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  242. package/dist/features/relationship/server/schema.js +27 -15
  243. package/dist/features/relationship/server/schema.js.map +1 -1
  244. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  245. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  246. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  247. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  248. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  249. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  250. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  251. package/dist/features/table/client/index.d.ts.map +1 -0
  252. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  253. package/dist/features/table/client/index.js.map +1 -0
  254. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  255. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  256. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  257. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  258. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  259. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  260. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  261. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  262. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  263. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  264. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  265. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  266. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  267. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  268. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  269. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  270. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  271. package/dist/features/table/client/utils/debounce.js.map +1 -0
  272. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  273. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  274. package/dist/features/table/markdownTransformer.d.ts +5 -0
  275. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  276. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  277. package/dist/features/table/markdownTransformer.js.map +1 -0
  278. package/dist/features/table/server/index.d.ts +3 -0
  279. package/dist/features/table/server/index.d.ts.map +1 -0
  280. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  281. package/dist/features/table/server/index.js.map +1 -0
  282. package/dist/features/table/server/schema.d.ts.map +1 -0
  283. package/dist/features/table/server/schema.js.map +1 -0
  284. package/dist/features/textState/feature.client.js +1 -1
  285. package/dist/features/textState/feature.client.js.map +1 -1
  286. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  287. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  288. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  289. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  290. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  291. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  292. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  293. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  294. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  295. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  296. package/dist/features/toolbars/inline/client/Toolbar/index.js +2 -2
  297. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  298. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  299. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  300. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  301. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  302. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  303. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  304. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +23 -24
  305. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  306. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  307. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  308. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  309. package/dist/features/typesClient.d.ts +1 -1
  310. package/dist/features/typesClient.d.ts.map +1 -1
  311. package/dist/features/typesClient.js.map +1 -1
  312. package/dist/features/typesServer.d.ts +16 -11
  313. package/dist/features/typesServer.d.ts.map +1 -1
  314. package/dist/features/typesServer.js.map +1 -1
  315. package/dist/features/upload/client/component/index.css +9 -9
  316. package/dist/features/upload/client/component/index.js +2 -1
  317. package/dist/features/upload/client/component/index.js.map +1 -1
  318. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  319. package/dist/features/upload/client/index.d.ts +3 -2
  320. package/dist/features/upload/client/index.d.ts.map +1 -1
  321. package/dist/features/upload/client/index.js.map +1 -1
  322. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  323. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  324. package/dist/features/upload/client/plugin/index.js +53 -56
  325. package/dist/features/upload/client/plugin/index.js.map +1 -1
  326. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  327. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  328. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  329. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  330. package/dist/features/upload/server/index.d.ts +6 -2
  331. package/dist/features/upload/server/index.d.ts.map +1 -1
  332. package/dist/features/upload/server/index.js +22 -18
  333. package/dist/features/upload/server/index.js.map +1 -1
  334. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  335. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  336. package/dist/features/upload/server/markdownTransformer.js +1 -1
  337. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  338. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  339. package/dist/features/upload/server/schema.d.ts +6 -6
  340. package/dist/features/upload/server/schema.d.ts.map +1 -1
  341. package/dist/features/upload/server/schema.js +30 -14
  342. package/dist/features/upload/server/schema.js.map +1 -1
  343. package/dist/features/upload/server/validate.d.ts +2 -2
  344. package/dist/features/upload/server/validate.d.ts.map +1 -1
  345. package/dist/features/upload/server/validate.js +3 -0
  346. package/dist/features/upload/server/validate.js.map +1 -1
  347. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  348. package/dist/field/Diff/converters/listitem/index.js +2 -1
  349. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  350. package/dist/field/Diff/converters/unknown/index.css +1 -1
  351. package/dist/field/Diff/index.d.ts +3 -2
  352. package/dist/field/Diff/index.d.ts.map +1 -1
  353. package/dist/field/Diff/index.js +1 -0
  354. package/dist/field/Diff/index.js.map +1 -1
  355. package/dist/field/Field.d.ts.map +1 -1
  356. package/dist/field/Field.js +18 -15
  357. package/dist/field/Field.js.map +1 -1
  358. package/dist/field/RenderLexical/index.d.ts +3 -1
  359. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  360. package/dist/field/RenderLexical/index.js +23 -23
  361. package/dist/field/RenderLexical/index.js.map +1 -1
  362. package/dist/field/ViewSelector.css +1 -1
  363. package/dist/field/ViewSelector.d.ts.map +1 -1
  364. package/dist/field/ViewSelector.js +1 -0
  365. package/dist/field/ViewSelector.js.map +1 -1
  366. package/dist/field/bundled.css +1 -1
  367. package/dist/field/index.css +4 -4
  368. package/dist/i18n.d.ts.map +1 -1
  369. package/dist/i18n.js +68 -0
  370. package/dist/i18n.js.map +1 -1
  371. package/dist/index.d.ts +3 -3
  372. package/dist/index.d.ts.map +1 -1
  373. package/dist/index.js +11 -54
  374. package/dist/index.js.map +1 -1
  375. package/dist/lexical/LexicalEditor.css +29 -18
  376. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  377. package/dist/lexical/LexicalEditor.js +62 -99
  378. package/dist/lexical/LexicalEditor.js.map +1 -1
  379. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  380. package/dist/lexical/LexicalProvider.js +7 -22
  381. package/dist/lexical/LexicalProvider.js.map +1 -1
  382. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  383. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  384. package/dist/lexical/config/server/loader.d.ts +1 -1
  385. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  386. package/dist/lexical/config/server/loader.js +2 -2
  387. package/dist/lexical/config/server/loader.js.map +1 -1
  388. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  389. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  390. package/dist/lexical/config/server/sanitize.js +2 -2
  391. package/dist/lexical/config/server/sanitize.js.map +1 -1
  392. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  393. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  394. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  395. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  396. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  397. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  398. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  399. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  400. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  401. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  402. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  403. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  404. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  405. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  406. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  407. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  408. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  409. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  410. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  411. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +2 -1
  412. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  413. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  414. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  415. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +5 -3
  416. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  417. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +17 -3
  418. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  419. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  420. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  421. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  422. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  423. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  424. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  425. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  426. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  427. package/dist/lexical/theme/EditorTheme.css +18 -19
  428. package/dist/lexical/ui/ContentEditable.css +22 -17
  429. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  430. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  431. package/dist/lexical/ui/ContentEditable.js +9 -6
  432. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  433. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  434. package/dist/lexical/ui/icons/H3/index.js +13 -6
  435. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  436. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  437. package/dist/lexical/ui/icons/H4/index.js +13 -6
  438. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  439. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  440. package/dist/lexical/ui/icons/H5/index.js +13 -6
  441. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  442. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  443. package/dist/lexical/ui/icons/H6/index.js +13 -6
  444. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  445. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  446. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  447. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  448. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  449. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  450. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  451. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  452. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  453. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  454. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  455. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  456. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  457. package/dist/lexical/utils/point.d.ts.map +1 -1
  458. package/dist/lexical/utils/rect.d.ts.map +1 -1
  459. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  460. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  461. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  462. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  463. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  464. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  465. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  466. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  467. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  468. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  469. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  470. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  471. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  472. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  473. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  474. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  475. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  476. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  477. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  478. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  479. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  480. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  481. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  482. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  483. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  484. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  485. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  486. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  487. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  488. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  489. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  490. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  491. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  492. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  493. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  494. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  495. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  496. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  497. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  498. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  499. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  500. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  501. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  502. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  503. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  504. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  505. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  506. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  507. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  508. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  509. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  510. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  511. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  512. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  513. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  514. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  515. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  516. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  517. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  518. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  519. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  520. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  521. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  522. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  523. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  524. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  525. package/dist/types/index.d.ts +1 -1
  526. package/dist/types/index.d.ts.map +1 -1
  527. package/dist/types/index.js.map +1 -1
  528. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  529. package/dist/types/nodeTypes.d.ts +1 -1
  530. package/dist/types/nodeTypes.d.ts.map +1 -1
  531. package/dist/types/nodeTypes.js.map +1 -1
  532. package/dist/types/schema.d.ts.map +1 -1
  533. package/dist/types/schema.js +12 -5
  534. package/dist/types/schema.js.map +1 -1
  535. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  536. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  537. package/dist/utilities/createServerFeature.d.ts +1 -1
  538. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  539. package/dist/utilities/createServerFeature.js +2 -2
  540. package/dist/utilities/createServerFeature.js.map +1 -1
  541. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  542. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  543. package/dist/utilities/editorConfigFactory.js +9 -9
  544. package/dist/utilities/editorConfigFactory.js.map +1 -1
  545. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  546. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  547. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  548. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  549. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  550. package/dist/utilities/generateImportMap.d.ts +1 -1
  551. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  552. package/dist/utilities/generateImportMap.js +3 -7
  553. package/dist/utilities/generateImportMap.js.map +1 -1
  554. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  555. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  556. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  557. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  558. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  559. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  560. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  561. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  562. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  563. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  564. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  565. package/dist/validate/hasText.d.ts +2 -2
  566. package/dist/validate/hasText.d.ts.map +1 -1
  567. package/dist/validate/hasText.js.map +1 -1
  568. package/dist/validate/index.d.ts +1 -1
  569. package/dist/validate/index.d.ts.map +1 -1
  570. package/package.json +96 -28
  571. package/dist/@types/assets.d.js +0 -2
  572. package/dist/@types/assets.d.js.map +0 -1
  573. package/dist/dependencyChecker.spec.js +0 -16
  574. package/dist/dependencyChecker.spec.js.map +0 -1
  575. package/dist/exports/client/Field-VW7ZGT6K.js +0 -2
  576. package/dist/exports/client/Field-VW7ZGT6K.js.map +0 -7
  577. package/dist/exports/client/chunk-4EIYXZ6H.js +0 -12
  578. package/dist/exports/client/chunk-4EIYXZ6H.js.map +0 -7
  579. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  580. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  581. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  582. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  583. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  584. package/dist/exports/server/rsc.browser.d.ts +0 -11
  585. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  586. package/dist/exports/server/rsc.browser.js +0 -10
  587. package/dist/exports/server/rsc.browser.js.map +0 -1
  588. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  589. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  590. package/dist/features/blockquote/markdownTransformer.js +0 -33
  591. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  592. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  593. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  594. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  595. package/dist/features/experimental_table/client/index.js.map +0 -1
  596. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  597. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  598. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  599. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  600. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  601. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  602. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  603. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  604. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  605. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  606. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  607. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  608. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  609. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  610. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  611. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  612. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  613. package/dist/features/experimental_table/server/index.d.ts +0 -3
  614. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  615. package/dist/features/experimental_table/server/index.js.map +0 -1
  616. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  617. package/dist/features/experimental_table/server/schema.js.map +0 -1
  618. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  619. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  620. package/dist/features/format/bold/markdownTransformers.js +0 -23
  621. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  622. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  623. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  624. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  625. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  626. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  627. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  628. package/dist/features/format/italic/markdownTransformers.js +0 -12
  629. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  630. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  631. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  632. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  633. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  634. package/dist/features/link/markdownTransformer.spec.js +0 -195
  635. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  636. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  637. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  638. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  639. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  640. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  641. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  642. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  643. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  644. package/dist/features/lists/shared/markdown.d.ts +0 -6
  645. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  646. package/dist/features/lists/shared/markdown.js +0 -57
  647. package/dist/features/lists/shared/markdown.js.map +0 -1
  648. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  649. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  650. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  651. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  652. package/dist/field/clientEntry.d.ts +0 -29
  653. package/dist/field/clientEntry.d.ts.map +0 -1
  654. package/dist/field/clientEntry.js +0 -86
  655. package/dist/field/clientEntry.js.map +0 -1
  656. package/dist/lexical/utils/guard.d.ts +0 -5
  657. package/dist/lexical/utils/guard.d.ts.map +0 -1
  658. package/dist/lexical/utils/guard.js +0 -9
  659. package/dist/lexical/utils/guard.js.map +0 -1
  660. package/dist/lexical/utils/url.spec.js +0 -114
  661. package/dist/lexical/utils/url.spec.js.map +0 -1
  662. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  663. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  664. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  665. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  666. package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js +0 -160
  667. package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js.map +0 -1
  668. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  669. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  670. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -220
  671. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  672. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  673. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  674. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -199
  675. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  676. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  677. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  678. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  679. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  680. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -173
  681. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  682. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -352
  683. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  684. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  685. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  686. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  687. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  688. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  689. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  690. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  691. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  692. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  693. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  694. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  695. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  696. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  697. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  698. package/dist/packages/@lexical/markdown/index.js +0 -39
  699. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  700. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  701. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  702. package/dist/packages/@lexical/markdown/utils.js +0 -267
  703. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  704. package/dist/utilities/jsx/jsx.spec.js +0 -178
  705. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  706. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-55HZXGUS.js.map} +0 -0
  707. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  708. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  709. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  710. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  711. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  712. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  713. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  714. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  715. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  716. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  717. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  718. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  719. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  720. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  721. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  722. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  723. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  724. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  725. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,qBAAqB,CAUpE,CAAA"}
1
+ {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,qBAAqB,CAUpE,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ALLOWED_HEADING_TAGS } from '../../../../heading/constants.js';
2
3
  export const HeadingJSXConverter = {
3
4
  heading: ({
4
5
  node,
@@ -7,7 +8,7 @@ export const HeadingJSXConverter = {
7
8
  const children = nodesToJSX({
8
9
  nodes: node.children
9
10
  });
10
- const NodeTag = node.tag;
11
+ const NodeTag = ALLOWED_HEADING_TAGS.has(node.tag) ? node.tag : 'h1';
11
12
  return /*#__PURE__*/_jsx(NodeTag, {
12
13
  children: children
13
14
  });
@@ -1 +1 @@
1
- {"version":3,"file":"heading.js","names":["HeadingJSXConverter","heading","node","nodesToJSX","children","nodes","NodeTag","tag","_jsx"],"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../types/nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const HeadingJSXConverter: JSXConverters<SerializedHeadingNode> = {\n heading: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag>{children}</NodeTag>\n },\n}\n"],"mappings":";AAGA,OAAO,MAAMA,mBAAA,GAA4D;EACvEC,OAAA,EAASA,CAAC;IAAEC,IAAI;IAAEC;EAAU,CAAE;IAC5B,MAAMC,QAAA,GAAWD,UAAA,CAAW;MAC1BE,KAAA,EAAOH,IAAA,CAAKE;IACd;IAEA,MAAME,OAAA,GAAUJ,IAAA,CAAKK,GAAG;IAExB,oBAAOC,IAAA,CAACF,OAAA;gBAASF;;EACnB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"heading.js","names":["ALLOWED_HEADING_TAGS","HeadingJSXConverter","heading","node","nodesToJSX","children","nodes","NodeTag","has","tag","_jsx"],"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../types/nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nimport { ALLOWED_HEADING_TAGS } from '../../../../heading/constants.js'\n\nexport const HeadingJSXConverter: JSXConverters<SerializedHeadingNode> = {\n heading: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = ALLOWED_HEADING_TAGS.has(node.tag) ? node.tag : 'h1'\n\n return <NodeTag>{children}</NodeTag>\n },\n}\n"],"mappings":";AAGA,SAASA,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,mBAAA,GAA4D;EACvEC,OAAA,EAASA,CAAC;IAAEC,IAAI;IAAEC;EAAU,CAAE;IAC5B,MAAMC,QAAA,GAAWD,UAAA,CAAW;MAC1BE,KAAA,EAAOH,IAAA,CAAKE;IACd;IAEA,MAAME,OAAA,GAAUP,oBAAA,CAAqBQ,GAAG,CAACL,IAAA,CAAKM,GAAG,IAAIN,IAAA,CAAKM,GAAG,GAAG;IAEhE,oBAAOC,IAAA,CAACH,OAAA;gBAASF;;EACnB;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,sBAAsB,GAAG,kBAAkB,CAqDvF,CAAA"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,sBAAsB,GAAG,kBAAkB,CAqDvF,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { v4 as uuidv4 } from 'uuid';
3
+ import { ALLOWED_LIST_TAGS } from '../../../../lists/shared/constants.js';
3
4
  export const ListJSXConverter = {
4
5
  list: ({
5
6
  node,
@@ -8,7 +9,7 @@ export const ListJSXConverter = {
8
9
  const children = nodesToJSX({
9
10
  nodes: node.children
10
11
  });
11
- const NodeTag = node.tag;
12
+ const NodeTag = ALLOWED_LIST_TAGS.has(node.tag) ? node.tag : 'ul';
12
13
  return /*#__PURE__*/_jsx(NodeTag, {
13
14
  className: `list-${node?.listType}`,
14
15
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","names":["v4","uuidv4","ListJSXConverter","list","node","nodesToJSX","children","nodes","NodeTag","tag","_jsx","className","listType","listitem","parent","hasSubLists","some","child","type","uuid","checked","role","style","listStyleType","tabIndex","value","_jsxs","_Fragment","id","readOnly","htmlFor","undefined"],"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/list.tsx"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport type { SerializedListItemNode, SerializedListNode } from '../../../../../types/nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const ListJSXConverter: JSXConverters<SerializedListItemNode | SerializedListNode> = {\n list: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag className={`list-${node?.listType}`}>{children}</NodeTag>\n },\n listitem: ({ node, nodesToJSX, parent }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return (\n <li\n aria-checked={node.checked ? 'true' : 'false'}\n className={`list-item-checkbox${node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked'}${hasSubLists ? ' nestedListItem' : ''}`}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"checkbox\"\n style={{ listStyleType: 'none' }}\n tabIndex={-1}\n value={node?.value}\n >\n {hasSubLists ? (\n children\n ) : (\n <>\n <input checked={node.checked} id={uuid} readOnly={true} type=\"checkbox\" />\n <label htmlFor={uuid}>{children}</label>\n <br />\n </>\n )}\n </li>\n )\n } else {\n return (\n <li\n className={`${hasSubLists ? 'nestedListItem' : ''}`}\n style={hasSubLists ? { listStyleType: 'none' } : undefined}\n value={node?.value}\n >\n {children}\n </li>\n )\n }\n },\n}\n"],"mappings":";AAAA,SAASA,EAAA,IAAMC,MAAM,QAAQ;AAK7B,OAAO,MAAMC,gBAAA,GAA+E;EAC1FC,IAAA,EAAMA,CAAC;IAAEC,IAAI;IAAEC;EAAU,CAAE;IACzB,MAAMC,QAAA,GAAWD,UAAA,CAAW;MAC1BE,KAAA,EAAOH,IAAA,CAAKE;IACd;IAEA,MAAME,OAAA,GAAUJ,IAAA,CAAKK,GAAG;IAExB,oBAAOC,IAAA,CAACF,OAAA;MAAQG,SAAA,EAAW,QAAQP,IAAA,EAAMQ,QAAA,EAAU;gBAAGN;;EACxD;EACAO,QAAA,EAAUA,CAAC;IAAET,IAAI;IAAEC,UAAU;IAAES;EAAM,CAAE;IACrC,MAAMC,WAAA,GAAcX,IAAA,CAAKE,QAAQ,CAACU,IAAI,CAAEC,KAAA,IAAUA,KAAA,CAAMC,IAAI,KAAK;IAEjE,MAAMZ,QAAA,GAAWD,UAAA,CAAW;MAC1BE,KAAA,EAAOH,IAAA,CAAKE;IACd;IAEA,IAAI,cAAcQ,MAAA,IAAUA,MAAA,EAAQF,QAAA,KAAa,SAAS;MACxD,MAAMO,IAAA,GAAOlB,MAAA;MAEb,oBACES,IAAA,CAAC;QACC,gBAAcN,IAAA,CAAKgB,OAAO,GAAG,SAAS;QACtCT,SAAA,EAAW,qBAAqBP,IAAA,CAAKgB,OAAO,GAAG,gCAAgC,kCAAkCL,WAAA,GAAc,oBAAoB,IAAI;QACvJ;QACAM,IAAA,EAAK;QACLC,KAAA,EAAO;UAAEC,aAAA,EAAe;QAAO;QAC/BC,QAAA,EAAU,CAAC;QACXC,KAAA,EAAOrB,IAAA,EAAMqB,KAAA;kBAEZV,WAAA,GACCT,QAAA,gBAEAoB,KAAA,CAAAC,SAAA;kCACEjB,IAAA,CAAC;YAAMU,OAAA,EAAShB,IAAA,CAAKgB,OAAO;YAAEQ,EAAA,EAAIT,IAAA;YAAMU,QAAA,EAAU;YAAMX,IAAA,EAAK;2BAC7DR,IAAA,CAAC;YAAMoB,OAAA,EAASX,IAAA;sBAAOb;2BACvBI,IAAA,CAAC;;;IAKX,OAAO;MACL,oBACEA,IAAA,CAAC;QACCC,SAAA,EAAW,GAAGI,WAAA,GAAc,mBAAmB,IAAI;QACnDO,KAAA,EAAOP,WAAA,GAAc;UAAEQ,aAAA,EAAe;QAAO,IAAIQ,SAAA;QACjDN,KAAA,EAAOrB,IAAA,EAAMqB,KAAA;kBAEZnB;;IAGP;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"list.js","names":["v4","uuidv4","ALLOWED_LIST_TAGS","ListJSXConverter","list","node","nodesToJSX","children","nodes","NodeTag","has","tag","_jsx","className","listType","listitem","parent","hasSubLists","some","child","type","uuid","checked","role","style","listStyleType","tabIndex","value","_jsxs","_Fragment","id","readOnly","htmlFor","undefined"],"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/list.tsx"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport type { SerializedListItemNode, SerializedListNode } from '../../../../../types/nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nimport { ALLOWED_LIST_TAGS } from '../../../../lists/shared/constants.js'\n\nexport const ListJSXConverter: JSXConverters<SerializedListItemNode | SerializedListNode> = {\n list: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = ALLOWED_LIST_TAGS.has(node.tag) ? node.tag : 'ul'\n\n return <NodeTag className={`list-${node?.listType}`}>{children}</NodeTag>\n },\n listitem: ({ node, nodesToJSX, parent }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return (\n <li\n aria-checked={node.checked ? 'true' : 'false'}\n className={`list-item-checkbox${node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked'}${hasSubLists ? ' nestedListItem' : ''}`}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"checkbox\"\n style={{ listStyleType: 'none' }}\n tabIndex={-1}\n value={node?.value}\n >\n {hasSubLists ? (\n children\n ) : (\n <>\n <input checked={node.checked} id={uuid} readOnly={true} type=\"checkbox\" />\n <label htmlFor={uuid}>{children}</label>\n <br />\n </>\n )}\n </li>\n )\n } else {\n return (\n <li\n className={`${hasSubLists ? 'nestedListItem' : ''}`}\n style={hasSubLists ? { listStyleType: 'none' } : undefined}\n value={node?.value}\n >\n {children}\n </li>\n )\n }\n },\n}\n"],"mappings":";AAAA,SAASA,EAAA,IAAMC,MAAM,QAAQ;AAK7B,SAASC,iBAAiB,QAAQ;AAElC,OAAO,MAAMC,gBAAA,GAA+E;EAC1FC,IAAA,EAAMA,CAAC;IAAEC,IAAI;IAAEC;EAAU,CAAE;IACzB,MAAMC,QAAA,GAAWD,UAAA,CAAW;MAC1BE,KAAA,EAAOH,IAAA,CAAKE;IACd;IAEA,MAAME,OAAA,GAAUP,iBAAA,CAAkBQ,GAAG,CAACL,IAAA,CAAKM,GAAG,IAAIN,IAAA,CAAKM,GAAG,GAAG;IAE7D,oBAAOC,IAAA,CAACH,OAAA;MAAQI,SAAA,EAAW,QAAQR,IAAA,EAAMS,QAAA,EAAU;gBAAGP;;EACxD;EACAQ,QAAA,EAAUA,CAAC;IAAEV,IAAI;IAAEC,UAAU;IAAEU;EAAM,CAAE;IACrC,MAAMC,WAAA,GAAcZ,IAAA,CAAKE,QAAQ,CAACW,IAAI,CAAEC,KAAA,IAAUA,KAAA,CAAMC,IAAI,KAAK;IAEjE,MAAMb,QAAA,GAAWD,UAAA,CAAW;MAC1BE,KAAA,EAAOH,IAAA,CAAKE;IACd;IAEA,IAAI,cAAcS,MAAA,IAAUA,MAAA,EAAQF,QAAA,KAAa,SAAS;MACxD,MAAMO,IAAA,GAAOpB,MAAA;MAEb,oBACEW,IAAA,CAAC;QACC,gBAAcP,IAAA,CAAKiB,OAAO,GAAG,SAAS;QACtCT,SAAA,EAAW,qBAAqBR,IAAA,CAAKiB,OAAO,GAAG,gCAAgC,kCAAkCL,WAAA,GAAc,oBAAoB,IAAI;QACvJ;QACAM,IAAA,EAAK;QACLC,KAAA,EAAO;UAAEC,aAAA,EAAe;QAAO;QAC/BC,QAAA,EAAU,CAAC;QACXC,KAAA,EAAOtB,IAAA,EAAMsB,KAAA;kBAEZV,WAAA,GACCV,QAAA,gBAEAqB,KAAA,CAAAC,SAAA;kCACEjB,IAAA,CAAC;YAAMU,OAAA,EAASjB,IAAA,CAAKiB,OAAO;YAAEQ,EAAA,EAAIT,IAAA;YAAMU,QAAA,EAAU;YAAMX,IAAA,EAAK;2BAC7DR,IAAA,CAAC;YAAMoB,OAAA,EAASX,IAAA;sBAAOd;2BACvBK,IAAA,CAAC;;;IAKX,OAAO;MACL,oBACEA,IAAA,CAAC;QACCC,SAAA,EAAW,GAAGI,WAAA,GAAc,mBAAmB,IAAI;QACnDO,KAAA,EAAOP,WAAA,GAAc;UAAEQ,aAAA,EAAe;QAAO,IAAIQ,SAAA;QACjDN,KAAA,EAAOtB,IAAA,EAAMsB,KAAA;kBAEZpB;;IAGP;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,wBAAwB,GAAI,yBAGtC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAInF,eAAO,MAAM,wBAAwB,4BAGlC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { createHeadlessEditor } from '@lexical/headless';
2
+ import { $convertToMarkdownString } from '@lexical/markdown';
2
3
  import { getEnabledNodes } from '../../../lexical/nodes/index.js';
3
- import { $convertToMarkdownString } from '../../../packages/@lexical/markdown/index.js';
4
4
  export const convertLexicalToMarkdown = ({
5
5
  data,
6
6
  editorConfig
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertToMarkdownString","convertLexicalToMarkdown","data","editorConfig","headlessEditor","nodes","update","setEditorState","parseEditorState","discrete","markdown","getEditorState","read","features","markdownTransformers"],"sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertToMarkdownString } from '../../../packages/@lexical/markdown/index.js'\n\nexport const convertLexicalToMarkdown = ({\n data,\n editorConfig,\n}: {\n data: SerializedEditorState\n editorConfig: SanitizedServerEditorConfig\n}): string => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(data))\n },\n { discrete: true },\n )\n\n let markdown: string = ''\n headlessEditor.getEditorState().read(() => {\n markdown = $convertToMarkdownString(editorConfig?.features?.markdownTransformers)\n })\n\n return markdown\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAIrC,SAASC,eAAe,QAAQ;AAChC,SAASC,wBAAwB,QAAQ;AAEzC,OAAO,MAAMC,wBAAA,GAA2BA,CAAC;EACvCC,IAAI;EACJC;AAAY,CAIb;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBI;IACF;EACF;EAEAC,cAAA,CAAeE,MAAM,CACnB;IACEF,cAAA,CAAeG,cAAc,CAACH,cAAA,CAAeI,gBAAgB,CAACN,IAAA;EAChE,GACA;IAAEO,QAAA,EAAU;EAAK;EAGnB,IAAIC,QAAA,GAAmB;EACvBN,cAAA,CAAeO,cAAc,GAAGC,IAAI,CAAC;IACnCF,QAAA,GAAWV,wBAAA,CAAyBG,YAAA,EAAcU,QAAA,EAAUC,oBAAA;EAC9D;EAEA,OAAOJ,QAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createHeadlessEditor","$convertToMarkdownString","getEnabledNodes","convertLexicalToMarkdown","data","editorConfig","headlessEditor","nodes","update","setEditorState","parseEditorState","discrete","markdown","getEditorState","read","features","markdownTransformers"],"sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { $convertToMarkdownString } from '@lexical/markdown'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\n\nexport const convertLexicalToMarkdown = ({\n data,\n editorConfig,\n}: {\n data: SerializedEditorState\n editorConfig: SanitizedServerEditorConfig\n}): string => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(data))\n },\n { discrete: true },\n )\n\n let markdown: string = ''\n headlessEditor.getEditorState().read(() => {\n markdown = $convertToMarkdownString(editorConfig?.features?.markdownTransformers)\n })\n\n return markdown\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,wBAAwB,QAAQ;AAIzC,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,wBAAA,GAA2BA,CAAC;EACvCC,IAAI;EACJC;AAAY,CAIb;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAOL,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAC,cAAA,CAAeE,MAAM,CACnB;IACEF,cAAA,CAAeG,cAAc,CAACH,cAAA,CAAeI,gBAAgB,CAACN,IAAA;EAChE,GACA;IAAEO,QAAA,EAAU;EAAK;EAGnB,IAAIC,QAAA,GAAmB;EACvBN,cAAA,CAAeO,cAAc,GAAGC,IAAI,CAAC;IACnCF,QAAA,GAAWX,wBAAA,CAAyBI,YAAA,EAAcU,QAAA,EAAUC,oBAAA;EAC9D;EAEA,OAAOJ,QAAA;AACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,EAC3D,6BAGC;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CAiB9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,+BAI1D;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CA0B9B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { createHeadlessEditor } from '@lexical/headless';
2
2
  import { getEnabledNodes } from '../../../lexical/nodes/index.js';
3
- import { $convertFromMarkdownString } from '../../../packages/@lexical/markdown/index.js';
3
+ import { $convertFromMarkdownString } from '../../../lexical/utils/markdown/convertFromMarkdownString.js';
4
4
  export const convertMarkdownToLexical = ({
5
5
  editorConfig,
6
6
  markdown
@@ -11,7 +11,10 @@ export const convertMarkdownToLexical = ({
11
11
  })
12
12
  });
13
13
  headlessEditor.update(() => {
14
- $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers);
14
+ // shouldMergeAdjacentLines is true so multi-line Payload block tags and
15
+ // soft-wrapped content keep being parsed as before. The exported
16
+ // $convertFromMarkdownString now defaults to false to match upstream.
17
+ $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers, undefined, false, true);
15
18
  }, {
16
19
  discrete: true
17
20
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertFromMarkdownString","convertMarkdownToLexical","editorConfig","markdown","headlessEditor","nodes","update","features","markdownTransformers","discrete","editorJSON","getEditorState","toJSON"],"sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\nimport type { DefaultNodeTypes, TypedEditorState } from '../../../types/nodeTypes.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertFromMarkdownString } from '../../../packages/@lexical/markdown/index.js'\n\nexport const convertMarkdownToLexical = <\n TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes,\n>({\n editorConfig,\n markdown,\n}: {\n editorConfig: SanitizedServerEditorConfig\n markdown: string\n}): TypedEditorState<TNodeTypes> => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers)\n },\n { discrete: true },\n )\n\n const editorJSON = headlessEditor.getEditorState().toJSON()\n\n return editorJSON as TypedEditorState<TNodeTypes>\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAKrC,SAASC,eAAe,QAAQ;AAChC,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,wBAAA,GAA2BA,CAEtC;EACAC,YAAY;EACZC;AAAQ,CAIT;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAE,cAAA,CAAeE,MAAM,CACnB;IACEN,0BAAA,CAA2BG,QAAA,EAAUD,YAAA,CAAaK,QAAQ,CAACC,oBAAoB;EACjF,GACA;IAAEC,QAAA,EAAU;EAAK;EAGnB,MAAMC,UAAA,GAAaN,cAAA,CAAeO,cAAc,GAAGC,MAAM;EAEzD,OAAOF,UAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertFromMarkdownString","convertMarkdownToLexical","editorConfig","markdown","headlessEditor","nodes","update","features","markdownTransformers","undefined","discrete","editorJSON","getEditorState","toJSON"],"sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\nimport type { DefaultNodeTypes, TypedEditorState } from '../../../types/nodeTypes.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertFromMarkdownString } from '../../../lexical/utils/markdown/convertFromMarkdownString.js'\n\nexport const convertMarkdownToLexical = <\n TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes,\n>({\n editorConfig,\n markdown,\n}: {\n editorConfig: SanitizedServerEditorConfig\n markdown: string\n}): TypedEditorState<TNodeTypes> => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n // shouldMergeAdjacentLines is true so multi-line Payload block tags and\n // soft-wrapped content keep being parsed as before. The exported\n // $convertFromMarkdownString now defaults to false to match upstream.\n $convertFromMarkdownString(\n markdown,\n editorConfig.features.markdownTransformers,\n undefined,\n false,\n true,\n )\n },\n { discrete: true },\n )\n\n const editorJSON = headlessEditor.getEditorState().toJSON()\n\n return editorJSON as TypedEditorState<TNodeTypes>\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAKrC,SAASC,eAAe,QAAQ;AAChC,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,wBAAA,GAA2BA,CAEtC;EACAC,YAAY;EACZC;AAAQ,CAIT;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAE,cAAA,CAAeE,MAAM,CACnB;IACE;IACA;IACA;IACAN,0BAAA,CACEG,QAAA,EACAD,YAAA,CAAaK,QAAQ,CAACC,oBAAoB,EAC1CC,SAAA,EACA,OACA;EAEJ,GACA;IAAEC,QAAA,EAAU;EAAK;EAGnB,MAAMC,UAAA,GAAaP,cAAA,CAAeQ,cAAc,GAAGC,MAAM;EAEzD,OAAOF,UAAA;AACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"payloadPopulateFn.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/utilities/payloadPopulateFn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAE7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIrE,eAAO,MAAM,oBAAoB,EAAE,CACjC,IAAI,EAAE;IACJ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,GAAG,CACA;IACE;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ,GACD;IACE;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAA;IACf;;;OAGG;IACH,GAAG,EAAE,cAAc,CAAA;CACpB,CACJ,KACE,OAAO,CAAC,cAAc,CAyC1B,CAAA"}
1
+ {"version":3,"file":"payloadPopulateFn.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/utilities/payloadPopulateFn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAEnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIrE,eAAO,MAAM,oBAAoB,EAAE,CACjC,IAAI,EAAE;IACJ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,GAAG,CACA;IACE;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ,GACD;IACE;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAA;IACf;;;OAGG;IACH,GAAG,EAAE,cAAc,CAAA;CACpB,CACJ,KACE,OAAO,CAAC,cAAc,CAyC1B,CAAA"}
@@ -1,4 +1,4 @@
1
- import { createLocalReq } from 'payload';
1
+ import { createPayloadRequest } from 'payload';
2
2
  import { populate } from '../../../populateGraphQL/populate.js';
3
3
  export const getPayloadPopulateFn = async ({
4
4
  currentDepth,
@@ -11,7 +11,9 @@ export const getPayloadPopulateFn = async ({
11
11
  }) => {
12
12
  let reqToUse = req;
13
13
  if (req === undefined && payload) {
14
- reqToUse = await createLocalReq({}, payload);
14
+ reqToUse = await createPayloadRequest({
15
+ payload
16
+ });
15
17
  }
16
18
  if (!reqToUse) {
17
19
  throw new Error('No req or payload provided');
@@ -1 +1 @@
1
- {"version":3,"file":"payloadPopulateFn.js","names":["createLocalReq","populate","getPayloadPopulateFn","currentDepth","depth","draft","overrideAccess","payload","req","showHiddenFields","reqToUse","undefined","Error","populateFn","id","collectionSlug","select","dataContainer","data","key","value"],"sources":["../../../../src/features/converters/utilities/payloadPopulateFn.ts"],"sourcesContent":["import { createLocalReq, type Payload, type PayloadRequest, type TypedLocale } from 'payload'\n\nimport type { HTMLPopulateFn } from '../lexicalToHtml/async/types.js'\n\nimport { populate } from '../../../populateGraphQL/populate.js'\n\nexport const getPayloadPopulateFn: (\n args: {\n currentDepth: number\n depth: number\n draft?: boolean\n locale?: TypedLocale\n\n overrideAccess?: boolean\n showHiddenFields?: boolean\n } & (\n | {\n /**\n * This payload property will only be used if req is undefined. If localization is enabled, you must pass `req` instead.\n */\n payload: Payload\n /**\n * When the converter is called, req CAN be passed in depending on where it's run.\n * If this is undefined and config is passed through, lexical will create a new req object for you.\n */\n req?: never\n }\n | {\n /**\n * This payload property will only be used if req is undefined. If localization is enabled, you must pass `req` instead.\n */\n payload?: never\n /**\n * When the converter is called, req CAN be passed in depending on where it's run.\n * If this is undefined and config is passed through, lexical will create a new req object for you.\n */\n req: PayloadRequest\n }\n ),\n) => Promise<HTMLPopulateFn> = async ({\n currentDepth,\n depth,\n draft,\n overrideAccess,\n payload,\n req,\n showHiddenFields,\n}) => {\n let reqToUse: PayloadRequest | undefined = req\n if (req === undefined && payload) {\n reqToUse = await createLocalReq({}, payload)\n }\n\n if (!reqToUse) {\n throw new Error('No req or payload provided')\n }\n\n const populateFn: HTMLPopulateFn = async ({ id, collectionSlug, select }) => {\n const dataContainer: {\n value?: any\n } = {}\n\n await populate({\n id,\n collectionSlug,\n currentDepth,\n data: dataContainer,\n depth,\n draft: draft ?? false,\n key: 'value',\n overrideAccess: overrideAccess ?? true,\n req: reqToUse,\n select,\n showHiddenFields: showHiddenFields ?? false,\n })\n\n return dataContainer.value\n }\n\n return populateFn\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAA6D;AAIpF,SAASC,QAAQ,QAAQ;AAEzB,OAAO,MAAMC,oBAAA,GAiCkB,MAAAA,CAAO;EACpCC,YAAY;EACZC,KAAK;EACLC,KAAK;EACLC,cAAc;EACdC,OAAO;EACPC,GAAG;EACHC;AAAgB,CACjB;EACC,IAAIC,QAAA,GAAuCF,GAAA;EAC3C,IAAIA,GAAA,KAAQG,SAAA,IAAaJ,OAAA,EAAS;IAChCG,QAAA,GAAW,MAAMV,cAAA,CAAe,CAAC,GAAGO,OAAA;EACtC;EAEA,IAAI,CAACG,QAAA,EAAU;IACb,MAAM,IAAIE,KAAA,CAAM;EAClB;EAEA,MAAMC,UAAA,GAA6B,MAAAA,CAAO;IAAEC,EAAE;IAAEC,cAAc;IAAEC;EAAM,CAAE;IACtE,MAAMC,aAAA,GAEF,CAAC;IAEL,MAAMhB,QAAA,CAAS;MACba,EAAA;MACAC,cAAA;MACAZ,YAAA;MACAe,IAAA,EAAMD,aAAA;MACNb,KAAA;MACAC,KAAA,EAAOA,KAAA,IAAS;MAChBc,GAAA,EAAK;MACLb,cAAA,EAAgBA,cAAA,IAAkB;MAClCE,GAAA,EAAKE,QAAA;MACLM,MAAA;MACAP,gBAAA,EAAkBA,gBAAA,IAAoB;IACxC;IAEA,OAAOQ,aAAA,CAAcG,KAAK;EAC5B;EAEA,OAAOP,UAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"payloadPopulateFn.js","names":["createPayloadRequest","populate","getPayloadPopulateFn","currentDepth","depth","draft","overrideAccess","payload","req","showHiddenFields","reqToUse","undefined","Error","populateFn","id","collectionSlug","select","dataContainer","data","key","value"],"sources":["../../../../src/features/converters/utilities/payloadPopulateFn.ts"],"sourcesContent":["import { createPayloadRequest, type Payload, type PayloadRequest, type TypedLocale } from 'payload'\n\nimport type { HTMLPopulateFn } from '../lexicalToHtml/async/types.js'\n\nimport { populate } from '../../../populateGraphQL/populate.js'\n\nexport const getPayloadPopulateFn: (\n args: {\n currentDepth: number\n depth: number\n draft?: boolean\n locale?: TypedLocale\n\n overrideAccess?: boolean\n showHiddenFields?: boolean\n } & (\n | {\n /**\n * This payload property will only be used if req is undefined. If localization is enabled, you must pass `req` instead.\n */\n payload: Payload\n /**\n * When the converter is called, req CAN be passed in depending on where it's run.\n * If this is undefined and config is passed through, lexical will create a new req object for you.\n */\n req?: never\n }\n | {\n /**\n * This payload property will only be used if req is undefined. If localization is enabled, you must pass `req` instead.\n */\n payload?: never\n /**\n * When the converter is called, req CAN be passed in depending on where it's run.\n * If this is undefined and config is passed through, lexical will create a new req object for you.\n */\n req: PayloadRequest\n }\n ),\n) => Promise<HTMLPopulateFn> = async ({\n currentDepth,\n depth,\n draft,\n overrideAccess,\n payload,\n req,\n showHiddenFields,\n}) => {\n let reqToUse: PayloadRequest | undefined = req\n if (req === undefined && payload) {\n reqToUse = await createPayloadRequest({ payload })\n }\n\n if (!reqToUse) {\n throw new Error('No req or payload provided')\n }\n\n const populateFn: HTMLPopulateFn = async ({ id, collectionSlug, select }) => {\n const dataContainer: {\n value?: any\n } = {}\n\n await populate({\n id,\n collectionSlug,\n currentDepth,\n data: dataContainer,\n depth,\n draft: draft ?? false,\n key: 'value',\n overrideAccess: overrideAccess ?? true,\n req: reqToUse,\n select,\n showHiddenFields: showHiddenFields ?? false,\n })\n\n return dataContainer.value\n }\n\n return populateFn\n}\n"],"mappings":"AAAA,SAASA,oBAAoB,QAA6D;AAI1F,SAASC,QAAQ,QAAQ;AAEzB,OAAO,MAAMC,oBAAA,GAiCkB,MAAAA,CAAO;EACpCC,YAAY;EACZC,KAAK;EACLC,KAAK;EACLC,cAAc;EACdC,OAAO;EACPC,GAAG;EACHC;AAAgB,CACjB;EACC,IAAIC,QAAA,GAAuCF,GAAA;EAC3C,IAAIA,GAAA,KAAQG,SAAA,IAAaJ,OAAA,EAAS;IAChCG,QAAA,GAAW,MAAMV,oBAAA,CAAqB;MAAEO;IAAQ;EAClD;EAEA,IAAI,CAACG,QAAA,EAAU;IACb,MAAM,IAAIE,KAAA,CAAM;EAClB;EAEA,MAAMC,UAAA,GAA6B,MAAAA,CAAO;IAAEC,EAAE;IAAEC,cAAc;IAAEC;EAAM,CAAE;IACtE,MAAMC,aAAA,GAEF,CAAC;IAEL,MAAMhB,QAAA,CAAS;MACba,EAAA;MACAC,cAAA;MACAZ,YAAA;MACAe,IAAA,EAAMD,aAAA;MACNb,KAAA;MACAC,KAAA,EAAOA,KAAA,IAAS;MAChBc,GAAA,EAAK;MACLb,cAAA,EAAgBA,cAAA,IAAkB;MAClCE,GAAA,EAAKE,QAAA;MACLM,MAAA;MACAP,gBAAA,EAAkBA,gBAAA,IAAoB;IACxC;IAEA,OAAOQ,aAAA,CAAcG,KAAK;EAC5B;EAEA,OAAOP,UAAA;AACT","ignoreList":[]}
@@ -1,9 +1,9 @@
1
1
  .debug-jsx-converter {
2
- padding-left: var(--spacer-5);
2
+ padding-inline-start: var(--spacer-5);
3
3
 
4
4
  ul,
5
5
  ol {
6
- padding-left: revert;
6
+ padding-inline-start: revert;
7
7
  margin: revert;
8
8
  }
9
9
  }
@@ -19,7 +19,6 @@
19
19
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.4);
20
20
  background-color: #222;
21
21
  color: white;
22
- transition: box-shadow 50ms ease-out;
23
22
  }
24
23
 
25
24
  .test-recorder-button:active {
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from '@lexical/markdown';
3
4
  import { $isTableSelection } from '@lexical/table';
4
5
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
5
6
  import { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js';
6
7
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
7
8
  import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
8
- import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from './markdownTransformers.js';
9
9
  const toolbarGroups = [toolbarFormatGroupWithItems([{
10
10
  ChildComponent: BoldIcon,
11
11
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","BoldIcon","createClientFeature","toolbarFormatGroupWithItems","BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","BoldFeatureClient","featureProviderMap","markdownTransformers","get","push","enableFormats","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/bold/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nexport const BoldFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n enableFormats: ['bold'],\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n"],"mappings":"AAAA;;AACA,SAASA,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,QAAQ,QAAQ;AACzB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAC5C,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV;AAEP,MAAMC,aAAA,GAAgC,CACpCL,2BAAA,CAA4B,CAC1B;EACEM,cAAA,EAAgBR,QAAA;EAChBS,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIZ,iBAAA,CAAkBY,SAAA,KAAcb,iBAAA,CAAkBa,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAChB,mBAAA,EAAqB;EAC9C;EACAiB,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,iBAAA,GAAoBhB,mBAAA,CAAoB,CAAC;EAAEiB;AAAkB,CAAE;EAC1E,MAAMC,oBAAA,GAAuB,CAACd,SAAA,EAAWC,eAAA,CAAgB;EACzD,IAAIY,kBAAA,CAAmBE,GAAG,CAAC,WAAW;IACpCD,oBAAA,CAAqBE,IAAI,CAACjB,sBAAA,EAAwBD,gBAAA;EACpD;EAEA,OAAO;IACLmB,aAAA,EAAe,CAAC,OAAO;IACvBH,oBAAA;IACAI,YAAA,EAAc;MACZC,MAAA,EAAQjB;IACV;IACAkB,aAAA,EAAe;MACbD,MAAA,EAAQjB;IACV;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"feature.client.js","names":["BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","BoldIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","BoldFeatureClient","featureProviderMap","markdownTransformers","get","push","enableFormats","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/bold/feature.client.tsx"],"sourcesContent":["'use client'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nexport const BoldFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n enableFormats: ['bold'],\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n"],"mappings":"AAAA;;AACA,SACEA,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV;AACP,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,QAAQ,QAAQ;AACzB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,QAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,iBAAA,GAAoBZ,mBAAA,CAAoB,CAAC;EAAEa;AAAkB,CAAE;EAC1E,MAAMC,oBAAA,GAAuB,CAACpB,SAAA,EAAWC,eAAA,CAAgB;EACzD,IAAIkB,kBAAA,CAAmBE,GAAG,CAAC,WAAW;IACpCD,oBAAA,CAAqBE,IAAI,CAACvB,sBAAA,EAAwBD,gBAAA;EACpD;EAEA,OAAO;IACLyB,aAAA,EAAe,CAAC,OAAO;IACvBH,oBAAA;IACAI,YAAA,EAAc;MACZC,MAAA,EAAQjB;IACV;IACAkB,aAAA,EAAe;MACbD,MAAA,EAAQjB;IACV;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.server.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,+FActB,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.server.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,+FActB,CAAA"}
@@ -1,5 +1,5 @@
1
+ import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from '@lexical/markdown';
1
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
2
- import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from './markdownTransformers.js';
3
3
  export const BoldFeature = createServerFeature({
4
4
  dependenciesSoft: ['italic'],
5
5
  feature: ({
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.js","names":["createServerFeature","BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","BoldFeature","dependenciesSoft","feature","featureProviderMap","markdownTransformers","get","push","ClientFeature","key"],"sources":["../../../../src/features/format/bold/feature.server.ts"],"sourcesContent":["import { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nexport const BoldFeature = createServerFeature({\n dependenciesSoft: ['italic'],\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#BoldFeatureClient',\n markdownTransformers,\n }\n },\n key: 'bold',\n})\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AACpC,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV;AAEP,OAAO,MAAMC,WAAA,GAAcL,mBAAA,CAAoB;EAC7CM,gBAAA,EAAkB,CAAC,SAAS;EAC5BC,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,MAAMC,oBAAA,GAAuB,CAACN,SAAA,EAAWC,eAAA,CAAgB;IACzD,IAAII,kBAAA,CAAmBE,GAAG,CAAC,WAAW;MACpCD,oBAAA,CAAqBE,IAAI,CAACT,sBAAA,EAAwBD,gBAAA;IACpD;IAEA,OAAO;MACLW,aAAA,EAAe;MACfH;IACF;EACF;EACAI,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"feature.server.js","names":["BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","createServerFeature","BoldFeature","dependenciesSoft","feature","featureProviderMap","markdownTransformers","get","push","ClientFeature","key"],"sources":["../../../../src/features/format/bold/feature.server.ts"],"sourcesContent":["import {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const BoldFeature = createServerFeature({\n dependenciesSoft: ['italic'],\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#BoldFeatureClient',\n markdownTransformers,\n }\n },\n key: 'bold',\n})\n"],"mappings":"AAAA,SACEA,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV;AAEP,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,WAAA,GAAcD,mBAAA,CAAoB;EAC7CE,gBAAA,EAAkB,CAAC,SAAS;EAC5BC,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,MAAMC,oBAAA,GAAuB,CAACP,SAAA,EAAWC,eAAA,CAAgB;IACzD,IAAIK,kBAAA,CAAmBE,GAAG,CAAC,WAAW;MACpCD,oBAAA,CAAqBE,IAAI,CAACV,sBAAA,EAAwBD,gBAAA;IACpD;IAEA,OAAO;MACLY,aAAA,EAAe;MACfH;IACF;EACF;EACAI,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import { INLINE_CODE } from '@lexical/markdown';
3
4
  import { $isTableSelection } from '@lexical/table';
4
5
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
5
6
  import { CodeIcon } from '../../../lexical/ui/icons/Code/index.js';
6
7
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
7
8
  import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
8
- import { INLINE_CODE } from './markdownTransformers.js';
9
9
  const toolbarGroups = [toolbarFormatGroupWithItems([{
10
10
  ChildComponent: CodeIcon,
11
11
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","CodeIcon","createClientFeature","toolbarFormatGroupWithItems","INLINE_CODE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","InlineCodeFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nexport const InlineCodeFeatureClient = createClientFeature({\n enableFormats: ['code'],\n markdownTransformers: [INLINE_CODE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,QAAQ,QAAQ;AACzB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,WAAW,QAAQ;AAE5B,MAAMC,aAAA,GAAgC,CACpCF,2BAAA,CAA4B,CAC1B;EACEG,cAAA,EAAgBL,QAAA;EAChBM,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIT,iBAAA,CAAkBS,SAAA,KAAcV,iBAAA,CAAkBU,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACb,mBAAA,EAAqB;EAC9C;EACAc,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,uBAAA,GAA0Bb,mBAAA,CAAoB;EACzDc,aAAA,EAAe,CAAC,OAAO;EACvBC,oBAAA,EAAsB,CAACb,WAAA,CAAY;EACnCc,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"file":"feature.client.js","names":["INLINE_CODE","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","CodeIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","InlineCodeFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INLINE_CODE } from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nexport const InlineCodeFeatureClient = createClientFeature({\n enableFormats: ['code'],\n markdownTransformers: [INLINE_CODE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,QAAQ;AAC5B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,QAAQ,QAAQ;AACzB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,QAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,uBAAA,GAA0BZ,mBAAA,CAAoB;EACzDa,aAAA,EAAe,CAAC,OAAO;EACvBC,oBAAA,EAAsB,CAACnB,WAAA,CAAY;EACnCoB,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,+FAM5B,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,+FAM5B,CAAA"}
@@ -1,5 +1,5 @@
1
+ import { INLINE_CODE } from '@lexical/markdown';
1
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
2
- import { INLINE_CODE } from './markdownTransformers.js';
3
3
  export const InlineCodeFeature = createServerFeature({
4
4
  feature: {
5
5
  ClientFeature: '@payloadcms/richtext-lexical/client#InlineCodeFeatureClient',
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.js","names":["createServerFeature","INLINE_CODE","InlineCodeFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"sourcesContent":["import { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nexport const InlineCodeFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#InlineCodeFeatureClient',\n markdownTransformers: [INLINE_CODE],\n },\n key: 'inlineCode',\n})\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,WAAW,QAAQ;AAE5B,OAAO,MAAMC,iBAAA,GAAoBF,mBAAA,CAAoB;EACnDG,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,oBAAA,EAAsB,CAACJ,WAAA;EACzB;EACAK,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"feature.server.js","names":["INLINE_CODE","createServerFeature","InlineCodeFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"sourcesContent":["import { INLINE_CODE } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const InlineCodeFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#InlineCodeFeatureClient',\n markdownTransformers: [INLINE_CODE],\n },\n key: 'inlineCode',\n})\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ;AAE5B,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,iBAAA,GAAoBD,mBAAA,CAAoB;EACnDE,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,oBAAA,EAAsB,CAACL,WAAA;EACzB;EACAM,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown';
3
4
  import { $isTableSelection } from '@lexical/table';
4
5
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
5
6
  import { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js';
6
7
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
7
8
  import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
8
- import { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js';
9
9
  const toolbarGroups = [toolbarFormatGroupWithItems([{
10
10
  ChildComponent: ItalicIcon,
11
11
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","ItalicIcon","createClientFeature","toolbarFormatGroupWithItems","ITALIC_STAR","ITALIC_UNDERSCORE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","ItalicFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/italic/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: ItalicIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('italic')\n }\n return false\n },\n key: 'italic',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n },\n order: 2,\n },\n ]),\n]\n\nexport const ItalicFeatureClient = createClientFeature({\n enableFormats: ['italic'],\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,WAAW,EAAEC,iBAAiB,QAAQ;AAE/C,MAAMC,aAAA,GAAgC,CACpCH,2BAAA,CAA4B,CAC1B;EACEI,cAAA,EAAgBN,UAAA;EAChBO,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIV,iBAAA,CAAkBU,SAAA,KAAcX,iBAAA,CAAkBW,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACd,mBAAA,EAAqB;EAC9C;EACAe,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,mBAAA,GAAsBd,mBAAA,CAAoB;EACrDe,aAAA,EAAe,CAAC,SAAS;EACzBC,oBAAA,EAAsB,CAACd,WAAA,EAAaC,iBAAA,CAAkB;EACtDc,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"file":"feature.client.js","names":["ITALIC_STAR","ITALIC_UNDERSCORE","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","ItalicIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","ItalicFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/italic/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: ItalicIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('italic')\n }\n return false\n },\n key: 'italic',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n },\n order: 2,\n },\n ]),\n]\n\nexport const ItalicFeatureClient = createClientFeature({\n enableFormats: ['italic'],\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,iBAAiB,QAAQ;AAC/C,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,UAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,mBAAA,GAAsBZ,mBAAA,CAAoB;EACrDa,aAAA,EAAe,CAAC,SAAS;EACzBC,oBAAA,EAAsB,CAACpB,WAAA,EAAaC,iBAAA,CAAkB;EACtDoB,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.server.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,+FAMxB,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,+FAMxB,CAAA"}
@@ -1,5 +1,5 @@
1
+ import { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown';
1
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
2
- import { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js';
3
3
  export const ItalicFeature = createServerFeature({
4
4
  feature: {
5
5
  ClientFeature: '@payloadcms/richtext-lexical/client#ItalicFeatureClient',
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.js","names":["createServerFeature","ITALIC_STAR","ITALIC_UNDERSCORE","ItalicFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/italic/feature.server.ts"],"sourcesContent":["import { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js'\n\nexport const ItalicFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#ItalicFeatureClient',\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n },\n key: 'italic',\n})\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,WAAW,EAAEC,iBAAiB,QAAQ;AAE/C,OAAO,MAAMC,aAAA,GAAgBH,mBAAA,CAAoB;EAC/CI,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,oBAAA,EAAsB,CAACL,WAAA,EAAaC,iBAAA;EACtC;EACAK,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"feature.server.js","names":["ITALIC_STAR","ITALIC_UNDERSCORE","createServerFeature","ItalicFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/italic/feature.server.ts"],"sourcesContent":["import { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const ItalicFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#ItalicFeatureClient',\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n },\n key: 'italic',\n})\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,iBAAiB,QAAQ;AAE/C,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,aAAA,GAAgBD,mBAAA,CAAoB;EAC/CE,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,oBAAA,EAAsB,CAACN,WAAA,EAAaC,iBAAA;EACtC;EACAM,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
1
+ {"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,UAAW,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import { STRIKETHROUGH } from '@lexical/markdown';
3
4
  import { $isTableSelection } from '@lexical/table';
4
5
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
5
6
  import { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js';
6
7
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
7
8
  import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
8
- import { STRIKETHROUGH } from './markdownTransformers.js';
9
9
  const toolbarGroups = [toolbarFormatGroupWithItems([{
10
10
  ChildComponent: StrikethroughIcon,
11
11
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","StrikethroughIcon","createClientFeature","toolbarFormatGroupWithItems","STRIKETHROUGH","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","StrikethroughFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/strikethrough/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { STRIKETHROUGH } from './markdownTransformers.js'\n\nconst toolbarGroups = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: StrikethroughIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('strikethrough')\n }\n return false\n },\n key: 'strikethrough',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n },\n order: 4,\n },\n ]),\n]\n\nexport const StrikethroughFeatureClient = createClientFeature({\n enableFormats: ['strikethrough'],\n markdownTransformers: [STRIKETHROUGH],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAEvD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,aAAa,QAAQ;AAE9B,MAAMC,aAAA,GAAgB,CACpBF,2BAAA,CAA4B,CAC1B;EACEG,cAAA,EAAgBL,iBAAA;EAChBM,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIT,iBAAA,CAAkBS,SAAA,KAAcV,iBAAA,CAAkBU,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACb,mBAAA,EAAqB;EAC9C;EACAc,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6Bb,mBAAA,CAAoB;EAC5Dc,aAAA,EAAe,CAAC,gBAAgB;EAChCC,oBAAA,EAAsB,CAACb,aAAA,CAAc;EACrCc,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"file":"feature.client.js","names":["STRIKETHROUGH","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","StrikethroughIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","StrikethroughFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/strikethrough/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { STRIKETHROUGH } from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: StrikethroughIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('strikethrough')\n }\n return false\n },\n key: 'strikethrough',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n },\n order: 4,\n },\n ]),\n]\n\nexport const StrikethroughFeatureClient = createClientFeature({\n enableFormats: ['strikethrough'],\n markdownTransformers: [STRIKETHROUGH],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,aAAa,QAAQ;AAC9B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAEvD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgB,CACpBD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,iBAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6BZ,mBAAA,CAAoB;EAC5Da,aAAA,EAAe,CAAC,gBAAgB;EAChCC,oBAAA,EAAsB,CAACnB,aAAA,CAAc;EACrCoB,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,+FAO/B,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,+FAO/B,CAAA"}
@@ -1,5 +1,5 @@
1
+ import { STRIKETHROUGH } from '@lexical/markdown';
1
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
2
- import { STRIKETHROUGH } from './markdownTransformers.js';
3
3
  export const StrikethroughFeature = createServerFeature({
4
4
  feature: {
5
5
  ClientFeature: '@payloadcms/richtext-lexical/client#StrikethroughFeatureClient',
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.js","names":["createServerFeature","STRIKETHROUGH","StrikethroughFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"sourcesContent":["import { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { STRIKETHROUGH } from './markdownTransformers.js'\n\nexport const StrikethroughFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#StrikethroughFeatureClient',\n\n markdownTransformers: [STRIKETHROUGH],\n },\n key: 'strikethrough',\n})\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,aAAa,QAAQ;AAE9B,OAAO,MAAMC,oBAAA,GAAuBF,mBAAA,CAAoB;EACtDG,OAAA,EAAS;IACPC,aAAA,EAAe;IAEfC,oBAAA,EAAsB,CAACJ,aAAA;EACzB;EACAK,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"feature.server.js","names":["STRIKETHROUGH","createServerFeature","StrikethroughFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"sourcesContent":["import { STRIKETHROUGH } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const StrikethroughFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#StrikethroughFeatureClient',\n\n markdownTransformers: [STRIKETHROUGH],\n },\n key: 'strikethrough',\n})\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ;AAE9B,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,oBAAA,GAAuBD,mBAAA,CAAoB;EACtDE,OAAA,EAAS;IACPC,aAAA,EAAe;IAEfC,oBAAA,EAAsB,CAACL,aAAA;EACzB;EACAM,GAAA,EAAK;AACP","ignoreList":[]}
@@ -15,7 +15,7 @@ import { H6Icon } from '../../../lexical/ui/icons/H6/index.js';
15
15
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
16
16
  import { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js';
17
17
  import { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js';
18
- import { MarkdownTransformer } from '../markdownTransformer.js';
18
+ import { PAYLOAD_HEADING } from '../markdownTransformer.js';
19
19
  const $setHeading = headingSize => {
20
20
  const selection = $getSelection();
21
21
  $setBlocksType(selection, () => $createHeadingNode(headingSize));
@@ -74,7 +74,7 @@ export const HeadingFeatureClient = createClientFeature(({
74
74
  };
75
75
  }))];
76
76
  return {
77
- markdownTransformers: [MarkdownTransformer(enabledHeadingSizes)],
77
+ markdownTransformers: [PAYLOAD_HEADING(enabledHeadingSizes)],
78
78
  nodes: [HeadingNode],
79
79
  plugins: [{
80
80
  Component: HeadingPlugin,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createHeadingNode","$isHeadingNode","HeadingNode","$setBlocksType","$getSelection","$isRangeSelection","useEffect","H1Icon","H2Icon","H3Icon","H4Icon","H5Icon","H6Icon","createClientFeature","slashMenuBasicGroupWithItems","toolbarTextDropdownGroupWithItems","MarkdownTransformer","$setHeading","headingSize","selection","iconImports","h1","h2","h3","h4","h5","h6","HeadingFeatureClient","props","enabledHeadingSizes","toolbarGroups","map","i","ChildComponent","isActive","node","getNodes","getTag","parent","getParent","key","label","i18n","t","headingLevel","charAt","onSelect","editor","update","order","markdownTransformers","nodes","plugins","Component","HeadingPlugin","position","sanitizedClientFeatureProps","slashMenu","groups","length","Icon","keywords","toolbarFixed","toolbarInline","t0","$","clientProps","t1","t2","undefined","t3","at","lowestAllowed","t4","t5","registerNodeTransform","includes","setTag"],"sources":["../../../../src/features/heading/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { PluginComponent } from '../../typesClient.js'\nimport type { HeadingFeatureProps } from '../server/index.js'\n\nimport { H1Icon } from '../../../lexical/ui/icons/H1/index.js'\nimport { H2Icon } from '../../../lexical/ui/icons/H2/index.js'\nimport { H3Icon } from '../../../lexical/ui/icons/H3/index.js'\nimport { H4Icon } from '../../../lexical/ui/icons/H4/index.js'\nimport { H5Icon } from '../../../lexical/ui/icons/H5/index.js'\nimport { H6Icon } from '../../../lexical/ui/icons/H6/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from '../markdownTransformer.js'\n\nconst $setHeading = (headingSize: HeadingTagType) => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createHeadingNode(headingSize))\n}\n\nconst iconImports = {\n h1: H1Icon,\n h2: H2Icon,\n h3: H3Icon,\n h4: H4Icon,\n h5: H5Icon,\n h6: H6Icon,\n}\n\nexport const HeadingFeatureClient = createClientFeature<HeadingFeatureProps>(({ props }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = props\n\n const toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems(\n enabledHeadingSizes.map((headingSize, i) => {\n return {\n ChildComponent: iconImports[headingSize],\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isHeadingNode(node) && node.getTag() === headingSize) {\n continue\n }\n\n const parent = node.getParent()\n if ($isHeadingNode(parent) && parent.getTag() === headingSize) {\n continue\n }\n\n return false\n }\n return true\n },\n key: headingSize,\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', { headingLevel: headingSize.charAt(1) })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n order: i + 2,\n }\n }),\n ),\n ]\n\n return {\n markdownTransformers: [MarkdownTransformer(enabledHeadingSizes)],\n nodes: [HeadingNode],\n plugins: [\n {\n Component: HeadingPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: enabledHeadingSizes?.length\n ? [\n slashMenuBasicGroupWithItems(\n enabledHeadingSizes.map((headingSize) => {\n return {\n Icon: iconImports[headingSize],\n key: `heading-${headingSize.charAt(1)}`,\n keywords: ['heading', headingSize],\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', {\n headingLevel: headingSize.charAt(1),\n })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n }\n }),\n ),\n ]\n : [],\n },\n toolbarFixed: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n toolbarInline: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n }\n})\n\nconst HeadingPlugin: PluginComponent<HeadingFeatureProps> = ({ clientProps }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = clientProps\n const lowestAllowed = enabledHeadingSizes.at(-1)\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!lowestAllowed || enabledHeadingSizes.length === 6) {\n return\n }\n return editor.registerNodeTransform(HeadingNode, (node) => {\n if (!enabledHeadingSizes.includes(node.getTag())) {\n node.setTag(lowestAllowed)\n }\n })\n }, [editor, enabledHeadingSizes, lowestAllowed])\n\n return null\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createHeadingNode","$isHeadingNode","HeadingNode","$setBlocksType","$getSelection","$isRangeSelection","useEffect","H1Icon","H2Icon","H3Icon","H4Icon","H5Icon","H6Icon","createClientFeature","slashMenuBasicGroupWithItems","toolbarTextDropdownGroupWithItems","PAYLOAD_HEADING","$setHeading","headingSize","selection","iconImports","h1","h2","h3","h4","h5","h6","HeadingFeatureClient","props","enabledHeadingSizes","toolbarGroups","map","i","ChildComponent","isActive","node","getNodes","getTag","parent","getParent","key","label","i18n","t","headingLevel","charAt","onSelect","editor","update","order","markdownTransformers","nodes","plugins","Component","HeadingPlugin","position","sanitizedClientFeatureProps","slashMenu","groups","length","Icon","keywords","toolbarFixed","toolbarInline","t0","$","clientProps","t1","t2","undefined","t3","at","lowestAllowed","t4","t5","registerNodeTransform","includes","setTag"],"sources":["../../../../src/features/heading/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { PluginComponent } from '../../typesClient.js'\nimport type { HeadingFeatureProps } from '../server/index.js'\n\nimport { H1Icon } from '../../../lexical/ui/icons/H1/index.js'\nimport { H2Icon } from '../../../lexical/ui/icons/H2/index.js'\nimport { H3Icon } from '../../../lexical/ui/icons/H3/index.js'\nimport { H4Icon } from '../../../lexical/ui/icons/H4/index.js'\nimport { H5Icon } from '../../../lexical/ui/icons/H5/index.js'\nimport { H6Icon } from '../../../lexical/ui/icons/H6/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { PAYLOAD_HEADING } from '../markdownTransformer.js'\n\nconst $setHeading = (headingSize: HeadingTagType) => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createHeadingNode(headingSize))\n}\n\nconst iconImports = {\n h1: H1Icon,\n h2: H2Icon,\n h3: H3Icon,\n h4: H4Icon,\n h5: H5Icon,\n h6: H6Icon,\n}\n\nexport const HeadingFeatureClient = createClientFeature<HeadingFeatureProps>(({ props }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = props\n\n const toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems(\n enabledHeadingSizes.map((headingSize, i) => {\n return {\n ChildComponent: iconImports[headingSize],\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isHeadingNode(node) && node.getTag() === headingSize) {\n continue\n }\n\n const parent = node.getParent()\n if ($isHeadingNode(parent) && parent.getTag() === headingSize) {\n continue\n }\n\n return false\n }\n return true\n },\n key: headingSize,\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', { headingLevel: headingSize.charAt(1) })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n order: i + 2,\n }\n }),\n ),\n ]\n\n return {\n markdownTransformers: [PAYLOAD_HEADING(enabledHeadingSizes)],\n nodes: [HeadingNode],\n plugins: [\n {\n Component: HeadingPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: enabledHeadingSizes?.length\n ? [\n slashMenuBasicGroupWithItems(\n enabledHeadingSizes.map((headingSize) => {\n return {\n Icon: iconImports[headingSize],\n key: `heading-${headingSize.charAt(1)}`,\n keywords: ['heading', headingSize],\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', {\n headingLevel: headingSize.charAt(1),\n })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n }\n }),\n ),\n ]\n : [],\n },\n toolbarFixed: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n toolbarInline: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n }\n})\n\nconst HeadingPlugin: PluginComponent<HeadingFeatureProps> = ({ clientProps }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = clientProps\n const lowestAllowed = enabledHeadingSizes.at(-1)\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!lowestAllowed || enabledHeadingSizes.length === 6) {\n return\n }\n return editor.registerNodeTransform(HeadingNode, (node) => {\n if (!enabledHeadingSizes.includes(node.getTag())) {\n node.setTag(lowestAllowed)\n }\n })\n }, [editor, enabledHeadingSizes, lowestAllowed])\n\n return null\n}\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export declare const ALLOWED_HEADING_TAGS: Set<string>;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/features/heading/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,aAAgD,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const ALLOWED_HEADING_TAGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","names":["ALLOWED_HEADING_TAGS","Set"],"sources":["../../../src/features/heading/constants.ts"],"sourcesContent":["export const ALLOWED_HEADING_TAGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])\n"],"mappings":"AAAA,OAAO,MAAMA,oBAAA,GAAuB,IAAIC,GAAA,CAAI,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK","ignoreList":[]}
@@ -1,4 +1,4 @@
1
+ import type { ElementTransformer } from '@lexical/markdown';
1
2
  import type { HeadingTagType } from '@lexical/rich-text';
2
- import type { ElementTransformer } from '../../packages/@lexical/markdown/MarkdownTransformers.js';
3
- export declare const MarkdownTransformer: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer;
3
+ export declare const PAYLOAD_HEADING: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer;
4
4
  //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/heading/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAIxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAA;AAIlG,eAAO,MAAM,mBAAmB,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,KAAK,kBA0B5E,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/heading/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAKxD,eAAO,MAAM,eAAe,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,KAAK,kBAaxE,CAAA"}