@atlaskit/editor-core 178.0.1 → 178.1.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 (182) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/cjs/create-editor/create-plugins-list.js +3 -1
  3. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +26 -13
  4. package/dist/cjs/plugins/annotation/index.js +4 -2
  5. package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +6 -2
  6. package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +8 -1
  7. package/dist/cjs/plugins/block-type/commands/delete-block-content.js +53 -0
  8. package/dist/cjs/plugins/block-type/commands/index.js +9 -1
  9. package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +2 -2
  10. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +8 -4
  11. package/dist/cjs/plugins/card/nodeviews/blockCard.js +1 -1
  12. package/dist/cjs/plugins/card/nodeviews/embedCard.js +1 -3
  13. package/dist/cjs/plugins/card/pm-plugins/doc.js +21 -4
  14. package/dist/cjs/plugins/card/toolbar.js +4 -2
  15. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +4 -1
  16. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +16 -9
  17. package/dist/cjs/plugins/collab-edit/actions.js +1 -1
  18. package/dist/cjs/plugins/collab-edit/index.js +1 -1
  19. package/dist/cjs/plugins/collab-edit/provider/channel.js +1 -1
  20. package/dist/cjs/plugins/expand/pm-plugins/keymap.js +5 -0
  21. package/dist/cjs/plugins/floating-toolbar/ui/Select.js +2 -1
  22. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +18 -9
  23. package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -0
  24. package/dist/cjs/plugins/hyperlink/index.js +2 -1
  25. package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +15 -2
  26. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +27 -22
  27. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +6 -2
  28. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
  29. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
  30. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
  31. package/dist/cjs/plugins/list/styles.js +1 -1
  32. package/dist/cjs/plugins/media/commands/helpers.js +24 -2
  33. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +14 -16
  34. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +232 -183
  35. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +1 -3
  36. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +1 -1
  37. package/dist/cjs/plugins/media/pm-plugins/keymap.js +46 -0
  38. package/dist/cjs/plugins/rank.js +3 -2
  39. package/dist/cjs/plugins/selection/pm-plugins/events/create-selection-between.js +86 -0
  40. package/dist/cjs/plugins/selection/pm-plugins/events/keydown.js +84 -0
  41. package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +6 -56
  42. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +1 -1
  43. package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +7 -2
  44. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +4 -2
  45. package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +22 -61
  46. package/dist/cjs/ui/Addon/ClickAreaInline/index.js +22 -56
  47. package/dist/cjs/ui/Addon/click-area-helper.js +28 -6
  48. package/dist/cjs/ui/Alignment/AlignmentButton/index.js +4 -2
  49. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +2 -1
  50. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +22 -9
  51. package/dist/cjs/utils/document.js +11 -2
  52. package/dist/cjs/version-wrapper.js +1 -1
  53. package/dist/cjs/version.json +1 -1
  54. package/dist/es2019/create-editor/create-plugins-list.js +3 -1
  55. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +28 -13
  56. package/dist/es2019/plugins/annotation/index.js +4 -2
  57. package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +6 -2
  58. package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +8 -1
  59. package/dist/es2019/plugins/block-type/commands/delete-block-content.js +49 -0
  60. package/dist/es2019/plugins/block-type/commands/index.js +2 -1
  61. package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +3 -3
  62. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +8 -4
  63. package/dist/es2019/plugins/card/nodeviews/blockCard.js +1 -1
  64. package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -2
  65. package/dist/es2019/plugins/card/pm-plugins/doc.js +19 -3
  66. package/dist/es2019/plugins/card/toolbar.js +4 -2
  67. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +5 -2
  68. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +15 -9
  69. package/dist/es2019/plugins/collab-edit/actions.js +1 -1
  70. package/dist/es2019/plugins/collab-edit/index.js +1 -1
  71. package/dist/es2019/plugins/collab-edit/provider/channel.js +1 -1
  72. package/dist/es2019/plugins/expand/pm-plugins/keymap.js +5 -0
  73. package/dist/es2019/plugins/floating-toolbar/ui/Select.js +2 -1
  74. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +18 -9
  75. package/dist/es2019/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -0
  76. package/dist/es2019/plugins/hyperlink/index.js +2 -1
  77. package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +11 -2
  78. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -5
  79. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +6 -2
  80. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
  81. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
  82. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
  83. package/dist/es2019/plugins/list/styles.js +15 -11
  84. package/dist/es2019/plugins/media/commands/helpers.js +18 -1
  85. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +14 -16
  86. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +37 -13
  87. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +1 -2
  88. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
  89. package/dist/es2019/plugins/media/pm-plugins/keymap.js +45 -0
  90. package/dist/es2019/plugins/rank.js +3 -2
  91. package/dist/es2019/plugins/selection/pm-plugins/events/create-selection-between.js +79 -0
  92. package/dist/es2019/plugins/selection/pm-plugins/events/keydown.js +77 -0
  93. package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +5 -55
  94. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +1 -1
  95. package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +6 -2
  96. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +3 -2
  97. package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +20 -31
  98. package/dist/es2019/ui/Addon/ClickAreaInline/index.js +20 -27
  99. package/dist/es2019/ui/Addon/click-area-helper.js +28 -6
  100. package/dist/es2019/ui/Alignment/AlignmentButton/index.js +4 -2
  101. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +2 -1
  102. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +22 -9
  103. package/dist/es2019/utils/document.js +9 -2
  104. package/dist/es2019/version-wrapper.js +1 -1
  105. package/dist/es2019/version.json +1 -1
  106. package/dist/esm/create-editor/create-plugins-list.js +3 -1
  107. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +26 -13
  108. package/dist/esm/plugins/annotation/index.js +4 -2
  109. package/dist/esm/plugins/annotation/ui/InlineCommentView.js +6 -2
  110. package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +8 -1
  111. package/dist/esm/plugins/block-type/commands/delete-block-content.js +46 -0
  112. package/dist/esm/plugins/block-type/commands/index.js +2 -1
  113. package/dist/esm/plugins/block-type/pm-plugins/keymap.js +3 -3
  114. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +8 -4
  115. package/dist/esm/plugins/card/nodeviews/blockCard.js +1 -1
  116. package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -2
  117. package/dist/esm/plugins/card/pm-plugins/doc.js +20 -3
  118. package/dist/esm/plugins/card/toolbar.js +4 -2
  119. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +5 -2
  120. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +16 -9
  121. package/dist/esm/plugins/collab-edit/actions.js +1 -1
  122. package/dist/esm/plugins/collab-edit/index.js +1 -1
  123. package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
  124. package/dist/esm/plugins/expand/pm-plugins/keymap.js +5 -0
  125. package/dist/esm/plugins/floating-toolbar/ui/Select.js +2 -1
  126. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +18 -9
  127. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -0
  128. package/dist/esm/plugins/hyperlink/index.js +2 -1
  129. package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +15 -3
  130. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +27 -22
  131. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +6 -2
  132. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
  133. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
  134. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
  135. package/dist/esm/plugins/list/styles.js +1 -1
  136. package/dist/esm/plugins/media/commands/helpers.js +20 -1
  137. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +14 -16
  138. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +235 -184
  139. package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +1 -2
  140. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  141. package/dist/esm/plugins/media/pm-plugins/keymap.js +45 -0
  142. package/dist/esm/plugins/rank.js +3 -2
  143. package/dist/esm/plugins/selection/pm-plugins/events/create-selection-between.js +76 -0
  144. package/dist/esm/plugins/selection/pm-plugins/events/keydown.js +74 -0
  145. package/dist/esm/plugins/selection/pm-plugins/selection-main.js +4 -57
  146. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +1 -1
  147. package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +7 -2
  148. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +4 -2
  149. package/dist/esm/ui/Addon/ClickAreaBlock/index.js +17 -58
  150. package/dist/esm/ui/Addon/ClickAreaInline/index.js +17 -53
  151. package/dist/esm/ui/Addon/click-area-helper.js +28 -6
  152. package/dist/esm/ui/Alignment/AlignmentButton/index.js +4 -2
  153. package/dist/esm/ui/ElementBrowser/InsertMenu.js +2 -1
  154. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +22 -9
  155. package/dist/esm/utils/document.js +11 -2
  156. package/dist/esm/version-wrapper.js +1 -1
  157. package/dist/esm/version.json +1 -1
  158. package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +1 -1
  159. package/dist/types/plugins/block-type/commands/delete-block-content.d.ts +10 -0
  160. package/dist/types/plugins/block-type/commands/index.d.ts +1 -0
  161. package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -1
  162. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +1 -0
  163. package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -0
  164. package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +6 -1
  165. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
  166. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -0
  167. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -0
  168. package/dist/types/plugins/media/commands/helpers.d.ts +1 -0
  169. package/dist/types/plugins/media/nodeviews/__mocks__/mediaNodeUpdater.d.ts +1 -0
  170. package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +3 -1
  171. package/dist/types/plugins/media/types.d.ts +2 -0
  172. package/dist/types/plugins/selection/pm-plugins/events/create-selection-between.d.ts +4 -0
  173. package/dist/types/plugins/selection/pm-plugins/events/keydown.d.ts +2 -0
  174. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +2 -5
  175. package/dist/types/ui/Addon/ClickAreaInline/index.d.ts +2 -5
  176. package/dist/types/ui/Addon/click-area-helper.d.ts +1 -1
  177. package/dist/types/ui/Alignment/AlignmentButton/index.d.ts +1 -1
  178. package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
  179. package/dist/types/ui/ElementBrowser/types.d.ts +1 -0
  180. package/docs/0-intro.tsx +9 -0
  181. package/package.json +17 -19
  182. package/report.api.md +4 -1
@@ -7,7 +7,7 @@ import uuidV4 from 'uuid/v4';
7
7
  import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/ui';
8
8
  import { getMediaClient, isMediaBlobUrl as _isMediaBlobUrl, getAttrsFromUrl, isImageRepresentationReady } from '@atlaskit/media-client';
9
9
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
10
- import { replaceExternalMedia, updateAllMediaNodesAttrs, updateMediaNodeAttrs } from '../commands/helpers';
10
+ import { replaceExternalMedia, updateAllMediaNodesAttrs, updateCurrentMediaNodeAttrs, updateMediaNodeAttrs } from '../commands/helpers';
11
11
  export var MediaNodeUpdater = /*#__PURE__*/function () {
12
12
  function MediaNodeUpdater(props) {
13
13
  var _this = this;
@@ -48,92 +48,75 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
48
48
  }, _callee);
49
49
  })));
50
50
 
51
- _defineProperty(this, "hasFileAttributesDefined", function () {
52
- var attrs = _this.getAttrs();
53
-
51
+ _defineProperty(this, "hasFileAttributesDefined", function (attrs) {
54
52
  return attrs && attrs.type === 'file' && attrs.__fileName && attrs.__fileMimeType && attrs.__fileSize && attrs.__contextId;
55
53
  });
56
54
 
57
- _defineProperty(this, "updateFileAttrs", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
58
- var isMediaSingle,
59
- attrs,
60
- mediaProvider,
61
- mediaClientConfig,
62
- mediaClient,
63
- options,
64
- fileState,
65
- contextId,
66
- _fileState,
67
- name,
68
- mimeType,
69
- size,
70
- newAttrs,
71
- attrsChanged,
72
- _args2 = arguments;
55
+ _defineProperty(this, "getNewFileAttrsForNode", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
56
+ var attrs, mediaProvider, mediaClientConfig, mediaClient, fileState, id, collectionName, contextId, _fileState, name, mimeType, size, newAttrs;
73
57
 
74
58
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
75
59
  while (1) {
76
60
  switch (_context2.prev = _context2.next) {
77
61
  case 0:
78
- isMediaSingle = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : true;
79
62
  attrs = _this.getAttrs();
80
- _context2.next = 4;
63
+ _context2.next = 3;
81
64
  return _this.props.mediaProvider;
82
65
 
83
- case 4:
66
+ case 3:
84
67
  mediaProvider = _context2.sent;
85
68
 
86
- if (!(!mediaProvider || !mediaProvider.uploadParams || !attrs || attrs.type !== 'file' || _this.hasFileAttributesDefined())) {
87
- _context2.next = 7;
69
+ if (!(!mediaProvider || !mediaProvider.uploadParams || !attrs || attrs.type !== 'file' || _this.hasFileAttributesDefined(attrs))) {
70
+ _context2.next = 6;
88
71
  break;
89
72
  }
90
73
 
91
74
  return _context2.abrupt("return");
92
75
 
93
- case 7:
76
+ case 6:
94
77
  mediaClientConfig = mediaProvider.viewMediaClientConfig;
95
78
  mediaClient = getMediaClient(mediaClientConfig);
96
- options = {
97
- collectionName: attrs.collection
98
- };
99
- _context2.prev = 10;
100
- _context2.next = 13;
101
- return mediaClient.file.getCurrentState(attrs.id, options);
102
-
103
- case 13:
79
+ id = attrs.id, collectionName = attrs.collection;
80
+ _context2.prev = 9;
81
+ _context2.next = 12;
82
+ return mediaClient.file.getCurrentState(id, {
83
+ collectionName: collectionName
84
+ });
85
+
86
+ case 12:
104
87
  fileState = _context2.sent;
105
88
 
106
89
  if (!(fileState.status === 'error')) {
107
- _context2.next = 16;
90
+ _context2.next = 15;
108
91
  break;
109
92
  }
110
93
 
111
94
  return _context2.abrupt("return");
112
95
 
113
- case 16:
114
- _context2.next = 21;
96
+ case 15:
97
+ _context2.next = 20;
115
98
  break;
116
99
 
117
- case 18:
118
- _context2.prev = 18;
119
- _context2.t0 = _context2["catch"](10);
100
+ case 17:
101
+ _context2.prev = 17;
102
+ _context2.t0 = _context2["catch"](9);
120
103
  return _context2.abrupt("return");
121
104
 
122
- case 21:
105
+ case 20:
123
106
  _context2.t1 = _this.getNodeContextId();
124
107
 
125
108
  if (_context2.t1) {
126
- _context2.next = 26;
109
+ _context2.next = 25;
127
110
  break;
128
111
  }
129
112
 
130
- _context2.next = 25;
113
+ _context2.next = 24;
131
114
  return _this.getObjectId();
132
115
 
133
- case 25:
116
+ case 24:
134
117
  _context2.t1 = _context2.sent;
135
118
 
136
- case 26:
119
+ case 25:
137
120
  contextId = _context2.t1;
138
121
  _fileState = fileState, name = _fileState.name, mimeType = _fileState.mimeType, size = _fileState.size;
139
122
  newAttrs = {
@@ -142,21 +125,89 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
142
125
  __fileSize: size,
143
126
  __contextId: contextId
144
127
  };
145
- attrsChanged = hasPrivateAttrsChanged(attrs, newAttrs);
146
128
 
147
- if (attrsChanged) {
148
- // TODO [MS-2258]: we should pass this.props.isMediaSingle and remove hardcoded "true"
149
- updateAllMediaNodesAttrs(attrs.id, newAttrs, isMediaSingle)(_this.props.view.state, _this.props.view.dispatch);
129
+ if (hasPrivateAttrsChanged(attrs, newAttrs)) {
130
+ _context2.next = 30;
131
+ break;
150
132
  }
151
133
 
134
+ return _context2.abrupt("return");
135
+
136
+ case 30:
137
+ return _context2.abrupt("return", newAttrs);
138
+
152
139
  case 31:
153
140
  case "end":
154
141
  return _context2.stop();
155
142
  }
156
143
  }
157
- }, _callee2, null, [[10, 18]]);
144
+ }, _callee2, null, [[9, 17]]);
145
+ })));
146
+
147
+ _defineProperty(this, "updateFileAttrs", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
148
+ var isMediaSingle,
149
+ newAttrs,
150
+ _ref4,
151
+ id,
152
+ _args3 = arguments;
153
+
154
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
155
+ while (1) {
156
+ switch (_context3.prev = _context3.next) {
157
+ case 0:
158
+ isMediaSingle = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : true;
159
+ _context3.next = 3;
160
+ return _this.getNewFileAttrsForNode();
161
+
162
+ case 3:
163
+ newAttrs = _context3.sent;
164
+ _ref4 = _this.getAttrs(), id = _ref4.id;
165
+
166
+ if (id && newAttrs) {
167
+ updateAllMediaNodesAttrs(id, newAttrs, isMediaSingle)(_this.props.view.state, _this.props.view.dispatch);
168
+ }
169
+
170
+ case 6:
171
+ case "end":
172
+ return _context3.stop();
173
+ }
174
+ }
175
+ }, _callee3);
158
176
  })));
159
177
 
178
+ _defineProperty(this, "updateNodeAttrs", /*#__PURE__*/function () {
179
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(getPos) {
180
+ var newAttrs;
181
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
182
+ while (1) {
183
+ switch (_context4.prev = _context4.next) {
184
+ case 0:
185
+ _context4.next = 2;
186
+ return _this.getNewFileAttrsForNode();
187
+
188
+ case 2:
189
+ newAttrs = _context4.sent;
190
+
191
+ if (newAttrs) {
192
+ updateCurrentMediaNodeAttrs(newAttrs, {
193
+ node: _this.props.node,
194
+ getPos: getPos
195
+ })(_this.props.view.state, _this.props.view.dispatch);
196
+ }
197
+
198
+ case 4:
199
+ case "end":
200
+ return _context4.stop();
201
+ }
202
+ }
203
+ }, _callee4);
204
+ }));
205
+
206
+ return function (_x) {
207
+ return _ref5.apply(this, arguments);
208
+ };
209
+ }());
210
+
160
211
  _defineProperty(this, "getAttrs", function () {
161
212
  var attrs = _this.props.node.attrs;
162
213
 
@@ -167,64 +218,64 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
167
218
  return undefined;
168
219
  });
169
220
 
170
- _defineProperty(this, "getObjectId", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
221
+ _defineProperty(this, "getObjectId", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
171
222
  var contextIdentifierProvider;
172
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
223
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
173
224
  while (1) {
174
- switch (_context3.prev = _context3.next) {
225
+ switch (_context5.prev = _context5.next) {
175
226
  case 0:
176
- _context3.next = 2;
227
+ _context5.next = 2;
177
228
  return _this.props.contextIdentifierProvider;
178
229
 
179
230
  case 2:
180
- contextIdentifierProvider = _context3.sent;
181
- return _context3.abrupt("return", (contextIdentifierProvider === null || contextIdentifierProvider === void 0 ? void 0 : contextIdentifierProvider.objectId) || null);
231
+ contextIdentifierProvider = _context5.sent;
232
+ return _context5.abrupt("return", (contextIdentifierProvider === null || contextIdentifierProvider === void 0 ? void 0 : contextIdentifierProvider.objectId) || null);
182
233
 
183
234
  case 4:
184
235
  case "end":
185
- return _context3.stop();
236
+ return _context5.stop();
186
237
  }
187
238
  }
188
- }, _callee3);
239
+ }, _callee5);
189
240
  })));
190
241
 
191
242
  _defineProperty(this, "uploadExternalMedia", /*#__PURE__*/function () {
192
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(getPos) {
243
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(getPos) {
193
244
  var node, mediaProvider, uploadMediaClientConfig, mediaClient, collection, uploader, uploadableFileUpfrontIds, dimensions;
194
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
245
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
195
246
  while (1) {
196
- switch (_context4.prev = _context4.next) {
247
+ switch (_context6.prev = _context6.next) {
197
248
  case 0:
198
249
  node = _this.props.node;
199
- _context4.next = 3;
250
+ _context6.next = 3;
200
251
  return _this.props.mediaProvider;
201
252
 
202
253
  case 3:
203
- mediaProvider = _context4.sent;
254
+ mediaProvider = _context6.sent;
204
255
 
205
256
  if (!(node && mediaProvider)) {
206
- _context4.next = 21;
257
+ _context6.next = 21;
207
258
  break;
208
259
  }
209
260
 
210
261
  uploadMediaClientConfig = mediaProvider.uploadMediaClientConfig;
211
262
 
212
263
  if (!(!uploadMediaClientConfig || !node.attrs.url)) {
213
- _context4.next = 8;
264
+ _context6.next = 8;
214
265
  break;
215
266
  }
216
267
 
217
- return _context4.abrupt("return");
268
+ return _context6.abrupt("return");
218
269
 
219
270
  case 8:
220
271
  mediaClient = getMediaClient(uploadMediaClientConfig);
221
272
  collection = mediaProvider.uploadParams && mediaProvider.uploadParams.collection;
222
- _context4.prev = 10;
223
- _context4.next = 13;
273
+ _context6.prev = 10;
274
+ _context6.next = 13;
224
275
  return mediaClient.file.uploadExternal(node.attrs.url, collection);
225
276
 
226
277
  case 13:
227
- uploader = _context4.sent;
278
+ uploader = _context6.sent;
228
279
  uploadableFileUpfrontIds = uploader.uploadableFileUpfrontIds, dimensions = uploader.dimensions;
229
280
  replaceExternalMedia(getPos() + 1, {
230
281
  id: uploadableFileUpfrontIds.id,
@@ -233,12 +284,12 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
233
284
  width: dimensions.width,
234
285
  occurrenceKey: uploadableFileUpfrontIds.occurrenceKey
235
286
  })(_this.props.view.state, _this.props.view.dispatch);
236
- _context4.next = 21;
287
+ _context6.next = 21;
237
288
  break;
238
289
 
239
290
  case 18:
240
- _context4.prev = 18;
241
- _context4.t0 = _context4["catch"](10);
291
+ _context6.prev = 18;
292
+ _context6.t0 = _context6["catch"](10);
242
293
 
243
294
  //keep it as external media
244
295
  if (_this.props.dispatchAnalyticsEvent) {
@@ -251,14 +302,14 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
251
302
 
252
303
  case 21:
253
304
  case "end":
254
- return _context4.stop();
305
+ return _context6.stop();
255
306
  }
256
307
  }
257
- }, _callee4, null, [[10, 18]]);
308
+ }, _callee6, null, [[10, 18]]);
258
309
  }));
259
310
 
260
- return function (_x) {
261
- return _ref4.apply(this, arguments);
311
+ return function (_x2) {
312
+ return _ref7.apply(this, arguments);
262
313
  };
263
314
  }());
264
315
 
@@ -279,144 +330,144 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
279
330
  }, true)(_this.props.view.state, _this.props.view.dispatch);
280
331
  });
281
332
 
282
- _defineProperty(this, "hasDifferentContextId", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
333
+ _defineProperty(this, "hasDifferentContextId", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
283
334
  var nodeContextId, currentContextId;
284
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
335
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
285
336
  while (1) {
286
- switch (_context5.prev = _context5.next) {
337
+ switch (_context7.prev = _context7.next) {
287
338
  case 0:
288
339
  nodeContextId = _this.getNodeContextId();
289
- _context5.next = 3;
340
+ _context7.next = 3;
290
341
  return _this.getObjectId();
291
342
 
292
343
  case 3:
293
- currentContextId = _context5.sent;
344
+ currentContextId = _context7.sent;
294
345
 
295
346
  if (!(nodeContextId && currentContextId && nodeContextId !== currentContextId)) {
296
- _context5.next = 6;
347
+ _context7.next = 6;
297
348
  break;
298
349
  }
299
350
 
300
- return _context5.abrupt("return", true);
351
+ return _context7.abrupt("return", true);
301
352
 
302
353
  case 6:
303
- return _context5.abrupt("return", false);
354
+ return _context7.abrupt("return", false);
304
355
 
305
356
  case 7:
306
357
  case "end":
307
- return _context5.stop();
358
+ return _context7.stop();
308
359
  }
309
360
  }
310
- }, _callee5);
361
+ }, _callee7);
311
362
  })));
312
363
 
313
- _defineProperty(this, "isNodeFromDifferentCollection", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
364
+ _defineProperty(this, "isNodeFromDifferentCollection", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
314
365
  var mediaProvider, currentCollectionName, attrs, nodeCollection, __contextId, contextId;
315
366
 
316
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
367
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
317
368
  while (1) {
318
- switch (_context6.prev = _context6.next) {
369
+ switch (_context8.prev = _context8.next) {
319
370
  case 0:
320
- _context6.next = 2;
371
+ _context8.next = 2;
321
372
  return _this.props.mediaProvider;
322
373
 
323
374
  case 2:
324
- mediaProvider = _context6.sent;
375
+ mediaProvider = _context8.sent;
325
376
 
326
377
  if (!(!mediaProvider || !mediaProvider.uploadParams)) {
327
- _context6.next = 5;
378
+ _context8.next = 5;
328
379
  break;
329
380
  }
330
381
 
331
- return _context6.abrupt("return", false);
382
+ return _context8.abrupt("return", false);
332
383
 
333
384
  case 5:
334
385
  currentCollectionName = mediaProvider.uploadParams.collection;
335
386
  attrs = _this.getAttrs();
336
387
 
337
388
  if (!(!attrs || attrs.type !== 'file')) {
338
- _context6.next = 9;
389
+ _context8.next = 9;
339
390
  break;
340
391
  }
341
392
 
342
- return _context6.abrupt("return", false);
393
+ return _context8.abrupt("return", false);
343
394
 
344
395
  case 9:
345
396
  nodeCollection = attrs.collection, __contextId = attrs.__contextId;
346
- _context6.t0 = __contextId;
397
+ _context8.t0 = __contextId;
347
398
 
348
- if (_context6.t0) {
349
- _context6.next = 15;
399
+ if (_context8.t0) {
400
+ _context8.next = 15;
350
401
  break;
351
402
  }
352
403
 
353
- _context6.next = 14;
404
+ _context8.next = 14;
354
405
  return _this.getObjectId();
355
406
 
356
407
  case 14:
357
- _context6.t0 = _context6.sent;
408
+ _context8.t0 = _context8.sent;
358
409
 
359
410
  case 15:
360
- contextId = _context6.t0;
411
+ contextId = _context8.t0;
361
412
 
362
413
  if (!(contextId && currentCollectionName !== nodeCollection)) {
363
- _context6.next = 18;
414
+ _context8.next = 18;
364
415
  break;
365
416
  }
366
417
 
367
- return _context6.abrupt("return", true);
418
+ return _context8.abrupt("return", true);
368
419
 
369
420
  case 18:
370
- return _context6.abrupt("return", false);
421
+ return _context8.abrupt("return", false);
371
422
 
372
423
  case 19:
373
424
  case "end":
374
- return _context6.stop();
425
+ return _context8.stop();
375
426
  }
376
427
  }
377
- }, _callee6);
428
+ }, _callee8);
378
429
  })));
379
430
 
380
431
  _defineProperty(this, "copyNodeFromBlobUrl", /*#__PURE__*/function () {
381
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(getPos) {
432
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(getPos) {
382
433
  var attrs, url, mediaAttrs, mediaProvider, currentCollectionName, contextId, id, collection, height, width, mimeType, name, size, uploadMediaClientConfig, mediaClient, auth, source, destination, mediaFile;
383
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
434
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
384
435
  while (1) {
385
- switch (_context7.prev = _context7.next) {
436
+ switch (_context9.prev = _context9.next) {
386
437
  case 0:
387
438
  attrs = _this.getAttrs();
388
439
 
389
440
  if (!(!attrs || attrs.type !== 'external')) {
390
- _context7.next = 3;
441
+ _context9.next = 3;
391
442
  break;
392
443
  }
393
444
 
394
- return _context7.abrupt("return");
445
+ return _context9.abrupt("return");
395
446
 
396
447
  case 3:
397
448
  url = attrs.url;
398
449
  mediaAttrs = getAttrsFromUrl(url);
399
450
 
400
451
  if (mediaAttrs) {
401
- _context7.next = 7;
452
+ _context9.next = 7;
402
453
  break;
403
454
  }
404
455
 
405
- return _context7.abrupt("return");
456
+ return _context9.abrupt("return");
406
457
 
407
458
  case 7:
408
- _context7.next = 9;
459
+ _context9.next = 9;
409
460
  return _this.props.mediaProvider;
410
461
 
411
462
  case 9:
412
- mediaProvider = _context7.sent;
463
+ mediaProvider = _context9.sent;
413
464
 
414
465
  if (!(!mediaProvider || !mediaProvider.uploadParams)) {
415
- _context7.next = 12;
466
+ _context9.next = 12;
416
467
  break;
417
468
  }
418
469
 
419
- return _context7.abrupt("return");
470
+ return _context9.abrupt("return");
420
471
 
421
472
  case 12:
422
473
  currentCollectionName = mediaProvider.uploadParams.collection;
@@ -424,19 +475,19 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
424
475
  uploadMediaClientConfig = mediaProvider.uploadMediaClientConfig;
425
476
 
426
477
  if (!(!uploadMediaClientConfig || !uploadMediaClientConfig.getAuthFromContext)) {
427
- _context7.next = 17;
478
+ _context9.next = 17;
428
479
  break;
429
480
  }
430
481
 
431
- return _context7.abrupt("return");
482
+ return _context9.abrupt("return");
432
483
 
433
484
  case 17:
434
485
  mediaClient = getMediaClient(uploadMediaClientConfig);
435
- _context7.next = 20;
486
+ _context9.next = 20;
436
487
  return uploadMediaClientConfig.getAuthFromContext(contextId);
437
488
 
438
489
  case 20:
439
- auth = _context7.sent;
490
+ auth = _context9.sent;
440
491
  source = {
441
492
  id: id,
442
493
  collection: collection,
@@ -449,11 +500,11 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
449
500
  authProvider: uploadMediaClientConfig.authProvider,
450
501
  occurrenceKey: uuidV4()
451
502
  };
452
- _context7.next = 25;
503
+ _context9.next = 25;
453
504
  return mediaClient.file.copyFile(source, destination);
454
505
 
455
506
  case 25:
456
- mediaFile = _context7.sent;
507
+ mediaFile = _context9.sent;
457
508
  replaceExternalMedia(getPos() + 1, {
458
509
  id: mediaFile.id,
459
510
  collection: currentCollectionName,
@@ -466,60 +517,60 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
466
517
 
467
518
  case 27:
468
519
  case "end":
469
- return _context7.stop();
520
+ return _context9.stop();
470
521
  }
471
522
  }
472
- }, _callee7);
523
+ }, _callee9);
473
524
  }));
474
525
 
475
- return function (_x2) {
476
- return _ref7.apply(this, arguments);
526
+ return function (_x3) {
527
+ return _ref10.apply(this, arguments);
477
528
  };
478
529
  }());
479
530
 
480
531
  _defineProperty(this, "copyNode", /*#__PURE__*/function () {
481
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(traceContext) {
532
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(traceContext) {
482
533
  var mediaProvider, _this$props, isMediaSingle, view, attrs, nodeContextId, uploadMediaClientConfig, mediaClient, auth, objectId, id, collection, source, currentCollectionName, destination, mediaFile;
483
534
 
484
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
535
+ return _regeneratorRuntime.wrap(function _callee10$(_context10) {
485
536
  while (1) {
486
- switch (_context8.prev = _context8.next) {
537
+ switch (_context10.prev = _context10.next) {
487
538
  case 0:
488
- _context8.next = 2;
539
+ _context10.next = 2;
489
540
  return _this.props.mediaProvider;
490
541
 
491
542
  case 2:
492
- mediaProvider = _context8.sent;
543
+ mediaProvider = _context10.sent;
493
544
  _this$props = _this.props, isMediaSingle = _this$props.isMediaSingle, view = _this$props.view;
494
545
  attrs = _this.getAttrs();
495
546
 
496
547
  if (!(!mediaProvider || !mediaProvider.uploadParams || !attrs || attrs.type !== 'file')) {
497
- _context8.next = 7;
548
+ _context10.next = 7;
498
549
  break;
499
550
  }
500
551
 
501
- return _context8.abrupt("return");
552
+ return _context10.abrupt("return");
502
553
 
503
554
  case 7:
504
555
  nodeContextId = _this.getNodeContextId();
505
556
  uploadMediaClientConfig = mediaProvider.uploadMediaClientConfig;
506
557
 
507
558
  if (!(uploadMediaClientConfig && uploadMediaClientConfig.getAuthFromContext && nodeContextId)) {
508
- _context8.next = 25;
559
+ _context10.next = 25;
509
560
  break;
510
561
  }
511
562
 
512
563
  mediaClient = getMediaClient(uploadMediaClientConfig);
513
- _context8.next = 13;
564
+ _context10.next = 13;
514
565
  return uploadMediaClientConfig.getAuthFromContext(nodeContextId);
515
566
 
516
567
  case 13:
517
- auth = _context8.sent;
518
- _context8.next = 16;
568
+ auth = _context10.sent;
569
+ _context10.next = 16;
519
570
  return _this.getObjectId();
520
571
 
521
572
  case 16:
522
- objectId = _context8.sent;
573
+ objectId = _context10.sent;
523
574
  id = attrs.id, collection = attrs.collection;
524
575
  source = {
525
576
  id: id,
@@ -534,11 +585,11 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
534
585
  authProvider: uploadMediaClientConfig.authProvider,
535
586
  occurrenceKey: uuidV4()
536
587
  };
537
- _context8.next = 23;
588
+ _context10.next = 23;
538
589
  return mediaClient.file.copyFile(source, destination, undefined, traceContext);
539
590
 
540
591
  case 23:
541
- mediaFile = _context8.sent;
592
+ mediaFile = _context10.sent;
542
593
  updateMediaNodeAttrs(source.id, {
543
594
  id: mediaFile.id,
544
595
  collection: currentCollectionName,
@@ -547,14 +598,14 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
547
598
 
548
599
  case 25:
549
600
  case "end":
550
- return _context8.stop();
601
+ return _context10.stop();
551
602
  }
552
603
  }
553
- }, _callee8);
604
+ }, _callee10);
554
605
  }));
555
606
 
556
- return function (_x3) {
557
- return _ref8.apply(this, arguments);
607
+ return function (_x4) {
608
+ return _ref11.apply(this, arguments);
558
609
  };
559
610
  }());
560
611
 
@@ -572,54 +623,54 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
572
623
  }, {
573
624
  key: "getRemoteDimensions",
574
625
  value: function () {
575
- var _getRemoteDimensions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
626
+ var _getRemoteDimensions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
576
627
  var mediaProvider, mediaOptions, attrs, height, width, id, collection, viewMediaClientConfig, mediaClient, currentState, imageMetadata;
577
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
628
+ return _regeneratorRuntime.wrap(function _callee11$(_context11) {
578
629
  while (1) {
579
- switch (_context9.prev = _context9.next) {
630
+ switch (_context11.prev = _context11.next) {
580
631
  case 0:
581
- _context9.next = 2;
632
+ _context11.next = 2;
582
633
  return this.props.mediaProvider;
583
634
 
584
635
  case 2:
585
- mediaProvider = _context9.sent;
636
+ mediaProvider = _context11.sent;
586
637
  mediaOptions = this.props.mediaOptions;
587
638
  attrs = this.getAttrs();
588
639
 
589
640
  if (!(!mediaProvider || !attrs)) {
590
- _context9.next = 7;
641
+ _context11.next = 7;
591
642
  break;
592
643
  }
593
644
 
594
- return _context9.abrupt("return", false);
645
+ return _context11.abrupt("return", false);
595
646
 
596
647
  case 7:
597
648
  height = attrs.height, width = attrs.width;
598
649
 
599
650
  if (!(attrs.type === 'external' || !attrs.id)) {
600
- _context9.next = 10;
651
+ _context11.next = 10;
601
652
  break;
602
653
  }
603
654
 
604
- return _context9.abrupt("return", false);
655
+ return _context11.abrupt("return", false);
605
656
 
606
657
  case 10:
607
658
  id = attrs.id, collection = attrs.collection;
608
659
 
609
660
  if (!(height && width)) {
610
- _context9.next = 13;
661
+ _context11.next = 13;
611
662
  break;
612
663
  }
613
664
 
614
- return _context9.abrupt("return", false);
665
+ return _context11.abrupt("return", false);
615
666
 
616
667
  case 13:
617
668
  if (!(mediaOptions && !mediaOptions.allowRemoteDimensionsFetch)) {
618
- _context9.next = 15;
669
+ _context11.next = 15;
619
670
  break;
620
671
  }
621
672
 
622
- return _context9.abrupt("return", {
673
+ return _context11.abrupt("return", {
623
674
  id: id,
624
675
  height: DEFAULT_IMAGE_HEIGHT,
625
676
  width: DEFAULT_IMAGE_WIDTH
@@ -628,39 +679,39 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
628
679
  case 15:
629
680
  viewMediaClientConfig = mediaProvider.viewMediaClientConfig;
630
681
  mediaClient = getMediaClient(viewMediaClientConfig);
631
- _context9.next = 19;
682
+ _context11.next = 19;
632
683
  return mediaClient.file.getCurrentState(id, {
633
684
  collectionName: collection
634
685
  });
635
686
 
636
687
  case 19:
637
- currentState = _context9.sent;
688
+ currentState = _context11.sent;
638
689
 
639
690
  if (isImageRepresentationReady(currentState)) {
640
- _context9.next = 22;
691
+ _context11.next = 22;
641
692
  break;
642
693
  }
643
694
 
644
- return _context9.abrupt("return", false);
695
+ return _context11.abrupt("return", false);
645
696
 
646
697
  case 22:
647
- _context9.next = 24;
698
+ _context11.next = 24;
648
699
  return mediaClient.getImageMetadata(id, {
649
700
  collection: collection
650
701
  });
651
702
 
652
703
  case 24:
653
- imageMetadata = _context9.sent;
704
+ imageMetadata = _context11.sent;
654
705
 
655
706
  if (!(!imageMetadata || !imageMetadata.original)) {
656
- _context9.next = 27;
707
+ _context11.next = 27;
657
708
  break;
658
709
  }
659
710
 
660
- return _context9.abrupt("return", false);
711
+ return _context11.abrupt("return", false);
661
712
 
662
713
  case 27:
663
- return _context9.abrupt("return", {
714
+ return _context11.abrupt("return", {
664
715
  id: id,
665
716
  height: imageMetadata.original.height || DEFAULT_IMAGE_HEIGHT,
666
717
  width: imageMetadata.original.width || DEFAULT_IMAGE_WIDTH
@@ -668,10 +719,10 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
668
719
 
669
720
  case 28:
670
721
  case "end":
671
- return _context9.stop();
722
+ return _context11.stop();
672
723
  }
673
724
  }
674
- }, _callee9, this);
725
+ }, _callee11, this);
675
726
  }));
676
727
 
677
728
  function getRemoteDimensions() {
@@ -683,47 +734,47 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
683
734
  }, {
684
735
  key: "handleExternalMedia",
685
736
  value: function () {
686
- var _handleExternalMedia = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(getPos) {
687
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
737
+ var _handleExternalMedia = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(getPos) {
738
+ return _regeneratorRuntime.wrap(function _callee12$(_context12) {
688
739
  while (1) {
689
- switch (_context10.prev = _context10.next) {
740
+ switch (_context12.prev = _context12.next) {
690
741
  case 0:
691
742
  if (!this.isMediaBlobUrl()) {
692
- _context10.next = 12;
743
+ _context12.next = 12;
693
744
  break;
694
745
  }
695
746
 
696
- _context10.prev = 1;
697
- _context10.next = 4;
747
+ _context12.prev = 1;
748
+ _context12.next = 4;
698
749
  return this.copyNodeFromBlobUrl(getPos);
699
750
 
700
751
  case 4:
701
- _context10.next = 10;
752
+ _context12.next = 10;
702
753
  break;
703
754
 
704
755
  case 6:
705
- _context10.prev = 6;
706
- _context10.t0 = _context10["catch"](1);
707
- _context10.next = 10;
756
+ _context12.prev = 6;
757
+ _context12.t0 = _context12["catch"](1);
758
+ _context12.next = 10;
708
759
  return this.uploadExternalMedia(getPos);
709
760
 
710
761
  case 10:
711
- _context10.next = 14;
762
+ _context12.next = 14;
712
763
  break;
713
764
 
714
765
  case 12:
715
- _context10.next = 14;
766
+ _context12.next = 14;
716
767
  return this.uploadExternalMedia(getPos);
717
768
 
718
769
  case 14:
719
770
  case "end":
720
- return _context10.stop();
771
+ return _context12.stop();
721
772
  }
722
773
  }
723
- }, _callee10, this, [[1, 6]]);
774
+ }, _callee12, this, [[1, 6]]);
724
775
  }));
725
776
 
726
- function handleExternalMedia(_x4) {
777
+ function handleExternalMedia(_x5) {
727
778
  return _handleExternalMedia.apply(this, arguments);
728
779
  }
729
780