@payloadcms/richtext-lexical 4.0.0-canary.3 → 4.0.0-canary.30

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 (565) 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/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  63. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  64. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  65. package/dist/features/converters/lexicalToHtml/sync/alignment.spec.js +92 -0
  66. package/dist/features/converters/lexicalToHtml/sync/alignment.spec.js.map +1 -0
  67. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  68. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  69. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  70. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  71. package/dist/features/converters/markdownToLexical/index.js +5 -2
  72. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  73. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  74. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  75. package/dist/features/format/bold/feature.client.js +1 -1
  76. package/dist/features/format/bold/feature.client.js.map +1 -1
  77. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  78. package/dist/features/format/bold/feature.server.js +1 -1
  79. package/dist/features/format/bold/feature.server.js.map +1 -1
  80. package/dist/features/format/inlineCode/feature.client.js +1 -1
  81. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  82. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  83. package/dist/features/format/inlineCode/feature.server.js +1 -1
  84. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  85. package/dist/features/format/italic/feature.client.js +1 -1
  86. package/dist/features/format/italic/feature.client.js.map +1 -1
  87. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  88. package/dist/features/format/italic/feature.server.js +1 -1
  89. package/dist/features/format/italic/feature.server.js.map +1 -1
  90. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  91. package/dist/features/format/strikethrough/feature.client.js +1 -1
  92. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  93. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  94. package/dist/features/format/strikethrough/feature.server.js +1 -1
  95. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  96. package/dist/features/heading/client/index.js +2 -2
  97. package/dist/features/heading/client/index.js.map +1 -1
  98. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  99. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  100. package/dist/features/heading/markdownTransformer.js +6 -19
  101. package/dist/features/heading/markdownTransformer.js.map +1 -1
  102. package/dist/features/heading/server/index.js +2 -2
  103. package/dist/features/heading/server/index.js.map +1 -1
  104. package/dist/features/heading/server/schema.d.ts.map +1 -1
  105. package/dist/features/horizontalRule/client/index.js +2 -2
  106. package/dist/features/horizontalRule/client/index.js.map +1 -1
  107. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  108. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  109. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  110. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  111. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  112. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  113. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  114. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  115. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  116. package/dist/features/horizontalRule/server/index.js +2 -2
  117. package/dist/features/horizontalRule/server/index.js.map +1 -1
  118. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  119. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  120. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  121. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  122. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  123. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  124. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  125. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  126. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  127. package/dist/features/link/client/index.js +2 -2
  128. package/dist/features/link/client/index.js.map +1 -1
  129. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  130. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  131. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  132. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  133. package/dist/features/link/markdownTransformer.d.ts +4 -4
  134. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  135. package/dist/features/link/markdownTransformer.js +2 -2
  136. package/dist/features/link/markdownTransformer.js.map +1 -1
  137. package/dist/features/link/markdownTransformer.spec.js +10 -10
  138. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  139. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  140. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  141. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  142. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  143. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  144. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  145. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  146. package/dist/features/link/server/baseFields.js.map +1 -1
  147. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  148. package/dist/features/link/server/index.js +4 -4
  149. package/dist/features/link/server/index.js.map +1 -1
  150. package/dist/features/link/server/schema.d.ts.map +1 -1
  151. package/dist/features/link/server/schema.js +4 -2
  152. package/dist/features/link/server/schema.js.map +1 -1
  153. package/dist/features/link/server/validate.d.ts.map +1 -1
  154. package/dist/features/lists/checklist/client/index.js +1 -1
  155. package/dist/features/lists/checklist/client/index.js.map +1 -1
  156. package/dist/features/lists/checklist/server/index.js +1 -1
  157. package/dist/features/lists/checklist/server/index.js.map +1 -1
  158. package/dist/features/lists/orderedList/client/index.js +1 -1
  159. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  160. package/dist/features/lists/orderedList/server/index.js +1 -1
  161. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  162. package/dist/features/lists/unorderedList/client/index.js +1 -1
  163. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  164. package/dist/features/lists/unorderedList/server/index.js +1 -1
  165. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  166. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  167. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  168. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  169. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  170. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  171. package/dist/features/relationship/server/schema.d.ts +3 -3
  172. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  173. package/dist/features/relationship/server/schema.js +22 -5
  174. package/dist/features/relationship/server/schema.js.map +1 -1
  175. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  176. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  177. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  178. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  179. package/dist/features/table/client/index.d.ts.map +1 -0
  180. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  181. package/dist/features/table/client/index.js.map +1 -0
  182. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  183. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  184. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  185. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  186. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  187. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  188. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  189. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  190. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  191. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  192. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  193. package/dist/features/table/client/utils/debounce.js.map +1 -0
  194. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  195. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  196. package/dist/features/table/markdownTransformer.d.ts +5 -0
  197. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  198. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  199. package/dist/features/table/markdownTransformer.js.map +1 -0
  200. package/dist/features/table/server/index.d.ts +3 -0
  201. package/dist/features/table/server/index.d.ts.map +1 -0
  202. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  203. package/dist/features/table/server/index.js.map +1 -0
  204. package/dist/features/table/server/schema.d.ts.map +1 -0
  205. package/dist/features/table/server/schema.js.map +1 -0
  206. package/dist/features/textState/feature.client.js +1 -1
  207. package/dist/features/textState/feature.client.js.map +1 -1
  208. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  209. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  210. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  211. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  212. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.js +65 -0
  213. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.js.map +1 -0
  214. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  215. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  216. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  217. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  218. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  219. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  220. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  221. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  222. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  223. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  224. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  225. package/dist/features/typesClient.d.ts +1 -1
  226. package/dist/features/typesClient.d.ts.map +1 -1
  227. package/dist/features/typesClient.js.map +1 -1
  228. package/dist/features/typesServer.d.ts +3 -3
  229. package/dist/features/typesServer.d.ts.map +1 -1
  230. package/dist/features/typesServer.js.map +1 -1
  231. package/dist/features/upload/client/component/index.css +9 -9
  232. package/dist/features/upload/client/component/index.js +2 -1
  233. package/dist/features/upload/client/component/index.js.map +1 -1
  234. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  235. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  236. package/dist/features/upload/client/plugin/index.js +5 -5
  237. package/dist/features/upload/client/plugin/index.js.map +1 -1
  238. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  239. package/dist/features/upload/server/index.js +4 -4
  240. package/dist/features/upload/server/index.js.map +1 -1
  241. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  242. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  243. package/dist/features/upload/server/markdownTransformer.js +1 -1
  244. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  245. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  246. package/dist/features/upload/server/schema.d.ts +4 -4
  247. package/dist/features/upload/server/schema.d.ts.map +1 -1
  248. package/dist/features/upload/server/schema.js +26 -6
  249. package/dist/features/upload/server/schema.js.map +1 -1
  250. package/dist/features/upload/server/validate.d.ts.map +1 -1
  251. package/dist/field/Diff/converters/unknown/index.css +1 -1
  252. package/dist/field/Field.d.ts.map +1 -1
  253. package/dist/field/Field.js +18 -15
  254. package/dist/field/Field.js.map +1 -1
  255. package/dist/field/ViewSelector.css +1 -1
  256. package/dist/field/bundled.css +1 -1
  257. package/dist/field/index.css +12 -15
  258. package/dist/field/index.js +1 -1
  259. package/dist/field/index.js.map +1 -1
  260. package/dist/field/rscEntry.d.ts.map +1 -1
  261. package/dist/field/rscEntry.js +2 -0
  262. package/dist/field/rscEntry.js.map +1 -1
  263. package/dist/i18n.d.ts.map +1 -1
  264. package/dist/i18n.js +68 -0
  265. package/dist/i18n.js.map +1 -1
  266. package/dist/index.d.ts +3 -3
  267. package/dist/index.d.ts.map +1 -1
  268. package/dist/index.js +7 -7
  269. package/dist/index.js.map +1 -1
  270. package/dist/lexical/LexicalEditor.css +18 -18
  271. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  272. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  273. package/dist/lexical/config/client/loader.js +5 -1
  274. package/dist/lexical/config/client/loader.js.map +1 -1
  275. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  276. package/dist/lexical/config/server/loader.d.ts +1 -1
  277. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  278. package/dist/lexical/config/server/loader.js +2 -2
  279. package/dist/lexical/config/server/loader.js.map +1 -1
  280. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  281. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  282. package/dist/lexical/config/server/sanitize.js +2 -2
  283. package/dist/lexical/config/server/sanitize.js.map +1 -1
  284. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  285. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  286. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  287. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  288. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  289. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  290. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  291. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  292. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  293. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  294. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  295. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  296. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  297. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  298. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  299. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  300. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  301. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  302. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  303. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  304. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  305. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  306. package/dist/lexical/theme/EditorTheme.css +18 -19
  307. package/dist/lexical/ui/ContentEditable.css +22 -17
  308. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  309. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  310. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  311. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  312. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  313. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  314. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  315. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  316. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  317. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  318. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  319. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  320. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  321. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  322. package/dist/lexical/utils/point.d.ts.map +1 -1
  323. package/dist/lexical/utils/rect.d.ts.map +1 -1
  324. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  325. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  326. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  327. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  328. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  329. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  330. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  331. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  332. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  333. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  334. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  335. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  336. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  337. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  338. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  339. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  340. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  341. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  342. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  343. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  344. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  345. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  346. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  347. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  348. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  349. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  350. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  351. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  352. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  353. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  354. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  355. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  356. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  357. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  358. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  359. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  360. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  361. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  362. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  363. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  364. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  365. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  366. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  367. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  368. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  369. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  370. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  371. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  372. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  373. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  374. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  375. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  376. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  377. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  378. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  379. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  380. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  381. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  382. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  383. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  384. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  385. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  386. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  387. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  388. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  389. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  390. package/dist/types/index.d.ts +3 -3
  391. package/dist/types/index.d.ts.map +1 -1
  392. package/dist/types/index.js.map +1 -1
  393. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  394. package/dist/types/nodeTypes.d.ts +1 -1
  395. package/dist/types/nodeTypes.d.ts.map +1 -1
  396. package/dist/types/nodeTypes.js.map +1 -1
  397. package/dist/types/schema.d.ts.map +1 -1
  398. package/dist/types/schema.js +12 -5
  399. package/dist/types/schema.js.map +1 -1
  400. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  401. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  402. package/dist/utilities/buildInitialState.d.ts +2 -1
  403. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  404. package/dist/utilities/buildInitialState.js.map +1 -1
  405. package/dist/utilities/createServerFeature.d.ts +1 -1
  406. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  407. package/dist/utilities/createServerFeature.js +2 -2
  408. package/dist/utilities/createServerFeature.js.map +1 -1
  409. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  410. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  411. package/dist/utilities/editorConfigFactory.js +9 -9
  412. package/dist/utilities/editorConfigFactory.js.map +1 -1
  413. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  414. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  415. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  416. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  417. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  418. package/dist/utilities/generateImportMap.d.ts +1 -1
  419. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  420. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  421. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  422. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  423. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  424. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  425. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  426. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  427. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  428. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  429. package/dist/validate/index.d.ts.map +1 -1
  430. package/package.json +95 -26
  431. package/dist/exports/client/Field-G5Z2HM5Y.js +0 -2
  432. package/dist/exports/client/Field-G5Z2HM5Y.js.map +0 -7
  433. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  434. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  435. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  436. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  437. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  438. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  439. package/dist/exports/client/componentInline-DV4EGOWU.js +0 -2
  440. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  441. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  442. package/dist/features/blockquote/markdownTransformer.js +0 -33
  443. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  444. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  445. package/dist/features/experimental_table/client/index.js.map +0 -1
  446. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  447. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  448. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  449. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  450. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  451. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  452. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  453. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  454. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  455. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  456. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  457. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  458. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  459. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  460. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  461. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  462. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  463. package/dist/features/experimental_table/server/index.d.ts +0 -3
  464. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  465. package/dist/features/experimental_table/server/index.js.map +0 -1
  466. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  467. package/dist/features/experimental_table/server/schema.js.map +0 -1
  468. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  469. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  470. package/dist/features/format/bold/markdownTransformers.js +0 -23
  471. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  472. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  473. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  474. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  475. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  476. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  477. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  478. package/dist/features/format/italic/markdownTransformers.js +0 -12
  479. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  480. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  481. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  482. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  483. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  484. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  485. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  486. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  487. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  488. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  489. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  490. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  491. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  492. package/dist/features/lists/shared/markdown.d.ts +0 -6
  493. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  494. package/dist/features/lists/shared/markdown.js +0 -57
  495. package/dist/features/lists/shared/markdown.js.map +0 -1
  496. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  497. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  498. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  499. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  500. package/dist/lexical/utils/guard.d.ts +0 -5
  501. package/dist/lexical/utils/guard.d.ts.map +0 -1
  502. package/dist/lexical/utils/guard.js +0 -9
  503. package/dist/lexical/utils/guard.js.map +0 -1
  504. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  505. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  506. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  507. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  508. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  509. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  510. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  511. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  512. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  513. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  514. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  515. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  516. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  517. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  518. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  519. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  520. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  521. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  522. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  523. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  524. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  525. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  526. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  527. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  528. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  529. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  530. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  531. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  532. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  533. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  534. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  535. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  536. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  537. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  538. package/dist/packages/@lexical/markdown/index.js +0 -39
  539. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  540. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  541. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  542. package/dist/packages/@lexical/markdown/utils.js +0 -267
  543. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  544. /package/dist/exports/client/{componentInline-DV4EGOWU.js.map → componentInline-H24N7GUG.js.map} +0 -0
  545. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  546. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  547. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  548. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +0 -0
  549. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  550. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  551. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  552. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  553. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  554. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  555. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  556. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  557. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  558. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  559. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  560. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  561. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  562. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  563. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  564. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  565. /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":"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","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":"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","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":"findConverterForNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToHtml/shared/findConverterForNode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGrE,wBAAgB,oBAAoB,CAClC,WAAW,SAAS,cAAc,GAAG,mBAAmB,EACxD,UAAU,SAAS,aAAa,GAAG,kBAAkB,EACrD,EACA,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,IAAI,EACJ,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,WAAW,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;IACrC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,gBAAgB,EAAE,UAAU,CAAA;CAC7B,GAAG;IACF,gBAAgB,EAAE,UAAU,GAAG,SAAS,CAAA;IACxC,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CACzB,CA8EA"}
1
+ {"version":3,"file":"findConverterForNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToHtml/shared/findConverterForNode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGrE,wBAAgB,oBAAoB,CAClC,WAAW,SAAS,cAAc,GAAG,mBAAmB,EACxD,UAAU,SAAS,aAAa,GAAG,kBAAkB,EACrD,EACA,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,IAAI,EACJ,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,WAAW,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;IAClC,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;IACrC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,gBAAgB,EAAE,UAAU,CAAA;CAC7B,GAAG;IACF,gBAAgB,EAAE,UAAU,GAAG,SAAS,CAAA;IACxC,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;CACzB,CA6EA"}
@@ -28,18 +28,19 @@
28
28
  style['text-align'] = 'center';
29
29
  break;
30
30
  case 'end':
31
- style['text-align'] = 'right';
31
+ style['text-align'] = 'end';
32
32
  break;
33
33
  case 'justify':
34
34
  style['text-align'] = 'justify';
35
35
  break;
36
36
  case 'left':
37
+ style['text-align'] = 'left';
37
38
  break;
38
39
  case 'right':
39
40
  style['text-align'] = 'right';
40
41
  break;
41
42
  case 'start':
42
- style['text-align'] = 'left';
43
+ style['text-align'] = 'start';
43
44
  break;
44
45
  }
45
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"findConverterForNode.js","names":["findConverterForNode","converters","disableIndent","disableTextAlign","node","unknownConverter","converterForNode","type","blocks","fields","blockType","console","error","inlineBlocks","style","Array","isArray","includes","format","indent","Number","providedCSSString","key","Object","keys","providedStyleTag","length"],"sources":["../../../../../src/features/converters/lexicalToHtml/shared/findConverterForNode.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedBlockNode, SerializedInlineBlockNode } from '../../../../types/nodeTypes.js'\nimport type { HTMLConverterAsync, HTMLConvertersAsync } from '../async/types.js'\nimport type { HTMLConverter, HTMLConverters } from '../sync/types.js'\nimport type { ProvidedCSS } from './types.js'\n\nexport function findConverterForNode<\n TConverters extends HTMLConverters | HTMLConvertersAsync,\n TConverter extends HTMLConverter | HTMLConverterAsync,\n>({\n converters,\n disableIndent,\n disableTextAlign,\n node,\n unknownConverter,\n}: {\n converters: TConverters\n disableIndent?: boolean | string[]\n disableTextAlign?: boolean | string[]\n node: SerializedLexicalNode\n unknownConverter: TConverter\n}): {\n converterForNode: TConverter | undefined\n providedCSSString: string\n providedStyleTag: string\n} {\n let converterForNode: TConverter | undefined\n if (node.type === 'block') {\n converterForNode = converters?.blocks?.[\n (node as SerializedBlockNode)?.fields?.blockType\n ] as TConverter\n if (!converterForNode && !unknownConverter) {\n console.error(\n `Lexical => HTML converter: Blocks converter: found ${(node as SerializedBlockNode)?.fields?.blockType} block, but no converter is provided`,\n )\n }\n } else if (node.type === 'inlineBlock') {\n converterForNode = converters?.inlineBlocks?.[\n (node as SerializedInlineBlockNode)?.fields?.blockType\n ] as TConverter\n if (!converterForNode && !unknownConverter) {\n console.error(\n `Lexical => HTML converter: Inline Blocks converter: found ${(node as SerializedInlineBlockNode)?.fields?.blockType} inline block, but no converter is provided`,\n )\n }\n } else {\n converterForNode = converters[node.type] as TConverter\n }\n\n const style: ProvidedCSS = {}\n\n // Check if disableTextAlign is not true and does not include node type\n if (\n !disableTextAlign &&\n (!Array.isArray(disableTextAlign) || !disableTextAlign?.includes(node.type))\n ) {\n if ('format' in node && node.format) {\n switch (node.format) {\n case 'center':\n style['text-align'] = 'center'\n break\n case 'end':\n style['text-align'] = 'right'\n break\n case 'justify':\n style['text-align'] = 'justify'\n break\n case 'left':\n //style['text-align'] = 'left'\n // Do nothing, as left is the default\n break\n case 'right':\n style['text-align'] = 'right'\n break\n case 'start':\n style['text-align'] = 'left'\n break\n }\n }\n }\n\n if (!disableIndent && (!Array.isArray(disableIndent) || !disableIndent?.includes(node.type))) {\n if ('indent' in node && node.indent && node.type !== 'listitem') {\n // the unit should be px. Do not change it to rem, em, or something else.\n // The quantity should be 40px. Do not change it either.\n // See rationale in\n // https://github.com/payloadcms/payload/issues/13130#issuecomment-3058348085\n style['padding-inline-start'] = `${Number(node.indent) * 40}px`\n }\n }\n\n let providedCSSString: string = ''\n for (const key of Object.keys(style)) {\n // @ts-expect-error we're iterating over the keys of the object\n providedCSSString += `${key}: ${style[key]};`\n }\n const providedStyleTag = providedCSSString?.length ? ` style=\"${providedCSSString}\"` : ''\n\n return {\n converterForNode: converterForNode ?? unknownConverter,\n providedCSSString,\n providedStyleTag,\n }\n}\n"],"mappings":"AAAA,+BAQA,OAAO,SAASA,qBAGd;EACAC,UAAU;EACVC,aAAa;EACbC,gBAAgB;EAChBC,IAAI;EACJC;AAAgB,CAOjB;EAKC,IAAIC,gBAAA;EACJ,IAAIF,IAAA,CAAKG,IAAI,KAAK,SAAS;IACzBD,gBAAA,GAAmBL,UAAA,EAAYO,MAAA,GAC5BJ,IAAA,EAA8BK,MAAA,EAAQC,SAAA,CACxC;IACD,IAAI,CAACJ,gBAAA,IAAoB,CAACD,gBAAA,EAAkB;MAC1CM,OAAA,CAAQC,KAAK,CACX,sDAAuDR,IAAA,EAA8BK,MAAA,EAAQC,SAAA,sCAA+C;IAEhJ;EACF,OAAO,IAAIN,IAAA,CAAKG,IAAI,KAAK,eAAe;IACtCD,gBAAA,GAAmBL,UAAA,EAAYY,YAAA,GAC5BT,IAAA,EAAoCK,MAAA,EAAQC,SAAA,CAC9C;IACD,IAAI,CAACJ,gBAAA,IAAoB,CAACD,gBAAA,EAAkB;MAC1CM,OAAA,CAAQC,KAAK,CACX,6DAA8DR,IAAA,EAAoCK,MAAA,EAAQC,SAAA,6CAAsD;IAEpK;EACF,OAAO;IACLJ,gBAAA,GAAmBL,UAAU,CAACG,IAAA,CAAKG,IAAI,CAAC;EAC1C;EAEA,MAAMO,KAAA,GAAqB,CAAC;EAE5B;EACA,IACE,CAACX,gBAAA,KACA,CAACY,KAAA,CAAMC,OAAO,CAACb,gBAAA,KAAqB,CAACA,gBAAA,EAAkBc,QAAA,CAASb,IAAA,CAAKG,IAAI,IAC1E;IACA,IAAI,YAAYH,IAAA,IAAQA,IAAA,CAAKc,MAAM,EAAE;MACnC,QAAQd,IAAA,CAAKc,MAAM;QACjB,KAAK;UACHJ,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UAGH;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;MACJ;IACF;EACF;EAEA,IAAI,CAACZ,aAAA,KAAkB,CAACa,KAAA,CAAMC,OAAO,CAACd,aAAA,KAAkB,CAACA,aAAA,EAAee,QAAA,CAASb,IAAA,CAAKG,IAAI,IAAI;IAC5F,IAAI,YAAYH,IAAA,IAAQA,IAAA,CAAKe,MAAM,IAAIf,IAAA,CAAKG,IAAI,KAAK,YAAY;MAC/D;MACA;MACA;MACA;MACAO,KAAK,CAAC,uBAAuB,GAAG,GAAGM,MAAA,CAAOhB,IAAA,CAAKe,MAAM,IAAI,MAAM;IACjE;EACF;EAEA,IAAIE,iBAAA,GAA4B;EAChC,KAAK,MAAMC,GAAA,IAAOC,MAAA,CAAOC,IAAI,CAACV,KAAA,GAAQ;IACpC;IACAO,iBAAA,IAAqB,GAAGC,GAAA,KAAQR,KAAK,CAACQ,GAAA,CAAI,GAAG;EAC/C;EACA,MAAMG,gBAAA,GAAmBJ,iBAAA,EAAmBK,MAAA,GAAS,WAAWL,iBAAA,GAAoB,GAAG;EAEvF,OAAO;IACLf,gBAAA,EAAkBA,gBAAA,IAAoBD,gBAAA;IACtCgB,iBAAA;IACAI;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"findConverterForNode.js","names":["findConverterForNode","converters","disableIndent","disableTextAlign","node","unknownConverter","converterForNode","type","blocks","fields","blockType","console","error","inlineBlocks","style","Array","isArray","includes","format","indent","Number","providedCSSString","key","Object","keys","providedStyleTag","length"],"sources":["../../../../../src/features/converters/lexicalToHtml/shared/findConverterForNode.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedBlockNode, SerializedInlineBlockNode } from '../../../../types/nodeTypes.js'\nimport type { HTMLConverterAsync, HTMLConvertersAsync } from '../async/types.js'\nimport type { HTMLConverter, HTMLConverters } from '../sync/types.js'\nimport type { ProvidedCSS } from './types.js'\n\nexport function findConverterForNode<\n TConverters extends HTMLConverters | HTMLConvertersAsync,\n TConverter extends HTMLConverter | HTMLConverterAsync,\n>({\n converters,\n disableIndent,\n disableTextAlign,\n node,\n unknownConverter,\n}: {\n converters: TConverters\n disableIndent?: boolean | string[]\n disableTextAlign?: boolean | string[]\n node: SerializedLexicalNode\n unknownConverter: TConverter\n}): {\n converterForNode: TConverter | undefined\n providedCSSString: string\n providedStyleTag: string\n} {\n let converterForNode: TConverter | undefined\n if (node.type === 'block') {\n converterForNode = converters?.blocks?.[\n (node as SerializedBlockNode)?.fields?.blockType\n ] as TConverter\n if (!converterForNode && !unknownConverter) {\n console.error(\n `Lexical => HTML converter: Blocks converter: found ${(node as SerializedBlockNode)?.fields?.blockType} block, but no converter is provided`,\n )\n }\n } else if (node.type === 'inlineBlock') {\n converterForNode = converters?.inlineBlocks?.[\n (node as SerializedInlineBlockNode)?.fields?.blockType\n ] as TConverter\n if (!converterForNode && !unknownConverter) {\n console.error(\n `Lexical => HTML converter: Inline Blocks converter: found ${(node as SerializedInlineBlockNode)?.fields?.blockType} inline block, but no converter is provided`,\n )\n }\n } else {\n converterForNode = converters[node.type] as TConverter\n }\n\n const style: ProvidedCSS = {}\n\n // Check if disableTextAlign is not true and does not include node type\n if (\n !disableTextAlign &&\n (!Array.isArray(disableTextAlign) || !disableTextAlign?.includes(node.type))\n ) {\n if ('format' in node && node.format) {\n switch (node.format) {\n case 'center':\n style['text-align'] = 'center'\n break\n case 'end':\n style['text-align'] = 'end'\n break\n case 'justify':\n style['text-align'] = 'justify'\n break\n case 'left':\n style['text-align'] = 'left'\n break\n case 'right':\n style['text-align'] = 'right'\n break\n case 'start':\n style['text-align'] = 'start'\n break\n }\n }\n }\n\n if (!disableIndent && (!Array.isArray(disableIndent) || !disableIndent?.includes(node.type))) {\n if ('indent' in node && node.indent && node.type !== 'listitem') {\n // the unit should be px. Do not change it to rem, em, or something else.\n // The quantity should be 40px. Do not change it either.\n // See rationale in\n // https://github.com/payloadcms/payload/issues/13130#issuecomment-3058348085\n style['padding-inline-start'] = `${Number(node.indent) * 40}px`\n }\n }\n\n let providedCSSString: string = ''\n for (const key of Object.keys(style)) {\n // @ts-expect-error we're iterating over the keys of the object\n providedCSSString += `${key}: ${style[key]};`\n }\n const providedStyleTag = providedCSSString?.length ? ` style=\"${providedCSSString}\"` : ''\n\n return {\n converterForNode: converterForNode ?? unknownConverter,\n providedCSSString,\n providedStyleTag,\n }\n}\n"],"mappings":"AAAA,+BAQA,OAAO,SAASA,qBAGd;EACAC,UAAU;EACVC,aAAa;EACbC,gBAAgB;EAChBC,IAAI;EACJC;AAAgB,CAOjB;EAKC,IAAIC,gBAAA;EACJ,IAAIF,IAAA,CAAKG,IAAI,KAAK,SAAS;IACzBD,gBAAA,GAAmBL,UAAA,EAAYO,MAAA,GAC5BJ,IAAA,EAA8BK,MAAA,EAAQC,SAAA,CACxC;IACD,IAAI,CAACJ,gBAAA,IAAoB,CAACD,gBAAA,EAAkB;MAC1CM,OAAA,CAAQC,KAAK,CACX,sDAAuDR,IAAA,EAA8BK,MAAA,EAAQC,SAAA,sCAA+C;IAEhJ;EACF,OAAO,IAAIN,IAAA,CAAKG,IAAI,KAAK,eAAe;IACtCD,gBAAA,GAAmBL,UAAA,EAAYY,YAAA,GAC5BT,IAAA,EAAoCK,MAAA,EAAQC,SAAA,CAC9C;IACD,IAAI,CAACJ,gBAAA,IAAoB,CAACD,gBAAA,EAAkB;MAC1CM,OAAA,CAAQC,KAAK,CACX,6DAA8DR,IAAA,EAAoCK,MAAA,EAAQC,SAAA,6CAAsD;IAEpK;EACF,OAAO;IACLJ,gBAAA,GAAmBL,UAAU,CAACG,IAAA,CAAKG,IAAI,CAAC;EAC1C;EAEA,MAAMO,KAAA,GAAqB,CAAC;EAE5B;EACA,IACE,CAACX,gBAAA,KACA,CAACY,KAAA,CAAMC,OAAO,CAACb,gBAAA,KAAqB,CAACA,gBAAA,EAAkBc,QAAA,CAASb,IAAA,CAAKG,IAAI,IAC1E;IACA,IAAI,YAAYH,IAAA,IAAQA,IAAA,CAAKc,MAAM,EAAE;MACnC,QAAQd,IAAA,CAAKc,MAAM;QACjB,KAAK;UACHJ,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;QACF,KAAK;UACHA,KAAK,CAAC,aAAa,GAAG;UACtB;MACJ;IACF;EACF;EAEA,IAAI,CAACZ,aAAA,KAAkB,CAACa,KAAA,CAAMC,OAAO,CAACd,aAAA,KAAkB,CAACA,aAAA,EAAee,QAAA,CAASb,IAAA,CAAKG,IAAI,IAAI;IAC5F,IAAI,YAAYH,IAAA,IAAQA,IAAA,CAAKe,MAAM,IAAIf,IAAA,CAAKG,IAAI,KAAK,YAAY;MAC/D;MACA;MACA;MACA;MACAO,KAAK,CAAC,uBAAuB,GAAG,GAAGM,MAAA,CAAOhB,IAAA,CAAKe,MAAM,IAAI,MAAM;IACjE;EACF;EAEA,IAAIE,iBAAA,GAA4B;EAChC,KAAK,MAAMC,GAAA,IAAOC,MAAA,CAAOC,IAAI,CAACV,KAAA,GAAQ;IACpC;IACAO,iBAAA,IAAqB,GAAGC,GAAA,KAAQR,KAAK,CAACQ,GAAA,CAAI,GAAG;EAC/C;EACA,MAAMG,gBAAA,GAAmBJ,iBAAA,EAAmBK,MAAA,GAAS,WAAWL,iBAAA,GAAoB,GAAG;EAEvF,OAAO;IACLf,gBAAA,EAAkBA,gBAAA,IAAoBD,gBAAA;IACtCgB,iBAAA;IACAI;EACF;AACF","ignoreList":[]}
@@ -0,0 +1,92 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { convertLexicalToHTML } from './index.js';
3
+ function textNode(text) {
4
+ return {
5
+ type: 'text',
6
+ detail: 0,
7
+ format: 0,
8
+ mode: 'normal',
9
+ style: '',
10
+ text,
11
+ version: 1
12
+ };
13
+ }
14
+ function paragraphNode({
15
+ direction = null,
16
+ format
17
+ }) {
18
+ return {
19
+ type: 'paragraph',
20
+ children: [textNode('مرحبا')],
21
+ direction,
22
+ format,
23
+ indent: 0,
24
+ textFormat: 0,
25
+ version: 1
26
+ };
27
+ }
28
+ function rootNode(paragraph) {
29
+ return {
30
+ root: {
31
+ type: 'root',
32
+ children: [paragraph],
33
+ direction: null,
34
+ format: '',
35
+ indent: 0,
36
+ version: 1
37
+ }
38
+ };
39
+ }
40
+ describe('convertLexicalToHTML - paragraph alignment', () => {
41
+ it('preserves logical alignment for format: start', () => {
42
+ const html = convertLexicalToHTML({
43
+ data: rootNode(paragraphNode({
44
+ format: 'start'
45
+ })),
46
+ disableContainer: true
47
+ });
48
+ expect(html).toBe('<p style="text-align: start;">مرحبا</p>');
49
+ });
50
+ it('preserves logical alignment for format: end', () => {
51
+ const html = convertLexicalToHTML({
52
+ data: rootNode(paragraphNode({
53
+ format: 'end'
54
+ })),
55
+ disableContainer: true
56
+ });
57
+ expect(html).toBe('<p style="text-align: end;">مرحبا</p>');
58
+ });
59
+ it('emits text-align for explicit format: left', () => {
60
+ const html = convertLexicalToHTML({
61
+ data: rootNode(paragraphNode({
62
+ format: 'left'
63
+ })),
64
+ disableContainer: true
65
+ });
66
+ expect(html).toBe('<p style="text-align: left;">مرحبا</p>');
67
+ });
68
+ it('emits text-align for explicit format: right', () => {
69
+ const html = convertLexicalToHTML({
70
+ data: rootNode(paragraphNode({
71
+ format: 'right'
72
+ })),
73
+ disableContainer: true
74
+ });
75
+ expect(html).toBe('<p style="text-align: right;">مرحبا</p>');
76
+ });
77
+ it('preserves logical alignment start for RTL-directed paragraphs', () => {
78
+ const html = convertLexicalToHTML({
79
+ data: rootNode(paragraphNode({
80
+ direction: 'rtl',
81
+ format: 'start'
82
+ })),
83
+ disableContainer: true
84
+ });
85
+ // For RTL content, `start` must NOT be resolved to `left` - it must stay logical
86
+ // (or resolve to `right`, its physical RTL equivalent), otherwise the paragraph
87
+ // renders visually misaligned against the text's own reading direction.
88
+ expect(html).not.toBe('<p style="text-align: left;">مرحبا</p>');
89
+ expect(html).toBe('<p style="text-align: start;">مرحبا</p>');
90
+ });
91
+ });
92
+ //# sourceMappingURL=alignment.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alignment.spec.js","names":["describe","expect","it","convertLexicalToHTML","textNode","text","type","detail","format","mode","style","version","paragraphNode","direction","children","indent","textFormat","rootNode","paragraph","root","html","data","disableContainer","toBe","not"],"sources":["../../../../../src/features/converters/lexicalToHtml/sync/alignment.spec.ts"],"sourcesContent":["import { describe, expect, it } from 'vitest'\nimport type {\n DefaultTypedEditorState,\n LexicalElementDirection,\n LexicalElementFormat,\n SerializedParagraphNode,\n SerializedTextNode,\n} from '../../../../types/nodeTypes.js'\n\nimport { convertLexicalToHTML } from './index.js'\n\nfunction textNode(text: string): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n }\n}\n\nfunction paragraphNode({\n direction = null,\n format,\n}: {\n direction?: LexicalElementDirection\n format: LexicalElementFormat\n}): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children: [textNode('مرحبا')],\n direction,\n format,\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\n\nfunction rootNode(paragraph: SerializedParagraphNode): DefaultTypedEditorState {\n return {\n root: {\n type: 'root',\n children: [paragraph],\n direction: null,\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\ndescribe('convertLexicalToHTML - paragraph alignment', () => {\n it('preserves logical alignment for format: start', () => {\n const html = convertLexicalToHTML({\n data: rootNode(paragraphNode({ format: 'start' })),\n disableContainer: true,\n })\n\n expect(html).toBe('<p style=\"text-align: start;\">مرحبا</p>')\n })\n\n it('preserves logical alignment for format: end', () => {\n const html = convertLexicalToHTML({\n data: rootNode(paragraphNode({ format: 'end' })),\n disableContainer: true,\n })\n\n expect(html).toBe('<p style=\"text-align: end;\">مرحبا</p>')\n })\n\n it('emits text-align for explicit format: left', () => {\n const html = convertLexicalToHTML({\n data: rootNode(paragraphNode({ format: 'left' })),\n disableContainer: true,\n })\n\n expect(html).toBe('<p style=\"text-align: left;\">مرحبا</p>')\n })\n\n it('emits text-align for explicit format: right', () => {\n const html = convertLexicalToHTML({\n data: rootNode(paragraphNode({ format: 'right' })),\n disableContainer: true,\n })\n\n expect(html).toBe('<p style=\"text-align: right;\">مرحبا</p>')\n })\n\n it('preserves logical alignment start for RTL-directed paragraphs', () => {\n const html = convertLexicalToHTML({\n data: rootNode(paragraphNode({ direction: 'rtl', format: 'start' })),\n disableContainer: true,\n })\n\n // For RTL content, `start` must NOT be resolved to `left` - it must stay logical\n // (or resolve to `right`, its physical RTL equivalent), otherwise the paragraph\n // renders visually misaligned against the text's own reading direction.\n expect(html).not.toBe('<p style=\"text-align: left;\">مرحبا</p>')\n expect(html).toBe('<p style=\"text-align: start;\">مرحبا</p>')\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ;AASrC,SAASC,oBAAoB,QAAQ;AAErC,SAASC,SAASC,IAAY;EAC5B,OAAO;IACLC,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQ;IACRC,IAAA,EAAM;IACNC,KAAA,EAAO;IACPL,IAAA;IACAM,OAAA,EAAS;EACX;AACF;AAEA,SAASC,cAAc;EACrBC,SAAA,GAAY,IAAI;EAChBL;AAAM,CAIP;EACC,OAAO;IACLF,IAAA,EAAM;IACNQ,QAAA,EAAU,CAACV,QAAA,CAAS,SAAS;IAC7BS,SAAA;IACAL,MAAA;IACAO,MAAA,EAAQ;IACRC,UAAA,EAAY;IACZL,OAAA,EAAS;EACX;AACF;AAEA,SAASM,SAASC,SAAkC;EAClD,OAAO;IACLC,IAAA,EAAM;MACJb,IAAA,EAAM;MACNQ,QAAA,EAAU,CAACI,SAAA,CAAU;MACrBL,SAAA,EAAW;MACXL,MAAA,EAAQ;MACRO,MAAA,EAAQ;MACRJ,OAAA,EAAS;IACX;EACF;AACF;AAEAX,QAAA,CAAS,8CAA8C;EACrDE,EAAA,CAAG,iDAAiD;IAClD,MAAMkB,IAAA,GAAOjB,oBAAA,CAAqB;MAChCkB,IAAA,EAAMJ,QAAA,CAASL,aAAA,CAAc;QAAEJ,MAAA,EAAQ;MAAQ;MAC/Cc,gBAAA,EAAkB;IACpB;IAEArB,MAAA,CAAOmB,IAAA,EAAMG,IAAI,CAAC;EACpB;EAEArB,EAAA,CAAG,+CAA+C;IAChD,MAAMkB,IAAA,GAAOjB,oBAAA,CAAqB;MAChCkB,IAAA,EAAMJ,QAAA,CAASL,aAAA,CAAc;QAAEJ,MAAA,EAAQ;MAAM;MAC7Cc,gBAAA,EAAkB;IACpB;IAEArB,MAAA,CAAOmB,IAAA,EAAMG,IAAI,CAAC;EACpB;EAEArB,EAAA,CAAG,8CAA8C;IAC/C,MAAMkB,IAAA,GAAOjB,oBAAA,CAAqB;MAChCkB,IAAA,EAAMJ,QAAA,CAASL,aAAA,CAAc;QAAEJ,MAAA,EAAQ;MAAO;MAC9Cc,gBAAA,EAAkB;IACpB;IAEArB,MAAA,CAAOmB,IAAA,EAAMG,IAAI,CAAC;EACpB;EAEArB,EAAA,CAAG,+CAA+C;IAChD,MAAMkB,IAAA,GAAOjB,oBAAA,CAAqB;MAChCkB,IAAA,EAAMJ,QAAA,CAASL,aAAA,CAAc;QAAEJ,MAAA,EAAQ;MAAQ;MAC/Cc,gBAAA,EAAkB;IACpB;IAEArB,MAAA,CAAOmB,IAAA,EAAMG,IAAI,CAAC;EACpB;EAEArB,EAAA,CAAG,iEAAiE;IAClE,MAAMkB,IAAA,GAAOjB,oBAAA,CAAqB;MAChCkB,IAAA,EAAMJ,QAAA,CAASL,aAAA,CAAc;QAAEC,SAAA,EAAW;QAAOL,MAAA,EAAQ;MAAQ;MACjEc,gBAAA,EAAkB;IACpB;IAEA;IACA;IACA;IACArB,MAAA,CAAOmB,IAAA,EAAMI,GAAG,CAACD,IAAI,CAAC;IACtBtB,MAAA,CAAOmB,IAAA,EAAMG,IAAI,CAAC;EACpB;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,wBAAwB,GAAI,yBAGtC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAInF,eAAO,MAAM,wBAAwB,4BAGlC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { createHeadlessEditor } from '@lexical/headless';
2
+ import { $convertToMarkdownString } from '@lexical/markdown';
2
3
  import { getEnabledNodes } from '../../../lexical/nodes/index.js';
3
- import { $convertToMarkdownString } from '../../../packages/@lexical/markdown/index.js';
4
4
  export const convertLexicalToMarkdown = ({
5
5
  data,
6
6
  editorConfig
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertToMarkdownString","convertLexicalToMarkdown","data","editorConfig","headlessEditor","nodes","update","setEditorState","parseEditorState","discrete","markdown","getEditorState","read","features","markdownTransformers"],"sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertToMarkdownString } from '../../../packages/@lexical/markdown/index.js'\n\nexport const convertLexicalToMarkdown = ({\n data,\n editorConfig,\n}: {\n data: SerializedEditorState\n editorConfig: SanitizedServerEditorConfig\n}): string => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(data))\n },\n { discrete: true },\n )\n\n let markdown: string = ''\n headlessEditor.getEditorState().read(() => {\n markdown = $convertToMarkdownString(editorConfig?.features?.markdownTransformers)\n })\n\n return markdown\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAIrC,SAASC,eAAe,QAAQ;AAChC,SAASC,wBAAwB,QAAQ;AAEzC,OAAO,MAAMC,wBAAA,GAA2BA,CAAC;EACvCC,IAAI;EACJC;AAAY,CAIb;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBI;IACF;EACF;EAEAC,cAAA,CAAeE,MAAM,CACnB;IACEF,cAAA,CAAeG,cAAc,CAACH,cAAA,CAAeI,gBAAgB,CAACN,IAAA;EAChE,GACA;IAAEO,QAAA,EAAU;EAAK;EAGnB,IAAIC,QAAA,GAAmB;EACvBN,cAAA,CAAeO,cAAc,GAAGC,IAAI,CAAC;IACnCF,QAAA,GAAWV,wBAAA,CAAyBG,YAAA,EAAcU,QAAA,EAAUC,oBAAA;EAC9D;EAEA,OAAOJ,QAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createHeadlessEditor","$convertToMarkdownString","getEnabledNodes","convertLexicalToMarkdown","data","editorConfig","headlessEditor","nodes","update","setEditorState","parseEditorState","discrete","markdown","getEditorState","read","features","markdownTransformers"],"sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { $convertToMarkdownString } from '@lexical/markdown'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\n\nexport const convertLexicalToMarkdown = ({\n data,\n editorConfig,\n}: {\n data: SerializedEditorState\n editorConfig: SanitizedServerEditorConfig\n}): string => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(data))\n },\n { discrete: true },\n )\n\n let markdown: string = ''\n headlessEditor.getEditorState().read(() => {\n markdown = $convertToMarkdownString(editorConfig?.features?.markdownTransformers)\n })\n\n return markdown\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,wBAAwB,QAAQ;AAIzC,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,wBAAA,GAA2BA,CAAC;EACvCC,IAAI;EACJC;AAAY,CAIb;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAOL,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAC,cAAA,CAAeE,MAAM,CACnB;IACEF,cAAA,CAAeG,cAAc,CAACH,cAAA,CAAeI,gBAAgB,CAACN,IAAA;EAChE,GACA;IAAEO,QAAA,EAAU;EAAK;EAGnB,IAAIC,QAAA,GAAmB;EACvBN,cAAA,CAAeO,cAAc,GAAGC,IAAI,CAAC;IACnCF,QAAA,GAAWX,wBAAA,CAAyBI,YAAA,EAAcU,QAAA,EAAUC,oBAAA;EAC9D;EAEA,OAAOJ,QAAA;AACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,EAC3D,6BAGC;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CAiB9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,+BAI1D;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CA0B9B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { createHeadlessEditor } from '@lexical/headless';
2
2
  import { getEnabledNodes } from '../../../lexical/nodes/index.js';
3
- import { $convertFromMarkdownString } from '../../../packages/@lexical/markdown/index.js';
3
+ import { $convertFromMarkdownString } from '../../../lexical/utils/markdown/convertFromMarkdownString.js';
4
4
  export const convertMarkdownToLexical = ({
5
5
  editorConfig,
6
6
  markdown
@@ -11,7 +11,10 @@ export const convertMarkdownToLexical = ({
11
11
  })
12
12
  });
13
13
  headlessEditor.update(() => {
14
- $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers);
14
+ // shouldMergeAdjacentLines is true so multi-line Payload block tags and
15
+ // soft-wrapped content keep being parsed as before. The exported
16
+ // $convertFromMarkdownString now defaults to false to match upstream.
17
+ $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers, undefined, false, true);
15
18
  }, {
16
19
  discrete: true
17
20
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertFromMarkdownString","convertMarkdownToLexical","editorConfig","markdown","headlessEditor","nodes","update","features","markdownTransformers","discrete","editorJSON","getEditorState","toJSON"],"sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\nimport type { DefaultNodeTypes, TypedEditorState } from '../../../types/nodeTypes.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertFromMarkdownString } from '../../../packages/@lexical/markdown/index.js'\n\nexport const convertMarkdownToLexical = <\n TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes,\n>({\n editorConfig,\n markdown,\n}: {\n editorConfig: SanitizedServerEditorConfig\n markdown: string\n}): TypedEditorState<TNodeTypes> => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers)\n },\n { discrete: true },\n )\n\n const editorJSON = headlessEditor.getEditorState().toJSON()\n\n return editorJSON as TypedEditorState<TNodeTypes>\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAKrC,SAASC,eAAe,QAAQ;AAChC,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,wBAAA,GAA2BA,CAEtC;EACAC,YAAY;EACZC;AAAQ,CAIT;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAE,cAAA,CAAeE,MAAM,CACnB;IACEN,0BAAA,CAA2BG,QAAA,EAAUD,YAAA,CAAaK,QAAQ,CAACC,oBAAoB;EACjF,GACA;IAAEC,QAAA,EAAU;EAAK;EAGnB,MAAMC,UAAA,GAAaN,cAAA,CAAeO,cAAc,GAAGC,MAAM;EAEzD,OAAOF,UAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertFromMarkdownString","convertMarkdownToLexical","editorConfig","markdown","headlessEditor","nodes","update","features","markdownTransformers","undefined","discrete","editorJSON","getEditorState","toJSON"],"sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\nimport type { DefaultNodeTypes, TypedEditorState } from '../../../types/nodeTypes.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertFromMarkdownString } from '../../../lexical/utils/markdown/convertFromMarkdownString.js'\n\nexport const convertMarkdownToLexical = <\n TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes,\n>({\n editorConfig,\n markdown,\n}: {\n editorConfig: SanitizedServerEditorConfig\n markdown: string\n}): TypedEditorState<TNodeTypes> => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n // shouldMergeAdjacentLines is true so multi-line Payload block tags and\n // soft-wrapped content keep being parsed as before. The exported\n // $convertFromMarkdownString now defaults to false to match upstream.\n $convertFromMarkdownString(\n markdown,\n editorConfig.features.markdownTransformers,\n undefined,\n false,\n true,\n )\n },\n { discrete: true },\n )\n\n const editorJSON = headlessEditor.getEditorState().toJSON()\n\n return editorJSON as TypedEditorState<TNodeTypes>\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAKrC,SAASC,eAAe,QAAQ;AAChC,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,wBAAA,GAA2BA,CAEtC;EACAC,YAAY;EACZC;AAAQ,CAIT;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAE,cAAA,CAAeE,MAAM,CACnB;IACE;IACA;IACA;IACAN,0BAAA,CACEG,QAAA,EACAD,YAAA,CAAaK,QAAQ,CAACC,oBAAoB,EAC1CC,SAAA,EACA,OACA;EAEJ,GACA;IAAEC,QAAA,EAAU;EAAK;EAGnB,MAAMC,UAAA,GAAaP,cAAA,CAAeQ,cAAc,GAAGC,MAAM;EAEzD,OAAOF,UAAA;AACT","ignoreList":[]}
@@ -1,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":[]}