@atlaskit/editor-core 150.0.0 → 151.0.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 (209) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/cjs/actions/index.js +5 -23
  3. package/dist/cjs/create-editor/ErrorBoundary.js +113 -79
  4. package/dist/cjs/create-editor/ReactEditorView.js +145 -31
  5. package/dist/cjs/create-editor/create-plugins-list.js +4 -2
  6. package/dist/cjs/editor.js +101 -40
  7. package/dist/cjs/labs/next/presets/cxhtml.js +2 -1
  8. package/dist/cjs/plugins/analytics/types/enums.js +3 -1
  9. package/dist/cjs/plugins/base/index.js +4 -3
  10. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +66 -36
  11. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
  12. package/dist/cjs/plugins/card/index.js +13 -2
  13. package/dist/cjs/plugins/card/nodeviews/embedCard.js +1 -0
  14. package/dist/cjs/plugins/card/pm-plugins/main.js +7 -2
  15. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +10 -3
  16. package/dist/cjs/plugins/code-block/toolbar.js +1 -1
  17. package/dist/cjs/plugins/collab-edit/ui/to-avatar.js +4 -8
  18. package/dist/cjs/plugins/emoji/styles.js +1 -1
  19. package/dist/cjs/plugins/extension/pm-plugins/main.js +1 -4
  20. package/dist/cjs/plugins/extension/toolbar.js +28 -23
  21. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +8 -3
  22. package/dist/cjs/plugins/find-replace/ui/Find.js +27 -7
  23. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +3 -3
  24. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  25. package/dist/cjs/plugins/hyperlink/utils.js +6 -69
  26. package/dist/cjs/plugins/media/index.js +14 -3
  27. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +24 -10
  28. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +179 -0
  29. package/dist/cjs/plugins/media/pm-plugins/main.js +18 -9
  30. package/dist/cjs/plugins/media/toolbar/index.js +49 -17
  31. package/dist/cjs/plugins/media/toolbar/utils.js +20 -2
  32. package/dist/cjs/plugins/media/utils/media-files.js +67 -1
  33. package/dist/cjs/plugins/mentions/type-ahead/index.js +39 -3
  34. package/dist/cjs/plugins/panel/index.js +2 -3
  35. package/dist/cjs/plugins/panel/message.js +47 -0
  36. package/dist/cjs/plugins/panel/toolbar.js +64 -84
  37. package/dist/cjs/plugins/panel/utils.js +2 -2
  38. package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -3
  39. package/dist/cjs/plugins/status/styles.js +1 -1
  40. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  41. package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -3
  42. package/dist/cjs/profiler/render-count.js +82 -0
  43. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -5
  44. package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +55 -19
  45. package/dist/cjs/version-wrapper.js +1 -1
  46. package/dist/cjs/version.json +1 -1
  47. package/dist/es2019/actions/index.js +6 -28
  48. package/dist/es2019/create-editor/ErrorBoundary.js +73 -60
  49. package/dist/es2019/create-editor/ReactEditorView.js +130 -23
  50. package/dist/es2019/create-editor/create-plugins-list.js +4 -2
  51. package/dist/es2019/editor.js +74 -35
  52. package/dist/es2019/labs/next/presets/cxhtml.js +2 -1
  53. package/dist/es2019/plugins/analytics/types/enums.js +3 -1
  54. package/dist/es2019/plugins/base/index.js +4 -3
  55. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +63 -35
  56. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -1
  57. package/dist/es2019/plugins/card/index.js +7 -2
  58. package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -0
  59. package/dist/es2019/plugins/card/pm-plugins/main.js +9 -2
  60. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +12 -5
  61. package/dist/es2019/plugins/code-block/toolbar.js +1 -1
  62. package/dist/es2019/plugins/collab-edit/ui/to-avatar.js +2 -6
  63. package/dist/es2019/plugins/emoji/styles.js +2 -0
  64. package/dist/es2019/plugins/extension/pm-plugins/main.js +1 -4
  65. package/dist/es2019/plugins/extension/toolbar.js +30 -25
  66. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +8 -4
  67. package/dist/es2019/plugins/find-replace/ui/Find.js +27 -6
  68. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  69. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  70. package/dist/es2019/plugins/hyperlink/utils.js +3 -59
  71. package/dist/es2019/plugins/media/index.js +13 -4
  72. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +16 -7
  73. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +88 -0
  74. package/dist/es2019/plugins/media/pm-plugins/main.js +20 -11
  75. package/dist/es2019/plugins/media/toolbar/index.js +44 -15
  76. package/dist/es2019/plugins/media/toolbar/utils.js +16 -0
  77. package/dist/es2019/plugins/media/utils/media-files.js +68 -2
  78. package/dist/es2019/plugins/mentions/type-ahead/index.js +21 -2
  79. package/dist/es2019/plugins/panel/index.js +3 -4
  80. package/dist/es2019/plugins/panel/message.js +38 -0
  81. package/dist/es2019/plugins/panel/toolbar.js +52 -71
  82. package/dist/es2019/plugins/panel/utils.js +2 -2
  83. package/dist/es2019/plugins/paste/linkify-md-plugin.js +2 -2
  84. package/dist/es2019/plugins/status/styles.js +2 -0
  85. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  86. package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -3
  87. package/dist/es2019/profiler/render-count.js +60 -0
  88. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -2
  89. package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +51 -18
  90. package/dist/es2019/version-wrapper.js +1 -1
  91. package/dist/es2019/version.json +1 -1
  92. package/dist/esm/actions/index.js +6 -24
  93. package/dist/esm/create-editor/ErrorBoundary.js +113 -78
  94. package/dist/esm/create-editor/ReactEditorView.js +146 -31
  95. package/dist/esm/create-editor/create-plugins-list.js +4 -2
  96. package/dist/esm/editor.js +100 -40
  97. package/dist/esm/labs/next/presets/cxhtml.js +2 -1
  98. package/dist/esm/plugins/analytics/types/enums.js +3 -1
  99. package/dist/esm/plugins/base/index.js +4 -3
  100. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +64 -36
  101. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
  102. package/dist/esm/plugins/card/index.js +13 -2
  103. package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -0
  104. package/dist/esm/plugins/card/pm-plugins/main.js +7 -2
  105. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +12 -5
  106. package/dist/esm/plugins/code-block/toolbar.js +1 -1
  107. package/dist/esm/plugins/collab-edit/ui/to-avatar.js +4 -8
  108. package/dist/esm/plugins/emoji/styles.js +1 -1
  109. package/dist/esm/plugins/extension/pm-plugins/main.js +1 -4
  110. package/dist/esm/plugins/extension/toolbar.js +28 -23
  111. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +8 -4
  112. package/dist/esm/plugins/find-replace/ui/Find.js +27 -7
  113. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  114. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  115. package/dist/esm/plugins/hyperlink/utils.js +3 -59
  116. package/dist/esm/plugins/media/index.js +14 -4
  117. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +24 -10
  118. package/dist/esm/plugins/media/nodeviews/mediaInline.js +147 -0
  119. package/dist/esm/plugins/media/pm-plugins/main.js +19 -11
  120. package/dist/esm/plugins/media/toolbar/index.js +47 -19
  121. package/dist/esm/plugins/media/toolbar/utils.js +15 -1
  122. package/dist/esm/plugins/media/utils/media-files.js +60 -2
  123. package/dist/esm/plugins/mentions/type-ahead/index.js +39 -3
  124. package/dist/esm/plugins/panel/index.js +3 -4
  125. package/dist/esm/plugins/panel/message.js +38 -0
  126. package/dist/esm/plugins/panel/toolbar.js +57 -77
  127. package/dist/esm/plugins/panel/utils.js +2 -2
  128. package/dist/esm/plugins/paste/linkify-md-plugin.js +2 -2
  129. package/dist/esm/plugins/status/styles.js +1 -1
  130. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  131. package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -3
  132. package/dist/esm/profiler/render-count.js +57 -0
  133. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -5
  134. package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +53 -20
  135. package/dist/esm/version-wrapper.js +1 -1
  136. package/dist/esm/version.json +1 -1
  137. package/dist/types/create-editor/ErrorBoundary.d.ts +6 -6
  138. package/dist/types/create-editor/ReactEditorView.d.ts +15 -3
  139. package/dist/types/editor.d.ts +3 -1
  140. package/dist/types/plugins/analytics/analytics-queue.d.ts +1 -1
  141. package/dist/types/plugins/analytics/index.d.ts +1 -1
  142. package/dist/types/plugins/analytics/types/enums.d.ts +4 -2
  143. package/dist/types/plugins/analytics/types/events.d.ts +7 -2
  144. package/dist/types/plugins/analytics/types/general-events.d.ts +4 -1
  145. package/dist/types/plugins/analytics/types/index.d.ts +1 -1
  146. package/dist/types/plugins/analytics/types/insert-events.d.ts +6 -1
  147. package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -0
  148. package/dist/types/plugins/base/index.d.ts +1 -0
  149. package/dist/types/plugins/base/pm-plugins/frozen-editor.d.ts +3 -2
  150. package/dist/types/plugins/card/pm-plugins/main.d.ts +2 -3
  151. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
  152. package/dist/types/plugins/card/types.d.ts +6 -0
  153. package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
  154. package/dist/types/plugins/extension/types.d.ts +0 -2
  155. package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -2
  156. package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
  157. package/dist/types/plugins/floating-toolbar/types.d.ts +1 -1
  158. package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -1
  159. package/dist/types/plugins/hyperlink/utils.d.ts +0 -21
  160. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
  161. package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +27 -0
  162. package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -2
  163. package/dist/types/plugins/media/toolbar/utils.d.ts +2 -0
  164. package/dist/types/plugins/media/utils/media-files.d.ts +8 -0
  165. package/dist/types/plugins/panel/message.d.ts +37 -0
  166. package/dist/types/plugins/panel/toolbar.d.ts +4 -37
  167. package/dist/types/plugins/panel/types.d.ts +1 -0
  168. package/dist/types/plugins/quick-insert/index.d.ts +1 -1
  169. package/dist/types/profiler/render-count.d.ts +14 -0
  170. package/dist/types/types/feature-flags.d.ts +8 -0
  171. package/dist/types/ui/LinkSearch/types.d.ts +1 -0
  172. package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +17 -1
  173. package/package.json +20 -17
  174. package/dist/cjs/plugins/caption/nodeviews/index.test.js +0 -135
  175. package/dist/cjs/plugins/caption/pm-plugins/keymap.test.js +0 -203
  176. package/dist/cjs/plugins/caption/pm-plugins/main.test.js +0 -141
  177. package/dist/cjs/plugins/code-block/language-list.test.js +0 -74
  178. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -101
  179. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -98
  180. package/dist/cjs/plugins/media/commands/captions.test.js +0 -149
  181. package/dist/cjs/plugins/media/commands/linking.test.js +0 -296
  182. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -50
  183. package/dist/cjs/plugins/panel/toolbar.test.js +0 -250
  184. package/dist/cjs/ui/ColorPickerButton/index.test.js +0 -123
  185. package/dist/cjs/ui/PortalProvider/index.test.js +0 -139
  186. package/dist/es2019/plugins/caption/nodeviews/index.test.js +0 -122
  187. package/dist/es2019/plugins/caption/pm-plugins/keymap.test.js +0 -193
  188. package/dist/es2019/plugins/caption/pm-plugins/main.test.js +0 -132
  189. package/dist/es2019/plugins/code-block/language-list.test.js +0 -69
  190. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -83
  191. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
  192. package/dist/es2019/plugins/media/commands/captions.test.js +0 -126
  193. package/dist/es2019/plugins/media/commands/linking.test.js +0 -208
  194. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
  195. package/dist/es2019/plugins/panel/toolbar.test.js +0 -200
  196. package/dist/es2019/ui/ColorPickerButton/index.test.js +0 -88
  197. package/dist/es2019/ui/PortalProvider/index.test.js +0 -115
  198. package/dist/esm/plugins/caption/nodeviews/index.test.js +0 -125
  199. package/dist/esm/plugins/caption/pm-plugins/keymap.test.js +0 -195
  200. package/dist/esm/plugins/caption/pm-plugins/main.test.js +0 -124
  201. package/dist/esm/plugins/code-block/language-list.test.js +0 -71
  202. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -92
  203. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
  204. package/dist/esm/plugins/media/commands/captions.test.js +0 -135
  205. package/dist/esm/plugins/media/commands/linking.test.js +0 -268
  206. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
  207. package/dist/esm/plugins/panel/toolbar.test.js +0 -230
  208. package/dist/esm/ui/ColorPickerButton/index.test.js +0 -107
  209. package/dist/esm/ui/PortalProvider/index.test.js +0 -129
@@ -37,28 +37,33 @@ var isLayoutSupported = function isLayoutSupported(state, selectedExtNode) {
37
37
  return !!((selectedExtNode.node.type === bodiedExtension || selectedExtNode.node.type === extension && !hasParentNodeOfType([bodiedExtension, table, expand].filter(Boolean))(selection)) && !hasParentNodeOfType([layoutSection])(selection));
38
38
  };
39
39
 
40
- var breakoutOptions = function breakoutOptions(state, formatMessage, extensionState, breakoutEnabled) {
41
- var nodeWithPos = getSelectedExtension(state, true);
42
- var layout = extensionState.layout;
43
- return nodeWithPos && breakoutEnabled && isLayoutSupported(state, nodeWithPos) ? [{
44
- type: 'button',
45
- icon: CenterIcon,
46
- onClick: updateExtensionLayout('default'),
47
- selected: layout === 'default',
48
- title: formatMessage(commonMessages.layoutFixedWidth)
49
- }, {
50
- type: 'button',
51
- icon: WideIcon,
52
- onClick: updateExtensionLayout('wide'),
53
- selected: layout === 'wide',
54
- title: formatMessage(commonMessages.layoutWide)
55
- }, {
56
- type: 'button',
57
- icon: FullWidthIcon,
58
- onClick: updateExtensionLayout('full-width'),
59
- selected: layout === 'full-width',
60
- title: formatMessage(commonMessages.layoutFullWidth)
61
- }] : [];
40
+ var breakoutOptions = function breakoutOptions(state, formatMessage, breakoutEnabled) {
41
+ var nodeWithPos = getSelectedExtension(state, true); // we should only return breakout options when breakouts are enabled and the node supports them
42
+
43
+ if (nodeWithPos && breakoutEnabled && isLayoutSupported(state, nodeWithPos)) {
44
+ var layout = nodeWithPos.node.attrs.layout;
45
+ return [{
46
+ type: 'button',
47
+ icon: CenterIcon,
48
+ onClick: updateExtensionLayout('default'),
49
+ selected: layout === 'default',
50
+ title: formatMessage(commonMessages.layoutFixedWidth)
51
+ }, {
52
+ type: 'button',
53
+ icon: WideIcon,
54
+ onClick: updateExtensionLayout('wide'),
55
+ selected: layout === 'wide',
56
+ title: formatMessage(commonMessages.layoutWide)
57
+ }, {
58
+ type: 'button',
59
+ icon: FullWidthIcon,
60
+ onClick: updateExtensionLayout('full-width'),
61
+ selected: layout === 'full-width',
62
+ title: formatMessage(commonMessages.layoutFullWidth)
63
+ }];
64
+ }
65
+
66
+ return [];
62
67
  };
63
68
 
64
69
  var editButton = function editButton(formatMessage, extensionState) {
@@ -94,7 +99,7 @@ export var getToolbarConfig = function getToolbarConfig() {
94
99
  if (extensionState && !extensionState.showContextPanel && extensionState.element) {
95
100
  var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension];
96
101
  var editButtonArray = editButton(formatMessage, extensionState);
97
- var breakoutButtonArray = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled);
102
+ var breakoutButtonArray = breakoutOptions(state, formatMessage, breakoutEnabled);
98
103
  return {
99
104
  title: 'Extension floating controls',
100
105
  getDomRef: function getDomRef() {
@@ -6,15 +6,17 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7
7
 
8
8
  import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
9
-
9
+ import { browser } from '@atlaskit/editor-common';
10
10
  /**
11
11
  * Transforms EditorProps to an FeatureFlags object,
12
12
  * which is used by both current and archv3 editors.
13
13
  */
14
+
14
15
  export function createFeatureFlagsFromProps(props) {
15
- var _props$allowTextColor, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$featureFlags10, _props$featureFlags11, _props$allowTables5, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25;
16
+ var _props$allowTextColor, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$featureFlags10, _props$featureFlags11, _props$allowTables5, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
16
17
 
17
- return _objectSpread(_objectSpread({}, normalizeFeatureFlags(props.featureFlags)), {}, {
18
+ var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
19
+ return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
18
20
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
19
21
  interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
20
22
  placeholderBracketHint: !!props.placeholderBracketHint,
@@ -39,6 +41,8 @@ export function createFeatureFlagsFromProps(props) {
39
41
  errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.useErrorBoundaryDocStructure) : false),
40
42
  synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.synchronyErrorDocStructure) : false),
41
43
  enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.enableViewUpdateSubscription) : false),
42
- collabAvatarScroll: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.collabAvatarScroll) : false)
44
+ collabAvatarScroll: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.collabAvatarScroll) : false),
45
+ ufo: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.ufo) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.ufo) : false),
46
+ codeBlockSyntaxHighlighting: Boolean(typeof normalizedFeatureFlags.codeBlockSyntaxHighlighting === 'boolean' ? !!normalizedFeatureFlags.codeBlockSyntaxHighlighting && !browser.safari : false)
43
47
  });
44
48
  }
@@ -91,13 +91,17 @@ var Find = /*#__PURE__*/function (_React$Component) {
91
91
  });
92
92
 
93
93
  _defineProperty(_assertThisInitialized(_this), "handleFindChange", function (event) {
94
- return _this.skipWhileComposing(function () {
95
- _this.updateFindValue(event.target.value);
96
- });
94
+ _this.updateFindValue(event.target.value);
97
95
  });
98
96
 
99
97
  _defineProperty(_assertThisInitialized(_this), "updateFindValue", function (value) {
100
- _this.props.onFind(value);
98
+ _this.setState({
99
+ localFindText: value
100
+ });
101
+
102
+ _this.skipWhileComposing(function () {
103
+ _this.props.onFind(value);
104
+ });
101
105
  });
102
106
 
103
107
  _defineProperty(_assertThisInitialized(_this), "handleFindKeyDown", function (event) {
@@ -177,7 +181,13 @@ var Find = /*#__PURE__*/function (_React$Component) {
177
181
  });
178
182
  _this.closeIcon = /*#__PURE__*/React.createElement(EditorCloseIcon, {
179
183
  label: _this.closeFindReplaceDialog
180
- });
184
+ }); // We locally manage the value of the input inside this component in order to support compositions.
185
+ // This requires some additional work inside componentDidUpdate to ensure we support changes that
186
+ // occur to this value which do not originate from this component.
187
+
188
+ _this.state = {
189
+ localFindText: _this.props.findText || ''
190
+ };
181
191
  return _this;
182
192
  }
183
193
 
@@ -190,7 +200,17 @@ var Find = /*#__PURE__*/function (_React$Component) {
190
200
  }, {
191
201
  key: "componentDidUpdate",
192
202
  value: function componentDidUpdate() {
193
- this.focusFindTextfield();
203
+ this.focusFindTextfield(); // If the external prop findText changes and we aren't in a composition we should update to the
204
+ // use the external prop value.
205
+ //
206
+ // An example of where this may happen is when a find occurs through the user selecting some text
207
+ // and pressing Mod-f.
208
+
209
+ if (!this.isComposing && this.props.findText !== this.state.localFindText) {
210
+ this.setState({
211
+ localFindText: this.props.findText || ''
212
+ });
213
+ }
194
214
  }
195
215
  }, {
196
216
  key: "render",
@@ -209,7 +229,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
209
229
  name: "find",
210
230
  appearance: "none",
211
231
  placeholder: this.find,
212
- value: findText,
232
+ value: this.state.localFindText,
213
233
  ref: this.findTextfieldRef,
214
234
  autoComplete: "off",
215
235
  onChange: this.handleFindChange,
@@ -1,6 +1,6 @@
1
1
  import { keymap } from 'prosemirror-keymap';
2
+ import { getLinkMatch } from '@atlaskit/adf-schema';
2
3
  import * as keymaps from '../../../keymaps';
3
- import { getLinkMatch } from '../utils';
4
4
  import { stateKey } from '../pm-plugins/main';
5
5
  import { showLinkToolbar, hideLinkToolbar } from '../commands';
6
6
  import { queueCards } from '../../card/pm-plugins/actions';
@@ -89,7 +89,8 @@ var mapActivityProviderResultToLinkSearchItemData = function mapActivityProvider
89
89
  container: container,
90
90
  iconUrl: iconUrl,
91
91
  url: url,
92
- lastViewedDate: viewedTimestamp ? new Date(viewedTimestamp) : undefined
92
+ lastViewedDate: viewedTimestamp ? new Date(viewedTimestamp) : undefined,
93
+ prefetch: true
93
94
  };
94
95
  };
95
96
 
@@ -106,7 +107,8 @@ var mapSearchProviderResultToLinkSearchItemData = function mapSearchProviderResu
106
107
  name: title,
107
108
  url: url,
108
109
  lastUpdatedDate: updatedTimestamp ? new Date(updatedTimestamp) : undefined,
109
- icon: contentType && mapContentTypeToIcon[contentType] || defaultIcon
110
+ icon: contentType && mapContentTypeToIcon[contentType] || defaultIcon,
111
+ prefetch: false
110
112
  };
111
113
  };
112
114
 
@@ -463,7 +465,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
463
465
  }
464
466
 
465
467
  if (interaction === 'click' || _this.isUrlPopulatedWithSelectedItem()) {
466
- var _pluginState$searchSe3;
468
+ var _pluginState$searchSe3, _selectedItem$prefetc;
467
469
 
468
470
  /**
469
471
  * When it's a mouse click even or the selectedItem.url matches displayUrl, we think
@@ -481,7 +483,8 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
481
483
  trigger: interaction,
482
484
  resultCount: items.length,
483
485
  selectedResultId: selectedItem.objectId,
484
- selectedRelativePosition: selectedIndex
486
+ selectedRelativePosition: selectedIndex,
487
+ prefetch: (_selectedItem$prefetc = selectedItem.prefetch) !== null && _selectedItem$prefetc !== void 0 ? _selectedItem$prefetc : false
485
488
  },
486
489
  eventType: EVENT_TYPE.UI
487
490
  });
@@ -1,28 +1,7 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import LinkifyIt from 'linkify-it';
4
3
  import { mapSlice } from '../../utils/slice';
5
- import { isSafeUrl } from '@atlaskit/adf-schema';
6
- export var LINK_REGEXP = /(https?|ftp):\/\/[^\s]+/;
7
- var linkify = LinkifyIt();
8
- linkify.add('sourcetree:', 'http:');
9
- var tlds = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
10
- var tlds2Char = 'a[cdefgilmnoqrtuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrtuvwxyz]|n[acefgilopruz]|om|p[aefghkmnrtw]|qa|r[eosuw]|s[abcdegijklmnrtuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
11
- tlds.push(tlds2Char);
12
- linkify.tlds(tlds, false);
13
- export function getLinkMatch(str) {
14
- if (!str) {
15
- return null;
16
- }
17
-
18
- var match = linkifyMatch(str);
19
-
20
- if (!match.length) {
21
- match = linkify.match(str);
22
- }
23
-
24
- return match && match[0];
25
- }
4
+ import { isSafeUrl, linkify, normalizeUrl as normaliseLinkHref } from '@atlaskit/adf-schema';
26
5
  /**
27
6
  * Instance of class LinkMatcher are used in autoformatting in place of Regex.
28
7
  * Hence it has been made similar to regex with an exec method.
@@ -99,8 +78,7 @@ export function normalizeUrl(url) {
99
78
  return url;
100
79
  }
101
80
 
102
- var match = getLinkMatch(url);
103
- return match && match.url || '';
81
+ return normaliseLinkHref(url);
104
82
  }
105
83
  export function linkifyContent(schema) {
106
84
  return function (slice) {
@@ -168,38 +146,4 @@ function findLinkMatches(text) {
168
146
  }
169
147
 
170
148
  return matches;
171
- }
172
-
173
- export var linkifyMatch = function linkifyMatch(text) {
174
- var matches = [];
175
-
176
- if (!LINK_REGEXP.test(text)) {
177
- return matches;
178
- }
179
-
180
- var startpos = 0;
181
- var substr;
182
-
183
- while (substr = text.substr(startpos)) {
184
- var link = (substr.match(LINK_REGEXP) || [''])[0];
185
-
186
- if (link) {
187
- var index = substr.search(LINK_REGEXP);
188
- var start = index >= 0 ? index + startpos : index;
189
- var end = start + link.length;
190
- matches.push({
191
- index: start,
192
- lastIndex: end,
193
- raw: link,
194
- url: link,
195
- text: link,
196
- schema: ''
197
- });
198
- startpos += end;
199
- } else {
200
- break;
201
- }
202
- }
203
-
204
- return matches;
205
- };
149
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { media, mediaGroup, mediaSingle, mediaSingleWithCaption } from '@atlaskit/adf-schema';
2
+ import { media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline } from '@atlaskit/adf-schema';
3
3
  import { stateKey as pluginKey, createPlugin } from './pm-plugins/main';
4
4
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
5
5
  import { createPlugin as createMediaEditorPlugin } from './pm-plugins/media-editor';
@@ -21,6 +21,7 @@ import MediaEditor from './ui/MediaEditor';
21
21
  import { MediaPickerComponents } from './ui/MediaPicker';
22
22
  import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
23
23
  import { ReactMediaNode } from './nodeviews/mediaNodeView';
24
+ import { ReactMediaInlineNode } from './nodeviews/mediaInline';
24
25
  export { insertMediaSingleNode } from './utils/media-single';
25
26
 
26
27
  var mediaPlugin = function mediaPlugin(options) {
@@ -32,6 +33,8 @@ var mediaPlugin = function mediaPlugin(options) {
32
33
  allowMediaGroup = _ref$allowMediaGroup === void 0 ? true : _ref$allowMediaGroup,
33
34
  _ref$allowMediaSingle = _ref.allowMediaSingle,
34
35
  allowMediaSingle = _ref$allowMediaSingle === void 0 ? false : _ref$allowMediaSingle,
36
+ _ref$allowMediaInline = _ref.allowMediaInline,
37
+ allowMediaInline = _ref$allowMediaInline === void 0 ? false : _ref$allowMediaInline,
35
38
  featureFlags = _ref.featureFlags;
36
39
 
37
40
  var captions = getMediaFeatureFlag('captions', featureFlags);
@@ -45,6 +48,9 @@ var mediaPlugin = function mediaPlugin(options) {
45
48
  }, {
46
49
  name: 'media',
47
50
  node: media
51
+ }, {
52
+ name: 'mediaInline',
53
+ node: mediaInline
48
54
  }].filter(function (node) {
49
55
  if (node.name === 'mediaGroup') {
50
56
  return allowMediaGroup;
@@ -54,6 +60,10 @@ var mediaPlugin = function mediaPlugin(options) {
54
60
  return allowMediaSingle;
55
61
  }
56
62
 
63
+ if (node.name === 'mediaInline') {
64
+ return allowMediaInline;
65
+ }
66
+
57
67
  return true;
58
68
  });
59
69
  },
@@ -74,7 +84,8 @@ var mediaPlugin = function mediaPlugin(options) {
74
84
  nodeViews: {
75
85
  mediaGroup: ReactMediaGroupNode(portalProviderAPI, eventDispatcher, providerFactory, options),
76
86
  mediaSingle: ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, dispatchAnalyticsEvent, options),
77
- media: ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options)
87
+ media: ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options),
88
+ mediaInline: ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory)
78
89
  },
79
90
  errorReporter: errorReporter,
80
91
  uploadErrorHandler: options && options.uploadErrorHandler,
@@ -203,8 +214,7 @@ var mediaPlugin = function mediaPlugin(options) {
203
214
  action: function action(insert, state) {
204
215
  var pluginState = pluginKey.getState(state);
205
216
  pluginState.showMediaPicker();
206
- var tr = insert('');
207
- return addAnalytics(state, tr, {
217
+ return addAnalytics(state, insert(''), {
208
218
  action: ACTION.OPENED,
209
219
  actionSubject: ACTION_SUBJECT.PICKER,
210
220
  actionSubjectId: ACTION_SUBJECT_ID.PICKER_CLOUD,
@@ -8,6 +8,10 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
 
11
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
12
+
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
14
+
11
15
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
16
 
13
17
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -130,23 +134,33 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
130
134
  // We declared this to get a fresh position every time
131
135
  var getNodePos = function getNodePos() {
132
136
  return getPos() + idx + 1;
137
+ }; // Media Inline creates a floating toolbar with the same options, excludes these options if enabled
138
+
139
+
140
+ var mediaInlineOptions = function mediaInlineOptions() {
141
+ var allowMediaInline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
142
+
143
+ if (!allowMediaInline) {
144
+ return {
145
+ shouldEnableDownloadButton: mediaOptions.enableDownloadButton,
146
+ actions: [{
147
+ handler: disabled ? function () {} : _this.mediaPluginState.handleMediaNodeRemoval.bind(null, undefined, getNodePos),
148
+ icon: /*#__PURE__*/React.createElement(EditorCloseIcon, {
149
+ label: "delete"
150
+ })
151
+ }]
152
+ };
153
+ }
133
154
  };
134
155
 
135
- return {
156
+ return _objectSpread({
136
157
  identifier: _this.getIdentifier(item),
137
158
  isLazy: allowLazyLoading,
138
159
  selected: _this.isNodeSelected(getNodePos()),
139
160
  onClick: function onClick() {
140
161
  setNodeSelection(_this.props.view, getNodePos());
141
- },
142
- shouldEnableDownloadButton: mediaOptions.enableDownloadButton,
143
- actions: [{
144
- handler: disabled ? function () {} : _this.mediaPluginState.handleMediaNodeRemoval.bind(null, undefined, getNodePos),
145
- icon: /*#__PURE__*/React.createElement(EditorCloseIcon, {
146
- label: "delete"
147
- })
148
- }]
149
- };
162
+ }
163
+ }, mediaInlineOptions(mediaOptions.allowMediaInline));
150
164
  });
151
165
 
152
166
  return /*#__PURE__*/React.createElement(Filmstrip, {
@@ -0,0 +1,147 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _inherits from "@babel/runtime/helpers/inherits";
4
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
8
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
9
+
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+
12
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
+
14
+ import React, { useEffect, useState } from 'react';
15
+ import { ReactNodeView } from '../../../nodeviews/';
16
+ import { MediaInlineCard } from '@atlaskit/media-card';
17
+ import { WithProviders } from '@atlaskit/editor-common';
18
+ export var MediaInline = function MediaInline(props) {
19
+ var _useState = useState({}),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ viewMediaClientConfig = _useState2[0],
22
+ setViewMediaClientConfig = _useState2[1];
23
+
24
+ useEffect(function () {
25
+ updateViewMediaClientConfig(props);
26
+ }, [props]);
27
+
28
+ var updateViewMediaClientConfig = /*#__PURE__*/function () {
29
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(props) {
30
+ var mediaProvider, _viewMediaClientConfig;
31
+
32
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
33
+ while (1) {
34
+ switch (_context.prev = _context.next) {
35
+ case 0:
36
+ _context.next = 2;
37
+ return props.mediaProvider;
38
+
39
+ case 2:
40
+ mediaProvider = _context.sent;
41
+
42
+ if (mediaProvider) {
43
+ _viewMediaClientConfig = mediaProvider.viewMediaClientConfig;
44
+ setViewMediaClientConfig(_viewMediaClientConfig);
45
+ }
46
+
47
+ case 4:
48
+ case "end":
49
+ return _context.stop();
50
+ }
51
+ }
52
+ }, _callee);
53
+ }));
54
+
55
+ return function updateViewMediaClientConfig(_x) {
56
+ return _ref.apply(this, arguments);
57
+ };
58
+ }();
59
+
60
+ var _props$node$attrs = props.node.attrs,
61
+ id = _props$node$attrs.id,
62
+ collection = _props$node$attrs.collection;
63
+ var identifier = {
64
+ id: id,
65
+ mediaItemType: 'file',
66
+ collectionName: collection
67
+ };
68
+ return /*#__PURE__*/React.createElement(MediaInlineCard, {
69
+ identifier: identifier,
70
+ mediaClientConfig: viewMediaClientConfig
71
+ });
72
+ };
73
+ export var MediaInlineNodeView = /*#__PURE__*/function (_ReactNodeView) {
74
+ _inherits(MediaInlineNodeView, _ReactNodeView);
75
+
76
+ var _super = _createSuper(MediaInlineNodeView);
77
+
78
+ function MediaInlineNodeView() {
79
+ _classCallCheck(this, MediaInlineNodeView);
80
+
81
+ return _super.apply(this, arguments);
82
+ }
83
+
84
+ _createClass(MediaInlineNodeView, [{
85
+ key: "createDomRef",
86
+ value: function createDomRef() {
87
+ var domRef = document.createElement('span');
88
+ domRef.contentEditable = 'false';
89
+ return domRef;
90
+ }
91
+ }, {
92
+ key: "getContentDOM",
93
+ value: function getContentDOM() {
94
+ var dom = document.createElement('span');
95
+ return {
96
+ dom: dom
97
+ };
98
+ }
99
+ }, {
100
+ key: "ignoreMutation",
101
+ value: function ignoreMutation() {
102
+ return true;
103
+ }
104
+ }, {
105
+ key: "viewShouldUpdate",
106
+ value: function viewShouldUpdate(nextNode) {
107
+ if (this.node.attrs !== nextNode.attrs) {
108
+ return true;
109
+ }
110
+
111
+ return false;
112
+ }
113
+ }, {
114
+ key: "render",
115
+ value: function render(props) {
116
+ var _this = this;
117
+
118
+ var providerFactory = props.providerFactory;
119
+ return /*#__PURE__*/React.createElement(WithProviders, {
120
+ providers: ['mediaProvider'],
121
+ providerFactory: providerFactory,
122
+ renderNode: function renderNode(_ref2) {
123
+ var mediaProvider = _ref2.mediaProvider;
124
+
125
+ if (!mediaProvider) {
126
+ return null;
127
+ }
128
+
129
+ return /*#__PURE__*/React.createElement(MediaInline, {
130
+ identifier: _this.node.attrs.id,
131
+ mediaProvider: mediaProvider,
132
+ node: _this.node
133
+ });
134
+ }
135
+ });
136
+ }
137
+ }]);
138
+
139
+ return MediaInlineNodeView;
140
+ }(ReactNodeView);
141
+ export var ReactMediaInlineNode = function ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory) {
142
+ return function (node, view, getPos) {
143
+ return new MediaInlineNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
144
+ providerFactory: providerFactory
145
+ }).init();
146
+ };
147
+ };