@payloadcms/richtext-lexical 3.0.0-beta.84 → 3.0.0-beta.86

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 (757) hide show
  1. package/dist/cell/index.js +117 -127
  2. package/dist/cell/index.js.map +1 -1
  3. package/dist/exports/client/Component-DOSSWC76.js +2 -0
  4. package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
  5. package/dist/exports/client/Component-MBLHTKDK.js +2 -0
  6. package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
  7. package/dist/exports/client/Field-KUSPHC7Q.js +2 -0
  8. package/dist/exports/client/Field-KUSPHC7Q.js.map +7 -0
  9. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js +2 -0
  10. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js.map +7 -0
  11. package/dist/exports/client/bundled.css +1 -1
  12. package/dist/exports/client/chunk-G5DTIOPI.js +2 -0
  13. package/dist/exports/client/chunk-G5DTIOPI.js.map +7 -0
  14. package/dist/exports/client/chunk-LGUXX2QH.js +2 -0
  15. package/dist/exports/client/chunk-LGUXX2QH.js.map +7 -0
  16. package/dist/exports/client/chunk-NI6Z4GBD.js +2 -0
  17. package/dist/exports/client/{chunk-SQHN3N6E.js.map → chunk-NI6Z4GBD.js.map} +2 -2
  18. package/dist/exports/client/chunk-OKMIHD2R.js +2 -0
  19. package/dist/exports/client/chunk-OKMIHD2R.js.map +7 -0
  20. package/dist/exports/client/chunk-TO2W7Q2G.js +2 -0
  21. package/dist/exports/client/chunk-TO2W7Q2G.js.map +7 -0
  22. package/dist/exports/client/chunk-V2LKLT2F.js +3 -0
  23. package/dist/exports/client/chunk-V2LKLT2F.js.map +7 -0
  24. package/dist/exports/client/component-3OFD6Q4Z.js +2 -0
  25. package/dist/exports/client/component-3OFD6Q4Z.js.map +7 -0
  26. package/dist/exports/client/component-LCAAX56T.js +2 -0
  27. package/dist/exports/client/component-LCAAX56T.js.map +7 -0
  28. package/dist/exports/client/component-LLWMZU6K.js +2 -0
  29. package/dist/exports/client/component-LLWMZU6K.js.map +7 -0
  30. package/dist/exports/client/componentInline-72VZAAHP.js +2 -0
  31. package/dist/exports/client/componentInline-72VZAAHP.js.map +7 -0
  32. package/dist/exports/client/index.js +9 -9
  33. package/dist/exports/client/index.js.map +3 -3
  34. package/dist/exports/server/migrate.js +0 -1
  35. package/dist/exports/server/migrate.js.map +1 -1
  36. package/dist/features/align/client/index.js +151 -134
  37. package/dist/features/align/client/index.js.map +1 -1
  38. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  39. package/dist/features/align/client/toolbarAlignGroup.js +10 -9
  40. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  41. package/dist/features/align/server/i18n.js +192 -193
  42. package/dist/features/align/server/i18n.js.map +1 -1
  43. package/dist/features/align/server/index.js +5 -6
  44. package/dist/features/align/server/index.js.map +1 -1
  45. package/dist/features/blockquote/client/index.js +60 -65
  46. package/dist/features/blockquote/client/index.js.map +1 -1
  47. package/dist/features/blockquote/markdownTransformer.js +28 -34
  48. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  49. package/dist/features/blockquote/server/i18n.js +96 -97
  50. package/dist/features/blockquote/server/i18n.js.map +1 -1
  51. package/dist/features/blockquote/server/index.js +38 -37
  52. package/dist/features/blockquote/server/index.js.map +1 -1
  53. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  54. package/dist/features/blocks/client/component/BlockContent.js +166 -172
  55. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  56. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -1
  57. package/dist/features/blocks/client/component/FormSavePlugin.js +46 -22
  58. package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -1
  59. package/dist/features/blocks/client/component/index.js +130 -142
  60. package/dist/features/blocks/client/component/index.js.map +1 -1
  61. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -1
  62. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +12 -8
  63. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
  64. package/dist/features/blocks/client/componentInline/index.js +106 -122
  65. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  66. package/dist/features/blocks/client/index.js +149 -142
  67. package/dist/features/blocks/client/index.js.map +1 -1
  68. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  69. package/dist/features/blocks/client/nodes/BlocksNode.js +41 -40
  70. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  71. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  72. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +31 -30
  73. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  74. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
  75. package/dist/features/blocks/client/plugin/commands.js +2 -1
  76. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  77. package/dist/features/blocks/client/plugin/index.js +179 -106
  78. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  79. package/dist/features/blocks/server/graphQLPopulationPromise.js +41 -28
  80. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  81. package/dist/features/blocks/server/i18n.js +288 -289
  82. package/dist/features/blocks/server/i18n.js.map +1 -1
  83. package/dist/features/blocks/server/index.js +149 -151
  84. package/dist/features/blocks/server/index.js.map +1 -1
  85. package/dist/features/blocks/server/nodes/BlocksNode.js +76 -73
  86. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  87. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +78 -76
  88. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  89. package/dist/features/blocks/server/validate.js +45 -34
  90. package/dist/features/blocks/server/validate.js.map +1 -1
  91. package/dist/features/converters/html/converter/converters/linebreak.js +4 -7
  92. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  93. package/dist/features/converters/html/converter/converters/paragraph.js +24 -19
  94. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  95. package/dist/features/converters/html/converter/converters/text.js +28 -29
  96. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  97. package/dist/features/converters/html/converter/defaultConverters.js +1 -6
  98. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  99. package/dist/features/converters/html/converter/index.js +66 -51
  100. package/dist/features/converters/html/converter/index.js.map +1 -1
  101. package/dist/features/converters/html/converter/types.js +1 -2
  102. package/dist/features/converters/html/converter/types.js.map +1 -1
  103. package/dist/features/converters/html/field/index.js +134 -139
  104. package/dist/features/converters/html/field/index.js.map +1 -1
  105. package/dist/features/converters/html/index.js +2 -3
  106. package/dist/features/converters/html/index.js.map +1 -1
  107. package/dist/features/createClientComponent.js +7 -6
  108. package/dist/features/createClientComponent.js.map +1 -1
  109. package/dist/features/createFeaturePropComponent.js +14 -13
  110. package/dist/features/createFeaturePropComponent.js.map +1 -1
  111. package/dist/features/debug/testRecorder/client/index.js +5 -7
  112. package/dist/features/debug/testRecorder/client/index.js.map +1 -1
  113. package/dist/features/debug/testRecorder/client/plugin/index.js +518 -402
  114. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  115. package/dist/features/debug/testRecorder/server/index.js +4 -5
  116. package/dist/features/debug/testRecorder/server/index.js.map +1 -1
  117. package/dist/features/debug/treeView/client/index.js +5 -7
  118. package/dist/features/debug/treeView/client/index.js.map +1 -1
  119. package/dist/features/debug/treeView/client/plugin/index.js +21 -11
  120. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  121. package/dist/features/debug/treeView/server/index.js +4 -5
  122. package/dist/features/debug/treeView/server/index.js.map +1 -1
  123. package/dist/features/experimental_table/client/index.js +41 -58
  124. package/dist/features/experimental_table/client/index.js.map +1 -1
  125. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +714 -560
  126. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  127. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +295 -301
  128. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  129. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -7
  130. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  131. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +228 -159
  132. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  133. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  134. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  135. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +129 -82
  136. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  137. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
  138. package/dist/features/experimental_table/client/utils/debounce.js +108 -89
  139. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  140. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -1
  141. package/dist/features/experimental_table/client/utils/useDebounce.js +11 -13
  142. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  143. package/dist/features/experimental_table/server/index.js +127 -114
  144. package/dist/features/experimental_table/server/index.js.map +1 -1
  145. package/dist/features/format/bold/feature.client.js +34 -35
  146. package/dist/features/format/bold/feature.client.js.map +1 -1
  147. package/dist/features/format/bold/feature.server.js +14 -18
  148. package/dist/features/format/bold/feature.server.js.map +1 -1
  149. package/dist/features/format/bold/markdownTransformers.js +14 -25
  150. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  151. package/dist/features/format/inlineCode/feature.client.js +26 -28
  152. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  153. package/dist/features/format/inlineCode/feature.server.js +5 -8
  154. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  155. package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
  156. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  157. package/dist/features/format/italic/feature.client.js +26 -29
  158. package/dist/features/format/italic/feature.client.js.map +1 -1
  159. package/dist/features/format/italic/feature.server.js +5 -9
  160. package/dist/features/format/italic/feature.server.js.map +1 -1
  161. package/dist/features/format/italic/markdownTransformers.js +7 -12
  162. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  163. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  164. package/dist/features/format/shared/toolbarFormatGroup.js +9 -8
  165. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  166. package/dist/features/format/strikethrough/feature.client.js +26 -28
  167. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  168. package/dist/features/format/strikethrough/feature.server.js +5 -8
  169. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  170. package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
  171. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  172. package/dist/features/format/subscript/feature.client.js +25 -25
  173. package/dist/features/format/subscript/feature.client.js.map +1 -1
  174. package/dist/features/format/subscript/feature.server.js +4 -5
  175. package/dist/features/format/subscript/feature.server.js.map +1 -1
  176. package/dist/features/format/superscript/feature.client.js +25 -25
  177. package/dist/features/format/superscript/feature.client.js.map +1 -1
  178. package/dist/features/format/superscript/feature.server.js +4 -5
  179. package/dist/features/format/superscript/feature.server.js.map +1 -1
  180. package/dist/features/format/underline/feature.client.js +25 -25
  181. package/dist/features/format/underline/feature.client.js.map +1 -1
  182. package/dist/features/format/underline/feature.server.js +4 -5
  183. package/dist/features/format/underline/feature.server.js.map +1 -1
  184. package/dist/features/heading/client/index.js +86 -90
  185. package/dist/features/heading/client/index.js.map +1 -1
  186. package/dist/features/heading/markdownTransformer.js +22 -25
  187. package/dist/features/heading/markdownTransformer.js.map +1 -1
  188. package/dist/features/heading/server/i18n.js +96 -97
  189. package/dist/features/heading/server/i18n.js.map +1 -1
  190. package/dist/features/heading/server/index.js +49 -51
  191. package/dist/features/heading/server/index.js.map +1 -1
  192. package/dist/features/horizontalRule/client/component/index.js +81 -51
  193. package/dist/features/horizontalRule/client/component/index.js.map +1 -1
  194. package/dist/features/horizontalRule/client/index.js +48 -57
  195. package/dist/features/horizontalRule/client/index.js.map +1 -1
  196. package/dist/features/horizontalRule/client/markdownTransformer.js +15 -18
  197. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  198. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  199. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +33 -30
  200. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  201. package/dist/features/horizontalRule/client/plugin/index.js +31 -20
  202. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  203. package/dist/features/horizontalRule/server/i18n.js +96 -97
  204. package/dist/features/horizontalRule/server/i18n.js.map +1 -1
  205. package/dist/features/horizontalRule/server/index.js +17 -24
  206. package/dist/features/horizontalRule/server/index.js.map +1 -1
  207. package/dist/features/horizontalRule/server/markdownTransformer.js +15 -18
  208. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  209. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +71 -66
  210. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  211. package/dist/features/indent/client/index.js +52 -47
  212. package/dist/features/indent/client/index.js.map +1 -1
  213. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  214. package/dist/features/indent/client/toolbarIndentGroup.js +9 -8
  215. package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
  216. package/dist/features/indent/server/i18n.js +128 -129
  217. package/dist/features/indent/server/i18n.js.map +1 -1
  218. package/dist/features/indent/server/index.js +5 -6
  219. package/dist/features/indent/server/index.js.map +1 -1
  220. package/dist/features/link/client/index.js +78 -83
  221. package/dist/features/link/client/index.js.map +1 -1
  222. package/dist/features/link/client/plugins/autoLink/index.js +267 -271
  223. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  224. package/dist/features/link/client/plugins/clickableLink/index.js +3 -3
  225. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  226. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  227. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +2 -1
  228. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  229. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +254 -276
  230. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  231. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +8 -6
  232. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  233. package/dist/features/link/client/plugins/floatingLinkEditor/types.js +1 -2
  234. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  235. package/dist/features/link/client/plugins/link/index.js +50 -41
  236. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  237. package/dist/features/link/markdownTransformer.js +38 -39
  238. package/dist/features/link/markdownTransformer.js.map +1 -1
  239. package/dist/features/link/nodes/AutoLinkNode.js +57 -56
  240. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  241. package/dist/features/link/nodes/LinkNode.js +277 -276
  242. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  243. package/dist/features/link/nodes/types.js +1 -2
  244. package/dist/features/link/nodes/types.js.map +1 -1
  245. package/dist/features/link/server/baseFields.js +118 -88
  246. package/dist/features/link/server/baseFields.js.map +1 -1
  247. package/dist/features/link/server/graphQLPopulationPromise.js +42 -28
  248. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  249. package/dist/features/link/server/i18n.js +96 -97
  250. package/dist/features/link/server/i18n.js.map +1 -1
  251. package/dist/features/link/server/index.js +120 -114
  252. package/dist/features/link/server/index.js.map +1 -1
  253. package/dist/features/link/server/transformExtraFields.js +15 -15
  254. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  255. package/dist/features/link/server/validate.js +37 -26
  256. package/dist/features/link/server/validate.js.map +1 -1
  257. package/dist/features/lists/checklist/client/index.js +77 -85
  258. package/dist/features/lists/checklist/client/index.js.map +1 -1
  259. package/dist/features/lists/checklist/client/plugin/index.js +3 -3
  260. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  261. package/dist/features/lists/checklist/markdownTransformers.js +7 -11
  262. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  263. package/dist/features/lists/checklist/server/i18n.js +96 -97
  264. package/dist/features/lists/checklist/server/i18n.js.map +1 -1
  265. package/dist/features/lists/checklist/server/index.js +21 -25
  266. package/dist/features/lists/checklist/server/index.js.map +1 -1
  267. package/dist/features/lists/htmlConverter.js +54 -43
  268. package/dist/features/lists/htmlConverter.js.map +1 -1
  269. package/dist/features/lists/orderedList/client/index.js +71 -77
  270. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  271. package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
  272. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  273. package/dist/features/lists/orderedList/server/i18n.js +96 -97
  274. package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
  275. package/dist/features/lists/orderedList/server/index.js +21 -25
  276. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  277. package/dist/features/lists/plugin/index.js +3 -3
  278. package/dist/features/lists/plugin/index.js.map +1 -1
  279. package/dist/features/lists/shared/markdown.js +48 -49
  280. package/dist/features/lists/shared/markdown.js.map +1 -1
  281. package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
  282. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  283. package/dist/features/lists/unorderedList/client/index.js +68 -76
  284. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  285. package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
  286. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  287. package/dist/features/lists/unorderedList/server/i18n.js +96 -97
  288. package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
  289. package/dist/features/lists/unorderedList/server/index.js +17 -23
  290. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  291. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +18 -17
  292. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  293. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +30 -29
  294. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  295. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +21 -20
  296. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  297. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +21 -19
  298. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  299. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +18 -17
  300. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  301. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +24 -23
  302. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +1 -10
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +69 -61
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -7
  312. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +42 -43
  314. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  317. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +64 -59
  319. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  320. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
  321. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  322. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +20 -25
  323. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  324. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +28 -30
  325. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  326. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +26 -26
  327. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  328. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +22 -21
  329. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  330. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
  331. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  332. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +12 -13
  333. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  334. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
  335. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  336. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
  337. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  338. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +15 -16
  339. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +1 -13
  341. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/index.js +105 -98
  343. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
  345. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  346. package/dist/features/migrations/slateToLexical/feature.client.js +7 -7
  347. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/feature.server.js +43 -44
  349. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  351. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  352. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +64 -59
  354. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  355. package/dist/features/paragraph/client/index.js +58 -61
  356. package/dist/features/paragraph/client/index.js.map +1 -1
  357. package/dist/features/paragraph/server/i18n.js +128 -129
  358. package/dist/features/paragraph/server/i18n.js.map +1 -1
  359. package/dist/features/paragraph/server/index.js +6 -7
  360. package/dist/features/paragraph/server/index.js.map +1 -1
  361. package/dist/features/relationship/client/components/RelationshipComponent.js +141 -149
  362. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  363. package/dist/features/relationship/client/drawer/commands.js +0 -1
  364. package/dist/features/relationship/client/drawer/commands.js.map +1 -1
  365. package/dist/features/relationship/client/drawer/index.js +138 -67
  366. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  367. package/dist/features/relationship/client/index.js +53 -59
  368. package/dist/features/relationship/client/index.js.map +1 -1
  369. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  370. package/dist/features/relationship/client/nodes/RelationshipNode.js +60 -59
  371. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  372. package/dist/features/relationship/client/plugins/index.js +90 -35
  373. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  374. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  375. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +97 -26
  376. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
  377. package/dist/features/relationship/server/graphQLPopulationPromise.js +34 -26
  378. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  379. package/dist/features/relationship/server/i18n.js +96 -97
  380. package/dist/features/relationship/server/i18n.js.map +1 -1
  381. package/dist/features/relationship/server/index.js +48 -44
  382. package/dist/features/relationship/server/index.js.map +1 -1
  383. package/dist/features/relationship/server/nodes/RelationshipNode.js +90 -87
  384. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  385. package/dist/features/shared/slashMenu/basicGroup.js +9 -8
  386. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  387. package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
  388. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  389. package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
  390. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  391. package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
  392. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  393. package/dist/features/toolbars/fixed/client/Toolbar/index.js +264 -187
  394. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  395. package/dist/features/toolbars/fixed/client/index.js +5 -7
  396. package/dist/features/toolbars/fixed/client/index.js.map +1 -1
  397. package/dist/features/toolbars/fixed/server/index.js +14 -13
  398. package/dist/features/toolbars/fixed/server/index.js.map +1 -1
  399. package/dist/features/toolbars/inline/client/Toolbar/index.js +374 -286
  400. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  401. package/dist/features/toolbars/inline/client/index.js +5 -7
  402. package/dist/features/toolbars/inline/client/index.js.map +1 -1
  403. package/dist/features/toolbars/inline/server/index.js +4 -5
  404. package/dist/features/toolbars/inline/server/index.js.map +1 -1
  405. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  406. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  407. package/dist/features/toolbars/shared/ToolbarButton/index.js +75 -97
  408. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  409. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +190 -211
  410. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  411. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  412. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  413. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +289 -124
  414. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  415. package/dist/features/toolbars/types.js +1 -2
  416. package/dist/features/toolbars/types.js.map +1 -1
  417. package/dist/features/typeUtilities.js +2 -3
  418. package/dist/features/typeUtilities.js.map +1 -1
  419. package/dist/features/typesClient.js +1 -2
  420. package/dist/features/typesClient.js.map +1 -1
  421. package/dist/features/typesServer.js +1 -2
  422. package/dist/features/typesServer.js.map +1 -1
  423. package/dist/features/upload/client/component/index.js +208 -224
  424. package/dist/features/upload/client/component/index.js.map +1 -1
  425. package/dist/features/upload/client/drawer/commands.js +1 -1
  426. package/dist/features/upload/client/drawer/commands.js.map +1 -1
  427. package/dist/features/upload/client/drawer/index.js +107 -58
  428. package/dist/features/upload/client/drawer/index.js.map +1 -1
  429. package/dist/features/upload/client/feature.client.js +51 -61
  430. package/dist/features/upload/client/feature.client.js.map +1 -1
  431. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  432. package/dist/features/upload/client/nodes/UploadNode.js +76 -73
  433. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  434. package/dist/features/upload/client/plugin/index.js +67 -39
  435. package/dist/features/upload/client/plugin/index.js.map +1 -1
  436. package/dist/features/upload/server/feature.server.js +190 -171
  437. package/dist/features/upload/server/feature.server.js.map +1 -1
  438. package/dist/features/upload/server/graphQLPopulationPromise.js +60 -47
  439. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  440. package/dist/features/upload/server/i18n.js +96 -97
  441. package/dist/features/upload/server/i18n.js.map +1 -1
  442. package/dist/features/upload/server/nodes/UploadNode.js +113 -108
  443. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  444. package/dist/features/upload/server/validate.js +53 -40
  445. package/dist/features/upload/server/validate.js.map +1 -1
  446. package/dist/field/Field.js +124 -105
  447. package/dist/field/Field.js.map +1 -1
  448. package/dist/field/bundled.css +1 -0
  449. package/dist/field/index.js +92 -36
  450. package/dist/field/index.js.map +1 -1
  451. package/dist/i18n.js +160 -161
  452. package/dist/i18n.js.map +1 -1
  453. package/dist/index.d.ts.map +1 -1
  454. package/dist/index.js +670 -623
  455. package/dist/index.js.map +1 -1
  456. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  457. package/dist/lexical/EditorPlugin.js +15 -10
  458. package/dist/lexical/EditorPlugin.js.map +1 -1
  459. package/dist/lexical/LexicalEditor.js +206 -161
  460. package/dist/lexical/LexicalEditor.js.map +1 -1
  461. package/dist/lexical/LexicalProvider.js +83 -82
  462. package/dist/lexical/LexicalProvider.js.map +1 -1
  463. package/dist/lexical/config/client/EditorConfigProvider.js +76 -79
  464. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  465. package/dist/lexical/config/client/default.js +3 -3
  466. package/dist/lexical/config/client/default.js.map +1 -1
  467. package/dist/lexical/config/client/loader.js +42 -39
  468. package/dist/lexical/config/client/loader.js.map +1 -1
  469. package/dist/lexical/config/client/sanitize.js +165 -165
  470. package/dist/lexical/config/client/sanitize.js.map +1 -1
  471. package/dist/lexical/config/server/default.js +5 -27
  472. package/dist/lexical/config/server/default.js.map +1 -1
  473. package/dist/lexical/config/server/loader.js +103 -103
  474. package/dist/lexical/config/server/loader.js.map +1 -1
  475. package/dist/lexical/config/server/sanitize.js +98 -99
  476. package/dist/lexical/config/server/sanitize.js.map +1 -1
  477. package/dist/lexical/config/types.js +1 -2
  478. package/dist/lexical/config/types.js.map +1 -1
  479. package/dist/lexical/nodes/index.js +9 -8
  480. package/dist/lexical/nodes/index.js.map +1 -1
  481. package/dist/lexical/plugins/MarkdownShortcut/index.js +17 -5
  482. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  483. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +384 -361
  484. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  485. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +223 -160
  486. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  487. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -2
  488. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  489. package/dist/lexical/plugins/SlashMenu/index.js +191 -179
  490. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  491. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -1
  492. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -26
  493. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  494. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +164 -129
  495. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  496. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  497. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +11 -10
  498. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  499. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -1
  500. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +11 -10
  501. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  502. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  503. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +27 -23
  504. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  505. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +331 -300
  506. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  507. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +110 -97
  508. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  509. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  510. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +23 -16
  511. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  512. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
  513. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +18 -27
  514. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  515. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -1
  516. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +15 -11
  517. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  518. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
  519. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +133 -118
  520. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  521. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  522. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +3 -2
  523. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  524. package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -1
  525. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +3 -2
  526. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  527. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  528. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +26 -25
  529. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  530. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  531. package/dist/lexical/theme/EditorTheme.js +97 -102
  532. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  533. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  534. package/dist/lexical/ui/ContentEditable.js +27 -10
  535. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  536. package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -1
  537. package/dist/lexical/ui/icons/AI/index.js +31 -33
  538. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  539. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  540. package/dist/lexical/ui/icons/Add/index.js +16 -18
  541. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  542. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  543. package/dist/lexical/ui/icons/AlignCenter/index.js +25 -28
  544. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  545. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  546. package/dist/lexical/ui/icons/AlignJustify/index.js +25 -28
  547. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  548. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  549. package/dist/lexical/ui/icons/AlignLeft/index.js +25 -28
  550. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  551. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  552. package/dist/lexical/ui/icons/AlignRight/index.js +25 -28
  553. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  554. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  555. package/dist/lexical/ui/icons/Block/index.js +34 -37
  556. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  557. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  558. package/dist/lexical/ui/icons/Blockquote/index.js +16 -15
  559. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  560. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  561. package/dist/lexical/ui/icons/Bold/index.js +16 -15
  562. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  563. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  564. package/dist/lexical/ui/icons/Checklist/index.js +24 -26
  565. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  566. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  567. package/dist/lexical/ui/icons/Code/index.js +19 -21
  568. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  569. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  570. package/dist/lexical/ui/icons/CodeBlock/index.js +19 -21
  571. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  572. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  573. package/dist/lexical/ui/icons/H1/index.js +16 -15
  574. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  575. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  576. package/dist/lexical/ui/icons/H2/index.js +16 -15
  577. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  579. package/dist/lexical/ui/icons/H3/index.js +16 -15
  580. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  582. package/dist/lexical/ui/icons/H4/index.js +16 -15
  583. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  585. package/dist/lexical/ui/icons/H5/index.js +16 -15
  586. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  588. package/dist/lexical/ui/icons/H6/index.js +16 -15
  589. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  591. package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -18
  592. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  593. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  594. package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -32
  595. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  597. package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -32
  598. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  599. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  600. package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -17
  601. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  603. package/dist/lexical/ui/icons/Italic/index.js +16 -15
  604. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  606. package/dist/lexical/ui/icons/Link/index.js +17 -16
  607. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  608. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  609. package/dist/lexical/ui/icons/Meatballs/index.js +19 -22
  610. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  611. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  612. package/dist/lexical/ui/icons/OrderedList/index.js +31 -36
  613. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  615. package/dist/lexical/ui/icons/Relationship/index.js +31 -33
  616. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  617. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  618. package/dist/lexical/ui/icons/Strikethrough/index.js +19 -21
  619. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  620. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  621. package/dist/lexical/ui/icons/Subscript/index.js +16 -15
  622. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  623. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  624. package/dist/lexical/ui/icons/Superscript/index.js +16 -15
  625. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  627. package/dist/lexical/ui/icons/Table/index.js +17 -16
  628. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  629. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  630. package/dist/lexical/ui/icons/Text/index.js +16 -15
  631. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  632. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  633. package/dist/lexical/ui/icons/Underline/index.js +19 -21
  634. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  636. package/dist/lexical/ui/icons/UnorderedList/index.js +46 -52
  637. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  639. package/dist/lexical/ui/icons/Upload/index.js +28 -31
  640. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  641. package/dist/lexical/utils/canUseDOM.d.ts.map +1 -1
  642. package/dist/lexical/utils/canUseDOM.js +2 -1
  643. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  644. package/dist/lexical/utils/environment.d.ts.map +1 -1
  645. package/dist/lexical/utils/environment.js +2 -1
  646. package/dist/lexical/utils/environment.js.map +1 -1
  647. package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -1
  648. package/dist/lexical/utils/getDOMRangeRect.js +13 -12
  649. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  650. package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -1
  651. package/dist/lexical/utils/getSelectedNode.js +18 -13
  652. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  653. package/dist/lexical/utils/guard.d.ts.map +1 -1
  654. package/dist/lexical/utils/guard.js +3 -2
  655. package/dist/lexical/utils/guard.js.map +1 -1
  656. package/dist/lexical/utils/joinClasses.d.ts.map +1 -1
  657. package/dist/lexical/utils/joinClasses.js +3 -2
  658. package/dist/lexical/utils/joinClasses.js.map +1 -1
  659. package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
  660. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  661. package/dist/lexical/utils/nodeFormat.js +58 -59
  662. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  663. package/dist/lexical/utils/point.d.ts.map +1 -1
  664. package/dist/lexical/utils/point.js +40 -32
  665. package/dist/lexical/utils/point.js.map +1 -1
  666. package/dist/lexical/utils/rect.d.ts.map +1 -1
  667. package/dist/lexical/utils/rect.js +167 -134
  668. package/dist/lexical/utils/rect.js.map +1 -1
  669. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  670. package/dist/lexical/utils/setFloatingElemPosition.js +56 -45
  671. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  672. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -1
  673. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +23 -22
  674. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  675. package/dist/lexical/utils/swipe.d.ts.map +1 -1
  676. package/dist/lexical/utils/swipe.js +82 -83
  677. package/dist/lexical/utils/swipe.js.map +1 -1
  678. package/dist/lexical/utils/url.js +23 -22
  679. package/dist/lexical/utils/url.js.map +1 -1
  680. package/dist/nodeTypes.js +1 -2
  681. package/dist/nodeTypes.js.map +1 -1
  682. package/dist/populateGraphQL/defaultValue.js +24 -29
  683. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  684. package/dist/populateGraphQL/populate.js +35 -25
  685. package/dist/populateGraphQL/populate.js.map +1 -1
  686. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +47 -32
  687. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  688. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +39 -25
  689. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  690. package/dist/types.js +1 -2
  691. package/dist/types.js.map +1 -1
  692. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  693. package/dist/utilities/createClientFeature.js +40 -26
  694. package/dist/utilities/createClientFeature.js.map +1 -1
  695. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  696. package/dist/utilities/createServerFeature.js +46 -31
  697. package/dist/utilities/createServerFeature.js.map +1 -1
  698. package/dist/utilities/fieldsDrawer/Drawer.js +28 -17
  699. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  700. package/dist/utilities/fieldsDrawer/DrawerContent.js +149 -78
  701. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  702. package/dist/utilities/forEachNodeRecursively.js +24 -19
  703. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  704. package/dist/utilities/generateComponentMap.js +90 -82
  705. package/dist/utilities/generateComponentMap.js.map +1 -1
  706. package/dist/utilities/generateImportMap.js +53 -47
  707. package/dist/utilities/generateImportMap.js.map +1 -1
  708. package/dist/utilities/generateSchemaMap.js +35 -30
  709. package/dist/utilities/generateSchemaMap.js.map +1 -1
  710. package/dist/utilities/migrateSlateToLexical/index.js +99 -86
  711. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
  712. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +73 -66
  713. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  714. package/dist/utilities/recurseNodeTree.js +25 -22
  715. package/dist/utilities/recurseNodeTree.js.map +1 -1
  716. package/dist/utilities/upgradeLexicalData/index.js +99 -86
  717. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  718. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +71 -66
  719. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  720. package/dist/utilities/useLexicalFeature.js +9 -8
  721. package/dist/utilities/useLexicalFeature.js.map +1 -1
  722. package/dist/validate/index.js +32 -26
  723. package/dist/validate/index.js.map +1 -1
  724. package/dist/validate/validateNodes.js +31 -28
  725. package/dist/validate/validateNodes.js.map +1 -1
  726. package/package.json +22 -11
  727. package/dist/exports/client/Component-7HS6FEJS.js +0 -2
  728. package/dist/exports/client/Component-7HS6FEJS.js.map +0 -7
  729. package/dist/exports/client/Component-LAKSCIDX.js +0 -2
  730. package/dist/exports/client/Component-LAKSCIDX.js.map +0 -7
  731. package/dist/exports/client/Field-BYB3WX7J.js +0 -2
  732. package/dist/exports/client/Field-BYB3WX7J.js.map +0 -7
  733. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +0 -2
  734. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +0 -7
  735. package/dist/exports/client/chunk-4EX7W4UX.js +0 -2
  736. package/dist/exports/client/chunk-4EX7W4UX.js.map +0 -7
  737. package/dist/exports/client/chunk-E4HH5PS6.js +0 -2
  738. package/dist/exports/client/chunk-E4HH5PS6.js.map +0 -7
  739. package/dist/exports/client/chunk-EBB2CEB6.js +0 -2
  740. package/dist/exports/client/chunk-EBB2CEB6.js.map +0 -7
  741. package/dist/exports/client/chunk-LTR7V74A.js +0 -2
  742. package/dist/exports/client/chunk-LTR7V74A.js.map +0 -7
  743. package/dist/exports/client/chunk-SQHN3N6E.js +0 -2
  744. package/dist/exports/client/chunk-VMCQSR3T.js +0 -3
  745. package/dist/exports/client/chunk-VMCQSR3T.js.map +0 -7
  746. package/dist/exports/client/component-6C5JERGA.js +0 -2
  747. package/dist/exports/client/component-6C5JERGA.js.map +0 -7
  748. package/dist/exports/client/component-GUWIGB77.js +0 -2
  749. package/dist/exports/client/component-GUWIGB77.js.map +0 -7
  750. package/dist/exports/client/component-UQ2BKD5X.js +0 -2
  751. package/dist/exports/client/component-UQ2BKD5X.js.map +0 -7
  752. package/dist/exports/client/componentInline-C2XIK5VZ.js +0 -2
  753. package/dist/exports/client/componentInline-C2XIK5VZ.js.map +0 -7
  754. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +0 -12
  755. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  756. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +0 -181
  757. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/debug/testRecorder/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport { IS_APPLE } from '../../../../../lexical/utils/environment.js'\nimport './index.scss'\n\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'Enter',\n 'Backspace',\n 'Delete',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = window.getSelection()\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = window.getSelection()\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = window.getSelection()\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","$createParagraphNode","$createTextNode","$getRoot","React","useCallback","useEffect","useLayoutEffect","useRef","useState","IS_APPLE","copy","text","textArea","document","createElement","value","style","position","opacity","body","appendChild","focus","select","result","execCommand","console","log","error","removeChild","download","filename","a","setAttribute","encodeURIComponent","display","click","formatStep","step","formatOneStep","name","x","y","anchorPath","toString","anchorOffset","focusPath","focusOffset","formattedStep","count","join","isSelectAll","event","key","toLowerCase","metaKey","ctrlKey","sanitizeSelection","selection","anchorNode","focusNode","getPathFromNodeToEditor","node","rootElement","currentNode","path","undefined","unshift","Array","from","parentNode","childNodes","indexOf","keyPresses","Set","useTestRecorder","editor","steps","setSteps","isRecording","setIsRecording","setCurrentInnerHTML","templatedTest","setTemplatedTest","previousSelectionRef","skipNextSelectionChangeRef","preRef","getCurrentEditor","generateTestContent","getRootElement","browserSelection","window","getSelection","contains","map","pushStep","currentSteps","currentIndex","length","lastStep","slice","onKeyDown","has","onKeyUp","registerRootListener","prevRootElement","removeEventListener","addEventListener","current","scrollTo","scrollHeight","testContent","removeUpdateListener","registerUpdateListener","dirtyElements","dirtyLeaves","editorState","currentSelection","_selection","previousSelection","skipNextSelectionChange","size","innerHTML","toggleEditorSelection","currentEditor","update","root","clear","append","currentIsRecording","onSnapshotClick","onCopyClick","onDownloadClick","button","className","id","onClick","e","preventDefault","title","type","output","div","pre","ref","TestRecorderPlugin","testRecorderButton","testRecorderOutput","Fragment","p"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,oBAAoB,EAAEC,eAAe,EAAEC,QAAQ,QAAQ,UAAS;AACzE,YAAYC,WAAW,QAAO;AAC9B,SAAmBC,WAAW,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAI3F,SAASC,QAAQ,QAAQ,8CAA6C;AAGtE,MAAMC,OAAO,CAACC;IACZ,MAAMC,WAAWC,SAASC,aAAa,CAAC;IACxCF,SAASG,KAAK,GAAGJ,QAAQ;IACzBC,SAASI,KAAK,CAACC,QAAQ,GAAG;IAC1BL,SAASI,KAAK,CAACE,OAAO,GAAG;IACzBL,SAASM,IAAI,EAAEC,YAAYR;IAC3BA,SAASS,KAAK;IACdT,SAASU,MAAM;IACf,IAAI;QACF,MAAMC,SAASV,SAASW,WAAW,CAAC;QACpC,sCAAsC;QACtCC,QAAQC,GAAG,CAACH;IACd,EAAE,OAAOI,OAAO;QACdF,QAAQE,KAAK,CAACA;IAChB;IACAd,SAASM,IAAI,EAAES,YAAYhB;AAC7B;AAEA,MAAMiB,WAAW,CAACC,UAAkBnB;IAClC,MAAMoB,IAAIlB,SAASC,aAAa,CAAC;IACjCiB,EAAEC,YAAY,CAAC,QAAQ,mCAAmCC,mBAAmBtB,QAAQ;IACrFoB,EAAEC,YAAY,CAAC,YAAYF;IAC3BC,EAAEf,KAAK,CAACkB,OAAO,GAAG;IAClBrB,SAASM,IAAI,EAAEC,YAAYW;IAC3BA,EAAEI,KAAK;IACPtB,SAASM,IAAI,EAAES,YAAYG;AAC7B;AAEA,MAAMK,aAAa,CAACC;IAClB,MAAMC,gBAAgB,CAACC,MAAcxB;QACnC,OAAQwB;YACN,KAAK;gBAAS;oBACZ,OAAO,CAAC,6BAA6B,EAAExB,MAAMyB,CAA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ACN;;kCAGD,KAACP;wBACCC,WAAU;wBACVC,IAAG;wBACHC,SAAS,CAACC;4BACRN;4BACAM,EAAEC,cAAc;wBAClB;wBACAC,OAAM;wBACNC,MAAK;kCACN;;kCAGD,KAACP;wBACCC,WAAU;wBACVC,IAAG;wBACHC,SAAS,CAACC;4BACRL;4BACAK,EAAEC,cAAc;wBAClB;wBACAC,OAAM;wBACNC,MAAK;kCACN;;;;0BAIH,KAACG;gBAAIR,IAAG;gBAAgBS,KAAK1D;0BAC1BJ;;;SAGH;IAEJ,OAAO;QAACmD;QAAQQ;KAAO;AACzB;AACA,OAAO,MAAMI,qBAAiD;IAC5D,MAAM,CAACrE,OAAO,GAAG5E;IACjB,MAAM,CAACkJ,oBAAoBC,mBAAmB,GAAGxE,gBAAgBC;IAEjE,qBACE,MAACxE,MAAMgJ,QAAQ;;0BACb,KAACC;0BAAE;;YACFH;YACAC;0BACD,KAACE;0BAAE;;;;AAGT,EAAC"}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createParagraphNode","$createTextNode","$getRoot","React","useCallback","useEffect","useLayoutEffect","useRef","useState","IS_APPLE","copy","text","textArea","document","createElement","value","style","position","opacity","body","appendChild","focus","select","result","execCommand","console","log","error","removeChild","download","filename","a","setAttribute","encodeURIComponent","display","click","formatStep","step","formatOneStep","name","x","y","anchorPath","toString","anchorOffset","focusPath","focusOffset","formattedStep","count","join","isSelectAll","event","key","toLowerCase","metaKey","ctrlKey","sanitizeSelection","selection","anchorNode","focusNode","getPathFromNodeToEditor","node","rootElement","currentNode","path","undefined","unshift","Array","from","parentNode","childNodes","indexOf","keyPresses","Set","useTestRecorder","editor","$","t0","Symbol","for","steps","setSteps","isRecording","setIsRecording","setCurrentInnerHTML","templatedTest","setTemplatedTest","previousSelectionRef","skipNextSelectionChangeRef","preRef","t1","getCurrentEditor","t2","getRootElement","browserSelection","window","getSelection","contains","map","generateTestContent","t3","currentSteps","currentIndex","length","lastStep","slice","pushStep","t4","t5","onKeyDown","has","onKeyUp","event_0","key_0","registerRootListener","rootElement_0","prevRootElement","removeEventListener","addEventListener","t6","current","scrollTo","scrollHeight","t7","testContent","t8","removeUpdateListener","registerUpdateListener","t9","dirtyElements","dirtyLeaves","editorState","currentSelection","_selection","previousSelection","skipNextSelectionChange","size","browserSelection_0","testContent_0","t10","removeUpdateListener_0","rootElement_1","innerHTML","t11","t12","currentEditor","update","root","clear","append","currentIsRecording","toggleEditorSelection","t13","browserSelection_1","rootElement_2","onSnapshotClick","t14","onCopyClick","t15","onDownloadClick","t16","t17","e","preventDefault","t18","t19","t20","_jsx","className","id","onClick","title","type","children","button","output","_jsxs","e_0","e_1","e_2","ref","t21","TestRecorderPlugin","testRecorderButton","testRecorderOutput","Fragment"],"sources":["../../../../../../src/features/debug/testRecorder/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport { IS_APPLE } from '../../../../../lexical/utils/environment.js'\nimport './index.scss'\n\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'Enter',\n 'Backspace',\n 'Delete',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = window.getSelection()\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = window.getSelection()\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = window.getSelection()\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,EAAEC,eAAe,EAAEC,QAAQ,QAAQ;AAChE,YAAYC,KAAA,MAAW;AACvB,SAAmBC,WAAW,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAIpF,SAASC,QAAQ,QAAQ;AAGzB,MAAMC,IAAA,GAAQC,IAAA;EACZ,MAAMC,QAAA,GAAWC,QAAA,CAASC,aAAa,CAAC;EACxCF,QAAA,CAASG,KA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AAAC,SAAA,EACW;QAAAC,EAAA,EACP;QAAAC,OAAA,EAAAS,GAAA;UAEDpB,eAAA;UACAG,GAAA,CAAAC,cAAA,CAAgB;QAAA;QAAAQ,KAAA,EAEZ;QAAAC,IAAA,EACD;QAAAC,QAAA,EACN;MAAA,C;QAIHN,IAAA,CAAC;MAAAE,EAAA,EAAO;MAAAW,GAAA,EAAqB3F,MAAA;MAAAoF,QAAA,EAC1BxF;IAAA,C;WAGH;EAAA,IAAAgG,GAAA;EAAA,IAAAzG,CAAA,SAAAkG,MAAA,IAAAlG,CAAA,SAAAmG,MAAA;IAEGM,GAAA,IAACP,MAAA,EAAQC,MAAA;IAAOnG,CAAA,OAAAkG,MAAA;IAAAlG,CAAA,OAAAmG,MAAA;IAAAnG,CAAA,OAAAyG,GAAA;EAAA;IAAAA,GAAA,GAAAzG,CAAA;EAAA;EAAA,OAAhByG,GAAgB;AAAA;AAEzB,OAAO,MAAMC,kBAAA,GAAiDA,CAAA;EAAA,MAAA1G,CAAA,GAAA9E,EAAA;EAC5D,OAAA6E,MAAA,IAAiB5E,yBAAA;EACjB,OAAAwL,kBAAA,EAAAC,kBAAA,IAAiD9G,eAAA,CAAgBC,MAAA;EAAA,IAAAE,EAAA;EAAA,IAAAD,CAAA,QAAA2G,kBAAA,IAAA3G,CAAA,QAAA4G,kBAAA;IAG/D3G,EAAA,GAAAmG,KAAA,CAAA7K,KAAA,CAAAsL,QAAA;MAAAZ,QAAA,GACEN,IAAA,CAAC;QAAAM,QAAA,EAAE;MAAA,C,GACFU,kBAAA,EACAC,kBAAA,EACDjB,IAAA,CAAC;QAAAM,QAAA,EAAE;MAAA,C;;;;;;;;SAJLhG,E;CAOJ","ignoreList":[]}
@@ -1,9 +1,8 @@
1
1
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
2
2
  export const TestRecorderFeature = createServerFeature({
3
- feature: {
4
- ClientFeature: '@payloadcms/richtext-lexical/client#TestRecorderFeatureClient'
5
- },
6
- key: 'testRecorder'
3
+ feature: {
4
+ ClientFeature: '@payloadcms/richtext-lexical/client#TestRecorderFeatureClient'
5
+ },
6
+ key: 'testRecorder'
7
7
  });
8
-
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/debug/testRecorder/server/index.ts"],"sourcesContent":["import { createServerFeature } from '../../../../utilities/createServerFeature.js'\n\nexport const TestRecorderFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#TestRecorderFeatureClient',\n },\n key: 'testRecorder',\n})\n"],"names":["createServerFeature","TestRecorderFeature","feature","ClientFeature","key"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,+CAA8C;AAElF,OAAO,MAAMC,sBAAsBD,oBAAoB;IACrDE,SAAS;QACPC,eAAe;IACjB;IACAC,KAAK;AACP,GAAE"}
1
+ {"version":3,"file":"index.js","names":["createServerFeature","TestRecorderFeature","feature","ClientFeature","key"],"sources":["../../../../../src/features/debug/testRecorder/server/index.ts"],"sourcesContent":["import { createServerFeature } from '../../../../utilities/createServerFeature.js'\n\nexport const TestRecorderFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#TestRecorderFeatureClient',\n },\n key: 'testRecorder',\n})\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,mBAAA,GAAsBD,mBAAA,CAAoB;EACrDE,OAAA,EAAS;IACPC,aAAA,EAAe;EACjB;EACAC,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,13 +1,11 @@
1
1
  'use client';
2
+
2
3
  import { createClientFeature } from '../../../../utilities/createClientFeature.js';
3
4
  import { TreeViewPlugin } from './plugin/index.js';
4
5
  export const TreeViewFeatureClient = createClientFeature({
5
- plugins: [
6
- {
7
- Component: TreeViewPlugin,
8
- position: 'bottom'
9
- }
10
- ]
6
+ plugins: [{
7
+ Component: TreeViewPlugin,
8
+ position: 'bottom'
9
+ }]
11
10
  });
12
-
13
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/debug/treeView/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { TreeViewPlugin } from './plugin/index.js'\n\nexport const TreeViewFeatureClient = createClientFeature({\n plugins: [\n {\n Component: TreeViewPlugin,\n position: 'bottom',\n },\n ],\n})\n"],"names":["createClientFeature","TreeViewPlugin","TreeViewFeatureClient","plugins","Component","position"],"mappings":"AAAA;AAEA,SAASA,mBAAmB,QAAQ,+CAA8C;AAClF,SAASC,cAAc,QAAQ,oBAAmB;AAElD,OAAO,MAAMC,wBAAwBF,oBAAoB;IACvDG,SAAS;QACP;YACEC,WAAWH;YACXI,UAAU;QACZ;KACD;AACH,GAAE"}
1
+ {"version":3,"file":"index.js","names":["createClientFeature","TreeViewPlugin","TreeViewFeatureClient","plugins","Component","position"],"sources":["../../../../../src/features/debug/treeView/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { TreeViewPlugin } from './plugin/index.js'\n\nexport const TreeViewFeatureClient = createClientFeature({\n plugins: [\n {\n Component: TreeViewPlugin,\n position: 'bottom',\n },\n ],\n})\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,cAAc,QAAQ;AAE/B,OAAO,MAAMC,qBAAA,GAAwBF,mBAAA,CAAoB;EACvDG,OAAA,EAAS,CACP;IACEC,SAAA,EAAWH,cAAA;IACXI,QAAA,EAAU;EACZ;AAEJ","ignoreList":[]}
@@ -1,19 +1,29 @@
1
1
  'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
2
4
  import { jsx as _jsx } from "react/jsx-runtime";
3
5
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
4
6
  import { TreeView } from '@lexical/react/LexicalTreeView.js';
5
7
  import * as React from 'react';
6
- export const TreeViewPlugin = ()=>{
7
- const [editor] = useLexicalComposerContext();
8
- return /*#__PURE__*/ _jsx(TreeView, {
9
- editor: editor,
10
- timeTravelButtonClassName: "debug-timetravel-button",
11
- timeTravelPanelButtonClassName: "debug-timetravel-panel-button",
12
- timeTravelPanelClassName: "debug-timetravel-panel",
13
- timeTravelPanelSliderClassName: "debug-timetravel-panel-slider",
14
- treeTypeButtonClassName: "debug-treetype-button",
15
- viewClassName: "tree-view-output"
8
+ export const TreeViewPlugin = () => {
9
+ const $ = _c(2);
10
+ const [editor] = useLexicalComposerContext();
11
+ let t0;
12
+ if ($[0] !== editor) {
13
+ t0 = _jsx(TreeView, {
14
+ editor,
15
+ timeTravelButtonClassName: "debug-timetravel-button",
16
+ timeTravelPanelButtonClassName: "debug-timetravel-panel-button",
17
+ timeTravelPanelClassName: "debug-timetravel-panel",
18
+ timeTravelPanelSliderClassName: "debug-timetravel-panel-slider",
19
+ treeTypeButtonClassName: "debug-treetype-button",
20
+ viewClassName: "tree-view-output"
16
21
  });
22
+ $[0] = editor;
23
+ $[1] = t0;
24
+ } else {
25
+ t0 = $[1];
26
+ }
27
+ return t0;
17
28
  };
18
-
19
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/debug/treeView/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport './index.scss'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n"],"names":["useLexicalComposerContext","TreeView","React","TreeViewPlugin","editor","timeTravelButtonClassName","timeTravelPanelButtonClassName","timeTravelPanelClassName","timeTravelPanelSliderClassName","treeTypeButtonClassName","viewClassName"],"mappings":"AAAA;;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,QAAQ,QAAQ,oCAAmC;AAC5D,YAAYC,WAAW,QAAO;AAM9B,OAAO,MAAMC,iBAA6C;IACxD,MAAM,CAACC,OAAO,GAAGJ;IACjB,qBACE,KAACC;QACCG,QAAQA;QACRC,2BAA0B;QAC1BC,gCAA+B;QAC/BC,0BAAyB;QACzBC,gCAA+B;QAC/BC,yBAAwB;QACxBC,eAAc;;AAGpB,EAAC"}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","TreeView","React","TreeViewPlugin","$","editor","t0","_jsx","timeTravelButtonClassName","timeTravelPanelButtonClassName","timeTravelPanelClassName","timeTravelPanelSliderClassName","treeTypeButtonClassName","viewClassName"],"sources":["../../../../../../src/features/debug/treeView/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport './index.scss'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,QAAQ,QAAQ;AACzB,YAAYC,KAAA,MAAW;AAMvB,OAAO,MAAMC,cAAA,GAA6CA,CAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EACxD,OAAAM,MAAA,IAAiBL,yBAAA;EAAA,IAAAM,EAAA;EAAA,IAAAF,CAAA,QAAAC,MAAA;IAEfC,EAAA,GAAAC,IAAA,CAAAN,QAAA;MAAAI,MAAA;MAAAG,yBAAA,EAE4B;MAAAC,8BAAA,EACK;MAAAC,wBAAA,EACN;MAAAC,8BAAA,EACM;MAAAC,uBAAA,EACP;MAAAC,aAAA,EACV;IAAA,C;;;;;;SAPhBP,E;CAUJ","ignoreList":[]}
@@ -1,9 +1,8 @@
1
1
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
2
2
  export const TreeViewFeature = createServerFeature({
3
- feature: {
4
- ClientFeature: '@payloadcms/richtext-lexical/client#TreeViewFeatureClient'
5
- },
6
- key: 'treeView'
3
+ feature: {
4
+ ClientFeature: '@payloadcms/richtext-lexical/client#TreeViewFeatureClient'
5
+ },
6
+ key: 'treeView'
7
7
  });
8
-
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/debug/treeView/server/index.ts"],"sourcesContent":["import { createServerFeature } from '../../../../utilities/createServerFeature.js'\n\nexport const TreeViewFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#TreeViewFeatureClient',\n },\n key: 'treeView',\n})\n"],"names":["createServerFeature","TreeViewFeature","feature","ClientFeature","key"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,+CAA8C;AAElF,OAAO,MAAMC,kBAAkBD,oBAAoB;IACjDE,SAAS;QACPC,eAAe;IACjB;IACAC,KAAK;AACP,GAAE"}
1
+ {"version":3,"file":"index.js","names":["createServerFeature","TreeViewFeature","feature","ClientFeature","key"],"sources":["../../../../../src/features/debug/treeView/server/index.ts"],"sourcesContent":["import { createServerFeature } from '../../../../utilities/createServerFeature.js'\n\nexport const TreeViewFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#TreeViewFeatureClient',\n },\n key: 'treeView',\n})\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,eAAA,GAAkBD,mBAAA,CAAoB;EACjDE,OAAA,EAAS;IACPC,aAAA,EAAe;EACjB;EACAC,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  'use client';
2
+
2
3
  import { TableCellNode, TableNode, TableRowNode } from '@lexical/table';
3
4
  import { TableIcon } from '../../../lexical/ui/icons/Table/index.js';
4
5
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
@@ -9,63 +10,45 @@ import { TableCellResizerPlugin } from './plugins/TableCellResizerPlugin/index.j
9
10
  import { TableHoverActionsPlugin } from './plugins/TableHoverActionsPlugin/index.js';
10
11
  import { OPEN_TABLE_DRAWER_COMMAND, TableContext, TablePlugin } from './plugins/TablePlugin/index.js';
11
12
  export const TableFeatureClient = createClientFeature({
12
- nodes: [
13
- TableNode,
14
- TableCellNode,
15
- TableRowNode
16
- ],
17
- plugins: [
18
- {
19
- Component: TablePlugin,
20
- position: 'normal'
21
- },
22
- {
23
- Component: TableCellResizerPlugin,
24
- position: 'normal'
25
- },
26
- {
27
- Component: TableActionMenuPlugin,
28
- position: 'floatingAnchorElem'
29
- },
30
- {
31
- Component: TableHoverActionsPlugin,
32
- position: 'floatingAnchorElem'
33
- }
34
- ],
35
- providers: [
36
- TableContext
37
- ],
38
- slashMenu: {
39
- groups: [
40
- slashMenuBasicGroupWithItems([
41
- {
42
- Icon: TableIcon,
43
- key: 'table',
44
- keywords: [
45
- 'table'
46
- ],
47
- label: 'Table',
48
- onSelect: ({ editor })=>{
49
- editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {});
50
- }
51
- }
52
- ])
53
- ]
54
- },
55
- toolbarFixed: {
56
- groups: [
57
- toolbarAddDropdownGroupWithItems([
58
- {
59
- ChildComponent: TableIcon,
60
- key: 'table',
61
- label: 'Table',
62
- onSelect: ({ editor })=>{
63
- editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {});
64
- }
65
- }
66
- ])
67
- ]
68
- }
13
+ nodes: [TableNode, TableCellNode, TableRowNode],
14
+ plugins: [{
15
+ Component: TablePlugin,
16
+ position: 'normal'
17
+ }, {
18
+ Component: TableCellResizerPlugin,
19
+ position: 'normal'
20
+ }, {
21
+ Component: TableActionMenuPlugin,
22
+ position: 'floatingAnchorElem'
23
+ }, {
24
+ Component: TableHoverActionsPlugin,
25
+ position: 'floatingAnchorElem'
26
+ }],
27
+ providers: [TableContext],
28
+ slashMenu: {
29
+ groups: [slashMenuBasicGroupWithItems([{
30
+ Icon: TableIcon,
31
+ key: 'table',
32
+ keywords: ['table'],
33
+ label: 'Table',
34
+ onSelect: ({
35
+ editor
36
+ }) => {
37
+ editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {});
38
+ }
39
+ }])]
40
+ },
41
+ toolbarFixed: {
42
+ groups: [toolbarAddDropdownGroupWithItems([{
43
+ ChildComponent: TableIcon,
44
+ key: 'table',
45
+ label: 'Table',
46
+ onSelect: ({
47
+ editor
48
+ }) => {
49
+ editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {});
50
+ }
51
+ }])]
52
+ }
69
53
  });
70
-
71
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/experimental_table/client/index.ts"],"sourcesContent":["'use client'\n\nimport { TableCellNode, TableNode, TableRowNode } from '@lexical/table'\n\nimport { TableIcon } from '../../../lexical/ui/icons/Table/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { TableActionMenuPlugin } from './plugins/TableActionMenuPlugin/index.js'\nimport { TableCellResizerPlugin } from './plugins/TableCellResizerPlugin/index.js'\nimport { TableHoverActionsPlugin } from './plugins/TableHoverActionsPlugin/index.js'\nimport {\n OPEN_TABLE_DRAWER_COMMAND,\n TableContext,\n TablePlugin,\n} from './plugins/TablePlugin/index.js'\n\nexport const TableFeatureClient = createClientFeature({\n nodes: [TableNode, TableCellNode, TableRowNode],\n plugins: [\n {\n Component: TablePlugin,\n position: 'normal',\n },\n {\n Component: TableCellResizerPlugin,\n position: 'normal',\n },\n {\n Component: TableActionMenuPlugin,\n position: 'floatingAnchorElem',\n },\n {\n Component: TableHoverActionsPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n providers: [TableContext],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: TableIcon,\n key: 'table',\n keywords: ['table'],\n label: 'Table',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {})\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: TableIcon,\n key: 'table',\n label: 'Table',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {})\n },\n },\n ]),\n ],\n },\n})\n"],"names":["TableCellNode","TableNode","TableRowNode","TableIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","TableActionMenuPlugin","TableCellResizerPlugin","TableHoverActionsPlugin","OPEN_TABLE_DRAWER_COMMAND","TableContext","TablePlugin","TableFeatureClient","nodes","plugins","Component","position","providers","slashMenu","groups","Icon","key","keywords","label","onSelect","editor","dispatchCommand","toolbarFixed","ChildComponent"],"mappings":"AAAA;AAEA,SAASA,aAAa,EAAEC,SAAS,EAAEC,YAAY,QAAQ,iBAAgB;AAEvE,SAASC,SAAS,QAAQ,2CAA0C;AACpE,SAASC,mBAAmB,QAAQ,4CAA2C;AAC/E,SAASC,4BAA4B,QAAQ,uCAAsC;AACnF,SAASC,gCAAgC,QAAQ,2CAA0C;AAC3F,SAASC,qBAAqB,QAAQ,2CAA0C;AAChF,SAASC,sBAAsB,QAAQ,4CAA2C;AAClF,SAASC,uBAAuB,QAAQ,6CAA4C;AACpF,SACEC,yBAAyB,EACzBC,YAAY,EACZC,WAAW,QACN,iCAAgC;AAEvC,OAAO,MAAMC,qBAAqBT,oBAAoB;IACpDU,OAAO;QAACb;QAAWD;QAAeE;KAAa;IAC/Ca,SAAS;QACP;YACEC,WAAWJ;YACXK,UAAU;QACZ;QACA;YACED,WAAWR;YACXS,UAAU;QACZ;QACA;YACED,WAAWT;YACXU,UAAU;QACZ;QACA;YACED,WAAWP;YACXQ,UAAU;QACZ;KACD;IACDC,WAAW;QAACP;KAAa;IACzBQ,WAAW;QACTC,QAAQ;YACNf,6BAA6B;gBAC3B;oBACEgB,MAAMlB;oBACNmB,KAAK;oBACLC,UAAU;wBAAC;qBAAQ;oBACnBC,OAAO;oBACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wBACnBA,OAAOC,eAAe,CAACjB,2BAA2B,CAAC;oBACrD;gBACF;aACD;SACF;IACH;IACAkB,cAAc;QACZR,QAAQ;YACNd,iCAAiC;gBAC/B;oBACEuB,gBAAgB1B;oBAChBmB,KAAK;oBACLE,OAAO;oBACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wBACnBA,OAAOC,eAAe,CAACjB,2BAA2B,CAAC;oBACrD;gBACF;aACD;SACF;IACH;AACF,GAAE"}
1
+ {"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","TableIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","TableActionMenuPlugin","TableCellResizerPlugin","TableHoverActionsPlugin","OPEN_TABLE_DRAWER_COMMAND","TableContext","TablePlugin","TableFeatureClient","nodes","plugins","Component","position","providers","slashMenu","groups","Icon","key","keywords","label","onSelect","editor","dispatchCommand","toolbarFixed","ChildComponent"],"sources":["../../../../src/features/experimental_table/client/index.ts"],"sourcesContent":["'use client'\n\nimport { TableCellNode, TableNode, TableRowNode } from '@lexical/table'\n\nimport { TableIcon } from '../../../lexical/ui/icons/Table/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { TableActionMenuPlugin } from './plugins/TableActionMenuPlugin/index.js'\nimport { TableCellResizerPlugin } from './plugins/TableCellResizerPlugin/index.js'\nimport { TableHoverActionsPlugin } from './plugins/TableHoverActionsPlugin/index.js'\nimport {\n OPEN_TABLE_DRAWER_COMMAND,\n TableContext,\n TablePlugin,\n} from './plugins/TablePlugin/index.js'\n\nexport const TableFeatureClient = createClientFeature({\n nodes: [TableNode, TableCellNode, TableRowNode],\n plugins: [\n {\n Component: TablePlugin,\n position: 'normal',\n },\n {\n Component: TableCellResizerPlugin,\n position: 'normal',\n },\n {\n Component: TableActionMenuPlugin,\n position: 'floatingAnchorElem',\n },\n {\n Component: TableHoverActionsPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n providers: [TableContext],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: TableIcon,\n key: 'table',\n keywords: ['table'],\n label: 'Table',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {})\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: TableIcon,\n key: 'table',\n label: 'Table',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {})\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,aAAa,EAAEC,SAAS,EAAEC,YAAY,QAAQ;AAEvD,SAASC,SAAS,QAAQ;AAC1B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,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