@atlaskit/editor-core 182.1.1 → 182.2.0

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 (417) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/actions/index.js +90 -98
  3. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +4 -0
  4. package/dist/cjs/create-editor/ErrorBoundary.js +86 -93
  5. package/dist/cjs/create-editor/ReactEditorViewInternal.js +8 -6
  6. package/dist/cjs/editor-next/index.js +5 -6
  7. package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +34 -37
  8. package/dist/cjs/editor-next/utils/trackEditorActions.js +48 -51
  9. package/dist/cjs/editor.js +29 -34
  10. package/dist/cjs/i18n/cs.js +34 -6
  11. package/dist/cjs/i18n/da.js +34 -6
  12. package/dist/cjs/i18n/de.js +34 -7
  13. package/dist/cjs/i18n/en.js +31 -4
  14. package/dist/cjs/i18n/en_GB.js +34 -7
  15. package/dist/cjs/i18n/en_ZZ.js +35 -8
  16. package/dist/cjs/i18n/es.js +33 -6
  17. package/dist/cjs/i18n/fi.js +33 -6
  18. package/dist/cjs/i18n/fr.js +34 -7
  19. package/dist/cjs/i18n/hu.js +33 -6
  20. package/dist/cjs/i18n/it.js +34 -7
  21. package/dist/cjs/i18n/ja.js +33 -6
  22. package/dist/cjs/i18n/ko.js +33 -6
  23. package/dist/cjs/i18n/nb.js +35 -8
  24. package/dist/cjs/i18n/nl.js +34 -7
  25. package/dist/cjs/i18n/pl.js +34 -7
  26. package/dist/cjs/i18n/pt_BR.js +34 -7
  27. package/dist/cjs/i18n/ru.js +34 -7
  28. package/dist/cjs/i18n/sv.js +33 -6
  29. package/dist/cjs/i18n/th.js +34 -7
  30. package/dist/cjs/i18n/tr.js +33 -6
  31. package/dist/cjs/i18n/uk.js +34 -7
  32. package/dist/cjs/i18n/vi.js +35 -8
  33. package/dist/cjs/i18n/zh.js +33 -4
  34. package/dist/cjs/i18n/zh_TW.js +33 -6
  35. package/dist/cjs/labs/CollapsedEditor/index.js +1 -1
  36. package/dist/cjs/plugins/analytics/plugin.js +1 -1
  37. package/dist/cjs/plugins/analytics/utils.js +2 -0
  38. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +39 -44
  39. package/dist/cjs/plugins/annotation/pm-plugins/types.js +4 -4
  40. package/dist/cjs/plugins/annotation/types.js +4 -4
  41. package/dist/cjs/plugins/base/pm-plugins/decoration.js +4 -4
  42. package/dist/cjs/plugins/block-type/commands/block-type.js +1 -1
  43. package/dist/cjs/plugins/card/nodeviews/embedCard.js +5 -6
  44. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +3 -4
  45. package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +16 -1
  46. package/dist/cjs/plugins/collab-edit/index.js +29 -32
  47. package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -4
  48. package/dist/cjs/plugins/custom-autoformat/doc.js +28 -31
  49. package/dist/cjs/plugins/custom-autoformat/index.js +20 -23
  50. package/dist/cjs/plugins/date/index.js +1 -1
  51. package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
  52. package/dist/cjs/plugins/date/utils/internal.js +1 -1
  53. package/dist/cjs/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
  54. package/dist/cjs/plugins/extension/actions.js +36 -39
  55. package/dist/cjs/plugins/extension/context-panel.js +123 -130
  56. package/dist/cjs/plugins/extension/pm-plugins/main.js +82 -89
  57. package/dist/cjs/plugins/extension/pm-plugins/utils.js +46 -51
  58. package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +44 -48
  59. package/dist/cjs/plugins/feedback-dialog/index.js +52 -57
  60. package/dist/cjs/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
  61. package/dist/cjs/plugins/find-replace/actions.js +4 -4
  62. package/dist/cjs/plugins/find-replace/utils/batch-decorations.js +144 -153
  63. package/dist/cjs/plugins/find-replace/utils/index.js +2 -2
  64. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -46
  65. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -1
  66. package/dist/cjs/plugins/floating-toolbar/ui/ToolbarLoader.js +2 -1
  67. package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +86 -86
  68. package/dist/cjs/plugins/help-dialog/ui/HelpDialogLoader.js +2 -1
  69. package/dist/cjs/plugins/history/actions.js +4 -4
  70. package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -82
  71. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
  72. package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +16 -16
  73. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -352
  74. package/dist/cjs/plugins/hyperlink/utils.js +3 -0
  75. package/dist/cjs/plugins/image-upload/pm-plugins/main.js +24 -27
  76. package/dist/cjs/plugins/list/utils/node.js +4 -4
  77. package/dist/cjs/plugins/macro/actions.js +107 -112
  78. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +43 -46
  79. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +62 -66
  80. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
  81. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +38 -42
  82. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +108 -113
  83. package/dist/cjs/plugins/media/picker-facade.js +22 -25
  84. package/dist/cjs/plugins/media/pm-plugins/linking/actions.js +4 -4
  85. package/dist/cjs/plugins/media/pm-plugins/main.js +159 -172
  86. package/dist/cjs/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
  87. package/dist/cjs/plugins/media/toolbar/index.js +3 -0
  88. package/dist/cjs/plugins/media/toolbar/utils.js +30 -33
  89. package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -1
  90. package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +1 -1
  91. package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
  92. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
  93. package/dist/cjs/plugins/media/utils/check-media-type.js +37 -40
  94. package/dist/cjs/plugins/mentions/nodeviews/mention.js +29 -31
  95. package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -1
  96. package/dist/cjs/plugins/mobile-dimensions/actions.js +4 -4
  97. package/dist/cjs/plugins/paste/actions.js +4 -4
  98. package/dist/cjs/plugins/paste/handlers.js +23 -26
  99. package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -0
  100. package/dist/cjs/plugins/paste/md.js +3 -0
  101. package/dist/cjs/plugins/paste/newline-md-plugin.js +3 -0
  102. package/dist/cjs/plugins/paste/paragraph-md-plugin.js +3 -0
  103. package/dist/cjs/plugins/paste/pm-plugins/main.js +25 -27
  104. package/dist/cjs/plugins/quick-insert/assets/index.js +63 -39
  105. package/dist/cjs/plugins/quick-insert/index.js +30 -33
  106. package/dist/cjs/plugins/selection/actions.js +4 -4
  107. package/dist/cjs/plugins/selection/gap-cursor/direction.js +4 -4
  108. package/dist/cjs/plugins/selection/types.js +4 -4
  109. package/dist/cjs/plugins/status/ui/statusPicker.js +7 -8
  110. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
  111. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/commands.js +16 -6
  112. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +12 -20
  113. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
  114. package/dist/cjs/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -42
  115. package/dist/cjs/plugins/tasks-and-decisions/utils.js +31 -2
  116. package/dist/cjs/plugins/text-color/pm-plugins/main.js +4 -4
  117. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
  118. package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +4 -4
  119. package/dist/cjs/plugins/type-ahead/constants.js +4 -4
  120. package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +4 -4
  121. package/dist/cjs/plugins/undo-redo/enums.js +4 -4
  122. package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -3
  123. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -2
  124. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  125. package/dist/cjs/ui/ColorPickerButton/index.js +3 -2
  126. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +68 -73
  127. package/dist/cjs/ui/ConfigPanel/ConfigPanelLoader.js +2 -1
  128. package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +54 -56
  129. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +51 -55
  130. package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +24 -27
  131. package/dist/cjs/ui/ConfigPanel/transformers.js +344 -363
  132. package/dist/cjs/ui/ConfigPanel/types.js +8 -8
  133. package/dist/cjs/ui/Dropdown/index.js +2 -1
  134. package/dist/cjs/ui/DropdownMenu/index.js +2 -1
  135. package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +1 -1
  136. package/dist/cjs/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +4 -4
  137. package/dist/cjs/ui/ElementBrowser/types.js +4 -4
  138. package/dist/cjs/ui/LinkSearch/index.js +94 -101
  139. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +19 -2
  140. package/dist/cjs/ui/ToolbarFeedback/index.js +27 -31
  141. package/dist/cjs/utils/action.js +31 -36
  142. package/dist/cjs/utils/clipboard.js +82 -86
  143. package/dist/cjs/utils/deprecation-warnings.js +1 -1
  144. package/dist/cjs/utils/extensions.js +62 -67
  145. package/dist/cjs/utils/insert.js +4 -4
  146. package/dist/cjs/utils/mark.js +2 -2
  147. package/dist/cjs/utils/performance/simple-measure-to-entries.js +1 -2
  148. package/dist/cjs/utils/performance/track-transactions.js +3 -2
  149. package/dist/cjs/version-wrapper.js +1 -1
  150. package/dist/cjs/version.json +1 -1
  151. package/dist/es2019/actions/index.js +8 -9
  152. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +4 -0
  153. package/dist/es2019/create-editor/ReactEditorViewInternal.js +5 -3
  154. package/dist/es2019/editor-next/index.js +5 -6
  155. package/dist/es2019/editor.js +29 -36
  156. package/dist/es2019/i18n/cs.js +34 -6
  157. package/dist/es2019/i18n/da.js +34 -6
  158. package/dist/es2019/i18n/de.js +34 -7
  159. package/dist/es2019/i18n/en.js +31 -4
  160. package/dist/es2019/i18n/en_GB.js +34 -7
  161. package/dist/es2019/i18n/en_ZZ.js +35 -8
  162. package/dist/es2019/i18n/es.js +33 -6
  163. package/dist/es2019/i18n/fi.js +33 -6
  164. package/dist/es2019/i18n/fr.js +34 -7
  165. package/dist/es2019/i18n/hu.js +33 -6
  166. package/dist/es2019/i18n/it.js +34 -7
  167. package/dist/es2019/i18n/ja.js +33 -6
  168. package/dist/es2019/i18n/ko.js +33 -6
  169. package/dist/es2019/i18n/nb.js +35 -8
  170. package/dist/es2019/i18n/nl.js +34 -7
  171. package/dist/es2019/i18n/pl.js +34 -7
  172. package/dist/es2019/i18n/pt_BR.js +34 -7
  173. package/dist/es2019/i18n/ru.js +34 -7
  174. package/dist/es2019/i18n/sv.js +33 -6
  175. package/dist/es2019/i18n/th.js +34 -7
  176. package/dist/es2019/i18n/tr.js +33 -6
  177. package/dist/es2019/i18n/uk.js +34 -7
  178. package/dist/es2019/i18n/vi.js +35 -8
  179. package/dist/es2019/i18n/zh.js +33 -4
  180. package/dist/es2019/i18n/zh_TW.js +33 -6
  181. package/dist/es2019/plugins/analytics/utils.js +2 -0
  182. package/dist/es2019/plugins/annotation/pm-plugins/types.js +3 -3
  183. package/dist/es2019/plugins/annotation/types.js +3 -3
  184. package/dist/es2019/plugins/base/pm-plugins/decoration.js +3 -3
  185. package/dist/es2019/plugins/card/nodeviews/embedCard.js +5 -7
  186. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +3 -5
  187. package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
  188. package/dist/es2019/plugins/collab-edit/plugin-state.js +1 -2
  189. package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +7 -11
  190. package/dist/es2019/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
  191. package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +8 -12
  192. package/dist/es2019/plugins/find-replace/actions.js +3 -3
  193. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -1
  194. package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +56 -71
  195. package/dist/es2019/plugins/history/actions.js +3 -3
  196. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
  197. package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +6 -6
  198. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
  199. package/dist/es2019/plugins/hyperlink/utils.js +3 -0
  200. package/dist/es2019/plugins/list/utils/node.js +3 -3
  201. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +4 -8
  202. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -3
  203. package/dist/es2019/plugins/media/pm-plugins/linking/actions.js +3 -3
  204. package/dist/es2019/plugins/media/pm-plugins/main.js +22 -31
  205. package/dist/es2019/plugins/media/toolbar/index.js +3 -0
  206. package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -1
  207. package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +1 -1
  208. package/dist/es2019/plugins/mobile-dimensions/actions.js +3 -3
  209. package/dist/es2019/plugins/paste/actions.js +3 -3
  210. package/dist/es2019/plugins/paste/linkify-md-plugin.js +3 -0
  211. package/dist/es2019/plugins/paste/md.js +3 -0
  212. package/dist/es2019/plugins/paste/newline-md-plugin.js +3 -0
  213. package/dist/es2019/plugins/paste/paragraph-md-plugin.js +3 -0
  214. package/dist/es2019/plugins/selection/actions.js +3 -3
  215. package/dist/es2019/plugins/selection/gap-cursor/direction.js +3 -3
  216. package/dist/es2019/plugins/selection/types.js +3 -3
  217. package/dist/es2019/plugins/status/ui/statusPicker.js +6 -7
  218. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -11
  219. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/commands.js +15 -3
  220. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +6 -16
  221. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
  222. package/dist/es2019/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +6 -5
  223. package/dist/es2019/plugins/tasks-and-decisions/utils.js +30 -0
  224. package/dist/es2019/plugins/text-color/pm-plugins/main.js +3 -3
  225. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
  226. package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +3 -3
  227. package/dist/es2019/plugins/type-ahead/constants.js +3 -3
  228. package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +3 -3
  229. package/dist/es2019/plugins/undo-redo/enums.js +3 -3
  230. package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -3
  231. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -2
  232. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  233. package/dist/es2019/ui/ColorPickerButton/index.js +5 -3
  234. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +3 -4
  235. package/dist/es2019/ui/ConfigPanel/types.js +6 -6
  236. package/dist/es2019/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
  237. package/dist/es2019/ui/ElementBrowser/types.js +3 -3
  238. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
  239. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -3
  240. package/dist/es2019/utils/insert.js +3 -3
  241. package/dist/es2019/utils/performance/simple-measure-to-entries.js +1 -1
  242. package/dist/es2019/utils/performance/track-transactions.js +3 -2
  243. package/dist/es2019/version-wrapper.js +1 -1
  244. package/dist/es2019/version.json +1 -1
  245. package/dist/esm/actions/index.js +90 -98
  246. package/dist/esm/analytics-api/attach-payload-into-transaction.js +4 -0
  247. package/dist/esm/create-editor/ErrorBoundary.js +86 -93
  248. package/dist/esm/create-editor/ReactEditorViewInternal.js +6 -5
  249. package/dist/esm/editor-next/index.js +5 -6
  250. package/dist/esm/editor-next/utils/sendDurationAnalytics.js +34 -37
  251. package/dist/esm/editor-next/utils/trackEditorActions.js +48 -51
  252. package/dist/esm/editor.js +29 -34
  253. package/dist/esm/i18n/cs.js +34 -6
  254. package/dist/esm/i18n/da.js +34 -6
  255. package/dist/esm/i18n/de.js +34 -7
  256. package/dist/esm/i18n/en.js +31 -4
  257. package/dist/esm/i18n/en_GB.js +34 -7
  258. package/dist/esm/i18n/en_ZZ.js +35 -8
  259. package/dist/esm/i18n/es.js +33 -6
  260. package/dist/esm/i18n/fi.js +33 -6
  261. package/dist/esm/i18n/fr.js +34 -7
  262. package/dist/esm/i18n/hu.js +33 -6
  263. package/dist/esm/i18n/it.js +34 -7
  264. package/dist/esm/i18n/ja.js +33 -6
  265. package/dist/esm/i18n/ko.js +33 -6
  266. package/dist/esm/i18n/nb.js +35 -8
  267. package/dist/esm/i18n/nl.js +34 -7
  268. package/dist/esm/i18n/pl.js +34 -7
  269. package/dist/esm/i18n/pt_BR.js +34 -7
  270. package/dist/esm/i18n/ru.js +34 -7
  271. package/dist/esm/i18n/sv.js +33 -6
  272. package/dist/esm/i18n/th.js +34 -7
  273. package/dist/esm/i18n/tr.js +33 -6
  274. package/dist/esm/i18n/uk.js +34 -7
  275. package/dist/esm/i18n/vi.js +35 -8
  276. package/dist/esm/i18n/zh.js +33 -4
  277. package/dist/esm/i18n/zh_TW.js +33 -6
  278. package/dist/esm/plugins/analytics/plugin.js +1 -1
  279. package/dist/esm/plugins/analytics/utils.js +2 -0
  280. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +39 -44
  281. package/dist/esm/plugins/annotation/pm-plugins/types.js +3 -3
  282. package/dist/esm/plugins/annotation/types.js +3 -3
  283. package/dist/esm/plugins/base/pm-plugins/decoration.js +3 -3
  284. package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
  285. package/dist/esm/plugins/card/nodeviews/embedCard.js +5 -6
  286. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +3 -4
  287. package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
  288. package/dist/esm/plugins/collab-edit/index.js +29 -32
  289. package/dist/esm/plugins/collab-edit/plugin-state.js +2 -4
  290. package/dist/esm/plugins/custom-autoformat/doc.js +28 -31
  291. package/dist/esm/plugins/custom-autoformat/index.js +20 -23
  292. package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
  293. package/dist/esm/plugins/date/utils/internal.js +1 -1
  294. package/dist/esm/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
  295. package/dist/esm/plugins/extension/actions.js +36 -39
  296. package/dist/esm/plugins/extension/context-panel.js +123 -129
  297. package/dist/esm/plugins/extension/pm-plugins/main.js +82 -88
  298. package/dist/esm/plugins/extension/pm-plugins/utils.js +46 -51
  299. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +44 -49
  300. package/dist/esm/plugins/feedback-dialog/index.js +52 -57
  301. package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
  302. package/dist/esm/plugins/find-replace/actions.js +3 -3
  303. package/dist/esm/plugins/find-replace/utils/batch-decorations.js +144 -153
  304. package/dist/esm/plugins/find-replace/utils/index.js +2 -2
  305. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -47
  306. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -1
  307. package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +78 -76
  308. package/dist/esm/plugins/history/actions.js +3 -3
  309. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -83
  310. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
  311. package/dist/esm/plugins/hyperlink/pm-plugins/main.js +14 -14
  312. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -353
  313. package/dist/esm/plugins/hyperlink/utils.js +3 -0
  314. package/dist/esm/plugins/image-upload/pm-plugins/main.js +24 -27
  315. package/dist/esm/plugins/list/utils/node.js +3 -3
  316. package/dist/esm/plugins/macro/actions.js +107 -112
  317. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +43 -46
  318. package/dist/esm/plugins/media/nodeviews/mediaInline.js +62 -67
  319. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
  320. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +38 -43
  321. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +108 -114
  322. package/dist/esm/plugins/media/picker-facade.js +22 -25
  323. package/dist/esm/plugins/media/pm-plugins/linking/actions.js +3 -3
  324. package/dist/esm/plugins/media/pm-plugins/main.js +159 -173
  325. package/dist/esm/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
  326. package/dist/esm/plugins/media/toolbar/index.js +3 -0
  327. package/dist/esm/plugins/media/toolbar/utils.js +30 -33
  328. package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -1
  329. package/dist/esm/plugins/media/ui/ImageBorder/styles.js +1 -1
  330. package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
  331. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
  332. package/dist/esm/plugins/media/utils/check-media-type.js +37 -40
  333. package/dist/esm/plugins/mentions/nodeviews/mention.js +29 -32
  334. package/dist/esm/plugins/mentions/type-ahead/index.js +1 -1
  335. package/dist/esm/plugins/mobile-dimensions/actions.js +3 -3
  336. package/dist/esm/plugins/paste/actions.js +3 -3
  337. package/dist/esm/plugins/paste/handlers.js +23 -26
  338. package/dist/esm/plugins/paste/linkify-md-plugin.js +3 -0
  339. package/dist/esm/plugins/paste/md.js +3 -0
  340. package/dist/esm/plugins/paste/newline-md-plugin.js +3 -0
  341. package/dist/esm/plugins/paste/paragraph-md-plugin.js +3 -0
  342. package/dist/esm/plugins/paste/pm-plugins/main.js +25 -28
  343. package/dist/esm/plugins/quick-insert/index.js +30 -33
  344. package/dist/esm/plugins/selection/actions.js +3 -3
  345. package/dist/esm/plugins/selection/gap-cursor/direction.js +3 -3
  346. package/dist/esm/plugins/selection/types.js +3 -3
  347. package/dist/esm/plugins/status/ui/statusPicker.js +6 -7
  348. package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
  349. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/commands.js +17 -7
  350. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +13 -21
  351. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
  352. package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -43
  353. package/dist/esm/plugins/tasks-and-decisions/utils.js +28 -0
  354. package/dist/esm/plugins/text-color/pm-plugins/main.js +3 -3
  355. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
  356. package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +3 -3
  357. package/dist/esm/plugins/type-ahead/constants.js +3 -3
  358. package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +3 -3
  359. package/dist/esm/plugins/undo-redo/enums.js +3 -3
  360. package/dist/esm/ui/Appearance/Comment/Comment.js +3 -3
  361. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -2
  362. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  363. package/dist/esm/ui/ColorPickerButton/index.js +3 -2
  364. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +68 -74
  365. package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +54 -57
  366. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +51 -56
  367. package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +24 -27
  368. package/dist/esm/ui/ConfigPanel/transformers.js +344 -362
  369. package/dist/esm/ui/ConfigPanel/types.js +6 -6
  370. package/dist/esm/ui/Dropdown/index.js +2 -1
  371. package/dist/esm/ui/DropdownMenu/index.js +2 -1
  372. package/dist/esm/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
  373. package/dist/esm/ui/ElementBrowser/types.js +3 -3
  374. package/dist/esm/ui/LinkSearch/index.js +94 -101
  375. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
  376. package/dist/esm/ui/ToolbarFeedback/index.js +27 -31
  377. package/dist/esm/utils/action.js +31 -36
  378. package/dist/esm/utils/clipboard.js +82 -87
  379. package/dist/esm/utils/deprecation-warnings.js +1 -1
  380. package/dist/esm/utils/extensions.js +62 -67
  381. package/dist/esm/utils/insert.js +3 -3
  382. package/dist/esm/utils/mark.js +2 -2
  383. package/dist/esm/utils/performance/simple-measure-to-entries.js +1 -2
  384. package/dist/esm/utils/performance/track-transactions.js +3 -2
  385. package/dist/esm/version-wrapper.js +1 -1
  386. package/dist/esm/version.json +1 -1
  387. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -0
  388. package/dist/types/i18n/cs.d.ts +29 -2
  389. package/dist/types/i18n/da.d.ts +29 -2
  390. package/dist/types/i18n/de.d.ts +28 -2
  391. package/dist/types/i18n/en.d.ts +28 -2
  392. package/dist/types/i18n/en_GB.d.ts +31 -5
  393. package/dist/types/i18n/en_ZZ.d.ts +28 -2
  394. package/dist/types/i18n/es.d.ts +28 -2
  395. package/dist/types/i18n/fi.d.ts +28 -2
  396. package/dist/types/i18n/fr.d.ts +28 -2
  397. package/dist/types/i18n/hu.d.ts +28 -2
  398. package/dist/types/i18n/it.d.ts +28 -2
  399. package/dist/types/i18n/ja.d.ts +28 -2
  400. package/dist/types/i18n/ko.d.ts +28 -2
  401. package/dist/types/i18n/nb.d.ts +28 -2
  402. package/dist/types/i18n/nl.d.ts +28 -2
  403. package/dist/types/i18n/pl.d.ts +28 -2
  404. package/dist/types/i18n/pt_BR.d.ts +28 -2
  405. package/dist/types/i18n/ru.d.ts +28 -2
  406. package/dist/types/i18n/sv.d.ts +28 -2
  407. package/dist/types/i18n/th.d.ts +28 -2
  408. package/dist/types/i18n/tr.d.ts +28 -2
  409. package/dist/types/i18n/uk.d.ts +28 -2
  410. package/dist/types/i18n/vi.d.ts +28 -2
  411. package/dist/types/i18n/zh.d.ts +30 -2
  412. package/dist/types/i18n/zh_TW.d.ts +28 -2
  413. package/dist/types/plugins/tasks-and-decisions/utils.d.ts +2 -0
  414. package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +3 -1
  415. package/dist/types/utils/document.d.ts +2 -2
  416. package/package.json +15 -15
  417. package/report.api.md +1 -1
@@ -7,36 +7,33 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.__temporaryFixForConfigPanel = __temporaryFixForConfigPanel;
8
8
  exports.cascadeCommands = cascadeCommands;
9
9
  exports.getEditorValueWithMedia = getEditorValueWithMedia;
10
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
12
12
  var _prosemirrorState = require("prosemirror-state");
13
13
  var _pluginKey = require("../plugins/extension/plugin-key");
14
14
  var _commands = require("../plugins/extension/commands");
15
15
  var _pluginKey2 = require("../plugins/media/pm-plugins/plugin-key");
16
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == (0, _typeof2.default)(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
17
16
  function __temporaryFixForConfigPanel(_x) {
18
17
  return _temporaryFixForConfigPanel.apply(this, arguments);
19
18
  }
20
19
  function _temporaryFixForConfigPanel() {
21
- _temporaryFixForConfigPanel = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(editorView) {
20
+ _temporaryFixForConfigPanel = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(editorView) {
22
21
  var extensionPluginState;
23
- return _regeneratorRuntime().wrap(function _callee$(_context) {
24
- while (1) {
25
- switch (_context.prev = _context.next) {
26
- case 0:
27
- extensionPluginState = editorView.state && _pluginKey.pluginKey.getState(editorView.state);
28
- if (!(extensionPluginState && extensionPluginState.showContextPanel)) {
29
- _context.next = 4;
30
- break;
31
- }
22
+ return _regenerator.default.wrap(function _callee$(_context) {
23
+ while (1) switch (_context.prev = _context.next) {
24
+ case 0:
25
+ extensionPluginState = editorView.state && _pluginKey.pluginKey.getState(editorView.state);
26
+ if (!(extensionPluginState && extensionPluginState.showContextPanel)) {
32
27
  _context.next = 4;
33
- return new Promise(function (resolve) {
34
- (0, _commands.forceAutoSave)(resolve)(editorView.state, editorView.dispatch);
35
- });
36
- case 4:
37
- case "end":
38
- return _context.stop();
39
- }
28
+ break;
29
+ }
30
+ _context.next = 4;
31
+ return new Promise(function (resolve) {
32
+ (0, _commands.forceAutoSave)(resolve)(editorView.state, editorView.dispatch);
33
+ });
34
+ case 4:
35
+ case "end":
36
+ return _context.stop();
40
37
  }
41
38
  }, _callee);
42
39
  }));
@@ -50,25 +47,23 @@ function getEditorValueWithMedia(_x2) {
50
47
  * passes the tr through and dispatches the cumulated transaction
51
48
  */
52
49
  function _getEditorValueWithMedia() {
53
- _getEditorValueWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(editorView) {
50
+ _getEditorValueWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(editorView) {
54
51
  var mediaPluginState;
55
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
56
- while (1) {
57
- switch (_context2.prev = _context2.next) {
58
- case 0:
59
- mediaPluginState = editorView.state && _pluginKey2.stateKey.getState(editorView.state);
60
- if (!(mediaPluginState && mediaPluginState.waitForMediaUpload)) {
61
- _context2.next = 4;
62
- break;
63
- }
52
+ return _regenerator.default.wrap(function _callee2$(_context2) {
53
+ while (1) switch (_context2.prev = _context2.next) {
54
+ case 0:
55
+ mediaPluginState = editorView.state && _pluginKey2.stateKey.getState(editorView.state);
56
+ if (!(mediaPluginState && mediaPluginState.waitForMediaUpload)) {
64
57
  _context2.next = 4;
65
- return mediaPluginState.waitForPendingTasks();
66
- case 4:
67
- return _context2.abrupt("return", editorView.state.doc);
68
- case 5:
69
- case "end":
70
- return _context2.stop();
71
- }
58
+ break;
59
+ }
60
+ _context2.next = 4;
61
+ return mediaPluginState.waitForPendingTasks();
62
+ case 4:
63
+ return _context2.abrupt("return", editorView.state.doc);
64
+ case 5:
65
+ case "end":
66
+ return _context2.stop();
72
67
  }
73
68
  }, _callee2);
74
69
  }));
@@ -8,11 +8,11 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.checkClipboardTypes = checkClipboardTypes;
9
9
  exports.copyToClipboard = exports.copyHTMLToClipboard = void 0;
10
10
  exports.isPastedFile = isPastedFile;
11
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
12
13
  var clipboard = _interopRequireWildcard(require("clipboard-polyfill"));
13
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
16
16
  function checkClipboardTypes(type, item) {
17
17
  var isDOMStringList = function isDOMStringList(t) {
18
18
  return !t.indexOf && !!t.contains;
@@ -34,52 +34,50 @@ var isIEClipboardApiSupported = function isIEClipboardApiSupported() {
34
34
  return window.clipboardData && typeof window.clipboardData.setData === 'function';
35
35
  };
36
36
  var copyToClipboard = /*#__PURE__*/function () {
37
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(textToCopy) {
38
- return _regeneratorRuntime().wrap(function _callee$(_context) {
39
- while (1) {
40
- switch (_context.prev = _context.next) {
41
- case 0:
42
- if (!isClipboardApiSupported()) {
43
- _context.next = 11;
44
- break;
45
- }
46
- _context.prev = 1;
47
- _context.next = 4;
48
- return navigator.clipboard.writeText(textToCopy);
49
- case 4:
50
- _context.next = 9;
37
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(textToCopy) {
38
+ return _regenerator.default.wrap(function _callee$(_context) {
39
+ while (1) switch (_context.prev = _context.next) {
40
+ case 0:
41
+ if (!isClipboardApiSupported()) {
42
+ _context.next = 11;
51
43
  break;
52
- case 6:
53
- _context.prev = 6;
54
- _context.t0 = _context["catch"](1);
55
- throw new Error('Clipboard api is not supported');
56
- case 9:
57
- _context.next = 23;
44
+ }
45
+ _context.prev = 1;
46
+ _context.next = 4;
47
+ return navigator.clipboard.writeText(textToCopy);
48
+ case 4:
49
+ _context.next = 9;
50
+ break;
51
+ case 6:
52
+ _context.prev = 6;
53
+ _context.t0 = _context["catch"](1);
54
+ throw new Error('Clipboard api is not supported');
55
+ case 9:
56
+ _context.next = 23;
57
+ break;
58
+ case 11:
59
+ if (!isIEClipboardApiSupported()) {
60
+ _context.next = 22;
58
61
  break;
59
- case 11:
60
- if (!isIEClipboardApiSupported()) {
61
- _context.next = 22;
62
- break;
63
- }
64
- _context.prev = 12;
65
- _context.next = 15;
66
- return window.clipboardData.setData('text', textToCopy);
67
- case 15:
68
- _context.next = 20;
69
- break;
70
- case 17:
71
- _context.prev = 17;
72
- _context.t1 = _context["catch"](12);
73
- throw new Error('IE clipboard api is not supported');
74
- case 20:
75
- _context.next = 23;
76
- break;
77
- case 22:
78
- throw new Error('Clipboard api is not supported');
79
- case 23:
80
- case "end":
81
- return _context.stop();
82
- }
62
+ }
63
+ _context.prev = 12;
64
+ _context.next = 15;
65
+ return window.clipboardData.setData('text', textToCopy);
66
+ case 15:
67
+ _context.next = 20;
68
+ break;
69
+ case 17:
70
+ _context.prev = 17;
71
+ _context.t1 = _context["catch"](12);
72
+ throw new Error('IE clipboard api is not supported');
73
+ case 20:
74
+ _context.next = 23;
75
+ break;
76
+ case 22:
77
+ throw new Error('Clipboard api is not supported');
78
+ case 23:
79
+ case "end":
80
+ return _context.stop();
83
81
  }
84
82
  }, _callee, null, [[1, 6], [12, 17]]);
85
83
  }));
@@ -89,49 +87,47 @@ var copyToClipboard = /*#__PURE__*/function () {
89
87
  }();
90
88
  exports.copyToClipboard = copyToClipboard;
91
89
  var copyHTMLToClipboard = /*#__PURE__*/function () {
92
- var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(elementToCopy, plainTextToCopy) {
90
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(elementToCopy, plainTextToCopy) {
93
91
  var data, Clipboard, dt;
94
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
95
- while (1) {
96
- switch (_context2.prev = _context2.next) {
97
- case 0:
98
- if (!(isClipboardApiSupported() && typeof ClipboardItem !== 'undefined')) {
99
- _context2.next = 12;
100
- break;
101
- }
102
- _context2.prev = 1;
103
- data = new ClipboardItem({
104
- 'text/plain': new Blob([plainTextToCopy || elementToCopy.innerText], {
105
- type: 'text/plain'
106
- }),
107
- 'text/html': new Blob([elementToCopy.innerHTML], {
108
- type: 'text/html'
109
- })
110
- }); // @ts-ignore
111
- _context2.next = 5;
112
- return navigator.clipboard.write([data]);
113
- case 5:
114
- _context2.next = 10;
115
- break;
116
- case 7:
117
- _context2.prev = 7;
118
- _context2.t0 = _context2["catch"](1);
119
- throw new Error('Clipboard api is not supported');
120
- case 10:
121
- _context2.next = 17;
92
+ return _regenerator.default.wrap(function _callee2$(_context2) {
93
+ while (1) switch (_context2.prev = _context2.next) {
94
+ case 0:
95
+ if (!(isClipboardApiSupported() && typeof ClipboardItem !== 'undefined')) {
96
+ _context2.next = 12;
122
97
  break;
123
- case 12:
124
- // At the time of development, Firefox doesn't support ClipboardItem API
125
- // Hence of use of this polyfill
126
- Clipboard = clipboard;
127
- dt = new Clipboard.DT();
128
- dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
129
- dt.setData('text/html', elementToCopy.innerHTML);
130
- Clipboard.write(dt);
131
- case 17:
132
- case "end":
133
- return _context2.stop();
134
- }
98
+ }
99
+ _context2.prev = 1;
100
+ data = new ClipboardItem({
101
+ 'text/plain': new Blob([plainTextToCopy || elementToCopy.innerText], {
102
+ type: 'text/plain'
103
+ }),
104
+ 'text/html': new Blob([elementToCopy.innerHTML], {
105
+ type: 'text/html'
106
+ })
107
+ }); // @ts-ignore
108
+ _context2.next = 5;
109
+ return navigator.clipboard.write([data]);
110
+ case 5:
111
+ _context2.next = 10;
112
+ break;
113
+ case 7:
114
+ _context2.prev = 7;
115
+ _context2.t0 = _context2["catch"](1);
116
+ throw new Error('Clipboard api is not supported');
117
+ case 10:
118
+ _context2.next = 17;
119
+ break;
120
+ case 12:
121
+ // At the time of development, Firefox doesn't support ClipboardItem API
122
+ // Hence of use of this polyfill
123
+ Clipboard = clipboard;
124
+ dt = new Clipboard.DT();
125
+ dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
126
+ dt.setData('text/html', elementToCopy.innerHTML);
127
+ Clipboard.write(dt);
128
+ case 17:
129
+ case "end":
130
+ return _context2.stop();
135
131
  }
136
132
  }, _callee2, null, [[1, 7]]);
137
133
  }));
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  var _versionWrapper = require("../version-wrapper");
8
8
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
9
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  var deprecationWarnings = function deprecationWarnings(className, props, deprecations) {
12
12
  if (process.env.NODE_ENV === 'production') {
13
13
  return;
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.combineQuickInsertProviders = combineQuickInsertProviders;
8
8
  exports.extensionProviderToQuickInsertProvider = extensionProviderToQuickInsertProvider;
9
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _react = _interopRequireDefault(require("react"));
12
12
  var _reactLoadable = _interopRequireDefault(require("react-loadable"));
13
13
  var _extensions = require("@atlaskit/editor-common/extensions");
14
14
  var _providerHelpers = require("@atlaskit/editor-common/provider-helpers");
15
15
  var _analytics = require("@atlaskit/editor-common/analytics");
16
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == (0, _typeof2.default)(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
17
16
  /**
18
17
  * Utils to send analytics event when a extension is inserted using quickInsert
19
18
  */
@@ -38,59 +37,57 @@ function extensionProviderToQuickInsertProvider(_x, _x2, _x3) {
38
37
  return _extensionProviderToQuickInsertProvider.apply(this, arguments);
39
38
  }
40
39
  function _extensionProviderToQuickInsertProvider() {
41
- _extensionProviderToQuickInsertProvider = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(extensionProvider, editorActions, createAnalyticsEvent) {
40
+ _extensionProviderToQuickInsertProvider = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(extensionProvider, editorActions, createAnalyticsEvent) {
42
41
  var extensions;
43
- return _regeneratorRuntime().wrap(function _callee$(_context) {
44
- while (1) {
45
- switch (_context.prev = _context.next) {
46
- case 0:
47
- _context.next = 2;
48
- return extensionProvider.getExtensions();
49
- case 2:
50
- extensions = _context.sent;
51
- return _context.abrupt("return", {
52
- getItems: function getItems() {
53
- var quickInsertItems = (0, _extensions.getQuickInsertItemsFromModule)(extensions, function (item) {
54
- var Icon = (0, _reactLoadable.default)({
55
- loader: item.icon,
56
- loading: function loading() {
57
- return null;
58
- }
59
- });
60
- return {
61
- title: item.title,
62
- description: item.description,
63
- icon: function icon() {
64
- return /*#__PURE__*/_react.default.createElement(Icon, {
65
- label: ""
66
- });
67
- },
68
- keywords: item.keywords,
69
- featured: item.featured,
70
- categories: item.categories,
71
- action: function action(insert) {
72
- if (typeof item.node === 'function') {
73
- (0, _extensions.resolveImport)(item.node()).then(function (node) {
74
- sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
75
- if (node) {
76
- editorActions.replaceSelection(node);
77
- }
78
- });
79
- return insert('');
80
- } else {
42
+ return _regenerator.default.wrap(function _callee$(_context) {
43
+ while (1) switch (_context.prev = _context.next) {
44
+ case 0:
45
+ _context.next = 2;
46
+ return extensionProvider.getExtensions();
47
+ case 2:
48
+ extensions = _context.sent;
49
+ return _context.abrupt("return", {
50
+ getItems: function getItems() {
51
+ var quickInsertItems = (0, _extensions.getQuickInsertItemsFromModule)(extensions, function (item) {
52
+ var Icon = (0, _reactLoadable.default)({
53
+ loader: item.icon,
54
+ loading: function loading() {
55
+ return null;
56
+ }
57
+ });
58
+ return {
59
+ title: item.title,
60
+ description: item.description,
61
+ icon: function icon() {
62
+ return /*#__PURE__*/_react.default.createElement(Icon, {
63
+ label: ""
64
+ });
65
+ },
66
+ keywords: item.keywords,
67
+ featured: item.featured,
68
+ categories: item.categories,
69
+ action: function action(insert) {
70
+ if (typeof item.node === 'function') {
71
+ (0, _extensions.resolveImport)(item.node()).then(function (node) {
81
72
  sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
82
- return insert(item.node);
83
- }
73
+ if (node) {
74
+ editorActions.replaceSelection(node);
75
+ }
76
+ });
77
+ return insert('');
78
+ } else {
79
+ sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
80
+ return insert(item.node);
84
81
  }
85
- };
86
- });
87
- return Promise.all(quickInsertItems);
88
- }
89
- });
90
- case 4:
91
- case "end":
92
- return _context.stop();
93
- }
82
+ }
83
+ };
84
+ });
85
+ return Promise.all(quickInsertItems);
86
+ }
87
+ });
88
+ case 4:
89
+ case "end":
90
+ return _context.stop();
94
91
  }
95
92
  }, _callee);
96
93
  }));
@@ -100,22 +97,20 @@ function combineQuickInsertProviders(_x4) {
100
97
  return _combineQuickInsertProviders.apply(this, arguments);
101
98
  }
102
99
  function _combineQuickInsertProviders() {
103
- _combineQuickInsertProviders = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(quickInsertProviders) {
100
+ _combineQuickInsertProviders = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(quickInsertProviders) {
104
101
  var _combineProviders, invokeList;
105
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
106
- while (1) {
107
- switch (_context2.prev = _context2.next) {
108
- case 0:
109
- _combineProviders = (0, _providerHelpers.combineProviders)(quickInsertProviders), invokeList = _combineProviders.invokeList;
110
- return _context2.abrupt("return", {
111
- getItems: function getItems() {
112
- return invokeList('getItems');
113
- }
114
- });
115
- case 2:
116
- case "end":
117
- return _context2.stop();
118
- }
102
+ return _regenerator.default.wrap(function _callee2$(_context2) {
103
+ while (1) switch (_context2.prev = _context2.next) {
104
+ case 0:
105
+ _combineProviders = (0, _providerHelpers.combineProviders)(quickInsertProviders), invokeList = _combineProviders.invokeList;
106
+ return _context2.abrupt("return", {
107
+ getItems: function getItems() {
108
+ return invokeList('getItems');
109
+ }
110
+ });
111
+ case 2:
112
+ case "end":
113
+ return _context2.stop();
119
114
  }
120
115
  }, _callee2);
121
116
  }));
@@ -12,12 +12,12 @@ var _document = require("./document");
12
12
  var _gapCursorSelection = require("../plugins/selection/gap-cursor-selection");
13
13
  var _selection = require("./selection");
14
14
  var _node = require("../plugins/list/utils/node");
15
- var LookDirection;
16
- exports.LookDirection = LookDirection;
17
- (function (LookDirection) {
15
+ var LookDirection = /*#__PURE__*/function (LookDirection) {
18
16
  LookDirection["Before"] = "before";
19
17
  LookDirection["After"] = "after";
20
- })(LookDirection || (exports.LookDirection = LookDirection = {}));
18
+ return LookDirection;
19
+ }({});
20
+ exports.LookDirection = LookDirection;
21
21
  var isLastChild = function isLastChild($pos, doc) {
22
22
  return doc.resolve($pos.after()).node().lastChild === $pos.node();
23
23
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.sanitiseSelectionMarksForWrapping = exports.sanitiseMarksInSelection = exports.removeBlockMarks = exports.isMarkExcluded = exports.isMarkAllowedInRange = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var isMarkAllowedInRange = function isMarkAllowedInRange(doc, ranges, type) {
10
- var _loop = function _loop(i) {
10
+ var _loop = function _loop() {
11
11
  var _ranges$i = ranges[i],
12
12
  $from = _ranges$i.$from,
13
13
  $to = _ranges$i.$to;
@@ -26,7 +26,7 @@ var isMarkAllowedInRange = function isMarkAllowedInRange(doc, ranges, type) {
26
26
  }
27
27
  };
28
28
  for (var i = 0; i < ranges.length; i++) {
29
- var _ret = _loop(i);
29
+ var _ret = _loop();
30
30
  if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
31
31
  }
32
32
  return false;
@@ -98,6 +98,5 @@ var SimpleMeasurementLogger = /*#__PURE__*/(0, _createClass2.default)(function S
98
98
  _this.currentBatch = [];
99
99
  }
100
100
  });
101
- } // callback when performance reports are ready
102
- );
101
+ });
103
102
  exports.SimpleMeasurementLogger = SimpleMeasurementLogger;
@@ -28,7 +28,9 @@ var TransactionTracker = /*#__PURE__*/function () {
28
28
  function TransactionTracker() {
29
29
  var _this = this;
30
30
  (0, _classCallCheck2.default)(this, TransactionTracker);
31
+ // Counter so we can rate limit the transaction performance tracking
31
32
  (0, _defineProperty2.default)(this, "dispatchCallCounter", 0);
33
+ // A map containing the time which measurement starts
32
34
  (0, _defineProperty2.default)(this, "measureMap", new Map());
33
35
  (0, _defineProperty2.default)(this, "measureListeners", []);
34
36
  (0, _defineProperty2.default)(this, "bumpDispatchCounter", function (options) {
@@ -85,8 +87,7 @@ var TransactionTracker = /*#__PURE__*/function () {
85
87
  });
86
88
  }
87
89
  });
88
- } // Counter so we can rate limit the transaction performance tracking
89
- // A map containing the time which measurement starts
90
+ }
90
91
  (0, _createClass2.default)(TransactionTracker, [{
91
92
  key: "addMeasureListener",
92
93
  value: function addMeasureListener(listener) {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "182.1.1";
9
+ var version = "182.2.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');