@payloadcms/richtext-lexical 3.0.0-beta.85 → 3.0.0-beta.87

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 (758) hide show
  1. package/dist/cell/index.d.ts +2 -2
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +117 -127
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/client/Component-DOSSWC76.js +2 -0
  6. package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
  7. package/dist/exports/client/Component-MBLHTKDK.js +2 -0
  8. package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
  9. package/dist/exports/client/Field-63NGLPJB.js +2 -0
  10. package/dist/exports/client/Field-63NGLPJB.js.map +7 -0
  11. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js +2 -0
  12. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js.map +7 -0
  13. package/dist/exports/client/bundled.css +1 -1
  14. package/dist/exports/client/chunk-G5DTIOPI.js +2 -0
  15. package/dist/exports/client/chunk-G5DTIOPI.js.map +7 -0
  16. package/dist/exports/client/chunk-LGUXX2QH.js +2 -0
  17. package/dist/exports/client/chunk-LGUXX2QH.js.map +7 -0
  18. package/dist/exports/client/chunk-NI6Z4GBD.js +2 -0
  19. package/dist/exports/client/{chunk-SQHN3N6E.js.map → chunk-NI6Z4GBD.js.map} +2 -2
  20. package/dist/exports/client/chunk-OKMIHD2R.js +2 -0
  21. package/dist/exports/client/chunk-OKMIHD2R.js.map +7 -0
  22. package/dist/exports/client/chunk-TO2W7Q2G.js +2 -0
  23. package/dist/exports/client/chunk-TO2W7Q2G.js.map +7 -0
  24. package/dist/exports/client/chunk-V2LKLT2F.js +3 -0
  25. package/dist/exports/client/chunk-V2LKLT2F.js.map +7 -0
  26. package/dist/exports/client/component-3OFD6Q4Z.js +2 -0
  27. package/dist/exports/client/component-3OFD6Q4Z.js.map +7 -0
  28. package/dist/exports/client/component-LCAAX56T.js +2 -0
  29. package/dist/exports/client/component-LCAAX56T.js.map +7 -0
  30. package/dist/exports/client/component-LLWMZU6K.js +2 -0
  31. package/dist/exports/client/component-LLWMZU6K.js.map +7 -0
  32. package/dist/exports/client/componentInline-72VZAAHP.js +2 -0
  33. package/dist/exports/client/componentInline-72VZAAHP.js.map +7 -0
  34. package/dist/exports/client/index.js +9 -9
  35. package/dist/exports/client/index.js.map +3 -3
  36. package/dist/exports/server/migrate.js +0 -1
  37. package/dist/exports/server/migrate.js.map +1 -1
  38. package/dist/features/align/client/index.js +151 -134
  39. package/dist/features/align/client/index.js.map +1 -1
  40. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  41. package/dist/features/align/client/toolbarAlignGroup.js +10 -9
  42. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  43. package/dist/features/align/server/i18n.js +192 -193
  44. package/dist/features/align/server/i18n.js.map +1 -1
  45. package/dist/features/align/server/index.js +5 -6
  46. package/dist/features/align/server/index.js.map +1 -1
  47. package/dist/features/blockquote/client/index.js +60 -65
  48. package/dist/features/blockquote/client/index.js.map +1 -1
  49. package/dist/features/blockquote/markdownTransformer.js +28 -34
  50. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  51. package/dist/features/blockquote/server/i18n.js +96 -97
  52. package/dist/features/blockquote/server/i18n.js.map +1 -1
  53. package/dist/features/blockquote/server/index.js +38 -37
  54. package/dist/features/blockquote/server/index.js.map +1 -1
  55. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  56. package/dist/features/blocks/client/component/BlockContent.js +166 -172
  57. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  58. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -1
  59. package/dist/features/blocks/client/component/FormSavePlugin.js +46 -22
  60. package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -1
  61. package/dist/features/blocks/client/component/index.js +130 -142
  62. package/dist/features/blocks/client/component/index.js.map +1 -1
  63. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -1
  64. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +12 -8
  65. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
  66. package/dist/features/blocks/client/componentInline/index.js +106 -122
  67. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  68. package/dist/features/blocks/client/index.js +149 -142
  69. package/dist/features/blocks/client/index.js.map +1 -1
  70. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  71. package/dist/features/blocks/client/nodes/BlocksNode.js +41 -40
  72. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  73. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  74. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +31 -30
  75. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  76. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
  77. package/dist/features/blocks/client/plugin/commands.js +2 -1
  78. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  79. package/dist/features/blocks/client/plugin/index.js +179 -106
  80. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  81. package/dist/features/blocks/server/graphQLPopulationPromise.js +41 -28
  82. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  83. package/dist/features/blocks/server/i18n.js +288 -289
  84. package/dist/features/blocks/server/i18n.js.map +1 -1
  85. package/dist/features/blocks/server/index.js +149 -151
  86. package/dist/features/blocks/server/index.js.map +1 -1
  87. package/dist/features/blocks/server/nodes/BlocksNode.js +76 -73
  88. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  89. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +78 -76
  90. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  91. package/dist/features/blocks/server/validate.js +45 -34
  92. package/dist/features/blocks/server/validate.js.map +1 -1
  93. package/dist/features/converters/html/converter/converters/linebreak.js +4 -7
  94. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  95. package/dist/features/converters/html/converter/converters/paragraph.js +24 -19
  96. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  97. package/dist/features/converters/html/converter/converters/text.js +28 -29
  98. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  99. package/dist/features/converters/html/converter/defaultConverters.js +1 -6
  100. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  101. package/dist/features/converters/html/converter/index.js +66 -51
  102. package/dist/features/converters/html/converter/index.js.map +1 -1
  103. package/dist/features/converters/html/converter/types.js +1 -2
  104. package/dist/features/converters/html/converter/types.js.map +1 -1
  105. package/dist/features/converters/html/field/index.js +134 -139
  106. package/dist/features/converters/html/field/index.js.map +1 -1
  107. package/dist/features/converters/html/index.js +2 -3
  108. package/dist/features/converters/html/index.js.map +1 -1
  109. package/dist/features/createClientComponent.js +7 -6
  110. package/dist/features/createClientComponent.js.map +1 -1
  111. package/dist/features/createFeaturePropComponent.js +14 -13
  112. package/dist/features/createFeaturePropComponent.js.map +1 -1
  113. package/dist/features/debug/testRecorder/client/index.js +5 -7
  114. package/dist/features/debug/testRecorder/client/index.js.map +1 -1
  115. package/dist/features/debug/testRecorder/client/plugin/index.js +518 -402
  116. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  117. package/dist/features/debug/testRecorder/server/index.js +4 -5
  118. package/dist/features/debug/testRecorder/server/index.js.map +1 -1
  119. package/dist/features/debug/treeView/client/index.js +5 -7
  120. package/dist/features/debug/treeView/client/index.js.map +1 -1
  121. package/dist/features/debug/treeView/client/plugin/index.js +21 -11
  122. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  123. package/dist/features/debug/treeView/server/index.js +4 -5
  124. package/dist/features/debug/treeView/server/index.js.map +1 -1
  125. package/dist/features/experimental_table/client/index.js +41 -58
  126. package/dist/features/experimental_table/client/index.js.map +1 -1
  127. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +714 -560
  128. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  129. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +295 -301
  130. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  131. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -7
  132. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  133. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +228 -159
  134. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  135. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  136. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  137. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +129 -82
  138. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  139. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
  140. package/dist/features/experimental_table/client/utils/debounce.js +108 -89
  141. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  142. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -1
  143. package/dist/features/experimental_table/client/utils/useDebounce.js +11 -13
  144. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  145. package/dist/features/experimental_table/server/index.js +127 -114
  146. package/dist/features/experimental_table/server/index.js.map +1 -1
  147. package/dist/features/format/bold/feature.client.js +34 -35
  148. package/dist/features/format/bold/feature.client.js.map +1 -1
  149. package/dist/features/format/bold/feature.server.js +14 -18
  150. package/dist/features/format/bold/feature.server.js.map +1 -1
  151. package/dist/features/format/bold/markdownTransformers.js +14 -25
  152. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  153. package/dist/features/format/inlineCode/feature.client.js +26 -28
  154. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  155. package/dist/features/format/inlineCode/feature.server.js +5 -8
  156. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  157. package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
  158. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  159. package/dist/features/format/italic/feature.client.js +26 -29
  160. package/dist/features/format/italic/feature.client.js.map +1 -1
  161. package/dist/features/format/italic/feature.server.js +5 -9
  162. package/dist/features/format/italic/feature.server.js.map +1 -1
  163. package/dist/features/format/italic/markdownTransformers.js +7 -12
  164. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  165. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  166. package/dist/features/format/shared/toolbarFormatGroup.js +9 -8
  167. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  168. package/dist/features/format/strikethrough/feature.client.js +26 -28
  169. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  170. package/dist/features/format/strikethrough/feature.server.js +5 -8
  171. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  172. package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
  173. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  174. package/dist/features/format/subscript/feature.client.js +25 -25
  175. package/dist/features/format/subscript/feature.client.js.map +1 -1
  176. package/dist/features/format/subscript/feature.server.js +4 -5
  177. package/dist/features/format/subscript/feature.server.js.map +1 -1
  178. package/dist/features/format/superscript/feature.client.js +25 -25
  179. package/dist/features/format/superscript/feature.client.js.map +1 -1
  180. package/dist/features/format/superscript/feature.server.js +4 -5
  181. package/dist/features/format/superscript/feature.server.js.map +1 -1
  182. package/dist/features/format/underline/feature.client.js +25 -25
  183. package/dist/features/format/underline/feature.client.js.map +1 -1
  184. package/dist/features/format/underline/feature.server.js +4 -5
  185. package/dist/features/format/underline/feature.server.js.map +1 -1
  186. package/dist/features/heading/client/index.js +86 -90
  187. package/dist/features/heading/client/index.js.map +1 -1
  188. package/dist/features/heading/markdownTransformer.js +22 -25
  189. package/dist/features/heading/markdownTransformer.js.map +1 -1
  190. package/dist/features/heading/server/i18n.js +96 -97
  191. package/dist/features/heading/server/i18n.js.map +1 -1
  192. package/dist/features/heading/server/index.js +49 -51
  193. package/dist/features/heading/server/index.js.map +1 -1
  194. package/dist/features/horizontalRule/client/component/index.js +81 -51
  195. package/dist/features/horizontalRule/client/component/index.js.map +1 -1
  196. package/dist/features/horizontalRule/client/index.js +48 -57
  197. package/dist/features/horizontalRule/client/index.js.map +1 -1
  198. package/dist/features/horizontalRule/client/markdownTransformer.js +15 -18
  199. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  200. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  201. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +33 -30
  202. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  203. package/dist/features/horizontalRule/client/plugin/index.js +31 -20
  204. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  205. package/dist/features/horizontalRule/server/i18n.js +96 -97
  206. package/dist/features/horizontalRule/server/i18n.js.map +1 -1
  207. package/dist/features/horizontalRule/server/index.js +17 -24
  208. package/dist/features/horizontalRule/server/index.js.map +1 -1
  209. package/dist/features/horizontalRule/server/markdownTransformer.js +15 -18
  210. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  211. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +71 -66
  212. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  213. package/dist/features/indent/client/index.js +52 -47
  214. package/dist/features/indent/client/index.js.map +1 -1
  215. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  216. package/dist/features/indent/client/toolbarIndentGroup.js +9 -8
  217. package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
  218. package/dist/features/indent/server/i18n.js +128 -129
  219. package/dist/features/indent/server/i18n.js.map +1 -1
  220. package/dist/features/indent/server/index.js +5 -6
  221. package/dist/features/indent/server/index.js.map +1 -1
  222. package/dist/features/link/client/index.js +78 -83
  223. package/dist/features/link/client/index.js.map +1 -1
  224. package/dist/features/link/client/plugins/autoLink/index.js +267 -271
  225. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  226. package/dist/features/link/client/plugins/clickableLink/index.js +3 -3
  227. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  228. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  229. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +2 -1
  230. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  231. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +254 -276
  232. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  233. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +8 -6
  234. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  235. package/dist/features/link/client/plugins/floatingLinkEditor/types.js +1 -2
  236. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  237. package/dist/features/link/client/plugins/link/index.js +50 -41
  238. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  239. package/dist/features/link/markdownTransformer.js +38 -39
  240. package/dist/features/link/markdownTransformer.js.map +1 -1
  241. package/dist/features/link/nodes/AutoLinkNode.js +57 -56
  242. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  243. package/dist/features/link/nodes/LinkNode.js +277 -276
  244. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  245. package/dist/features/link/nodes/types.js +1 -2
  246. package/dist/features/link/nodes/types.js.map +1 -1
  247. package/dist/features/link/server/baseFields.js +118 -88
  248. package/dist/features/link/server/baseFields.js.map +1 -1
  249. package/dist/features/link/server/graphQLPopulationPromise.js +42 -28
  250. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  251. package/dist/features/link/server/i18n.js +96 -97
  252. package/dist/features/link/server/i18n.js.map +1 -1
  253. package/dist/features/link/server/index.js +120 -114
  254. package/dist/features/link/server/index.js.map +1 -1
  255. package/dist/features/link/server/transformExtraFields.js +15 -15
  256. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  257. package/dist/features/link/server/validate.js +37 -26
  258. package/dist/features/link/server/validate.js.map +1 -1
  259. package/dist/features/lists/checklist/client/index.js +77 -85
  260. package/dist/features/lists/checklist/client/index.js.map +1 -1
  261. package/dist/features/lists/checklist/client/plugin/index.js +3 -3
  262. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  263. package/dist/features/lists/checklist/markdownTransformers.js +7 -11
  264. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  265. package/dist/features/lists/checklist/server/i18n.js +96 -97
  266. package/dist/features/lists/checklist/server/i18n.js.map +1 -1
  267. package/dist/features/lists/checklist/server/index.js +21 -25
  268. package/dist/features/lists/checklist/server/index.js.map +1 -1
  269. package/dist/features/lists/htmlConverter.js +54 -43
  270. package/dist/features/lists/htmlConverter.js.map +1 -1
  271. package/dist/features/lists/orderedList/client/index.js +71 -77
  272. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  273. package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
  274. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  275. package/dist/features/lists/orderedList/server/i18n.js +96 -97
  276. package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
  277. package/dist/features/lists/orderedList/server/index.js +21 -25
  278. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  279. package/dist/features/lists/plugin/index.js +3 -3
  280. package/dist/features/lists/plugin/index.js.map +1 -1
  281. package/dist/features/lists/shared/markdown.js +48 -49
  282. package/dist/features/lists/shared/markdown.js.map +1 -1
  283. package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
  284. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  285. package/dist/features/lists/unorderedList/client/index.js +68 -76
  286. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  287. package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
  288. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  289. package/dist/features/lists/unorderedList/server/i18n.js +96 -97
  290. package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
  291. package/dist/features/lists/unorderedList/server/index.js +17 -23
  292. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  293. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +18 -17
  294. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  295. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +30 -29
  296. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  297. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +21 -20
  298. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  299. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +21 -19
  300. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  301. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +18 -17
  302. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +24 -23
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +1 -10
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +69 -61
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -7
  314. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +42 -43
  316. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  319. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +64 -59
  321. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  322. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
  323. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  324. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +20 -25
  325. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  326. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +28 -30
  327. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  328. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +26 -26
  329. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  330. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +22 -21
  331. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  332. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
  333. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  334. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +12 -13
  335. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  336. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
  337. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  338. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
  339. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +15 -16
  341. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +1 -13
  343. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/index.js +105 -98
  345. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  346. package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
  347. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/feature.client.js +7 -7
  349. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/feature.server.js +43 -44
  351. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  352. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  353. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  354. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  355. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +64 -59
  356. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  357. package/dist/features/paragraph/client/index.js +58 -61
  358. package/dist/features/paragraph/client/index.js.map +1 -1
  359. package/dist/features/paragraph/server/i18n.js +128 -129
  360. package/dist/features/paragraph/server/i18n.js.map +1 -1
  361. package/dist/features/paragraph/server/index.js +6 -7
  362. package/dist/features/paragraph/server/index.js.map +1 -1
  363. package/dist/features/relationship/client/components/RelationshipComponent.js +141 -149
  364. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  365. package/dist/features/relationship/client/drawer/commands.js +0 -1
  366. package/dist/features/relationship/client/drawer/commands.js.map +1 -1
  367. package/dist/features/relationship/client/drawer/index.js +138 -67
  368. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  369. package/dist/features/relationship/client/index.js +53 -59
  370. package/dist/features/relationship/client/index.js.map +1 -1
  371. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  372. package/dist/features/relationship/client/nodes/RelationshipNode.js +60 -59
  373. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  374. package/dist/features/relationship/client/plugins/index.js +90 -35
  375. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  376. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  377. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +97 -26
  378. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
  379. package/dist/features/relationship/server/graphQLPopulationPromise.js +34 -26
  380. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  381. package/dist/features/relationship/server/i18n.js +96 -97
  382. package/dist/features/relationship/server/i18n.js.map +1 -1
  383. package/dist/features/relationship/server/index.js +48 -44
  384. package/dist/features/relationship/server/index.js.map +1 -1
  385. package/dist/features/relationship/server/nodes/RelationshipNode.js +90 -87
  386. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  387. package/dist/features/shared/slashMenu/basicGroup.js +9 -8
  388. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  389. package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
  390. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  391. package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
  392. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  393. package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
  394. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  395. package/dist/features/toolbars/fixed/client/Toolbar/index.js +264 -187
  396. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  397. package/dist/features/toolbars/fixed/client/index.js +5 -7
  398. package/dist/features/toolbars/fixed/client/index.js.map +1 -1
  399. package/dist/features/toolbars/fixed/server/index.js +14 -13
  400. package/dist/features/toolbars/fixed/server/index.js.map +1 -1
  401. package/dist/features/toolbars/inline/client/Toolbar/index.js +374 -286
  402. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  403. package/dist/features/toolbars/inline/client/index.js +5 -7
  404. package/dist/features/toolbars/inline/client/index.js.map +1 -1
  405. package/dist/features/toolbars/inline/server/index.js +4 -5
  406. package/dist/features/toolbars/inline/server/index.js.map +1 -1
  407. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  408. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  409. package/dist/features/toolbars/shared/ToolbarButton/index.js +75 -97
  410. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  411. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +190 -211
  412. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  413. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  414. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  415. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +289 -124
  416. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  417. package/dist/features/toolbars/types.js +1 -2
  418. package/dist/features/toolbars/types.js.map +1 -1
  419. package/dist/features/typeUtilities.js +2 -3
  420. package/dist/features/typeUtilities.js.map +1 -1
  421. package/dist/features/typesClient.js +1 -2
  422. package/dist/features/typesClient.js.map +1 -1
  423. package/dist/features/typesServer.js +1 -2
  424. package/dist/features/typesServer.js.map +1 -1
  425. package/dist/features/upload/client/component/index.js +208 -224
  426. package/dist/features/upload/client/component/index.js.map +1 -1
  427. package/dist/features/upload/client/drawer/commands.js +1 -1
  428. package/dist/features/upload/client/drawer/commands.js.map +1 -1
  429. package/dist/features/upload/client/drawer/index.js +107 -58
  430. package/dist/features/upload/client/drawer/index.js.map +1 -1
  431. package/dist/features/upload/client/feature.client.js +51 -61
  432. package/dist/features/upload/client/feature.client.js.map +1 -1
  433. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  434. package/dist/features/upload/client/nodes/UploadNode.js +76 -73
  435. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  436. package/dist/features/upload/client/plugin/index.js +67 -39
  437. package/dist/features/upload/client/plugin/index.js.map +1 -1
  438. package/dist/features/upload/server/feature.server.js +190 -171
  439. package/dist/features/upload/server/feature.server.js.map +1 -1
  440. package/dist/features/upload/server/graphQLPopulationPromise.js +60 -47
  441. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  442. package/dist/features/upload/server/i18n.js +96 -97
  443. package/dist/features/upload/server/i18n.js.map +1 -1
  444. package/dist/features/upload/server/nodes/UploadNode.js +113 -108
  445. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  446. package/dist/features/upload/server/validate.js +53 -40
  447. package/dist/features/upload/server/validate.js.map +1 -1
  448. package/dist/field/Field.d.ts.map +1 -1
  449. package/dist/field/Field.js +127 -105
  450. package/dist/field/Field.js.map +1 -1
  451. package/dist/field/bundled.css +1 -0
  452. package/dist/field/index.js +92 -36
  453. package/dist/field/index.js.map +1 -1
  454. package/dist/i18n.js +160 -161
  455. package/dist/i18n.js.map +1 -1
  456. package/dist/index.js +670 -623
  457. package/dist/index.js.map +1 -1
  458. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  459. package/dist/lexical/EditorPlugin.js +15 -10
  460. package/dist/lexical/EditorPlugin.js.map +1 -1
  461. package/dist/lexical/LexicalEditor.js +206 -161
  462. package/dist/lexical/LexicalEditor.js.map +1 -1
  463. package/dist/lexical/LexicalProvider.js +83 -82
  464. package/dist/lexical/LexicalProvider.js.map +1 -1
  465. package/dist/lexical/config/client/EditorConfigProvider.js +76 -79
  466. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  467. package/dist/lexical/config/client/default.js +3 -3
  468. package/dist/lexical/config/client/default.js.map +1 -1
  469. package/dist/lexical/config/client/loader.js +42 -39
  470. package/dist/lexical/config/client/loader.js.map +1 -1
  471. package/dist/lexical/config/client/sanitize.js +165 -165
  472. package/dist/lexical/config/client/sanitize.js.map +1 -1
  473. package/dist/lexical/config/server/default.js +5 -27
  474. package/dist/lexical/config/server/default.js.map +1 -1
  475. package/dist/lexical/config/server/loader.js +103 -103
  476. package/dist/lexical/config/server/loader.js.map +1 -1
  477. package/dist/lexical/config/server/sanitize.js +98 -99
  478. package/dist/lexical/config/server/sanitize.js.map +1 -1
  479. package/dist/lexical/config/types.js +1 -2
  480. package/dist/lexical/config/types.js.map +1 -1
  481. package/dist/lexical/nodes/index.js +9 -8
  482. package/dist/lexical/nodes/index.js.map +1 -1
  483. package/dist/lexical/plugins/MarkdownShortcut/index.js +17 -5
  484. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  485. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +384 -361
  486. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  487. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +223 -160
  488. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  489. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -2
  490. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  491. package/dist/lexical/plugins/SlashMenu/index.js +191 -179
  492. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  493. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -1
  494. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -26
  495. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  496. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +164 -129
  497. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  498. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  499. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +11 -10
  500. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  501. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -1
  502. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +11 -10
  503. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  504. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  505. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +27 -23
  506. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  507. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +331 -300
  508. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  509. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +110 -97
  510. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  511. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  512. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +23 -16
  513. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  514. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
  515. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +18 -27
  516. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  517. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -1
  518. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +15 -11
  519. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  520. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
  521. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +133 -118
  522. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  523. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  524. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +3 -2
  525. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  526. package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -1
  527. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +3 -2
  528. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  529. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  530. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +26 -25
  531. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  532. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  533. package/dist/lexical/theme/EditorTheme.js +97 -102
  534. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  535. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  536. package/dist/lexical/ui/ContentEditable.js +27 -10
  537. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  538. package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -1
  539. package/dist/lexical/ui/icons/AI/index.js +31 -33
  540. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  541. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  542. package/dist/lexical/ui/icons/Add/index.js +16 -18
  543. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  544. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  545. package/dist/lexical/ui/icons/AlignCenter/index.js +25 -28
  546. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  547. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  548. package/dist/lexical/ui/icons/AlignJustify/index.js +25 -28
  549. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  550. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  551. package/dist/lexical/ui/icons/AlignLeft/index.js +25 -28
  552. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  553. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  554. package/dist/lexical/ui/icons/AlignRight/index.js +25 -28
  555. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  556. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  557. package/dist/lexical/ui/icons/Block/index.js +34 -37
  558. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  559. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  560. package/dist/lexical/ui/icons/Blockquote/index.js +16 -15
  561. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  562. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  563. package/dist/lexical/ui/icons/Bold/index.js +16 -15
  564. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  565. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  566. package/dist/lexical/ui/icons/Checklist/index.js +24 -26
  567. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  568. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  569. package/dist/lexical/ui/icons/Code/index.js +19 -21
  570. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  571. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  572. package/dist/lexical/ui/icons/CodeBlock/index.js +19 -21
  573. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  574. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  575. package/dist/lexical/ui/icons/H1/index.js +16 -15
  576. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  577. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  578. package/dist/lexical/ui/icons/H2/index.js +16 -15
  579. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  580. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  581. package/dist/lexical/ui/icons/H3/index.js +16 -15
  582. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  583. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  584. package/dist/lexical/ui/icons/H4/index.js +16 -15
  585. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  587. package/dist/lexical/ui/icons/H5/index.js +16 -15
  588. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  589. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  590. package/dist/lexical/ui/icons/H6/index.js +16 -15
  591. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  592. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  593. package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -18
  594. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  595. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  596. package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -32
  597. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  598. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  599. package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -32
  600. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  601. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  602. package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -17
  603. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  604. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  605. package/dist/lexical/ui/icons/Italic/index.js +16 -15
  606. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  607. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  608. package/dist/lexical/ui/icons/Link/index.js +17 -16
  609. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  611. package/dist/lexical/ui/icons/Meatballs/index.js +19 -22
  612. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  613. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  614. package/dist/lexical/ui/icons/OrderedList/index.js +31 -36
  615. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  616. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  617. package/dist/lexical/ui/icons/Relationship/index.js +31 -33
  618. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  619. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  620. package/dist/lexical/ui/icons/Strikethrough/index.js +19 -21
  621. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  622. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  623. package/dist/lexical/ui/icons/Subscript/index.js +16 -15
  624. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  625. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  626. package/dist/lexical/ui/icons/Superscript/index.js +16 -15
  627. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  628. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  629. package/dist/lexical/ui/icons/Table/index.js +17 -16
  630. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  631. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  632. package/dist/lexical/ui/icons/Text/index.js +16 -15
  633. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  634. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  635. package/dist/lexical/ui/icons/Underline/index.js +19 -21
  636. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  637. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  638. package/dist/lexical/ui/icons/UnorderedList/index.js +46 -52
  639. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  640. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  641. package/dist/lexical/ui/icons/Upload/index.js +28 -31
  642. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  643. package/dist/lexical/utils/canUseDOM.d.ts.map +1 -1
  644. package/dist/lexical/utils/canUseDOM.js +2 -1
  645. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  646. package/dist/lexical/utils/environment.d.ts.map +1 -1
  647. package/dist/lexical/utils/environment.js +2 -1
  648. package/dist/lexical/utils/environment.js.map +1 -1
  649. package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -1
  650. package/dist/lexical/utils/getDOMRangeRect.js +13 -12
  651. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  652. package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -1
  653. package/dist/lexical/utils/getSelectedNode.js +18 -13
  654. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  655. package/dist/lexical/utils/guard.d.ts.map +1 -1
  656. package/dist/lexical/utils/guard.js +3 -2
  657. package/dist/lexical/utils/guard.js.map +1 -1
  658. package/dist/lexical/utils/joinClasses.d.ts.map +1 -1
  659. package/dist/lexical/utils/joinClasses.js +3 -2
  660. package/dist/lexical/utils/joinClasses.js.map +1 -1
  661. package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
  662. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  663. package/dist/lexical/utils/nodeFormat.js +58 -59
  664. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  665. package/dist/lexical/utils/point.d.ts.map +1 -1
  666. package/dist/lexical/utils/point.js +40 -32
  667. package/dist/lexical/utils/point.js.map +1 -1
  668. package/dist/lexical/utils/rect.d.ts.map +1 -1
  669. package/dist/lexical/utils/rect.js +167 -134
  670. package/dist/lexical/utils/rect.js.map +1 -1
  671. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  672. package/dist/lexical/utils/setFloatingElemPosition.js +56 -45
  673. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  674. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -1
  675. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +23 -22
  676. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  677. package/dist/lexical/utils/swipe.d.ts.map +1 -1
  678. package/dist/lexical/utils/swipe.js +82 -83
  679. package/dist/lexical/utils/swipe.js.map +1 -1
  680. package/dist/lexical/utils/url.js +23 -22
  681. package/dist/lexical/utils/url.js.map +1 -1
  682. package/dist/nodeTypes.js +1 -2
  683. package/dist/nodeTypes.js.map +1 -1
  684. package/dist/populateGraphQL/defaultValue.js +24 -29
  685. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  686. package/dist/populateGraphQL/populate.js +35 -25
  687. package/dist/populateGraphQL/populate.js.map +1 -1
  688. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +47 -32
  689. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  690. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +39 -25
  691. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  692. package/dist/types.js +1 -2
  693. package/dist/types.js.map +1 -1
  694. package/dist/utilities/createClientFeature.js +40 -36
  695. package/dist/utilities/createClientFeature.js.map +1 -1
  696. package/dist/utilities/createServerFeature.js +46 -35
  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.d.ts.map +1 -1
  705. package/dist/utilities/generateComponentMap.js +92 -82
  706. package/dist/utilities/generateComponentMap.js.map +1 -1
  707. package/dist/utilities/generateImportMap.js +53 -47
  708. package/dist/utilities/generateImportMap.js.map +1 -1
  709. package/dist/utilities/generateSchemaMap.js +35 -30
  710. package/dist/utilities/generateSchemaMap.js.map +1 -1
  711. package/dist/utilities/migrateSlateToLexical/index.js +99 -86
  712. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
  713. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +73 -66
  714. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  715. package/dist/utilities/recurseNodeTree.js +25 -22
  716. package/dist/utilities/recurseNodeTree.js.map +1 -1
  717. package/dist/utilities/upgradeLexicalData/index.js +99 -86
  718. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  719. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +71 -66
  720. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  721. package/dist/utilities/useLexicalFeature.js +9 -8
  722. package/dist/utilities/useLexicalFeature.js.map +1 -1
  723. package/dist/validate/index.js +32 -26
  724. package/dist/validate/index.js.map +1 -1
  725. package/dist/validate/validateNodes.js +31 -28
  726. package/dist/validate/validateNodes.js.map +1 -1
  727. package/package.json +22 -11
  728. package/dist/exports/client/Component-7HS6FEJS.js +0 -2
  729. package/dist/exports/client/Component-7HS6FEJS.js.map +0 -7
  730. package/dist/exports/client/Component-LAKSCIDX.js +0 -2
  731. package/dist/exports/client/Component-LAKSCIDX.js.map +0 -7
  732. package/dist/exports/client/Field-BYB3WX7J.js +0 -2
  733. package/dist/exports/client/Field-BYB3WX7J.js.map +0 -7
  734. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +0 -2
  735. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +0 -7
  736. package/dist/exports/client/chunk-4EX7W4UX.js +0 -2
  737. package/dist/exports/client/chunk-4EX7W4UX.js.map +0 -7
  738. package/dist/exports/client/chunk-E4HH5PS6.js +0 -2
  739. package/dist/exports/client/chunk-E4HH5PS6.js.map +0 -7
  740. package/dist/exports/client/chunk-EBB2CEB6.js +0 -2
  741. package/dist/exports/client/chunk-EBB2CEB6.js.map +0 -7
  742. package/dist/exports/client/chunk-LTR7V74A.js +0 -2
  743. package/dist/exports/client/chunk-LTR7V74A.js.map +0 -7
  744. package/dist/exports/client/chunk-SQHN3N6E.js +0 -2
  745. package/dist/exports/client/chunk-VMCQSR3T.js +0 -3
  746. package/dist/exports/client/chunk-VMCQSR3T.js.map +0 -7
  747. package/dist/exports/client/component-6C5JERGA.js +0 -2
  748. package/dist/exports/client/component-6C5JERGA.js.map +0 -7
  749. package/dist/exports/client/component-GUWIGB77.js +0 -2
  750. package/dist/exports/client/component-GUWIGB77.js.map +0 -7
  751. package/dist/exports/client/component-UQ2BKD5X.js +0 -2
  752. package/dist/exports/client/component-UQ2BKD5X.js.map +0 -7
  753. package/dist/exports/client/componentInline-C2XIK5VZ.js +0 -2
  754. package/dist/exports/client/componentInline-C2XIK5VZ.js.map +0 -7
  755. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +0 -12
  756. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  757. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +0 -181
  758. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +0 -1
@@ -1,66 +1,68 @@
1
1
  'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
2
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
5
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
4
6
  import { $createParagraphNode, $createTextNode, $getRoot } from 'lexical';
5
7
  import * as React from 'react';
6
8
  import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
7
9
  import { IS_APPLE } from '../../../../../lexical/utils/environment.js';
8
- const copy = (text)=>{
9
- const textArea = document.createElement('textarea');
10
- textArea.value = text || '';
11
- textArea.style.position = 'absolute';
12
- textArea.style.opacity = '0';
13
- document.body?.appendChild(textArea);
14
- textArea.focus();
15
- textArea.select();
16
- try {
17
- const result = document.execCommand('copy');
18
- // eslint-disable-next-line no-console
19
- console.log(result);
20
- } catch (error) {
21
- console.error(error);
22
- }
23
- document.body?.removeChild(textArea);
10
+ const copy = text => {
11
+ const textArea = document.createElement('textarea');
12
+ textArea.value = text || '';
13
+ textArea.style.position = 'absolute';
14
+ textArea.style.opacity = '0';
15
+ document.body?.appendChild(textArea);
16
+ textArea.focus();
17
+ textArea.select();
18
+ try {
19
+ const result = document.execCommand('copy');
20
+ // eslint-disable-next-line no-console
21
+ console.log(result);
22
+ } catch (error) {
23
+ console.error(error);
24
+ }
25
+ document.body?.removeChild(textArea);
24
26
  };
25
- const download = (filename, text)=>{
26
- const a = document.createElement('a');
27
- a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''));
28
- a.setAttribute('download', filename);
29
- a.style.display = 'none';
30
- document.body?.appendChild(a);
31
- a.click();
32
- document.body?.removeChild(a);
27
+ const download = (filename, text) => {
28
+ const a = document.createElement('a');
29
+ a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''));
30
+ a.setAttribute('download', filename);
31
+ a.style.display = 'none';
32
+ document.body?.appendChild(a);
33
+ a.click();
34
+ document.body?.removeChild(a);
33
35
  };
34
- const formatStep = (step)=>{
35
- const formatOneStep = (name, value)=>{
36
- switch(name){
37
- case 'click':
38
- {
39
- return ` await page.mouse.click(${value.x}, ${value.y});`;
40
- }
41
- case 'press':
42
- {
43
- return ` await page.keyboard.press('${value}');`;
44
- }
45
- case 'keydown':
46
- {
47
- return ` await page.keyboard.keydown('${value}');`;
48
- }
49
- case 'keyup':
50
- {
51
- return ` await page.keyboard.keyup('${value}');`;
52
- }
53
- case 'type':
54
- {
55
- return ` await page.keyboard.type('${value}');`;
56
- }
57
- case 'selectAll':
58
- {
59
- return ` await selectAll(page);`;
60
- }
61
- case 'snapshot':
62
- {
63
- return ` await assertHTMLSnapshot(page);
36
+ const formatStep = step => {
37
+ const formatOneStep = (name, value) => {
38
+ switch (name) {
39
+ case 'click':
40
+ {
41
+ return ` await page.mouse.click(${value.x}, ${value.y});`;
42
+ }
43
+ case 'press':
44
+ {
45
+ return ` await page.keyboard.press('${value}');`;
46
+ }
47
+ case 'keydown':
48
+ {
49
+ return ` await page.keyboard.keydown('${value}');`;
50
+ }
51
+ case 'keyup':
52
+ {
53
+ return ` await page.keyboard.keyup('${value}');`;
54
+ }
55
+ case 'type':
56
+ {
57
+ return ` await page.keyboard.type('${value}');`;
58
+ }
59
+ case 'selectAll':
60
+ {
61
+ return ` await selectAll(page);`;
62
+ }
63
+ case 'snapshot':
64
+ {
65
+ return ` await assertHTMLSnapshot(page);
64
66
  await assertSelection(page, {
65
67
  anchorPath: [${value.anchorPath.toString()}],
66
68
  anchorOffset: ${value.anchorOffset},
@@ -68,87 +70,95 @@ const formatStep = (step)=>{
68
70
  focusOffset: ${value.focusOffset},
69
71
  });
70
72
  `;
71
- }
72
- default:
73
- return ``;
74
73
  }
75
- };
76
- const formattedStep = formatOneStep(step.name, step.value);
77
- switch(step.count){
78
- case 1:
79
- return formattedStep;
80
- case 2:
81
- return [
82
- formattedStep,
83
- formattedStep
84
- ].join(`\n`);
85
- default:
86
- return ` await repeat(${step.count}, async () => {
74
+ default:
75
+ return ``;
76
+ }
77
+ };
78
+ const formattedStep = formatOneStep(step.name, step.value);
79
+ switch (step.count) {
80
+ case 1:
81
+ return formattedStep;
82
+ case 2:
83
+ return [formattedStep, formattedStep].join(`\n`);
84
+ default:
85
+ return ` await repeat(${step.count}, async () => {
87
86
  ${formattedStep}
88
87
  );`;
89
- }
88
+ }
90
89
  };
91
90
  export function isSelectAll(event) {
92
- return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey);
91
+ return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey);
93
92
  }
94
93
  // stolen from LexicalSelection-test
95
94
  function sanitizeSelection(selection) {
96
- const { anchorNode, focusNode } = selection;
97
- let { anchorOffset, focusOffset } = selection;
98
- if (anchorOffset !== 0) {
99
- anchorOffset--;
100
- }
101
- if (focusOffset !== 0) {
102
- focusOffset--;
103
- }
104
- return {
105
- anchorNode,
106
- anchorOffset,
107
- focusNode,
108
- focusOffset
109
- };
95
+ const {
96
+ anchorNode,
97
+ focusNode
98
+ } = selection;
99
+ let {
100
+ anchorOffset,
101
+ focusOffset
102
+ } = selection;
103
+ if (anchorOffset !== 0) {
104
+ anchorOffset--;
105
+ }
106
+ if (focusOffset !== 0) {
107
+ focusOffset--;
108
+ }
109
+ return {
110
+ anchorNode,
111
+ anchorOffset,
112
+ focusNode,
113
+ focusOffset
114
+ };
110
115
  }
111
116
  function getPathFromNodeToEditor(node, rootElement) {
112
- let currentNode = node;
113
- const path = [];
114
- while(currentNode !== rootElement){
115
- if (currentNode !== null && currentNode !== undefined) {
116
- path.unshift(Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode));
117
- }
118
- currentNode = currentNode?.parentNode;
117
+ let currentNode = node;
118
+ const path = [];
119
+ while (currentNode !== rootElement) {
120
+ if (currentNode !== null && currentNode !== undefined) {
121
+ path.unshift(Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode));
119
122
  }
120
- return path;
123
+ currentNode = currentNode?.parentNode;
124
+ }
125
+ return path;
121
126
  }
122
- const keyPresses = new Set([
123
- 'Enter',
124
- 'Backspace',
125
- 'Delete',
126
- 'Escape',
127
- 'ArrowLeft',
128
- 'ArrowRight',
129
- 'ArrowUp',
130
- 'ArrowDown'
131
- ]);
127
+ const keyPresses = new Set(['Enter', 'Backspace', 'Delete', 'Escape', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']);
132
128
  function useTestRecorder(editor) {
133
- const [steps, setSteps] = useState([]);
134
- const [isRecording, setIsRecording] = useState(false);
135
- const [, setCurrentInnerHTML] = useState('');
136
- const [templatedTest, setTemplatedTest] = useState('');
137
- const previousSelectionRef = useRef(null);
138
- const skipNextSelectionChangeRef = useRef(false);
139
- const preRef = useRef(null);
140
- const getCurrentEditor = useCallback(()=>{
141
- return editor;
142
- }, [
143
- editor
144
- ]);
145
- const generateTestContent = useCallback(()=>{
146
- const rootElement = editor.getRootElement();
147
- const browserSelection = window.getSelection();
148
- if (rootElement == null || browserSelection == null || browserSelection.anchorNode == null || browserSelection.focusNode == null || !rootElement.contains(browserSelection.anchorNode) || !rootElement.contains(browserSelection.focusNode)) {
149
- return null;
150
- }
151
- return `
129
+ const $ = _c(55);
130
+ let t0;
131
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
132
+ t0 = [];
133
+ $[0] = t0;
134
+ } else {
135
+ t0 = $[0];
136
+ }
137
+ const [steps, setSteps] = useState(t0);
138
+ const [isRecording, setIsRecording] = useState(false);
139
+ const [, setCurrentInnerHTML] = useState("");
140
+ const [templatedTest, setTemplatedTest] = useState("");
141
+ const previousSelectionRef = useRef(null);
142
+ const skipNextSelectionChangeRef = useRef(false);
143
+ const preRef = useRef(null);
144
+ let t1;
145
+ if ($[1] !== editor) {
146
+ t1 = () => editor;
147
+ $[1] = editor;
148
+ $[2] = t1;
149
+ } else {
150
+ t1 = $[2];
151
+ }
152
+ const getCurrentEditor = t1;
153
+ let t2;
154
+ if ($[3] !== editor || $[4] !== steps) {
155
+ t2 = () => {
156
+ const rootElement = editor.getRootElement();
157
+ const browserSelection = window.getSelection();
158
+ if (rootElement == null || browserSelection == null || browserSelection.anchorNode == null || browserSelection.focusNode == null || !rootElement.contains(browserSelection.anchorNode) || !rootElement.contains(browserSelection.focusNode)) {
159
+ return null;
160
+ }
161
+ return `
152
162
  import {
153
163
  initializeE2E,
154
164
  assertHTMLSnapshot,
@@ -169,303 +179,409 @@ ${steps.map(formatStep).join(`\n`)}
169
179
  });
170
180
  });
171
181
  `;
172
- }, [
173
- editor,
174
- steps
175
- ]);
176
- // just a wrapper around inserting new actions so that we can
177
- // coalesce some actions like insertText/moveNativeSelection
178
- const pushStep = useCallback((name, value)=>{
179
- setSteps((currentSteps)=>{
180
- // trying to group steps
181
- const currentIndex = steps.length - 1;
182
- const lastStep = steps[currentIndex];
183
- if (lastStep) {
184
- if (lastStep.name === name) {
185
- if (name === 'type') {
186
- // for typing events we just append the text
187
- return [
188
- ...steps.slice(0, currentIndex),
189
- {
190
- ...lastStep,
191
- value: lastStep.value + value
192
- }
193
- ];
194
- } else {
195
- // for other events we bump the counter if their values are the same
196
- if (lastStep.value === value) {
197
- return [
198
- ...steps.slice(0, currentIndex),
199
- {
200
- ...lastStep,
201
- count: lastStep.count + 1
202
- }
203
- ];
204
- }
205
- }
206
- }
207
- }
208
- // could not group, just append a new one
209
- return [
210
- ...currentSteps,
211
- {
212
- name,
213
- count: 1,
214
- value
215
- }
216
- ];
217
- });
218
- }, [
219
- steps,
220
- setSteps
221
- ]);
222
- useLayoutEffect(()=>{
223
- const onKeyDown = (event)=>{
224
- if (!isRecording) {
225
- return;
226
- }
227
- const key = event.key;
228
- if (isSelectAll(event)) {
229
- pushStep('selectAll', '');
230
- } else if (keyPresses.has(key)) {
231
- pushStep('press', event.key);
232
- } else if ([
233
- ...key
234
- ].length > 1) {
235
- pushStep('keydown', event.key);
182
+ };
183
+ $[3] = editor;
184
+ $[4] = steps;
185
+ $[5] = t2;
186
+ } else {
187
+ t2 = $[5];
188
+ }
189
+ const generateTestContent = t2;
190
+ let t3;
191
+ if ($[6] !== steps) {
192
+ t3 = (name, value) => {
193
+ setSteps(currentSteps => {
194
+ const currentIndex = steps.length - 1;
195
+ const lastStep = steps[currentIndex];
196
+ if (lastStep) {
197
+ if (lastStep.name === name) {
198
+ if (name === "type") {
199
+ return [...steps.slice(0, currentIndex), {
200
+ ...lastStep,
201
+ value: lastStep.value + value
202
+ }];
236
203
  } else {
237
- pushStep('type', event.key);
238
- }
239
- };
240
- const onKeyUp = (event)=>{
241
- if (!isRecording) {
242
- return;
243
- }
244
- const key = event.key;
245
- if (!keyPresses.has(key) && [
246
- ...key
247
- ].length > 1) {
248
- pushStep('keyup', event.key);
249
- }
250
- };
251
- return editor.registerRootListener((rootElement, prevRootElement)=>{
252
- if (prevRootElement !== null) {
253
- prevRootElement.removeEventListener('keydown', onKeyDown);
254
- prevRootElement.removeEventListener('keyup', onKeyUp);
255
- }
256
- if (rootElement !== null) {
257
- rootElement.addEventListener('keydown', onKeyDown);
258
- rootElement.addEventListener('keyup', onKeyUp);
204
+ if (lastStep.value === value) {
205
+ return [...steps.slice(0, currentIndex), {
206
+ ...lastStep,
207
+ count: lastStep.count + 1
208
+ }];
209
+ }
259
210
  }
260
- });
261
- }, [
262
- editor,
263
- isRecording,
264
- pushStep
265
- ]);
266
- useLayoutEffect(()=>{
267
- if (preRef.current) {
268
- preRef.current.scrollTo(0, preRef.current.scrollHeight);
211
+ }
269
212
  }
270
- }, [
271
- generateTestContent
272
- ]);
273
- useEffect(()=>{
274
- if (steps) {
275
- const testContent = generateTestContent();
276
- if (testContent !== null) {
277
- setTemplatedTest(testContent);
278
- }
279
- if (preRef.current) {
280
- preRef.current.scrollTo(0, preRef.current.scrollHeight);
281
- }
282
- }
283
- }, [
284
- generateTestContent,
285
- steps
286
- ]);
287
- useEffect(()=>{
288
- const removeUpdateListener = editor.registerUpdateListener(({ dirtyElements, dirtyLeaves, editorState })=>{
289
- if (!isRecording) {
290
- return;
291
- }
292
- const currentSelection = editorState._selection;
293
- const previousSelection = previousSelectionRef.current;
294
- const skipNextSelectionChange = skipNextSelectionChangeRef.current;
295
- if (previousSelection !== currentSelection) {
296
- if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {
297
- const browserSelection = window.getSelection();
298
- if (browserSelection && (browserSelection.anchorNode == null || browserSelection.focusNode == null)) {
299
- return;
300
- }
301
- }
302
- previousSelectionRef.current = currentSelection;
303
- }
304
- skipNextSelectionChangeRef.current = false;
305
- const testContent = generateTestContent();
306
- if (testContent !== null) {
307
- setTemplatedTest(testContent);
308
- }
309
- });
310
- return removeUpdateListener;
311
- }, [
312
- editor,
313
- generateTestContent,
314
- isRecording,
315
- pushStep
316
- ]);
317
- // save innerHTML
318
- useEffect(()=>{
213
+ return [...currentSteps, {
214
+ name,
215
+ count: 1,
216
+ value
217
+ }];
218
+ });
219
+ };
220
+ $[6] = steps;
221
+ $[7] = t3;
222
+ } else {
223
+ t3 = $[7];
224
+ }
225
+ const pushStep = t3;
226
+ let t4;
227
+ let t5;
228
+ if ($[8] !== isRecording || $[9] !== pushStep || $[10] !== editor) {
229
+ t4 = () => {
230
+ const onKeyDown = event => {
319
231
  if (!isRecording) {
320
- return;
232
+ return;
321
233
  }
322
- const removeUpdateListener = editor.registerUpdateListener(()=>{
323
- const rootElement = editor.getRootElement();
324
- if (rootElement !== null) {
325
- setCurrentInnerHTML(rootElement?.innerHTML);
234
+ const key = event.key;
235
+ if (isSelectAll(event)) {
236
+ pushStep("selectAll", "");
237
+ } else {
238
+ if (keyPresses.has(key)) {
239
+ pushStep("press", event.key);
240
+ } else {
241
+ if ([...key].length > 1) {
242
+ pushStep("keydown", event.key);
243
+ } else {
244
+ pushStep("type", event.key);
326
245
  }
327
- });
328
- return removeUpdateListener;
329
- }, [
330
- editor,
331
- isRecording
332
- ]);
333
- // clear editor and start recording
334
- const toggleEditorSelection = useCallback((currentEditor)=>{
246
+ }
247
+ }
248
+ };
249
+ const onKeyUp = event_0 => {
335
250
  if (!isRecording) {
336
- currentEditor.update(()=>{
337
- const root = $getRoot();
338
- root.clear();
339
- const text = $createTextNode();
340
- root.append($createParagraphNode().append(text));
341
- text.select();
342
- });
343
- setSteps([]);
251
+ return;
252
+ }
253
+ const key_0 = event_0.key;
254
+ if (!keyPresses.has(key_0) && [...key_0].length > 1) {
255
+ pushStep("keyup", event_0.key);
344
256
  }
345
- setIsRecording((currentIsRecording)=>!currentIsRecording);
346
- }, [
347
- isRecording
348
- ]);
349
- const onSnapshotClick = useCallback(()=>{
257
+ };
258
+ return editor.registerRootListener((rootElement_0, prevRootElement) => {
259
+ if (prevRootElement !== null) {
260
+ prevRootElement.removeEventListener("keydown", onKeyDown);
261
+ prevRootElement.removeEventListener("keyup", onKeyUp);
262
+ }
263
+ if (rootElement_0 !== null) {
264
+ rootElement_0.addEventListener("keydown", onKeyDown);
265
+ rootElement_0.addEventListener("keyup", onKeyUp);
266
+ }
267
+ });
268
+ };
269
+ t5 = [editor, isRecording, pushStep];
270
+ $[8] = isRecording;
271
+ $[9] = pushStep;
272
+ $[10] = editor;
273
+ $[11] = t4;
274
+ $[12] = t5;
275
+ } else {
276
+ t4 = $[11];
277
+ t5 = $[12];
278
+ }
279
+ useLayoutEffect(t4, t5);
280
+ let t6;
281
+ if ($[13] !== generateTestContent) {
282
+ t6 = [generateTestContent];
283
+ $[13] = generateTestContent;
284
+ $[14] = t6;
285
+ } else {
286
+ t6 = $[14];
287
+ }
288
+ useLayoutEffect(() => {
289
+ if (preRef.current) {
290
+ preRef.current.scrollTo(0, preRef.current.scrollHeight);
291
+ }
292
+ }, t6);
293
+ let t7;
294
+ if ($[15] !== generateTestContent || $[16] !== steps) {
295
+ t7 = [generateTestContent, steps];
296
+ $[15] = generateTestContent;
297
+ $[16] = steps;
298
+ $[17] = t7;
299
+ } else {
300
+ t7 = $[17];
301
+ }
302
+ useEffect(() => {
303
+ if (steps) {
304
+ const testContent = generateTestContent();
305
+ if (testContent !== null) {
306
+ setTemplatedTest(testContent);
307
+ }
308
+ if (preRef.current) {
309
+ preRef.current.scrollTo(0, preRef.current.scrollHeight);
310
+ }
311
+ }
312
+ }, t7);
313
+ let t8;
314
+ if ($[18] !== editor || $[19] !== isRecording || $[20] !== generateTestContent) {
315
+ t8 = () => {
316
+ const removeUpdateListener = editor.registerUpdateListener(t9 => {
317
+ const {
318
+ dirtyElements,
319
+ dirtyLeaves,
320
+ editorState
321
+ } = t9;
350
322
  if (!isRecording) {
351
- return;
323
+ return;
352
324
  }
353
- const browserSelection = window.getSelection();
354
- if (browserSelection === null || browserSelection.anchorNode == null || browserSelection.focusNode == null) {
355
- return;
325
+ const currentSelection = editorState._selection;
326
+ const previousSelection = previousSelectionRef.current;
327
+ const skipNextSelectionChange = skipNextSelectionChangeRef.current;
328
+ if (previousSelection !== currentSelection) {
329
+ if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {
330
+ const browserSelection_0 = window.getSelection();
331
+ if (browserSelection_0 && (browserSelection_0.anchorNode == null || browserSelection_0.focusNode == null)) {
332
+ return;
333
+ }
334
+ }
335
+ previousSelectionRef.current = currentSelection;
356
336
  }
357
- const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection);
358
- const rootElement = getCurrentEditor().getRootElement();
359
- let anchorPath;
360
- if (anchorNode !== null) {
361
- anchorPath = getPathFromNodeToEditor(anchorNode, rootElement);
337
+ skipNextSelectionChangeRef.current = false;
338
+ const testContent_0 = generateTestContent();
339
+ if (testContent_0 !== null) {
340
+ setTemplatedTest(testContent_0);
362
341
  }
363
- let focusPath;
364
- if (focusNode !== null) {
365
- focusPath = getPathFromNodeToEditor(focusNode, rootElement);
342
+ });
343
+ return removeUpdateListener;
344
+ };
345
+ $[18] = editor;
346
+ $[19] = isRecording;
347
+ $[20] = generateTestContent;
348
+ $[21] = t8;
349
+ } else {
350
+ t8 = $[21];
351
+ }
352
+ let t9;
353
+ if ($[22] !== editor || $[23] !== generateTestContent || $[24] !== isRecording || $[25] !== pushStep) {
354
+ t9 = [editor, generateTestContent, isRecording, pushStep];
355
+ $[22] = editor;
356
+ $[23] = generateTestContent;
357
+ $[24] = isRecording;
358
+ $[25] = pushStep;
359
+ $[26] = t9;
360
+ } else {
361
+ t9 = $[26];
362
+ }
363
+ useEffect(t8, t9);
364
+ let t10;
365
+ if ($[27] !== isRecording || $[28] !== editor || $[29] !== setCurrentInnerHTML) {
366
+ t10 = () => {
367
+ if (!isRecording) {
368
+ return;
369
+ }
370
+ const removeUpdateListener_0 = editor.registerUpdateListener(() => {
371
+ const rootElement_1 = editor.getRootElement();
372
+ if (rootElement_1 !== null) {
373
+ setCurrentInnerHTML(rootElement_1?.innerHTML);
366
374
  }
367
- pushStep('snapshot', {
368
- anchorNode,
369
- anchorOffset,
370
- anchorPath,
371
- focusNode,
372
- focusOffset,
373
- focusPath
375
+ });
376
+ return removeUpdateListener_0;
377
+ };
378
+ $[27] = isRecording;
379
+ $[28] = editor;
380
+ $[29] = setCurrentInnerHTML;
381
+ $[30] = t10;
382
+ } else {
383
+ t10 = $[30];
384
+ }
385
+ let t11;
386
+ if ($[31] !== editor || $[32] !== isRecording) {
387
+ t11 = [editor, isRecording];
388
+ $[31] = editor;
389
+ $[32] = isRecording;
390
+ $[33] = t11;
391
+ } else {
392
+ t11 = $[33];
393
+ }
394
+ useEffect(t10, t11);
395
+ let t12;
396
+ if ($[34] !== isRecording) {
397
+ t12 = currentEditor => {
398
+ if (!isRecording) {
399
+ currentEditor.update(() => {
400
+ const root = $getRoot();
401
+ root.clear();
402
+ const text = $createTextNode();
403
+ root.append($createParagraphNode().append(text));
404
+ text.select();
374
405
  });
375
- }, [
376
- pushStep,
377
- isRecording,
378
- getCurrentEditor
379
- ]);
380
- const onCopyClick = useCallback(()=>{
381
- copy(generateTestContent());
382
- }, [
383
- generateTestContent
384
- ]);
385
- const onDownloadClick = useCallback(()=>{
386
- download('test.js', generateTestContent());
387
- }, [
388
- generateTestContent
389
- ]);
390
- const button = /*#__PURE__*/ _jsx("button", {
391
- className: `editor-dev-button ${isRecording ? 'active' : ''}`,
392
- id: "test-recorder-button",
393
- onClick: (e)=>{
394
- toggleEditorSelection(getCurrentEditor());
395
- e.preventDefault();
406
+ setSteps([]);
407
+ }
408
+ setIsRecording(currentIsRecording => !currentIsRecording);
409
+ };
410
+ $[34] = isRecording;
411
+ $[35] = t12;
412
+ } else {
413
+ t12 = $[35];
414
+ }
415
+ const toggleEditorSelection = t12;
416
+ let t13;
417
+ if ($[36] !== isRecording || $[37] !== getCurrentEditor || $[38] !== pushStep) {
418
+ t13 = () => {
419
+ if (!isRecording) {
420
+ return;
421
+ }
422
+ const browserSelection_1 = window.getSelection();
423
+ if (browserSelection_1 === null || browserSelection_1.anchorNode == null || browserSelection_1.focusNode == null) {
424
+ return;
425
+ }
426
+ const {
427
+ anchorNode,
428
+ anchorOffset,
429
+ focusNode,
430
+ focusOffset
431
+ } = sanitizeSelection(browserSelection_1);
432
+ const rootElement_2 = getCurrentEditor().getRootElement();
433
+ let anchorPath;
434
+ if (anchorNode !== null) {
435
+ anchorPath = getPathFromNodeToEditor(anchorNode, rootElement_2);
436
+ }
437
+ let focusPath;
438
+ if (focusNode !== null) {
439
+ focusPath = getPathFromNodeToEditor(focusNode, rootElement_2);
440
+ }
441
+ pushStep("snapshot", {
442
+ anchorNode,
443
+ anchorOffset,
444
+ anchorPath,
445
+ focusNode,
446
+ focusOffset,
447
+ focusPath
448
+ });
449
+ };
450
+ $[36] = isRecording;
451
+ $[37] = getCurrentEditor;
452
+ $[38] = pushStep;
453
+ $[39] = t13;
454
+ } else {
455
+ t13 = $[39];
456
+ }
457
+ const onSnapshotClick = t13;
458
+ let t14;
459
+ if ($[40] !== generateTestContent) {
460
+ t14 = () => {
461
+ copy(generateTestContent());
462
+ };
463
+ $[40] = generateTestContent;
464
+ $[41] = t14;
465
+ } else {
466
+ t14 = $[41];
467
+ }
468
+ const onCopyClick = t14;
469
+ let t15;
470
+ if ($[42] !== generateTestContent) {
471
+ t15 = () => {
472
+ download("test.js", generateTestContent());
473
+ };
474
+ $[42] = generateTestContent;
475
+ $[43] = t15;
476
+ } else {
477
+ t15 = $[43];
478
+ }
479
+ const onDownloadClick = t15;
480
+ const t16 = `editor-dev-button ${isRecording ? "active" : ""}`;
481
+ let t17;
482
+ if ($[44] !== toggleEditorSelection || $[45] !== getCurrentEditor) {
483
+ t17 = e => {
484
+ toggleEditorSelection(getCurrentEditor());
485
+ e.preventDefault();
486
+ };
487
+ $[44] = toggleEditorSelection;
488
+ $[45] = getCurrentEditor;
489
+ $[46] = t17;
490
+ } else {
491
+ t17 = $[46];
492
+ }
493
+ const t18 = isRecording ? "Disable test recorder" : "Enable test recorder";
494
+ const t19 = isRecording ? "Disable test recorder" : "Enable test recorder";
495
+ let t20;
496
+ if ($[47] !== t16 || $[48] !== t17 || $[49] !== t18 || $[50] !== t19) {
497
+ t20 = _jsx("button", {
498
+ className: t16,
499
+ id: "test-recorder-button",
500
+ onClick: t17,
501
+ title: t18,
502
+ type: "button",
503
+ children: t19
504
+ });
505
+ $[47] = t16;
506
+ $[48] = t17;
507
+ $[49] = t18;
508
+ $[50] = t19;
509
+ $[51] = t20;
510
+ } else {
511
+ t20 = $[51];
512
+ }
513
+ const button = t20;
514
+ const output = isRecording ? _jsxs("div", {
515
+ className: "test-recorder-output",
516
+ children: [_jsxs("div", {
517
+ className: "test-recorder-toolbar",
518
+ children: [_jsx("button", {
519
+ className: "test-recorder-button",
520
+ id: "test-recorder-button-snapshot",
521
+ onClick: e_0 => {
522
+ onSnapshotClick();
523
+ e_0.preventDefault();
396
524
  },
397
- title: isRecording ? 'Disable test recorder' : 'Enable test recorder',
525
+ title: "Insert snapshot",
398
526
  type: "button",
399
- children: isRecording ? 'Disable test recorder' : 'Enable test recorder'
400
- });
401
- const output = isRecording ? /*#__PURE__*/ _jsxs("div", {
402
- className: "test-recorder-output",
403
- children: [
404
- /*#__PURE__*/ _jsxs("div", {
405
- className: "test-recorder-toolbar",
406
- children: [
407
- /*#__PURE__*/ _jsx("button", {
408
- className: "test-recorder-button",
409
- id: "test-recorder-button-snapshot",
410
- onClick: (e)=>{
411
- onSnapshotClick();
412
- e.preventDefault();
413
- },
414
- title: "Insert snapshot",
415
- type: "button",
416
- children: "Insert Snapshot"
417
- }),
418
- /*#__PURE__*/ _jsx("button", {
419
- className: "test-recorder-button",
420
- id: "test-recorder-button-copy",
421
- onClick: (e)=>{
422
- onCopyClick();
423
- e.preventDefault();
424
- },
425
- title: "Copy to clipboard",
426
- type: "button",
427
- children: "Copy"
428
- }),
429
- /*#__PURE__*/ _jsx("button", {
430
- className: "test-recorder-button",
431
- id: "test-recorder-button-download",
432
- onClick: (e)=>{
433
- onDownloadClick();
434
- e.preventDefault();
435
- },
436
- title: "Download as a file",
437
- type: "button",
438
- children: "Download"
439
- })
440
- ]
441
- }),
442
- /*#__PURE__*/ _jsx("pre", {
443
- id: "test-recorder",
444
- ref: preRef,
445
- children: templatedTest
446
- })
447
- ]
448
- }) : null;
449
- return [
450
- button,
451
- output
452
- ];
527
+ children: "Insert Snapshot"
528
+ }), _jsx("button", {
529
+ className: "test-recorder-button",
530
+ id: "test-recorder-button-copy",
531
+ onClick: e_1 => {
532
+ onCopyClick();
533
+ e_1.preventDefault();
534
+ },
535
+ title: "Copy to clipboard",
536
+ type: "button",
537
+ children: "Copy"
538
+ }), _jsx("button", {
539
+ className: "test-recorder-button",
540
+ id: "test-recorder-button-download",
541
+ onClick: e_2 => {
542
+ onDownloadClick();
543
+ e_2.preventDefault();
544
+ },
545
+ title: "Download as a file",
546
+ type: "button",
547
+ children: "Download"
548
+ })]
549
+ }), _jsx("pre", {
550
+ id: "test-recorder",
551
+ ref: preRef,
552
+ children: templatedTest
553
+ })]
554
+ }) : null;
555
+ let t21;
556
+ if ($[52] !== button || $[53] !== output) {
557
+ t21 = [button, output];
558
+ $[52] = button;
559
+ $[53] = output;
560
+ $[54] = t21;
561
+ } else {
562
+ t21 = $[54];
563
+ }
564
+ return t21;
453
565
  }
454
- export const TestRecorderPlugin = ()=>{
455
- const [editor] = useLexicalComposerContext();
456
- const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor);
457
- return /*#__PURE__*/ _jsxs(React.Fragment, {
458
- children: [
459
- /*#__PURE__*/ _jsx("p", {
460
- children: "HI"
461
- }),
462
- testRecorderButton,
463
- testRecorderOutput,
464
- /*#__PURE__*/ _jsx("p", {
465
- children: "DONE"
466
- })
467
- ]
566
+ export const TestRecorderPlugin = () => {
567
+ const $ = _c(3);
568
+ const [editor] = useLexicalComposerContext();
569
+ const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor);
570
+ let t0;
571
+ if ($[0] !== testRecorderButton || $[1] !== testRecorderOutput) {
572
+ t0 = _jsxs(React.Fragment, {
573
+ children: [_jsx("p", {
574
+ children: "HI"
575
+ }), testRecorderButton, testRecorderOutput, _jsx("p", {
576
+ children: "DONE"
577
+ })]
468
578
  });
579
+ $[0] = testRecorderButton;
580
+ $[1] = testRecorderOutput;
581
+ $[2] = t0;
582
+ } else {
583
+ t0 = $[2];
584
+ }
585
+ return t0;
469
586
  };
470
-
471
587
  //# sourceMappingURL=index.js.map