@payloadcms/richtext-lexical 4.0.0-internal.a1317b2 → 4.0.0-internal.a2d053c

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 (448) hide show
  1. package/dist/exports/client/Field-334JNLRF.js +2 -0
  2. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  3. package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
  4. package/dist/exports/client/chunk-BEKGION5.js +2 -0
  5. package/dist/exports/client/chunk-BEKGION5.js.map +7 -0
  6. package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
  7. package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
  8. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  9. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  10. package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
  11. package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
  12. package/dist/exports/client/chunk-SE5IITBK.js +2 -0
  13. package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
  14. package/dist/exports/client/{component-D5QLYS7W.js → component-QENB4QTS.js} +2 -2
  15. package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
  16. package/dist/exports/client/index.js +28 -28
  17. package/dist/exports/client/index.js.map +4 -4
  18. package/dist/features/align/client/index.js.map +1 -1
  19. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  20. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  21. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  22. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  23. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  24. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  25. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  26. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  27. package/dist/features/blocks/client/component/index.d.ts +0 -6
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +199 -109
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  32. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  33. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  34. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  35. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  36. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  37. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  38. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  39. package/dist/features/blocks/client/componentInline/index.css +0 -1
  40. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  41. package/dist/features/blocks/client/componentInline/index.js +32 -30
  42. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  43. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  44. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  45. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  46. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  47. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  49. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  50. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  51. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
  52. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  53. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  54. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  55. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  56. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  57. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  58. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  59. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  60. package/dist/features/blocks/server/schema.d.ts +2 -0
  61. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  62. package/dist/features/blocks/server/schema.js +7 -9
  63. package/dist/features/blocks/server/schema.js.map +1 -1
  64. package/dist/features/blocks/server/validate.js +1 -1
  65. package/dist/features/blocks/server/validate.js.map +1 -1
  66. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  67. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  68. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  69. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  70. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  71. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  72. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  73. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  74. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  75. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  76. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  77. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  78. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  79. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  80. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  81. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  82. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  83. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  84. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  85. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  86. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  87. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  88. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  90. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  91. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  92. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  93. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  94. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  95. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  96. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  97. package/dist/features/heading/client/index.js.map +1 -1
  98. package/dist/features/heading/constants.d.ts +2 -0
  99. package/dist/features/heading/constants.d.ts.map +1 -0
  100. package/dist/features/heading/constants.js +2 -0
  101. package/dist/features/heading/constants.js.map +1 -0
  102. package/dist/features/heading/server/index.d.ts.map +1 -1
  103. package/dist/features/heading/server/index.js +5 -1
  104. package/dist/features/heading/server/index.js.map +1 -1
  105. package/dist/features/heading/server/validate.d.ts +6 -0
  106. package/dist/features/heading/server/validate.d.ts.map +1 -0
  107. package/dist/features/heading/server/validate.js +15 -0
  108. package/dist/features/heading/server/validate.js.map +1 -0
  109. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +11 -1
  110. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  111. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +17 -0
  112. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  113. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  114. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +2 -2
  115. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  116. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  117. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  118. package/dist/features/horizontalRule/server/schema.js +6 -5
  119. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  120. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  121. package/dist/features/indent/client/IndentPlugin.js +122 -1
  122. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  123. package/dist/features/indent/client/index.d.ts.map +1 -1
  124. package/dist/features/indent/client/index.js +0 -2
  125. package/dist/features/indent/client/index.js.map +1 -1
  126. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  127. package/dist/features/indent/server/i18n.js +74 -37
  128. package/dist/features/indent/server/i18n.js.map +1 -1
  129. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  130. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  131. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +18 -7
  132. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  133. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -1
  134. package/dist/features/link/client/plugins/link/index.js.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/nodes/AutoLinkNode.d.ts.map +1 -1
  138. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  139. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  140. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  141. package/dist/features/link/nodes/LinkNode.js +2 -15
  142. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  143. package/dist/features/link/server/baseFields.js.map +1 -1
  144. package/dist/features/link/server/validate.js +1 -1
  145. package/dist/features/link/server/validate.js.map +1 -1
  146. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  147. package/dist/features/lists/checklist/server/index.js +5 -2
  148. package/dist/features/lists/checklist/server/index.js.map +1 -1
  149. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  150. package/dist/features/lists/orderedList/server/index.js +5 -2
  151. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  152. package/dist/features/lists/shared/constants.d.ts +2 -0
  153. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  154. package/dist/features/lists/shared/constants.js +2 -0
  155. package/dist/features/lists/shared/constants.js.map +1 -0
  156. package/dist/features/lists/shared/schema.d.ts.map +1 -1
  157. package/dist/features/lists/shared/schema.js.map +1 -1
  158. package/dist/features/lists/shared/validate.d.ts +5 -0
  159. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  160. package/dist/features/lists/shared/validate.js +15 -0
  161. package/dist/features/lists/shared/validate.js.map +1 -0
  162. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  163. package/dist/features/lists/unorderedList/server/index.js +5 -2
  164. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  165. package/dist/features/relationship/client/components/index.css +3 -6
  166. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  167. package/dist/features/relationship/client/index.d.ts +2 -2
  168. package/dist/features/relationship/client/index.d.ts.map +1 -1
  169. package/dist/features/relationship/client/index.js.map +1 -1
  170. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  171. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  172. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  173. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  174. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  175. package/dist/features/relationship/client/plugins/index.js +27 -31
  176. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  177. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  178. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  179. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  180. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  181. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  182. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  183. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  184. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  185. package/dist/features/relationship/server/index.d.ts +8 -1
  186. package/dist/features/relationship/server/index.d.ts.map +1 -1
  187. package/dist/features/relationship/server/index.js +28 -11
  188. package/dist/features/relationship/server/index.js.map +1 -1
  189. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  190. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  191. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  192. package/dist/features/relationship/server/schema.d.ts +3 -2
  193. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  194. package/dist/features/relationship/server/schema.js +9 -12
  195. package/dist/features/relationship/server/schema.js.map +1 -1
  196. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  197. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  198. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  199. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  200. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  201. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  202. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  203. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  204. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.css +1 -2
  205. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  206. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js +17 -44
  207. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  208. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  209. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js +47 -24
  210. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  211. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  212. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  213. package/dist/features/table/client/plugins/TablePlugin/index.js +54 -18
  214. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -1
  215. package/dist/features/table/client/utils/useDebounce.js.map +1 -1
  216. package/dist/features/textState/defaultColors.js +1 -1
  217. package/dist/features/textState/defaultColors.js.map +1 -1
  218. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -1
  219. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  220. package/dist/features/toolbars/fixed/client/Toolbar/index.js +141 -70
  221. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  222. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  223. package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
  224. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  225. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  226. package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
  227. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  228. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  229. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
  230. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  231. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -12
  232. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  233. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
  234. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  235. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  236. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  237. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  238. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  239. package/dist/features/typesServer.d.ts +16 -11
  240. package/dist/features/typesServer.d.ts.map +1 -1
  241. package/dist/features/typesServer.js.map +1 -1
  242. package/dist/features/upload/client/component/index.css +0 -2
  243. package/dist/features/upload/client/drawer/index.js.map +1 -1
  244. package/dist/features/upload/client/index.d.ts +3 -2
  245. package/dist/features/upload/client/index.d.ts.map +1 -1
  246. package/dist/features/upload/client/index.js.map +1 -1
  247. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  248. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  249. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  250. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  251. package/dist/features/upload/client/plugin/index.js +50 -53
  252. package/dist/features/upload/client/plugin/index.js.map +1 -1
  253. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  254. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  255. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  256. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  257. package/dist/features/upload/server/index.d.ts +7 -3
  258. package/dist/features/upload/server/index.d.ts.map +1 -1
  259. package/dist/features/upload/server/index.js +18 -14
  260. package/dist/features/upload/server/index.js.map +1 -1
  261. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  262. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  263. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  264. package/dist/features/upload/server/schema.d.ts +4 -16
  265. package/dist/features/upload/server/schema.d.ts.map +1 -1
  266. package/dist/features/upload/server/schema.js +8 -10
  267. package/dist/features/upload/server/schema.js.map +1 -1
  268. package/dist/features/upload/server/validate.d.ts +2 -2
  269. package/dist/features/upload/server/validate.d.ts.map +1 -1
  270. package/dist/features/upload/server/validate.js +4 -1
  271. package/dist/features/upload/server/validate.js.map +1 -1
  272. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  273. package/dist/field/Diff/converters/listitem/index.js +2 -1
  274. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  275. package/dist/field/Diff/converters/relationship/index.css +0 -1
  276. package/dist/field/Diff/converters/unknown/index.css +0 -1
  277. package/dist/field/Diff/converters/upload/index.css +0 -1
  278. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  279. package/dist/field/Diff/index.css +0 -2
  280. package/dist/field/Diff/index.d.ts +3 -2
  281. package/dist/field/Diff/index.d.ts.map +1 -1
  282. package/dist/field/Diff/index.js +3 -2
  283. package/dist/field/Diff/index.js.map +1 -1
  284. package/dist/field/Field.d.ts.map +1 -1
  285. package/dist/field/Field.js +8 -1
  286. package/dist/field/Field.js.map +1 -1
  287. package/dist/field/RenderLexical/index.d.ts +3 -1
  288. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  289. package/dist/field/RenderLexical/index.js +23 -23
  290. package/dist/field/RenderLexical/index.js.map +1 -1
  291. package/dist/field/ViewSelector.d.ts.map +1 -1
  292. package/dist/field/ViewSelector.js +13 -4
  293. package/dist/field/ViewSelector.js.map +1 -1
  294. package/dist/field/bundled.css +1 -1
  295. package/dist/field/index.css +0 -1
  296. package/dist/field/index.js.map +1 -1
  297. package/dist/field/rscEntry.d.ts +2 -2
  298. package/dist/field/rscEntry.d.ts.map +1 -1
  299. package/dist/field/rscEntry.js.map +1 -1
  300. package/dist/i18n.d.ts.map +1 -1
  301. package/dist/i18n.js +44 -0
  302. package/dist/i18n.js.map +1 -1
  303. package/dist/index.d.ts +4 -4
  304. package/dist/index.d.ts.map +1 -1
  305. package/dist/index.js +23 -1
  306. package/dist/index.js.map +1 -1
  307. package/dist/lexical/LexicalEditor.css +21 -10
  308. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  309. package/dist/lexical/LexicalEditor.js +61 -64
  310. package/dist/lexical/LexicalEditor.js.map +1 -1
  311. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  312. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  313. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  314. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  315. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +2 -1
  316. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  317. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  318. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  319. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +235 -88
  320. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  321. package/dist/lexical/plugins/SlashMenu/index.css +0 -1
  322. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  323. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  324. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  325. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  326. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  327. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +17 -0
  328. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  329. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +139 -37
  330. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  331. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  332. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  333. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  334. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  335. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  336. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  337. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  338. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  339. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  340. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  341. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  342. package/dist/lexical/theme/EditorTheme.css +0 -2
  343. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  344. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  345. package/dist/lexical/ui/ContentEditable.js +32 -11
  346. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  347. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  348. package/dist/lexical/ui/icons/H3/index.js +13 -6
  349. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  350. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  351. package/dist/lexical/ui/icons/H4/index.js +13 -6
  352. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  353. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  354. package/dist/lexical/ui/icons/H5/index.js +13 -6
  355. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  356. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  357. package/dist/lexical/ui/icons/H6/index.js +13 -6
  358. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  359. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  360. package/dist/lexical/utils/nodeFormat.js +0 -2
  361. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  362. package/dist/lexical/utils/url.d.ts.map +1 -1
  363. package/dist/lexical/utils/url.js +1 -1
  364. package/dist/lexical/utils/url.js.map +1 -1
  365. package/dist/populateGraphQL/populate.js.map +1 -1
  366. package/dist/presets/llmInstructions.d.ts +2 -0
  367. package/dist/presets/llmInstructions.d.ts.map +1 -0
  368. package/dist/presets/llmInstructions.js +13 -0
  369. package/dist/presets/llmInstructions.js.map +1 -0
  370. package/dist/types/builtInNodes.d.ts +1 -1
  371. package/dist/types/builtInNodes.d.ts.map +1 -1
  372. package/dist/types/builtInNodes.js +8 -3
  373. package/dist/types/builtInNodes.js.map +1 -1
  374. package/dist/types/index.d.ts +3 -6
  375. package/dist/types/index.d.ts.map +1 -1
  376. package/dist/types/index.js.map +1 -1
  377. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  378. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  379. package/dist/types/jsonSchemaHelpers.js +7 -2
  380. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  381. package/dist/types/nodeTypes.d.ts +5 -0
  382. package/dist/types/nodeTypes.d.ts.map +1 -1
  383. package/dist/types/nodeTypes.js.map +1 -1
  384. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  385. package/dist/utilities/buildEditorState.js.map +1 -1
  386. package/dist/utilities/buildInitialState.d.ts +3 -2
  387. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  388. package/dist/utilities/buildInitialState.js +1 -0
  389. package/dist/utilities/buildInitialState.js.map +1 -1
  390. package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
  391. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  392. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  393. package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -9
  394. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  395. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
  396. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  397. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  398. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  399. package/dist/utilities/generateImportMap.d.ts +2 -2
  400. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  401. package/dist/utilities/generateImportMap.js.map +1 -1
  402. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  403. package/dist/utilities/initLexicalFeatures.js +38 -4
  404. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  405. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  406. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  407. package/dist/utilities/useLexicalFeature.js +15 -6
  408. package/dist/utilities/useLexicalFeature.js.map +1 -1
  409. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  410. package/dist/validate/hasText.d.ts +2 -2
  411. package/dist/validate/hasText.d.ts.map +1 -1
  412. package/dist/validate/hasText.js.map +1 -1
  413. package/dist/validate/index.d.ts +1 -1
  414. package/dist/validate/index.d.ts.map +1 -1
  415. package/package.json +50 -53
  416. package/dist/dependencyChecker.spec.js +0 -16
  417. package/dist/dependencyChecker.spec.js.map +0 -1
  418. package/dist/exports/client/Field-F22V5L4V.js +0 -2
  419. package/dist/exports/client/Field-F22V5L4V.js.map +0 -7
  420. package/dist/exports/client/bundled.css +0 -1
  421. package/dist/exports/client/chunk-43E5QYAA.js +0 -2
  422. package/dist/exports/client/chunk-43E5QYAA.js.map +0 -7
  423. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  424. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  425. package/dist/exports/client/chunk-LN6VX25I.js +0 -2
  426. package/dist/exports/client/chunk-LN6VX25I.js.map +0 -7
  427. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  428. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  429. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  430. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  431. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  432. package/dist/features/converters/lexicalToHtml/sync/alignment.spec.js +0 -92
  433. package/dist/features/converters/lexicalToHtml/sync/alignment.spec.js.map +0 -1
  434. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  435. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  436. package/dist/features/link/markdownTransformer.spec.js +0 -195
  437. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  438. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.js +0 -65
  439. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.js.map +0 -1
  440. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  441. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  442. package/dist/lexical/utils/url.spec.js +0 -114
  443. package/dist/lexical/utils/url.spec.js.map +0 -1
  444. package/dist/utilities/jsx/jsx.spec.js +0 -178
  445. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  446. /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
  447. /package/dist/exports/client/{component-D5QLYS7W.js.map → component-QENB4QTS.js.map} +0 -0
  448. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-AU7IBNY7.js.map} +0 -0
@@ -1,92 +0,0 @@
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
@@ -1 +0,0 @@
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,E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ACArB,MAAA,CAAOmB,IAAA,EAAMI,GAAG,CAACD,IAAI,CAAC;IACtBtB,MAAA,CAAOmB,IAAA,EAAMG,IAAI,CAAC;EACpB;AACF","ignoreList":[]}
@@ -1,180 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { convertLexicalToPlaintext } from './sync/index.js';
3
- function textNode(text, bold) {
4
- return {
5
- type: 'text',
6
- detail: 0,
7
- format: bold ? 1 : 0,
8
- mode: 'normal',
9
- style: '',
10
- text,
11
- version: 1
12
- };
13
- }
14
- function linebreakNode() {
15
- return {
16
- type: 'linebreak',
17
- version: 1
18
- };
19
- }
20
- function tabNode() {
21
- return {
22
- type: 'tab',
23
- detail: 0,
24
- format: 0,
25
- mode: 'normal',
26
- style: '',
27
- text: '',
28
- version: 1
29
- };
30
- }
31
- function paragraphNode(children) {
32
- return {
33
- type: 'paragraph',
34
- children,
35
- direction: 'ltr',
36
- format: '',
37
- indent: 0,
38
- textFormat: 0,
39
- version: 1
40
- };
41
- }
42
- function headingNode(children) {
43
- return {
44
- type: 'heading',
45
- children,
46
- direction: 'ltr',
47
- format: '',
48
- indent: 0,
49
- textFormat: 0,
50
- tag: 'h1',
51
- version: 1
52
- };
53
- }
54
- function listItemNode(children) {
55
- return {
56
- type: 'listitem',
57
- children,
58
- checked: false,
59
- direction: 'ltr',
60
- format: '',
61
- indent: 0,
62
- value: 0,
63
- version: 1
64
- };
65
- }
66
- function listNode(children) {
67
- return {
68
- type: 'list',
69
- children,
70
- direction: 'ltr',
71
- format: '',
72
- indent: 0,
73
- listType: 'bullet',
74
- start: 0,
75
- tag: 'ul',
76
- version: 1
77
- };
78
- }
79
- function tableNode(children) {
80
- return {
81
- type: 'table',
82
- children,
83
- direction: 'ltr',
84
- format: '',
85
- indent: 0,
86
- version: 1
87
- };
88
- }
89
- function tableRowNode(children) {
90
- return {
91
- type: 'tablerow',
92
- children,
93
- direction: 'ltr',
94
- format: '',
95
- indent: 0,
96
- version: 1
97
- };
98
- }
99
- function tableCellNode(children) {
100
- return {
101
- type: 'tablecell',
102
- children,
103
- direction: 'ltr',
104
- format: '',
105
- indent: 0,
106
- headerState: 0,
107
- version: 1
108
- };
109
- }
110
- function rootNode(nodes) {
111
- return {
112
- root: {
113
- type: 'root',
114
- children: nodes,
115
- direction: 'ltr',
116
- format: '',
117
- indent: 0,
118
- version: 1
119
- }
120
- };
121
- }
122
- describe('convertLexicalToPlaintext', () => {
123
- it('ensure paragraph with text is correctly converted', () => {
124
- const data = rootNode([paragraphNode([textNode('Basic Text')])]);
125
- const plaintext = convertLexicalToPlaintext({
126
- data
127
- });
128
- expect(plaintext).toBe('Basic Text');
129
- });
130
- it('ensure paragraph with multiple text nodes is correctly converted', () => {
131
- const data = rootNode([paragraphNode([textNode('Basic Text'), textNode(' Bold', true), textNode(' Text')])]);
132
- const plaintext = convertLexicalToPlaintext({
133
- data
134
- });
135
- expect(plaintext).toBe('Basic Text Bold Text');
136
- });
137
- it('ensure linebreaks are converted correctly', () => {
138
- const data = rootNode([paragraphNode([textNode('Basic Text'), linebreakNode(), textNode('Next Line')])]);
139
- const plaintext = convertLexicalToPlaintext({
140
- data
141
- });
142
- expect(plaintext).toBe('Basic Text\nNext Line');
143
- });
144
- it('ensure tabs are converted correctly', () => {
145
- const data = rootNode([paragraphNode([textNode('Basic Text'), tabNode(), textNode('Next Line')])]);
146
- const plaintext = convertLexicalToPlaintext({
147
- data
148
- });
149
- expect(plaintext).toBe('Basic Text\tNext Line');
150
- });
151
- it('ensure new lines are added between paragraphs', () => {
152
- const data = rootNode([paragraphNode([textNode('Basic text')]), paragraphNode([textNode('Next block-node')])]);
153
- const plaintext = convertLexicalToPlaintext({
154
- data
155
- });
156
- expect(plaintext).toBe('Basic text\n\nNext block-node');
157
- });
158
- it('ensure new lines are added between heading nodes', () => {
159
- const data = rootNode([headingNode([textNode('Basic text')]), headingNode([textNode('Next block-node')])]);
160
- const plaintext = convertLexicalToPlaintext({
161
- data
162
- });
163
- expect(plaintext).toBe('Basic text\n\nNext block-node');
164
- });
165
- it('ensure new lines are added between list items and lists', () => {
166
- const data = rootNode([listNode([listItemNode([textNode('First item')]), listItemNode([textNode('Second item')])]), listNode([listItemNode([textNode('Next list')])])]);
167
- const plaintext = convertLexicalToPlaintext({
168
- data
169
- });
170
- expect(plaintext).toBe('First item\nSecond item\n\nNext list');
171
- });
172
- it('ensure new lines are added between tables, table rows, and table cells', () => {
173
- const data = rootNode([tableNode([tableRowNode([tableCellNode([textNode('Cell 1, Row 1')]), tableCellNode([textNode('Cell 2, Row 1')])]), tableRowNode([tableCellNode([textNode('Cell 1, Row 2')]), tableCellNode([textNode('Cell 2, Row 2')])])]), tableNode([tableRowNode([tableCellNode([textNode('Cell in Table 2')])])])]);
174
- const plaintext = convertLexicalToPlaintext({
175
- data
176
- });
177
- expect(plaintext).toBe('Cell 1, Row 1 | Cell 2, Row 1\nCell 1, Row 2 | Cell 2, Row 2\n\nCell in Table 2');
178
- });
179
- });
180
- //# sourceMappingURL=convertLexicalToPlaintext.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertLexicalToPlaintext.spec.js","names":["describe","it","expect","convertLexicalToPlaintext","textNode","text","bold","type","detail","format","mode","style","version","linebreakNode","tabNode","paragraphNode","children","direction","indent","textFormat","headingNode","tag","listItemNode","checked","value","listNode","listType","start","tableNode","tableRowNode","tableCellNode","headerState","rootNode","nodes","root","data","plaintext","toBe"],"sources":["../../../../src/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\nimport type {\n DefaultNodeTypes,\n DefaultTypedEditorState,\n SerializedTabNode,\n SerializedParagraphNode,\n SerializedTextNode,\n SerializedLineBreakNode,\n SerializedHeadingNode,\n SerializedListItemNode,\n SerializedListNode,\n SerializedTableRowNode,\n SerializedTableNode,\n SerializedTableCellNode,\n} from '../../../types/nodeTypes.js'\nimport { convertLexicalToPlaintext } from './sync/index.js'\n\nfunction textNode(text: string, bold?: boolean): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: bold ? 1 : 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n }\n}\n\nfunction linebreakNode(): SerializedLineBreakNode {\n return {\n type: 'linebreak',\n version: 1,\n }\n}\n\nfunction tabNode(): SerializedTabNode {\n return {\n type: 'tab',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n }\n}\n\nfunction paragraphNode(children: DefaultNodeTypes[]): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\n\nfunction headingNode(children: DefaultNodeTypes[]): SerializedHeadingNode {\n return {\n type: 'heading',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n tag: 'h1',\n version: 1,\n }\n}\n\nfunction listItemNode(children: DefaultNodeTypes[]): SerializedListItemNode {\n return {\n type: 'listitem',\n children,\n checked: false,\n direction: 'ltr',\n format: '',\n indent: 0,\n value: 0,\n version: 1,\n }\n}\n\nfunction listNode(children: DefaultNodeTypes[]): SerializedListNode {\n return {\n type: 'list',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n listType: 'bullet',\n start: 0,\n tag: 'ul',\n version: 1,\n }\n}\n\nfunction tableNode(children: (DefaultNodeTypes | SerializedTableRowNode)[]): SerializedTableNode {\n return {\n type: 'table',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableRowNode(\n children: (DefaultNodeTypes | SerializedTableCellNode)[],\n): SerializedTableRowNode {\n return {\n type: 'tablerow',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableCellNode(children: DefaultNodeTypes[]): SerializedTableCellNode {\n return {\n type: 'tablecell',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n headerState: 0,\n version: 1,\n }\n}\n\nfunction rootNode(nodes: (DefaultNodeTypes | SerializedTableNode)[]): DefaultTypedEditorState {\n return {\n root: {\n type: 'root',\n children: nodes,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\ndescribe('convertLexicalToPlaintext', () => {\n it('ensure paragraph with text is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([paragraphNode([textNode('Basic Text')])])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text')\n })\n\n it('ensure paragraph with multiple text nodes is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), textNode(' Bold', true), textNode(' Text')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text Bold Text')\n })\n\n it('ensure linebreaks are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), linebreakNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\nNext Line')\n })\n\n it('ensure tabs are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), tabNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\tNext Line')\n })\n\n it('ensure new lines are added between paragraphs', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic text')]),\n paragraphNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between heading nodes', () => {\n const data: DefaultTypedEditorState = rootNode([\n headingNode([textNode('Basic text')]),\n headingNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between list items and lists', () => {\n const data: DefaultTypedEditorState = rootNode([\n listNode([listItemNode([textNode('First item')]), listItemNode([textNode('Second item')])]),\n listNode([listItemNode([textNode('Next list')])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('First item\\nSecond item\\n\\nNext list')\n })\n\n it('ensure new lines are added between tables, table rows, and table cells', () => {\n const data: DefaultTypedEditorState = rootNode([\n tableNode([\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 1')]),\n tableCellNode([textNode('Cell 2, Row 1')]),\n ]),\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 2')]),\n tableCellNode([textNode('Cell 2, Row 2')]),\n ]),\n ]),\n tableNode([tableRowNode([tableCellNode([textNode('Cell in Table 2')])])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe(\n 'Cell 1, Row 1 | Cell 2, Row 1\\nCell 1, Row 2 | Cell 2, Row 2\\n\\nCell in Table 2',\n )\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ;AAerC,SAASC,yBAAyB,QAAQ;AAE1C,SAASC,SAASC,IAAY,EAAEC,IAAc;EAC5C,OAAO;IACLC,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQH,IAAA,GAAO,IAAI;IACnBI,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA;IACAO,OAAA,EAAS;EACX;AACF;AAEA,SAASC,cAAA;EACP,OAAO;IACLN,IAAA,EAAM;IACNK,OAAA,EAAS;EACX;AACF;AAEA,SAASE,QAAA;EACP,OAAO;IACLP,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQ;IACRC,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA,EAAM;IACNO,OAAA,EAAS;EACX;AACF;AAEA,SAASG,cAAcC,QAA4B;EACjD,OAAO;IACLT,IAAA,EAAM;IACNS,QAAA;IACAC,SAAA,EAAW;IACXR,MA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U,CAACC,YAAA,CAAa,CAACC,aAAA,CAAc,CAAC1B,QAAA,CAAS,mBAAmB,EAAE,EAAE,EACzE;IAED,MAAMgC,SAAA,GAAYjC,yBAAA,CAA0B;MAC1CgC;IACF;IAEAjC,MAAA,CAAOkC,SAAA,EAAWC,IAAI,CACpB;EAEJ;AACF","ignoreList":[]}
@@ -1,195 +0,0 @@
1
- import { createHeadlessEditor } from '@lexical/headless';
2
- import { $createParagraphNode, $createTextNode, $getRoot } from 'lexical';
3
- import { describe, expect, it } from 'vitest';
4
- import { $convertToMarkdownString } from '@lexical/markdown';
5
- import { AutoLinkNode } from './nodes/AutoLinkNode.js';
6
- import { $createLinkNode, LinkNode } from './nodes/LinkNode.js';
7
- import { PAYLOAD_LINK, createPayloadLinkTransformer } from './markdownTransformer.js';
8
- function createEditor() {
9
- return createHeadlessEditor({
10
- nodes: [LinkNode, AutoLinkNode]
11
- });
12
- }
13
- function toMarkdown(setupFn, transformer = PAYLOAD_LINK) {
14
- const editor = createEditor();
15
- editor.update(setupFn, {
16
- discrete: true
17
- });
18
- let markdown = '';
19
- editor.getEditorState().read(() => {
20
- markdown = $convertToMarkdownString([transformer]);
21
- });
22
- return markdown;
23
- }
24
- describe('createPayloadLinkTransformer', () => {
25
- describe('custom links', () => {
26
- it('should export a custom link with its url', () => {
27
- const markdown = toMarkdown(() => {
28
- const link = $createLinkNode({
29
- fields: {
30
- linkType: 'custom',
31
- url: 'https://payloadcms.com',
32
- newTab: false,
33
- doc: null
34
- }
35
- });
36
- link.append($createTextNode('Payload'));
37
- $getRoot().append($createParagraphNode().append(link));
38
- });
39
- expect(markdown).toBe('[Payload](https://payloadcms.com)');
40
- });
41
- it('should export a custom link that opens in a new tab', () => {
42
- // newTab is a Payload field — markdown has no equivalent, so it is intentionally dropped
43
- const markdown = toMarkdown(() => {
44
- const link = $createLinkNode({
45
- fields: {
46
- linkType: 'custom',
47
- url: 'https://payloadcms.com',
48
- newTab: true,
49
- doc: null
50
- }
51
- });
52
- link.append($createTextNode('Payload'));
53
- $getRoot().append($createParagraphNode().append(link));
54
- });
55
- expect(markdown).toBe('[Payload](https://payloadcms.com)');
56
- });
57
- it('should produce an empty href when url is null or undefined', () => {
58
- const markdownNull = toMarkdown(() => {
59
- const link = $createLinkNode({
60
- fields: {
61
- linkType: 'custom',
62
- url: null,
63
- newTab: false,
64
- doc: null
65
- }
66
- });
67
- link.append($createTextNode('Broken'));
68
- $getRoot().append($createParagraphNode().append(link));
69
- });
70
- const markdownUndefined = toMarkdown(() => {
71
- const link = $createLinkNode({
72
- fields: {
73
- linkType: 'custom',
74
- newTab: false,
75
- doc: null
76
- }
77
- });
78
- link.append($createTextNode('Broken'));
79
- $getRoot().append($createParagraphNode().append(link));
80
- });
81
- expect(markdownNull).toBe('[Broken]()');
82
- expect(markdownUndefined).toBe('[Broken]()');
83
- });
84
- });
85
- describe('internal links', () => {
86
- it('should export an empty href when no internalDocToHref is provided', () => {
87
- const markdown = toMarkdown(() => {
88
- const link = $createLinkNode({
89
- fields: {
90
- linkType: 'internal',
91
- doc: {
92
- relationTo: 'pages',
93
- value: {
94
- id: '1',
95
- slug: 'about'
96
- }
97
- },
98
- newTab: false
99
- }
100
- });
101
- link.append($createTextNode('About'));
102
- $getRoot().append($createParagraphNode().append(link));
103
- });
104
- expect(markdown).toBe('[About]()');
105
- });
106
- it('should call internalDocToHref and use the returned url', () => {
107
- const transformer = createPayloadLinkTransformer({
108
- internalDocToHref: ({
109
- linkNode
110
- }) => {
111
- const value = linkNode.fields.doc?.value;
112
- if (value && typeof value === 'object' && 'slug' in value) {
113
- return `/${value.slug}`;
114
- }
115
- return '/';
116
- }
117
- });
118
- const markdown = toMarkdown(() => {
119
- const link = $createLinkNode({
120
- fields: {
121
- linkType: 'internal',
122
- doc: {
123
- relationTo: 'pages',
124
- value: {
125
- id: '1',
126
- slug: 'about'
127
- }
128
- },
129
- newTab: false
130
- }
131
- });
132
- link.append($createTextNode('About'));
133
- $getRoot().append($createParagraphNode().append(link));
134
- }, transformer);
135
- expect(markdown).toBe('[About](/about)');
136
- });
137
- it('should pass the full serialized link node to internalDocToHref', () => {
138
- let capturedLinkNode = null;
139
- const transformer = createPayloadLinkTransformer({
140
- internalDocToHref: ({
141
- linkNode
142
- }) => {
143
- capturedLinkNode = linkNode;
144
- return '/captured';
145
- }
146
- });
147
- toMarkdown(() => {
148
- const link = $createLinkNode({
149
- fields: {
150
- linkType: 'internal',
151
- doc: {
152
- relationTo: 'pages',
153
- value: {
154
- id: '42',
155
- title: 'Home'
156
- }
157
- },
158
- newTab: true
159
- }
160
- });
161
- link.append($createTextNode('Home'));
162
- $getRoot().append($createParagraphNode().append(link));
163
- }, transformer);
164
- expect(capturedLinkNode).not.toBeNull();
165
- expect(capturedLinkNode.fields.linkType).toBe('internal');
166
- expect(capturedLinkNode.fields.doc?.relationTo).toBe('pages');
167
- expect(capturedLinkNode.fields.doc?.value).toMatchObject({
168
- id: '42',
169
- title: 'Home'
170
- });
171
- expect(capturedLinkNode.fields.newTab).toBe(true);
172
- });
173
- });
174
- describe('PAYLOAD_LINK (static export)', () => {
175
- it('should behave identically to createPayloadLinkTransformer() with no args', () => {
176
- const setup = () => {
177
- const link = $createLinkNode({
178
- fields: {
179
- linkType: 'custom',
180
- url: 'https://example.com',
181
- newTab: false,
182
- doc: null
183
- }
184
- });
185
- link.append($createTextNode('Example'));
186
- $getRoot().append($createParagraphNode().append(link));
187
- };
188
- const fromStatic = toMarkdown(setup, PAYLOAD_LINK);
189
- const fromFactory = toMarkdown(setup, createPayloadLinkTransformer());
190
- expect(fromStatic).toBe(fromFactory);
191
- expect(fromStatic).toBe('[Example](https://example.com)');
192
- });
193
- });
194
- });
195
- //# sourceMappingURL=markdownTransformer.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.spec.js","names":["createHeadlessEditor","$createParagraphNode","$createTextNode","$getRoot","describe","expect","it","$convertToMarkdownString","AutoLinkNode","$createLinkNode","LinkNode","PAYLOAD_LINK","createPayloadLinkTransformer","createEditor","nodes","toMarkdown","setupFn","transformer","editor","update","discrete","markdown","getEditorState","read","link","fields","linkType","url","newTab","doc","append","toBe","markdownNull","markdownUndefined","relationTo","value","id","slug","internalDocToHref","linkNode","capturedLinkNode","title","not","toBeNull","toMatchObject","setup","fromStatic","fromFactory"],"sources":["../../../src/features/link/markdownTransformer.spec.ts"],"sourcesContent":["import { createHeadlessEditor } from '@lexical/headless'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport { describe, expect, it } from 'vitest'\n\nimport { $convertToMarkdownString } from '@lexical/markdown'\nimport { AutoLinkNode } from './nodes/AutoLinkNode.js'\nimport { $createLinkNode, LinkNode } from './nodes/LinkNode.js'\nimport type { SerializedLinkNode } from './server/schema.js'\nimport { PAYLOAD_LINK, createPayloadLinkTransformer } from './markdownTransformer.js'\n\nfunction createEditor() {\n return createHeadlessEditor({ nodes: [LinkNode, AutoLinkNode] })\n}\n\nfunction toMarkdown(setupFn: () => void, transformer = PAYLOAD_LINK): string {\n const editor = createEditor()\n editor.update(setupFn, { discrete: true })\n let markdown = ''\n editor.getEditorState().read(() => {\n markdown = $convertToMarkdownString([transformer])\n })\n return markdown\n}\n\ndescribe('createPayloadLinkTransformer', () => {\n describe('custom links', () => {\n it('should export a custom link with its url', () => {\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: 'https://payloadcms.com', newTab: false, doc: null },\n })\n link.append($createTextNode('Payload'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdown).toBe('[Payload](https://payloadcms.com)')\n })\n\n it('should export a custom link that opens in a new tab', () => {\n // newTab is a Payload field — markdown has no equivalent, so it is intentionally dropped\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: 'https://payloadcms.com', newTab: true, doc: null },\n })\n link.append($createTextNode('Payload'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdown).toBe('[Payload](https://payloadcms.com)')\n })\n\n it('should produce an empty href when url is null or undefined', () => {\n const markdownNull = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: null as unknown as string, newTab: false, doc: null },\n })\n link.append($createTextNode('Broken'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n const markdownUndefined = toMarkdown(() => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', newTab: false, doc: null },\n })\n link.append($createTextNode('Broken'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdownNull).toBe('[Broken]()')\n expect(markdownUndefined).toBe('[Broken]()')\n })\n })\n\n describe('internal links', () => {\n it('should export an empty href when no internalDocToHref is provided', () => {\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: {\n linkType: 'internal',\n doc: { relationTo: 'pages', value: { id: '1', slug: 'about' } },\n newTab: false,\n },\n })\n link.append($createTextNode('About'))\n $getRoot().append($createParagraphNode().append(link))\n })\n\n expect(markdown).toBe('[About]()')\n })\n\n it('should call internalDocToHref and use the returned url', () => {\n const transformer = createPayloadLinkTransformer({\n internalDocToHref: ({ linkNode }) => {\n const value = linkNode.fields.doc?.value\n if (value && typeof value === 'object' && 'slug' in value) {\n return `/${value.slug}`\n }\n return '/'\n },\n })\n\n const markdown = toMarkdown(() => {\n const link = $createLinkNode({\n fields: {\n linkType: 'internal',\n doc: { relationTo: 'pages', value: { id: '1', slug: 'about' } },\n newTab: false,\n },\n })\n link.append($createTextNode('About'))\n $getRoot().append($createParagraphNode().append(link))\n }, transformer)\n\n expect(markdown).toBe('[About](/about)')\n })\n\n it('should pass the full serialized link node to internalDocToHref', () => {\n let capturedLinkNode: SerializedLinkNode | null = null\n\n const transformer = createPayloadLinkTransformer({\n internalDocToHref: ({ linkNode }) => {\n capturedLinkNode = linkNode\n return '/captured'\n },\n })\n\n toMarkdown(() => {\n const link = $createLinkNode({\n fields: {\n linkType: 'internal',\n doc: { relationTo: 'pages', value: { id: '42', title: 'Home' } },\n newTab: true,\n },\n })\n link.append($createTextNode('Home'))\n $getRoot().append($createParagraphNode().append(link))\n }, transformer)\n\n expect(capturedLinkNode).not.toBeNull()\n expect(capturedLinkNode!.fields.linkType).toBe('internal')\n expect(capturedLinkNode!.fields.doc?.relationTo).toBe('pages')\n expect(capturedLinkNode!.fields.doc?.value).toMatchObject({ id: '42', title: 'Home' })\n expect(capturedLinkNode!.fields.newTab).toBe(true)\n })\n })\n\n describe('PAYLOAD_LINK (static export)', () => {\n it('should behave identically to createPayloadLinkTransformer() with no args', () => {\n const setup = () => {\n const link = $createLinkNode({\n fields: { linkType: 'custom', url: 'https://example.com', newTab: false, doc: null },\n })\n link.append($createTextNode('Example'))\n $getRoot().append($createParagraphNode().append(link))\n }\n\n const fromStatic = toMarkdown(setup, PAYLOAD_LINK)\n const fromFactory = toMarkdown(setup, createPayloadLinkTransformer())\n\n expect(fromStatic).toBe(fromFactory)\n expect(fromStatic).toBe('[Example](https://example.com)')\n })\n })\n})\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,oBAAoB,EAAEC,eAAe,EAAEC,QAAQ,QAAQ;AAChE,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ;AAErC,SAASC,wBAAwB,QAAQ;AACzC,SAASC,YAAY,QAAQ;AAC7B,SAASC,eAAe,EAAEC,QAAQ,QAAQ;AAE1C,SAASC,YAAY,EAAEC,4BAA4B,QAAQ;AAE3D,SAASC,aAAA;EACP,OAAOb,oBAAA,CAAqB;IAAEc,KAAA,EAAO,CAACJ,QAAA,EAAUF,YAAA;EAAc;AAChE;AAEA,SAASO,WAAWC,OAAmB,EAAEC,WAAA,GAAcN,YAAY;EACjE,MAAMO,MAAA,GAASL,YAAA;EACfK,MAAA,CAAOC,MAAM,CAACH,OAAA,EAAS;IAAEI,QAAA,EAAU;EAAK;EACxC,IAAIC,QAAA,GAAW;EACfH,MAAA,CAAOI,cAAc,GAAGC,IAAI,CAAC;IAC3BF,QAAA,GAAWd,wBAAA,CAAyB,CA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OmC,gBAAA,CAAkBf,MAAM,CAACI,GAAG,EAAEK,UAAA,EAAYH,IAAI,CAAC;MACtD1B,MAAA,CAAOmC,gBAAA,CAAkBf,MAAM,CAACI,GAAG,EAAEM,KAAA,EAAOS,aAAa,CAAC;QAAER,EAAA,EAAI;QAAMK,KAAA,EAAO;MAAO;MACpFpC,MAAA,CAAOmC,gBAAA,CAAkBf,MAAM,CAACG,MAAM,EAAEG,IAAI,CAAC;IAC/C;EACF;EAEA3B,QAAA,CAAS,gCAAgC;IACvCE,EAAA,CAAG,4EAA4E;MAC7E,MAAMuC,KAAA,GAAQA,CAAA;QACZ,MAAMrB,IAAA,GAAOf,eAAA,CAAgB;UAC3BgB,MAAA,EAAQ;YAAEC,QAAA,EAAU;YAAUC,GAAA,EAAK;YAAuBC,MAAA,EAAQ;YAAOC,GAAA,EAAK;UAAK;QACrF;QACAL,IAAA,CAAKM,MAAM,CAAC5B,eAAA,CAAgB;QAC5BC,QAAA,GAAW2B,MAAM,CAAC7B,oBAAA,GAAuB6B,MAAM,CAACN,IAAA;MAClD;MAEA,MAAMsB,UAAA,GAAa/B,UAAA,CAAW8B,KAAA,EAAOlC,YAAA;MACrC,MAAMoC,WAAA,GAAchC,UAAA,CAAW8B,KAAA,EAAOjC,4BAAA;MAEtCP,MAAA,CAAOyC,UAAA,EAAYf,IAAI,CAACgB,WAAA;MACxB1C,MAAA,CAAOyC,UAAA,EAAYf,IAAI,CAAC;IAC1B;EACF;AACF","ignoreList":[]}
@@ -1,65 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { getHorizontalScrollDelta } from './horizontalWheelScroll.js';
3
- describe('getHorizontalScrollDelta', () => {
4
- describe('deltaMode 0 (pixel)', () => {
5
- it('should pass deltaY through unchanged for LTR', () => {
6
- const delta = getHorizontalScrollDelta({
7
- clientWidth: 300,
8
- deltaMode: 0,
9
- deltaY: 15,
10
- isRightToLeft: false
11
- });
12
- expect(delta).toBe(15);
13
- });
14
- it('should negate deltaY for RTL', () => {
15
- const delta = getHorizontalScrollDelta({
16
- clientWidth: 300,
17
- deltaMode: 0,
18
- deltaY: 15,
19
- isRightToLeft: true
20
- });
21
- expect(delta).toBe(-15);
22
- });
23
- });
24
- describe('deltaMode 1 (line)', () => {
25
- it('should scale deltaY by the pixels-per-line factor for LTR', () => {
26
- const delta = getHorizontalScrollDelta({
27
- clientWidth: 300,
28
- deltaMode: 1,
29
- deltaY: 3,
30
- isRightToLeft: false
31
- });
32
- expect(delta).toBe(120);
33
- });
34
- it('should scale and negate deltaY for RTL', () => {
35
- const delta = getHorizontalScrollDelta({
36
- clientWidth: 300,
37
- deltaMode: 1,
38
- deltaY: 3,
39
- isRightToLeft: true
40
- });
41
- expect(delta).toBe(-120);
42
- });
43
- });
44
- describe('deltaMode 2 (page)', () => {
45
- it('should scale deltaY by the scroll container width for LTR', () => {
46
- const delta = getHorizontalScrollDelta({
47
- clientWidth: 300,
48
- deltaMode: 2,
49
- deltaY: 2,
50
- isRightToLeft: false
51
- });
52
- expect(delta).toBe(600);
53
- });
54
- it('should scale and negate deltaY for RTL', () => {
55
- const delta = getHorizontalScrollDelta({
56
- clientWidth: 300,
57
- deltaMode: 2,
58
- deltaY: 2,
59
- isRightToLeft: true
60
- });
61
- expect(delta).toBe(-600);
62
- });
63
- });
64
- });
65
- //# sourceMappingURL=horizontalWheelScroll.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"horizontalWheelScroll.spec.js","names":["describe","expect","it","getHorizontalScrollDelta","delta","clientWidth","deltaMode","deltaY","isRightToLeft","toBe"],"sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.ts"],"sourcesContent":["import { describe, expect, it } from 'vitest'\n\nimport { getHorizontalScrollDelta } from './horizontalWheelScroll.js'\n\ndescribe('getHorizontalScrollDelta', () => {\n describe('deltaMode 0 (pixel)', () => {\n it('should pass deltaY through unchanged for LTR', () => {\n const delta = getHorizontalScrollDelta({\n clientWidth: 300,\n deltaMode: 0,\n deltaY: 15,\n isRightToLeft: false,\n })\n\n expect(delta).toBe(15)\n })\n\n it('should negate deltaY for RTL', () => {\n const delta = getHorizontalScrollDelta({\n clientWidth: 300,\n deltaMode: 0,\n deltaY: 15,\n isRightToLeft: true,\n })\n\n expect(delta).toBe(-15)\n })\n })\n\n describe('deltaMode 1 (line)', () => {\n it('should scale deltaY by the pixels-per-line factor for LTR', () => {\n const delta = getHorizontalScrollDelta({\n clientWidth: 300,\n deltaMode: 1,\n deltaY: 3,\n isRightToLeft: false,\n })\n\n expect(delta).toBe(120)\n })\n\n it('should scale and negate deltaY for RTL', () => {\n const delta = getHorizontalScrollDelta({\n clientWidth: 300,\n deltaMode: 1,\n deltaY: 3,\n isRightToLeft: true,\n })\n\n expect(delta).toBe(-120)\n })\n })\n\n describe('deltaMode 2 (page)', () => {\n it('should scale deltaY by the scroll container width for LTR', () => {\n const delta = getHorizontalScrollDelta({\n clientWidth: 300,\n deltaMode: 2,\n deltaY: 2,\n isRightToLeft: false,\n })\n\n expect(delta).toBe(600)\n })\n\n it('should scale and negate deltaY for RTL', () => {\n const delta = getHorizontalScrollDelta({\n clientWidth: 300,\n deltaMode: 2,\n deltaY: 2,\n isRightToLeft: true,\n })\n\n expect(delta).toBe(-600)\n })\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ;AAErC,SAASC,wBAAwB,QAAQ;AAEzCH,QAAA,CAAS,4BAA4B;EACnCA,QAAA,CAAS,uBAAuB;IAC9BE,EAAA,CAAG,gDAAgD;MACjD,MAAME,KAAA,GAAQD,wBAAA,CAAyB;QACrCE,WAAA,EAAa;QACbC,SAAA,EAAW;QACXC,MAAA,EAAQ;QACRC,aAAA,EAAe;MACjB;MAEAP,MAAA,CAAOG,KAAA,EAAOK,IAAI,CAAC;IACrB;IAEAP,EAAA,CAAG,gCAAgC;MACjC,MAAME,KAAA,GAAQD,wBAAA,CAAyB;QACrCE,WAAA,EAAa;QACbC,S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