@payloadcms/richtext-lexical 4.0.0-canary.2 → 4.0.0-canary.21

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 (552) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js +5 -5
  4. package/dist/cell/rscEntry.js.map +1 -1
  5. package/dist/exports/client/Field-F22V5L4V.js +2 -0
  6. package/dist/exports/client/Field-F22V5L4V.js.map +7 -0
  7. package/dist/exports/client/bundled.css +1 -1
  8. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  9. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  10. package/dist/exports/client/{chunk-CUFJGFNW.js → chunk-ESITTE3C.js} +2 -2
  11. package/dist/exports/client/{chunk-CUFJGFNW.js.map → chunk-ESITTE3C.js.map} +2 -2
  12. package/dist/exports/client/chunk-LN6VX25I.js +2 -0
  13. package/dist/exports/client/chunk-LN6VX25I.js.map +7 -0
  14. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  15. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  16. package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
  17. package/dist/exports/client/index.d.ts +1 -2
  18. package/dist/exports/client/index.d.ts.map +1 -1
  19. package/dist/exports/client/index.js +27 -28
  20. package/dist/exports/client/index.js.map +4 -4
  21. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  22. package/dist/features/blockquote/client/index.js +2 -2
  23. package/dist/features/blockquote/client/index.js.map +1 -1
  24. package/dist/features/blockquote/server/index.js +2 -2
  25. package/dist/features/blockquote/server/index.js.map +1 -1
  26. package/dist/features/blocks/client/component/index.css +2 -2
  27. package/dist/features/blocks/client/component/index.js.map +1 -1
  28. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  29. package/dist/features/blocks/client/componentInline/index.css +8 -8
  30. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  31. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  32. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  33. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  34. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  35. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  36. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  37. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  38. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  39. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  40. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  41. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  42. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  43. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  44. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  46. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  47. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  48. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  49. package/dist/features/blocks/server/index.js +2 -2
  50. package/dist/features/blocks/server/index.js.map +1 -1
  51. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  52. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  53. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  54. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  55. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  56. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  57. package/dist/features/blocks/server/schema.js +3 -2
  58. package/dist/features/blocks/server/schema.js.map +1 -1
  59. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  60. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  61. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  62. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  63. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  64. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  65. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  66. package/dist/features/converters/markdownToLexical/index.js +5 -2
  67. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  68. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  69. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  70. package/dist/features/format/bold/feature.client.js +1 -1
  71. package/dist/features/format/bold/feature.client.js.map +1 -1
  72. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  73. package/dist/features/format/bold/feature.server.js +1 -1
  74. package/dist/features/format/bold/feature.server.js.map +1 -1
  75. package/dist/features/format/inlineCode/feature.client.js +1 -1
  76. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  77. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  78. package/dist/features/format/inlineCode/feature.server.js +1 -1
  79. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  80. package/dist/features/format/italic/feature.client.js +1 -1
  81. package/dist/features/format/italic/feature.client.js.map +1 -1
  82. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  83. package/dist/features/format/italic/feature.server.js +1 -1
  84. package/dist/features/format/italic/feature.server.js.map +1 -1
  85. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  86. package/dist/features/format/strikethrough/feature.client.js +1 -1
  87. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  88. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  89. package/dist/features/format/strikethrough/feature.server.js +1 -1
  90. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  91. package/dist/features/heading/client/index.js +2 -2
  92. package/dist/features/heading/client/index.js.map +1 -1
  93. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  94. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  95. package/dist/features/heading/markdownTransformer.js +6 -19
  96. package/dist/features/heading/markdownTransformer.js.map +1 -1
  97. package/dist/features/heading/server/index.js +2 -2
  98. package/dist/features/heading/server/index.js.map +1 -1
  99. package/dist/features/heading/server/schema.d.ts.map +1 -1
  100. package/dist/features/horizontalRule/client/index.js +2 -2
  101. package/dist/features/horizontalRule/client/index.js.map +1 -1
  102. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  103. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  104. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  105. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  106. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  107. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  108. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  109. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  110. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  111. package/dist/features/horizontalRule/server/index.js +2 -2
  112. package/dist/features/horizontalRule/server/index.js.map +1 -1
  113. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  114. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  115. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  116. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  117. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  118. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  119. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  120. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  121. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  122. package/dist/features/link/client/index.js +2 -2
  123. package/dist/features/link/client/index.js.map +1 -1
  124. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  125. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  126. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  127. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  128. package/dist/features/link/markdownTransformer.d.ts +4 -4
  129. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  130. package/dist/features/link/markdownTransformer.js +2 -2
  131. package/dist/features/link/markdownTransformer.js.map +1 -1
  132. package/dist/features/link/markdownTransformer.spec.js +10 -10
  133. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  134. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  135. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  136. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  137. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  138. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  139. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  140. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  141. package/dist/features/link/server/baseFields.js.map +1 -1
  142. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  143. package/dist/features/link/server/index.js +4 -4
  144. package/dist/features/link/server/index.js.map +1 -1
  145. package/dist/features/link/server/schema.d.ts.map +1 -1
  146. package/dist/features/link/server/schema.js +4 -2
  147. package/dist/features/link/server/schema.js.map +1 -1
  148. package/dist/features/link/server/validate.d.ts.map +1 -1
  149. package/dist/features/lists/checklist/client/index.js +1 -1
  150. package/dist/features/lists/checklist/client/index.js.map +1 -1
  151. package/dist/features/lists/checklist/server/index.js +1 -1
  152. package/dist/features/lists/checklist/server/index.js.map +1 -1
  153. package/dist/features/lists/orderedList/client/index.js +1 -1
  154. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  155. package/dist/features/lists/orderedList/server/index.js +1 -1
  156. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  157. package/dist/features/lists/unorderedList/client/index.js +1 -1
  158. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  159. package/dist/features/lists/unorderedList/server/index.js +1 -1
  160. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  161. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  162. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  163. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  164. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  165. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  166. package/dist/features/relationship/server/schema.d.ts +3 -3
  167. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  168. package/dist/features/relationship/server/schema.js +22 -5
  169. package/dist/features/relationship/server/schema.js.map +1 -1
  170. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  171. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  172. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  173. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  174. package/dist/features/table/client/index.d.ts.map +1 -0
  175. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  176. package/dist/features/table/client/index.js.map +1 -0
  177. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  178. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  179. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  180. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  181. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  182. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  183. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  184. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  185. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  186. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  187. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  188. package/dist/features/table/client/utils/debounce.js.map +1 -0
  189. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  190. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  191. package/dist/features/table/markdownTransformer.d.ts +5 -0
  192. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  193. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  194. package/dist/features/table/markdownTransformer.js.map +1 -0
  195. package/dist/features/table/server/index.d.ts +3 -0
  196. package/dist/features/table/server/index.d.ts.map +1 -0
  197. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  198. package/dist/features/table/server/index.js.map +1 -0
  199. package/dist/features/table/server/schema.d.ts.map +1 -0
  200. package/dist/features/table/server/schema.js.map +1 -0
  201. package/dist/features/textState/feature.client.js +1 -1
  202. package/dist/features/textState/feature.client.js.map +1 -1
  203. package/dist/features/toolbars/fixed/client/Toolbar/index.css +4 -6
  204. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  205. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  206. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  207. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  208. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  209. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  210. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  211. package/dist/features/typesClient.d.ts +1 -1
  212. package/dist/features/typesClient.d.ts.map +1 -1
  213. package/dist/features/typesClient.js.map +1 -1
  214. package/dist/features/typesServer.d.ts +3 -3
  215. package/dist/features/typesServer.d.ts.map +1 -1
  216. package/dist/features/typesServer.js.map +1 -1
  217. package/dist/features/upload/client/component/index.css +9 -9
  218. package/dist/features/upload/client/component/index.js +2 -1
  219. package/dist/features/upload/client/component/index.js.map +1 -1
  220. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  221. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  222. package/dist/features/upload/client/plugin/index.js +5 -5
  223. package/dist/features/upload/client/plugin/index.js.map +1 -1
  224. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  225. package/dist/features/upload/server/index.js +4 -4
  226. package/dist/features/upload/server/index.js.map +1 -1
  227. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  228. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  229. package/dist/features/upload/server/markdownTransformer.js +1 -1
  230. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  231. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  232. package/dist/features/upload/server/schema.d.ts +4 -4
  233. package/dist/features/upload/server/schema.d.ts.map +1 -1
  234. package/dist/features/upload/server/schema.js +26 -6
  235. package/dist/features/upload/server/schema.js.map +1 -1
  236. package/dist/features/upload/server/validate.d.ts.map +1 -1
  237. package/dist/field/Diff/converters/unknown/index.css +1 -1
  238. package/dist/field/Field.d.ts.map +1 -1
  239. package/dist/field/Field.js +18 -15
  240. package/dist/field/Field.js.map +1 -1
  241. package/dist/field/ViewSelector.css +1 -1
  242. package/dist/field/bundled.css +1 -1
  243. package/dist/field/index.css +5 -9
  244. package/dist/field/index.js +1 -1
  245. package/dist/field/index.js.map +1 -1
  246. package/dist/field/rscEntry.d.ts.map +1 -1
  247. package/dist/field/rscEntry.js +2 -0
  248. package/dist/field/rscEntry.js.map +1 -1
  249. package/dist/i18n.d.ts.map +1 -1
  250. package/dist/i18n.js +68 -0
  251. package/dist/i18n.js.map +1 -1
  252. package/dist/index.d.ts +3 -3
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +7 -7
  255. package/dist/index.js.map +1 -1
  256. package/dist/lexical/LexicalEditor.css +18 -18
  257. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  258. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  259. package/dist/lexical/config/client/loader.js +5 -1
  260. package/dist/lexical/config/client/loader.js.map +1 -1
  261. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  262. package/dist/lexical/config/server/loader.d.ts +1 -1
  263. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  264. package/dist/lexical/config/server/loader.js +2 -2
  265. package/dist/lexical/config/server/loader.js.map +1 -1
  266. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  267. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  268. package/dist/lexical/config/server/sanitize.js +2 -2
  269. package/dist/lexical/config/server/sanitize.js.map +1 -1
  270. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  271. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  272. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  273. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  274. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  275. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  276. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  277. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  278. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  279. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  280. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  281. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  282. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  283. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  284. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  285. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  286. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  287. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  288. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  289. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  290. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  291. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  292. package/dist/lexical/theme/EditorTheme.css +18 -19
  293. package/dist/lexical/ui/ContentEditable.css +22 -17
  294. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  295. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  296. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  297. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  298. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  299. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  300. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  301. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  302. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  303. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  304. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  305. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  306. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  307. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  308. package/dist/lexical/utils/point.d.ts.map +1 -1
  309. package/dist/lexical/utils/rect.d.ts.map +1 -1
  310. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  311. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  312. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  313. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  314. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  315. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  316. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  317. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  318. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  319. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  320. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  321. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  322. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  323. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  324. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  325. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  326. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  327. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  328. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  329. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  330. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  331. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  332. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  333. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  334. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  335. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  336. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  337. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  338. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  339. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  340. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  341. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  342. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  343. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  344. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  345. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  346. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  347. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  348. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  349. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  350. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  351. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  352. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  353. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  354. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  355. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  356. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  357. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  358. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  359. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  360. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  361. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  362. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  363. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  364. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  365. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  366. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  367. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  368. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  369. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  370. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  371. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  372. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  373. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  374. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  375. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  376. package/dist/types/index.d.ts +3 -3
  377. package/dist/types/index.d.ts.map +1 -1
  378. package/dist/types/index.js.map +1 -1
  379. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  380. package/dist/types/nodeTypes.d.ts +1 -1
  381. package/dist/types/nodeTypes.d.ts.map +1 -1
  382. package/dist/types/nodeTypes.js.map +1 -1
  383. package/dist/types/schema.d.ts.map +1 -1
  384. package/dist/types/schema.js +12 -5
  385. package/dist/types/schema.js.map +1 -1
  386. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  387. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  388. package/dist/utilities/buildInitialState.d.ts +2 -1
  389. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  390. package/dist/utilities/buildInitialState.js.map +1 -1
  391. package/dist/utilities/createServerFeature.d.ts +1 -1
  392. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  393. package/dist/utilities/createServerFeature.js +2 -2
  394. package/dist/utilities/createServerFeature.js.map +1 -1
  395. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  396. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  397. package/dist/utilities/editorConfigFactory.js +9 -9
  398. package/dist/utilities/editorConfigFactory.js.map +1 -1
  399. package/dist/utilities/fieldsDrawer/index.css +0 -4
  400. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  401. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  402. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  403. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  404. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  405. package/dist/utilities/generateImportMap.d.ts +1 -1
  406. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  407. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  408. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  409. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  410. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  411. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  412. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  413. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  414. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  415. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  416. package/dist/validate/index.d.ts.map +1 -1
  417. package/package.json +96 -27
  418. package/dist/exports/client/Field-G5Z2HM5Y.js +0 -2
  419. package/dist/exports/client/Field-G5Z2HM5Y.js.map +0 -7
  420. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  421. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  422. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  423. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  424. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  425. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  426. package/dist/exports/client/componentInline-DV4EGOWU.js +0 -2
  427. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  428. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  429. package/dist/features/blockquote/markdownTransformer.js +0 -33
  430. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  431. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  432. package/dist/features/experimental_table/client/index.js.map +0 -1
  433. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  434. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  435. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  436. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  437. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  438. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  439. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  440. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  441. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  442. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  443. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  444. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  445. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  446. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  447. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  448. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  449. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  450. package/dist/features/experimental_table/server/index.d.ts +0 -3
  451. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  452. package/dist/features/experimental_table/server/index.js.map +0 -1
  453. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  454. package/dist/features/experimental_table/server/schema.js.map +0 -1
  455. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  456. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  457. package/dist/features/format/bold/markdownTransformers.js +0 -23
  458. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  459. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  460. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  461. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  462. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  463. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  464. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  465. package/dist/features/format/italic/markdownTransformers.js +0 -12
  466. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  467. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  468. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  469. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  470. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  471. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  472. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  473. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  474. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  475. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  476. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  477. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  478. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  479. package/dist/features/lists/shared/markdown.d.ts +0 -6
  480. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  481. package/dist/features/lists/shared/markdown.js +0 -57
  482. package/dist/features/lists/shared/markdown.js.map +0 -1
  483. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  484. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  485. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  486. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  487. package/dist/lexical/utils/guard.d.ts +0 -5
  488. package/dist/lexical/utils/guard.d.ts.map +0 -1
  489. package/dist/lexical/utils/guard.js +0 -9
  490. package/dist/lexical/utils/guard.js.map +0 -1
  491. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  492. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  493. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  494. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  495. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  496. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  497. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  498. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  499. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  500. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  501. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  502. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  503. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  504. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  505. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  506. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  507. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  508. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  509. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  510. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  511. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  512. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  513. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  514. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  515. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  516. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  517. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  518. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  519. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  520. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  521. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  522. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  523. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  524. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  525. package/dist/packages/@lexical/markdown/index.js +0 -39
  526. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  527. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  528. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  529. package/dist/packages/@lexical/markdown/utils.js +0 -267
  530. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  531. /package/dist/exports/client/{componentInline-DV4EGOWU.js.map → componentInline-H24N7GUG.js.map} +0 -0
  532. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  533. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  534. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  535. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +0 -0
  536. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  537. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  538. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  539. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  540. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  541. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  542. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  543. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  544. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  545. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  546. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  547. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  548. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  549. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  550. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  551. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  552. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -34,7 +34,8 @@ const buildBlockFieldsSchema = (block, args, {
34
34
  fields: flattened,
35
35
  i18n: args.i18n,
36
36
  interfaceNameDefinitions: args.interfaceNameDefinitions,
37
- typeStringDefinitions: args.typeStringDefinitions
37
+ typeStringDefinitions: args.typeStringDefinitions,
38
+ variant: args.variant
38
39
  }) : {
39
40
  properties: {},
40
41
  required: []
@@ -67,7 +68,7 @@ const buildBlockFieldsSchema = (block, args, {
67
68
  properties,
68
69
  required
69
70
  };
70
- return registerBlockInterface(block, fieldsSchema, args.interfaceNameDefinitions);
71
+ return registerBlockInterface(block, fieldsSchema, args.interfaceNameDefinitions, args.variant);
71
72
  };
72
73
  export const createBlockNodeJSONSchema = blockConfigs => args => {
73
74
  args.typeStringDefinitions.add(BLOCK_NODES_TS);
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":["fieldsToJSONSchema","flattenAllFields","registerBlockInterface","formatSchema","BLOCK_NODES_TS","buildBlockFieldsSchema","block","args","isInlineBlock","flattened","fields","userFieldsSchema","config","collectionIDFieldTypes","i18n","interfaceNameDefinitions","typeStringDefinitions","properties","required","id","_stripId","blockName","_stripBlockName","userOnlyProperties","userOnlyRequired","filter","r","type","blockType","const","slug","fieldsSchema","additionalProperties","createBlockNodeJSONSchema","blockConfigs","add","definitionNames","map","length","$ref","oneOf","name","tsType","join","format","version","createInlineBlockNodeJSONSchema","inlineBlockConfigs"],"sources":["../../../../src/features/blocks/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { Block, JsonObject } from 'payload'\n\nimport { fieldsToJSONSchema, flattenAllFields, registerBlockInterface } from 'payload'\n\nimport type { LexicalElementFormat } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaArgs, JSONSchemaFn } from '../../typesServer.js'\n\nimport { formatSchema } from '../../../types/jsonSchemaHelpers.js'\n\ntype BaseBlockFields<TFields extends JsonObject = JsonObject> = {\n blockName?: null | string\n blockType: string\n} & TFields\n\nexport type BlockFields<TFields extends JsonObject = JsonObject> = {\n id: string\n} & BaseBlockFields<TFields>\n\nexport type BlockFieldsOptionalID<TFields extends JsonObject = JsonObject> = {\n id?: string\n} & BaseBlockFields<TFields>\n\nexport type InlineBlockFields<TFields extends JsonObject = JsonObject> = {\n blockType: string\n id: string\n} & TFields\n\n// Distributive (`TFields extends unknown ?`) so `SerializedBlockNode<A | B>` expands to\n// `SerializedBlockNode<A> | SerializedBlockNode<B>` - i.e. a discriminated union where each block\n// keeps its own fields. Without this, `Omit<A | B, ...>` collapses to the blocks' common keys and\n// every block-specific field is lost. Lets users write either form interchangeably.\nexport type SerializedBlockNode<TFields extends { blockType: string } = { blockType: string }> =\n TFields extends unknown\n ? {\n fields: { blockName?: null | string; id: string } & Omit<TFields, 'blockName' | 'id'>\n format: LexicalElementFormat\n type: 'block'\n version: number\n }\n : never\n\nexport type SerializedInlineBlockNode<\n TFields extends { blockType: string } = { blockType: string },\n> = TFields extends unknown\n ? {\n fields: { id: string } & Omit<TFields, 'id'>\n type: 'inlineBlock'\n version: number\n }\n : never\n\n/**\n * MUST stay byte-for-byte in sync with the runtime `SerializedBlockNode` and\n * `SerializedInlineBlockNode` declared above.\n */\nconst BLOCK_NODES_TS = `export type SerializedBlockNode<TFields extends { blockType: string }> = TFields extends unknown ? {\n type: 'block';\n format: LexicalElementFormat;\n version: number;\n fields: { id: string; blockName?: string | null } & Omit<TFields, 'id' | 'blockName'>;\n} : never;\nexport type SerializedInlineBlockNode<TFields extends { blockType: string }> = TFields extends unknown ? {\n type: 'inlineBlock';\n version: number;\n fields: { id: string } & Omit<TFields, 'id'>;\n} : never;`\n\n/**\n * JSON Schema for one block's `fields:` payload. Strips Payload's auto-added\n * `id`/`blockName` and re-adds them with strict runtime types: required\n * non-null `id`, optional `blockName?: string | null` (omitted for inline\n * blocks). Registers the interface through `registerBlockInterface` (shared with\n * payload core) and returns its collision-safe name.\n */\nconst buildBlockFieldsSchema = (\n block: Block,\n args: JSONSchemaArgs,\n { isInlineBlock }: { isInlineBlock: boolean },\n): string => {\n const flattened = flattenAllFields({ fields: block.fields })\n const userFieldsSchema = args.config\n ? fieldsToJSONSchema({\n collectionIDFieldTypes: args.collectionIDFieldTypes,\n config: args.config,\n fields: flattened,\n i18n: args.i18n,\n interfaceNameDefinitions: args.interfaceNameDefinitions,\n typeStringDefinitions: args.typeStringDefinitions,\n })\n : { properties: {}, required: [] }\n\n const {\n id: _stripId,\n blockName: _stripBlockName,\n ...userOnlyProperties\n } = (userFieldsSchema.properties ?? {}) as { [k: string]: JSONSchema4 }\n const userOnlyRequired = (userFieldsSchema.required ?? []).filter(\n (r) => r !== 'id' && r !== 'blockName',\n )\n\n const properties: { [k: string]: JSONSchema4 } = {\n id: { type: 'string' },\n blockType: { type: 'string', const: block.slug },\n ...userOnlyProperties,\n }\n const required = ['id', 'blockType', ...userOnlyRequired]\n\n if (!isInlineBlock) {\n properties.blockName = { type: ['string', 'null'] }\n }\n\n const fieldsSchema: JSONSchema4 = {\n type: 'object',\n additionalProperties: false,\n properties,\n required,\n }\n\n return registerBlockInterface(block, fieldsSchema, args.interfaceNameDefinitions)\n}\n\nexport const createBlockNodeJSONSchema =\n (blockConfigs: Block[]): JSONSchemaFn =>\n (args) => {\n args.typeStringDefinitions.add(BLOCK_NODES_TS)\n const definitionNames = blockConfigs.map((block) =>\n buildBlockFieldsSchema(block, args, { isInlineBlock: false }),\n )\n\n const fieldsSchema: JSONSchema4 =\n definitionNames.length === 0\n ? { type: 'object', additionalProperties: true }\n : definitionNames.length === 1\n ? { $ref: `#/$defs/${definitionNames[0]!}` }\n : { oneOf: definitionNames.map((name) => ({ $ref: `#/$defs/${name}` })) }\n\n const tsType =\n definitionNames.length > 0\n ? `SerializedBlockNode<${definitionNames.join(' | ')}>`\n : `SerializedBlockNode<{ blockType: string }>`\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'block' },\n fields: fieldsSchema,\n format: formatSchema,\n version: { type: 'integer' },\n },\n required: ['fields', 'format', 'type', 'version'],\n tsType,\n }\n }\n\nexport const createInlineBlockNodeJSONSchema =\n (inlineBlockConfigs: Block[]): JSONSchemaFn =>\n (args) => {\n args.typeStringDefinitions.add(BLOCK_NODES_TS)\n const definitionNames = inlineBlockConfigs.map((block) =>\n buildBlockFieldsSchema(block, args, { isInlineBlock: true }),\n )\n\n const fieldsSchema: JSONSchema4 =\n definitionNames.length === 0\n ? { type: 'object', additionalProperties: true }\n : definitionNames.length === 1\n ? { $ref: `#/$defs/${definitionNames[0]!}` }\n : { oneOf: definitionNames.map((name) => ({ $ref: `#/$defs/${name}` })) }\n\n const tsType =\n definitionNames.length > 0\n ? `SerializedInlineBlockNode<${definitionNames.join(' | ')}>`\n : `SerializedInlineBlockNode<{ blockType: string }>`\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'inlineBlock' },\n fields: fieldsSchema,\n version: { type: 'integer' },\n },\n required: ['fields', 'type', 'version'],\n tsType,\n }\n }\n"],"mappings":"AAGA,SAASA,kBAAkB,EAAEC,gBAAgB,EAAEC,sBAAsB,QAAQ;AAK7E,SAASC,YAAY,QAAQ;AA4C7B;;;;AAIA,MAAMC,cAAA,GAAiB;;;;;;;;;;WAUZ;AAEX;;;;;;;AAOA,MAAMC,sBAAA,GAAyBA,CAC7BC,KAAA,EACAC,IAAA,EACA;EAAEC;AAAa,CAA8B;EAE7C,MAAMC,SAAA,GAAYR,gBAAA,CAAiB;IAAES,MAAA,EAAQJ,KAAA,CAAMI;EAAO;EAC1D,MAAMC,gB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AAsB;EAAK,IAC7CI,eAAA,CAAgBE,MAAM,KAAK,IACzB;IAAEC,IAAA,EAAM,WAAWH,eAAe,CAAC,EAAE;EAAI,IACzC;IAAEI,KAAA,EAAOJ,eAAA,CAAgBC,GAAG,CAAEI,IAAA,KAAU;MAAEF,IAAA,EAAM,WAAWE,IAAA;IAAO;EAAI;EAE9E,MAAMC,MAAA,GACJN,eAAA,CAAgBE,MAAM,GAAG,IACrB,6BAA6BF,eAAA,CAAgBO,IAAI,CAAC,SAAS,GAC3D,kDAAkD;EAExD,OAAO;IACLhB,IAAA,EAAM;IACNK,oBAAA,EAAsB;IACtBf,UAAA,EAAY;MACVU,IAAA,EAAM;QAAEA,IAAA,EAAM;QAAUE,KAAA,EAAO;MAAc;MAC7CnB,MAAA,EAAQqB,YAAA;MACRc,OAAA,EAAS;QAAElB,IAAA,EAAM;MAAU;IAC7B;IACAT,QAAA,EAAU,CAAC,UAAU,QAAQ,UAAU;IACvCwB;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"schema.js","names":["fieldsToJSONSchema","flattenAllFields","registerBlockInterface","formatSchema","BLOCK_NODES_TS","buildBlockFieldsSchema","block","args","isInlineBlock","flattened","fields","userFieldsSchema","config","collectionIDFieldTypes","i18n","interfaceNameDefinitions","typeStringDefinitions","variant","properties","required","id","_stripId","blockName","_stripBlockName","userOnlyProperties","userOnlyRequired","filter","r","type","blockType","const","slug","fieldsSchema","additionalProperties","createBlockNodeJSONSchema","blockConfigs","add","definitionNames","map","length","$ref","oneOf","name","tsType","join","format","version","createInlineBlockNodeJSONSchema","inlineBlockConfigs"],"sources":["../../../../src/features/blocks/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { Block, JsonObject } from 'payload'\n\nimport { fieldsToJSONSchema, flattenAllFields, registerBlockInterface } from 'payload'\n\nimport type { LexicalElementFormat } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaArgs, JSONSchemaFn } from '../../typesServer.js'\n\nimport { formatSchema } from '../../../types/jsonSchemaHelpers.js'\n\ntype BaseBlockFields<TFields extends JsonObject = JsonObject> = {\n blockName?: null | string\n blockType: string\n} & TFields\n\nexport type BlockFields<TFields extends JsonObject = JsonObject> = {\n id: string\n} & BaseBlockFields<TFields>\n\nexport type BlockFieldsOptionalID<TFields extends JsonObject = JsonObject> = {\n id?: string\n} & BaseBlockFields<TFields>\n\nexport type InlineBlockFields<TFields extends JsonObject = JsonObject> = {\n blockType: string\n id: string\n} & TFields\n\n// Distributive (`TFields extends unknown ?`) so `SerializedBlockNode<A | B>` expands to\n// `SerializedBlockNode<A> | SerializedBlockNode<B>` - i.e. a discriminated union where each block\n// keeps its own fields. Without this, `Omit<A | B, ...>` collapses to the blocks' common keys and\n// every block-specific field is lost. Lets users write either form interchangeably.\nexport type SerializedBlockNode<TFields extends { blockType: string } = { blockType: string }> =\n TFields extends unknown\n ? {\n fields: { blockName?: null | string; id: string } & Omit<TFields, 'blockName' | 'id'>\n format: LexicalElementFormat\n type: 'block'\n version: number\n }\n : never\n\nexport type SerializedInlineBlockNode<\n TFields extends { blockType: string } = { blockType: string },\n> = TFields extends unknown\n ? {\n fields: { id: string } & Omit<TFields, 'id'>\n type: 'inlineBlock'\n version: number\n }\n : never\n\n/**\n * MUST stay byte-for-byte in sync with the runtime `SerializedBlockNode` and\n * `SerializedInlineBlockNode` declared above.\n */\nconst BLOCK_NODES_TS = `export type SerializedBlockNode<TFields extends { blockType: string }> = TFields extends unknown ? {\n type: 'block';\n format: LexicalElementFormat;\n version: number;\n fields: { id: string; blockName?: string | null } & Omit<TFields, 'id' | 'blockName'>;\n} : never;\nexport type SerializedInlineBlockNode<TFields extends { blockType: string }> = TFields extends unknown ? {\n type: 'inlineBlock';\n version: number;\n fields: { id: string } & Omit<TFields, 'id'>;\n} : never;`\n\n/**\n * JSON Schema for one block's `fields:` payload. Strips Payload's auto-added\n * `id`/`blockName` and re-adds them with strict runtime types: required\n * non-null `id`, optional `blockName?: string | null` (omitted for inline\n * blocks). Registers the interface through `registerBlockInterface` (shared with\n * payload core) and returns its collision-safe name.\n */\nconst buildBlockFieldsSchema = (\n block: Block,\n args: JSONSchemaArgs,\n { isInlineBlock }: { isInlineBlock: boolean },\n): string => {\n const flattened = flattenAllFields({ fields: block.fields })\n const userFieldsSchema = args.config\n ? fieldsToJSONSchema({\n collectionIDFieldTypes: args.collectionIDFieldTypes,\n config: args.config,\n fields: flattened,\n i18n: args.i18n,\n interfaceNameDefinitions: args.interfaceNameDefinitions,\n typeStringDefinitions: args.typeStringDefinitions,\n variant: args.variant,\n })\n : { properties: {}, required: [] }\n\n const {\n id: _stripId,\n blockName: _stripBlockName,\n ...userOnlyProperties\n } = userFieldsSchema.properties ?? {}\n const userOnlyRequired = (userFieldsSchema.required ?? []).filter(\n (r) => r !== 'id' && r !== 'blockName',\n )\n\n const properties: { [k: string]: JSONSchema4 } = {\n id: { type: 'string' },\n blockType: { type: 'string', const: block.slug },\n ...userOnlyProperties,\n }\n const required = ['id', 'blockType', ...userOnlyRequired]\n\n if (!isInlineBlock) {\n properties.blockName = { type: ['string', 'null'] }\n }\n\n const fieldsSchema: JSONSchema4 = {\n type: 'object',\n additionalProperties: false,\n properties,\n required,\n }\n\n return registerBlockInterface(block, fieldsSchema, args.interfaceNameDefinitions, args.variant)\n}\n\nexport const createBlockNodeJSONSchema =\n (blockConfigs: Block[]): JSONSchemaFn =>\n (args) => {\n args.typeStringDefinitions.add(BLOCK_NODES_TS)\n const definitionNames = blockConfigs.map((block) =>\n buildBlockFieldsSchema(block, args, { isInlineBlock: false }),\n )\n\n const fieldsSchema: JSONSchema4 =\n definitionNames.length === 0\n ? { type: 'object', additionalProperties: true }\n : definitionNames.length === 1\n ? { $ref: `#/$defs/${definitionNames[0]!}` }\n : { oneOf: definitionNames.map((name) => ({ $ref: `#/$defs/${name}` })) }\n\n const tsType =\n definitionNames.length > 0\n ? `SerializedBlockNode<${definitionNames.join(' | ')}>`\n : `SerializedBlockNode<{ blockType: string }>`\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'block' },\n fields: fieldsSchema,\n format: formatSchema,\n version: { type: 'integer' },\n },\n required: ['fields', 'format', 'type', 'version'],\n tsType,\n }\n }\n\nexport const createInlineBlockNodeJSONSchema =\n (inlineBlockConfigs: Block[]): JSONSchemaFn =>\n (args) => {\n args.typeStringDefinitions.add(BLOCK_NODES_TS)\n const definitionNames = inlineBlockConfigs.map((block) =>\n buildBlockFieldsSchema(block, args, { isInlineBlock: true }),\n )\n\n const fieldsSchema: JSONSchema4 =\n definitionNames.length === 0\n ? { type: 'object', additionalProperties: true }\n : definitionNames.length === 1\n ? { $ref: `#/$defs/${definitionNames[0]!}` }\n : { oneOf: definitionNames.map((name) => ({ $ref: `#/$defs/${name}` })) }\n\n const tsType =\n definitionNames.length > 0\n ? `SerializedInlineBlockNode<${definitionNames.join(' | ')}>`\n : `SerializedInlineBlockNode<{ blockType: string }>`\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'inlineBlock' },\n fields: fieldsSchema,\n version: { type: 'integer' },\n },\n required: ['fields', 'type', 'version'],\n tsType,\n }\n }\n"],"mappings":"AAGA,SAASA,kBAAkB,EAAEC,gBAAgB,EAAEC,sBAAsB,QAAQ;AAK7E,SAASC,YAAY,QAAQ;AA4C7B;;;;AAIA,MAAMC,cAAA,GAAiB;;;;;;;;;;WAUZ;AAEX;;;;;;;AAOA,MAAMC,sBAAA,GAAyBA,CAC7BC,KAAA,EACAC,IAAA,EACA;EAAEC;AAAa,CAA8B;EAE7C,MAAMC,SAAA,GAAYR,gBAAA,CAAiB;IAAES,MAAA,EAAQJ,KAAA,CAAMI;EAAO;EAC1D,MAAMC,gBAAA,GAAmBJ,IAAA,CAAKK,MAAM,GAChCZ,kBAAA,CAAmB;IACjBa,sBAAA,EAAwBN,IAAA,CAAKM,sBAAsB;IACnDD,MAAA,EAAQL,IAAA,CAAKK,MAAM;IACnBF,MAAA,EAAQD,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AAI,IACzC;IAAEI,KAAA,EAAOJ,eAAA,CAAgBC,GAAG,CAAEI,IAAA,KAAU;MAAEF,IAAA,EAAM,WAAWE,IAAA;IAAO;EAAI;EAE9E,MAAMC,MAAA,GACJN,eAAA,CAAgBE,MAAM,GAAG,IACrB,6BAA6BF,eAAA,CAAgBO,IAAI,CAAC,SAAS,GAC3D,kDAAkD;EAExD,OAAO;IACLhB,IAAA,EAAM;IACNK,oBAAA,EAAsB;IACtBf,UAAA,EAAY;MACVU,IAAA,EAAM;QAAEA,IAAA,EAAM;QAAUE,KAAA,EAAO;MAAc;MAC7CpB,MAAA,EAAQsB,YAAA;MACRc,OAAA,EAAS;QAAElB,IAAA,EAAM;MAAU;IAC7B;IACAT,QAAA,EAAU,CAAC,UAAU,QAAQ,UAAU;IACvCwB;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAe,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,KAAK,EAAE,KACd,cAAc,CAAC,mBAAmB,GAAG,yBAAyB,CAqDhE,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAe,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WACrB,KAAK,EAAE,KACd,cAAc,CAAC,mBAAmB,GAAG,yBAAyB,CAqDhE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/htmlToLexical/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,oBAAoB,GAAI,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,EAAE,gCAI/F;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK;QAC3B,MAAM,EAAE;YACN,QAAQ,EAAE,QAAQ,CAAA;SACnB,CAAA;KACF,CAAA;CACF,KAAG,gBAAgB,CAAC,UAAU,CA2B9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/htmlToLexical/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,oBAAoB,GAAI,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,kCAI7F;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK;QAC3B,MAAM,EAAE;YACN,QAAQ,EAAE,QAAQ,CAAA;SACnB,CAAA;KACF,CAAA;CACF,KAAG,gBAAgB,CAAC,UAAU,CA2B9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cssColors.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToHtml/shared/cssColors.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,aA0J3B,CAAA;AAKF,qFAAqF;AACrF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,OAE9C,CAAA"}
1
+ {"version":3,"file":"cssColors.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToHtml/shared/cssColors.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,aA0J3B,CAAA;AAKF,qFAAqF;AACrF,eAAO,MAAM,cAAc,UAAW,MAAM,KAAG,OAE9C,CAAA"}
@@ -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,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":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,EAAEC,cAAc,EAAEC,WAAW,QAAQ;AAChE,SAASC,cAAc,QAAQ;AAC/B,SAASC,aAAa,EAAEC,iBAAiB,QAAQ;AACjD,SAASC,SAAS,QAAQ;AAM1B,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C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BAAA;IAAAoC,CAAA,MAAAO,aAAA;IAAAP,CAAA,MAAAQ,EAAA;IAAAR,CAAA,MAAAS,EAAA;EAAA;IAAAD,EAAA,GAAAR,CAAA;IAAAS,EAAA,GAAAT,CAAA;EAAA;EAT/C3D,SAAA,CAAUmE,EASV,EAAGC,EAA4C;EAAA;AAAA,CAGjD","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":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,EAAEC,cAAc,EAAEC,WAAW,QAAQ;AAChE,SAASC,cAAc,QAAQ;AAC/B,SAASC,aAAa,EAAEC,iBAAiB,QAAQ;AACjD,SAASC,SAAS,QAAQ;AAM1B,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,iCAAiC,QAAQ;AAClD,SAASC,e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P,CAAA,MAAAQ,EAAA;IAAAR,CAAA,MAAAS,EAAA;EAAA;IAAAD,EAAA,GAAAR,CAAA;IAAAS,EAAA,GAAAT,CAAA;EAAA;EAT/C3D,SAAA,CAAUmE,EASV,EAAGC,EAA4C;EAAA;AAAA,CAGjD","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"}
@@ -1,26 +1,13 @@
1
- import { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text';
2
- import { createBlockNode } from '../../lexical/utils/markdown/createBlockNode.js';
3
- export const MarkdownTransformer = enabledHeadingSizes => {
1
+ // eslint-disable-next-line payload/no-conflicting-lexical-markdown-imports -- PAYLOAD_HEADING intentionally extends upstream HEADING, overriding only its regExp to respect the enabled heading levels
2
+ import { HEADING } from '@lexical/markdown';
3
+ export const PAYLOAD_HEADING = enabledHeadingSizes => {
4
4
  // Convert enabledHeadingSizes to a list of numbers (1 for h1, 2 for h2, etc.)
5
5
  const enabledSizes = enabledHeadingSizes.map(tag => Number(tag.slice(1)));
6
- // Create a regex pattern that matches any of the enabled sizes
6
+ // Only the heading levels enabled in the config should be matched on import.
7
7
  const pattern = `^(${enabledSizes.map(size => `#{${size}}`).join('|')})\\s`;
8
- const regExp = new RegExp(pattern);
9
8
  return {
10
- type: 'element',
11
- dependencies: [HeadingNode],
12
- export: (node, exportChildren) => {
13
- if (!$isHeadingNode(node)) {
14
- return null;
15
- }
16
- const level = Number(node.getTag().slice(1));
17
- return '#'.repeat(level) + ' ' + exportChildren(node);
18
- },
19
- regExp,
20
- replace: createBlockNode(match => {
21
- const tag = 'h' + match[1]?.length;
22
- return $createHeadingNode(tag);
23
- })
9
+ ...HEADING,
10
+ regExp: new RegExp(pattern)
24
11
  };
25
12
  };
26
13
  //# sourceMappingURL=markdownTransformer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$createHeadingNode","$isHeadingNode","HeadingNode","createBlockNode","MarkdownTransformer","enabledHeadingSizes","enabledSizes","map","tag","Number","slice","pattern","size","join","regExp","RegExp","type","dependencies","export","node","exportChildren","level","getTag","repeat","replace","match","length"],"sources":["../../../src/features/heading/markdownTransformer.ts"],"sourcesContent":["import type { HeadingTagType } from '@lexical/rich-text'\n\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\n\nimport type { ElementTransformer } from '../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { createBlockNode } from '../../lexical/utils/markdown/createBlockNode.js'\n\nexport const MarkdownTransformer: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer = (\n enabledHeadingSizes,\n) => {\n // Convert enabledHeadingSizes to a list of numbers (1 for h1, 2 for h2, etc.)\n const enabledSizes = enabledHeadingSizes.map((tag) => Number(tag.slice(1)))\n\n // Create a regex pattern that matches any of the enabled sizes\n const pattern = `^(${enabledSizes.map((size) => `#{${size}}`).join('|')})\\\\s`\n const regExp = new RegExp(pattern)\n\n return {\n type: 'element',\n dependencies: [HeadingNode],\n export: (node, exportChildren) => {\n if (!$isHeadingNode(node)) {\n return null\n }\n const level = Number(node.getTag().slice(1))\n return '#'.repeat(level) + ' ' + exportChildren(node)\n },\n regExp,\n replace: createBlockNode((match) => {\n const tag = ('h' + match[1]?.length) as HeadingTagType\n return $createHeadingNode(tag)\n }),\n }\n}\n"],"mappings":"AAEA,SAASA,kBAAkB,EAAEC,cAAc,EAAEC,WAAW,QAAQ;AAIhE,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,mBAAA,GACXC,mBAAA;EAEA;EACA,MAAMC,YAAA,GAAeD,mBAAA,CAAoBE,GAAG,CAAEC,GAAA,IAAQC,MAAA,CAAOD,GAAA,CAAIE,KAAK,CAAC;EAEvE;EACA,MAAMC,OAAA,GAAU,KAAKL,YAAA,CAAaC,GAAG,CAAEK,IAAA,IAAS,KAAKA,IAAA,GAAO,EAAEC,IAAI,CAAC,UAAU;EAC7E,MAAMC,MAAA,GAAS,IAAIC,MAAA,CAAOJ,OAAA;EAE1B,OAAO;IACLK,IAAA,EAAM;IACNC,YAAA,EAAc,CAACf,WAAA,CAAY;IAC3BgB,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;MACb,IAAI,CAACnB,cAAA,CAAekB,IAAA,GAAO;QACzB,OAAO;MACT;MACA,MAAME,KAAA,GAAQZ,MAAA,CAAOU,IAAA,CAAKG,MAAM,GAAGZ,KAAK,CAAC;MACzC,OAAO,IAAIa,MAAM,CAACF,KAAA,IAAS,MAAMD,cAAA,CAAeD,IAAA;IAClD;IACAL,MAAA;IACAU,OAAA,EAASrB,eAAA,CAAiBsB,KAAA;MACxB,MAAMjB,GAAA,GAAO,MAAMiB,KAAK,CAAC,EAAE,EAAEC,MAAA;MAC7B,OAAO1B,kBAAA,CAAmBQ,GAAA;IAC5B;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"markdownTransformer.js","names":["HEADING","PAYLOAD_HEADING","enabledHeadingSizes","enabledSizes","map","tag","Number","slice","pattern","size","join","regExp","RegExp"],"sources":["../../../src/features/heading/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\nimport type { HeadingTagType } from '@lexical/rich-text'\n\n// eslint-disable-next-line payload/no-conflicting-lexical-markdown-imports -- PAYLOAD_HEADING intentionally extends upstream HEADING, overriding only its regExp to respect the enabled heading levels\nimport { HEADING } from '@lexical/markdown'\n\nexport const PAYLOAD_HEADING: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer = (\n enabledHeadingSizes,\n) => {\n // Convert enabledHeadingSizes to a list of numbers (1 for h1, 2 for h2, etc.)\n const enabledSizes = enabledHeadingSizes.map((tag) => Number(tag.slice(1)))\n\n // Only the heading levels enabled in the config should be matched on import.\n const pattern = `^(${enabledSizes.map((size) => `#{${size}}`).join('|')})\\\\s`\n\n return {\n ...HEADING,\n regExp: new RegExp(pattern),\n }\n}\n"],"mappings":"AAGA;AACA,SAASA,OAAO,QAAQ;AAExB,OAAO,MAAMC,eAAA,GACXC,mBAAA;EAEA;EACA,MAAMC,YAAA,GAAeD,mBAAA,CAAoBE,GAAG,CAAEC,GAAA,IAAQC,MAAA,CAAOD,GAAA,CAAIE,KAAK,CAAC;EAEvE;EACA,MAAMC,OAAA,GAAU,KAAKL,YAAA,CAAaC,GAAG,CAAEK,IAAA,IAAS,KAAKA,IAAA,GAAO,EAAEC,IAAI,CAAC,UAAU;EAE7E,OAAO;IACL,GAAGV,OAAO;IACVW,MAAA,EAAQ,IAAIC,MAAA,CAAOJ,OAAA;EACrB;AACF","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import { HeadingNode } from '@lexical/rich-text';
2
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
3
3
  import { createNode } from '../../typeUtilities.js';
4
- import { MarkdownTransformer } from '../markdownTransformer.js';
4
+ import { PAYLOAD_HEADING } from '../markdownTransformer.js';
5
5
  import { i18n } from './i18n.js';
6
6
  import { createHeadingJSONSchema } from './schema.js';
7
7
  export const HeadingFeature = createServerFeature({
@@ -19,7 +19,7 @@ export const HeadingFeature = createServerFeature({
19
19
  ClientFeature: '@payloadcms/richtext-lexical/client#HeadingFeatureClient',
20
20
  clientFeatureProps: props,
21
21
  i18n,
22
- markdownTransformers: enabledHeadingSizes.length > 0 ? [MarkdownTransformer(enabledHeadingSizes)] : [],
22
+ markdownTransformers: enabledHeadingSizes.length > 0 ? [PAYLOAD_HEADING(enabledHeadingSizes)] : [],
23
23
  nodes: [createNode({
24
24
  jsonSchema: createHeadingJSONSchema(enabledHeadingSizes),
25
25
  node: HeadingNode