@atlaskit/editor-plugin-media 9.0.0 → 9.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.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/mediaPlugin.js +8 -8
- package/dist/cjs/nodeviews/lazy-media-group.js +2 -2
- package/dist/cjs/nodeviews/lazy-media-inline.js +0 -5
- package/dist/cjs/nodeviews/mediaGroup.js +2 -1
- package/dist/cjs/nodeviews/mediaNodeView/media.js +1 -4
- package/dist/cjs/nodeviews/toDOM-fixes/media.js +0 -4
- package/dist/cjs/nodeviews/toDOM-fixes/mediaGroup.js +1 -5
- package/dist/cjs/nodeviews/toDOM-fixes/mediaInline.js +0 -4
- package/dist/cjs/nodeviews/toDOM-fixes/mediaSingle.js +0 -4
- package/dist/cjs/ui/ImageBorder/index.js +3 -12
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/cjs/ui/toolbar/index.js +1 -1
- package/dist/cjs/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/cjs/ui/toolbar/mediaInline.js +1 -1
- package/dist/es2019/mediaPlugin.js +4 -4
- package/dist/es2019/nodeviews/lazy-media-group.js +2 -2
- package/dist/es2019/nodeviews/lazy-media-inline.js +0 -5
- package/dist/es2019/nodeviews/mediaGroup.js +2 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +1 -4
- package/dist/es2019/nodeviews/toDOM-fixes/media.js +0 -4
- package/dist/es2019/nodeviews/toDOM-fixes/mediaGroup.js +1 -6
- package/dist/es2019/nodeviews/toDOM-fixes/mediaInline.js +0 -4
- package/dist/es2019/nodeviews/toDOM-fixes/mediaSingle.js +0 -4
- package/dist/es2019/ui/ImageBorder/index.js +4 -11
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/es2019/ui/toolbar/index.js +1 -1
- package/dist/es2019/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/es2019/ui/toolbar/mediaInline.js +1 -1
- package/dist/esm/mediaPlugin.js +4 -4
- package/dist/esm/nodeviews/lazy-media-group.js +2 -2
- package/dist/esm/nodeviews/lazy-media-inline.js +0 -5
- package/dist/esm/nodeviews/mediaGroup.js +2 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +1 -4
- package/dist/esm/nodeviews/toDOM-fixes/media.js +0 -4
- package/dist/esm/nodeviews/toDOM-fixes/mediaGroup.js +1 -6
- package/dist/esm/nodeviews/toDOM-fixes/mediaInline.js +0 -4
- package/dist/esm/nodeviews/toDOM-fixes/mediaSingle.js +0 -4
- package/dist/esm/ui/ImageBorder/index.js +4 -13
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/esm/ui/toolbar/index.js +1 -1
- package/dist/esm/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/esm/ui/toolbar/mediaInline.js +1 -1
- package/dist/types/nodeviews/mediaGroupNext.d.ts +2 -2
- package/dist/types/nodeviews/toDOM-fixes/media.d.ts +24 -1
- package/dist/types/nodeviews/toDOM-fixes/mediaGroup.d.ts +24 -1
- package/dist/types/nodeviews/toDOM-fixes/mediaInline.d.ts +24 -1
- package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +24 -1
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +24 -1
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +24 -1
- package/package.json +4 -7
- package/dist/cjs/nodeviews/lazy-media-single.js +0 -35
- package/dist/cjs/nodeviews/lazy-media.js +0 -36
- package/dist/es2019/nodeviews/lazy-media-single.js +0 -24
- package/dist/es2019/nodeviews/lazy-media.js +0 -24
- package/dist/esm/nodeviews/lazy-media-single.js +0 -24
- package/dist/esm/nodeviews/lazy-media.js +0 -25
- package/dist/types/nodeviews/lazy-media-single.d.ts +0 -9
- package/dist/types/nodeviews/lazy-media.d.ts +0 -8
- package/dist/types-ts4.5/nodeviews/lazy-media-single.d.ts +0 -9
- package/dist/types-ts4.5/nodeviews/lazy-media.d.ts +0 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import {
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
import { ReactMediaGroupNode } from './mediaGroup';
|
|
4
4
|
export var lazyMediaGroupView = function lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
5
5
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
6
6
|
var api = arguments.length > 4 ? arguments[4] : undefined;
|
|
7
|
-
if (
|
|
7
|
+
if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
|
|
8
8
|
return ReactMediaGroupNode(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
9
9
|
}
|
|
10
10
|
return withLazyLoading({
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
|
-
import { ReactMediaInlineNode } from './mediaInline';
|
|
4
2
|
export var lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
5
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
6
|
-
return ReactMediaInlineNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent);
|
|
7
|
-
}
|
|
8
3
|
return withLazyLoading({
|
|
9
4
|
nodeName: 'mediaInline',
|
|
10
5
|
getNodeViewOptions: function getNodeViewOptions() {},
|
|
@@ -9,6 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
12
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
13
|
import { useMediaProvider } from '../ui/hooks/useMediaProvider';
|
|
13
14
|
import { MediaGroupNext } from './mediaGroupNext';
|
|
14
15
|
var selector = function selector(states) {
|
|
@@ -55,7 +56,7 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
55
56
|
editorDisabled = _ref3.editorDisabled,
|
|
56
57
|
editorViewMode = _ref3.editorViewMode;
|
|
57
58
|
var mediaProvider = mediaProviderFromState ? Promise.resolve(mediaProviderFromState) : undefined;
|
|
58
|
-
if (!mediaProvider) {
|
|
59
|
+
if (!mediaProvider && !expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
62
|
return /*#__PURE__*/React.createElement(MediaGroupNext, {
|
|
@@ -296,10 +296,7 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
296
296
|
return {};
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
|
-
var ssr;
|
|
300
|
-
if (fg('platform_editor_ssr_media')) {
|
|
301
|
-
ssr = process.env.REACT_SSR ? 'server' : 'client';
|
|
302
|
-
}
|
|
299
|
+
var ssr = process.env.REACT_SSR ? 'server' : 'client';
|
|
303
300
|
return /*#__PURE__*/React.createElement(MediaCardWrapper, {
|
|
304
301
|
dimensions: originalDimensions,
|
|
305
302
|
onContextMenu: this.selectMediaSingle,
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { media } from '@atlaskit/adf-schema';
|
|
5
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
7
|
import { getMediaAttrs } from './toDOMAttrs';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -25,9 +24,6 @@ export var defaultImageCardDimensions = {
|
|
|
25
24
|
|
|
26
25
|
// @nodeSpecException:toDOM patch
|
|
27
26
|
export var mediaSpecWithFixedToDOM = function mediaSpecWithFixedToDOM() {
|
|
28
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
29
|
-
return media;
|
|
30
|
-
}
|
|
31
27
|
return _objectSpread(_objectSpread({}, media), {}, {
|
|
32
28
|
toDOM: function toDOM(node) {
|
|
33
29
|
var attrs = getMediaAttrs('media', node);
|
|
@@ -2,8 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { mediaGroup } from '@atlaskit/adf-schema';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
6
|
* Duplicate consts from `media-card`.
|
|
9
7
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -55,11 +53,8 @@ export var getDefaultCardDimensions = function getDefaultCardDimensions() {
|
|
|
55
53
|
|
|
56
54
|
// @nodeSpecException:toDOM patch
|
|
57
55
|
export var mediaGroupSpecWithFixedToDOM = function mediaGroupSpecWithFixedToDOM() {
|
|
58
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
59
|
-
return mediaGroup;
|
|
60
|
-
}
|
|
61
56
|
return _objectSpread(_objectSpread({}, mediaGroup), {}, {
|
|
62
|
-
toDOM: function toDOM(
|
|
57
|
+
toDOM: function toDOM() {
|
|
63
58
|
// Margin margin that consolidates the margin in the
|
|
64
59
|
return ['div', {
|
|
65
60
|
style: "\n\t\t\t\t\t\tmargin: 3px 5px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tgap: 8px;\n\t\t\t\t\t\t--ak-editor-media-card-background-color: #EBECF0;\n\t\t\t\t\t\t--ak-editor-media-card-width: ".concat(defaultImageCardDimensions.width, "px;\n\t\t\t\t\t\t--ak-editor-media-card-height: ").concat(defaultImageCardDimensions.height, "px;\n\t\t\t\t\t"),
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { mediaInline } from '@atlaskit/adf-schema';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { getMediaAttrs } from './toDOMAttrs';
|
|
7
6
|
var skeletonStyling = "background: ".concat("var(--ds-background-neutral, #0515240F)", ";");
|
|
8
7
|
// Matches media
|
|
@@ -10,9 +9,6 @@ var fallbackAspectRatio = 1.25;
|
|
|
10
9
|
|
|
11
10
|
// @nodeSpecException:toDOM patch
|
|
12
11
|
export var mediaInlineSpecWithFixedToDOM = function mediaInlineSpecWithFixedToDOM() {
|
|
13
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
14
|
-
return mediaInline;
|
|
15
|
-
}
|
|
16
12
|
return _objectSpread(_objectSpread({}, mediaInline), {}, {
|
|
17
13
|
toDOM: function toDOM(node) {
|
|
18
14
|
var dataAttrs = getMediaAttrs('mediaInline', node);
|
|
@@ -5,7 +5,6 @@ import { mediaSingleSpec } from '@atlaskit/adf-schema';
|
|
|
5
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
6
|
import { N20, N50 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
|
|
10
9
|
var WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
|
|
11
10
|
var ALIGNED_LAYOUTS = ['align-end', 'align-start'];
|
|
@@ -215,9 +214,6 @@ export var getToDom = function getToDom(allowPixelResizing) {
|
|
|
215
214
|
// @nodeSpecException:toDOM patch
|
|
216
215
|
export var mediaSingleSpecWithFixedToDOM = function mediaSingleSpecWithFixedToDOM(mediaSingleOption) {
|
|
217
216
|
var mediaSingleNode = mediaSingleSpec(mediaSingleOption);
|
|
218
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
219
|
-
return mediaSingleNode;
|
|
220
|
-
}
|
|
221
217
|
var toDOM = getToDom(mediaSingleOption.withExtendedWidthTypes);
|
|
222
218
|
return _objectSpread(_objectSpread({}, mediaSingleNode), {}, {
|
|
223
219
|
toDOM: toDOM
|
|
@@ -18,10 +18,9 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
|
18
18
|
import StrokeWeightLargeIcon from '@atlaskit/icon/core/stroke-weight-large';
|
|
19
19
|
import StrokeWeightMediumIcon from '@atlaskit/icon/core/stroke-weight-medium';
|
|
20
20
|
import StrokeWeightSmallIcon from '@atlaskit/icon/core/stroke-weight-small';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
21
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
23
22
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
|
-
import { buttonStyle, buttonWrapperStyle, contextualMenuArrow,
|
|
23
|
+
import { buttonStyle, buttonWrapperStyle, contextualMenuArrow, contextualSubMenu, dropdownOptionButton, dropdownWrapper, itemSpacing, menuItemDimensions, toolbarButtonWrapper } from './styles';
|
|
25
24
|
var ImageBorder = function ImageBorder(_ref) {
|
|
26
25
|
var formatMessage = _ref.intl.formatMessage,
|
|
27
26
|
toggleBorder = _ref.toggleBorder,
|
|
@@ -114,9 +113,6 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
114
113
|
value: 3,
|
|
115
114
|
icon: StrokeWeightLargeIcon
|
|
116
115
|
}];
|
|
117
|
-
var borderColorSelectStyles = function borderColorSelectStyles() {
|
|
118
|
-
return !fg('platform-visual-refresh-icons') ? contextualMenuColorIcon(color && hexToEditorBorderPaletteColor(color)) : contextualMenuArrow;
|
|
119
|
-
};
|
|
120
116
|
var items = [{
|
|
121
117
|
content: jsx("div", null, jsx("button", {
|
|
122
118
|
ref: dropDownColorOptionButton,
|
|
@@ -133,7 +129,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
133
129
|
});
|
|
134
130
|
}
|
|
135
131
|
}, jsx(Text, null, formatMessage(messages.borderColor)), jsx("div", {
|
|
136
|
-
css:
|
|
132
|
+
css: contextualMenuArrow
|
|
137
133
|
})), jsx("div", {
|
|
138
134
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
139
135
|
className: DropdownMenuSharedCssClassName.SUBMENU,
|
|
@@ -258,15 +254,10 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
258
254
|
onMouseDown: function onMouseDown(e) {
|
|
259
255
|
e.preventDefault();
|
|
260
256
|
}
|
|
261
|
-
},
|
|
262
|
-
//eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
263
|
-
jsx("div", {
|
|
264
|
-
css: line(value, value === size),
|
|
265
|
-
role: "presentation"
|
|
266
|
-
}) : jsx(ButtonIcon, {
|
|
257
|
+
}, jsx(ButtonIcon, {
|
|
267
258
|
color: value === size ? "var(--ds-icon-inverse, #FFFFFF)" : 'currentColor',
|
|
268
259
|
spacing: "spacious",
|
|
269
|
-
label:
|
|
260
|
+
label: ""
|
|
270
261
|
}))))
|
|
271
262
|
);
|
|
272
263
|
}))))),
|
|
@@ -185,7 +185,7 @@ export var ResizableMediaSingleNextFunctional = function ResizableMediaSingleNex
|
|
|
185
185
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
186
186
|
isResizing = _useState6[0],
|
|
187
187
|
setIsResizing = _useState6[1];
|
|
188
|
-
var _useState7 = useState(!
|
|
188
|
+
var _useState7 = useState(!fg('platform_editor_media_video_check_fix')),
|
|
189
189
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
190
190
|
isVideoFile = _useState8[0],
|
|
191
191
|
setIsVideoFile = _useState8[1];
|
|
@@ -17,11 +17,11 @@ import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
|
17
17
|
import ImageCropIcon from '@atlaskit/icon-lab/core/image-crop';
|
|
18
18
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
19
19
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
20
|
+
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
20
21
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
21
22
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
22
23
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
23
24
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
24
|
-
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
25
25
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
26
26
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
27
27
|
import { messages } from '@atlaskit/media-ui';
|
|
@@ -11,8 +11,8 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
|
11
11
|
import { addLink, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
12
12
|
import { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
13
13
|
import { FloatingToolbarSeparator as Separator, FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
|
|
14
|
+
import LinkIcon from '@atlaskit/icon/core/link';
|
|
14
15
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
15
|
-
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
16
16
|
import { currentMediaInlineNode, currentMediaNode } from '../../pm-plugins//utils/current-media-node';
|
|
17
17
|
import { stateKey } from '../../pm-plugins/plugin-key';
|
|
18
18
|
import { checkMediaType } from '../../pm-plugins/utils/check-media-type';
|
|
@@ -7,11 +7,11 @@ import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atl
|
|
|
7
7
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
8
8
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
10
|
+
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
10
11
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
11
12
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
12
13
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
13
14
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
14
|
-
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
15
15
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
16
16
|
import { messages } from '@atlaskit/media-ui';
|
|
17
17
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
@@ -15,7 +15,7 @@ export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntl
|
|
|
15
15
|
headPos: number;
|
|
16
16
|
isCopyPasteEnabled?: boolean;
|
|
17
17
|
mediaOptions: MediaOptions;
|
|
18
|
-
mediaProvider
|
|
18
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
19
19
|
node: PMNode;
|
|
20
20
|
view: EditorView;
|
|
21
21
|
} & WrappedComponentProps>> & {
|
|
@@ -30,7 +30,7 @@ export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntl
|
|
|
30
30
|
headPos: number;
|
|
31
31
|
isCopyPasteEnabled?: boolean;
|
|
32
32
|
mediaOptions: MediaOptions;
|
|
33
|
-
mediaProvider
|
|
33
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
34
34
|
node: PMNode;
|
|
35
35
|
view: EditorView;
|
|
36
36
|
} & WrappedComponentProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
2
|
/**
|
|
2
3
|
* Duplicate consts from `media-card`.
|
|
3
4
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -13,4 +14,26 @@ export declare const defaultImageCardDimensions: {
|
|
|
13
14
|
width: number;
|
|
14
15
|
height: number;
|
|
15
16
|
};
|
|
16
|
-
export declare const mediaSpecWithFixedToDOM: () =>
|
|
17
|
+
export declare const mediaSpecWithFixedToDOM: () => {
|
|
18
|
+
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
19
|
+
content?: string;
|
|
20
|
+
marks?: string;
|
|
21
|
+
group?: string;
|
|
22
|
+
inline?: boolean;
|
|
23
|
+
atom?: boolean;
|
|
24
|
+
attrs?: {
|
|
25
|
+
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
26
|
+
};
|
|
27
|
+
selectable?: boolean;
|
|
28
|
+
draggable?: boolean;
|
|
29
|
+
code?: boolean;
|
|
30
|
+
whitespace?: "pre" | "normal";
|
|
31
|
+
definingAsContext?: boolean;
|
|
32
|
+
definingForContent?: boolean;
|
|
33
|
+
defining?: boolean;
|
|
34
|
+
isolating?: boolean;
|
|
35
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
36
|
+
toDebugString?: (node: PMNode) => string;
|
|
37
|
+
leafText?: (node: PMNode) => string;
|
|
38
|
+
linebreakReplacement?: boolean;
|
|
39
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
|
|
1
2
|
/**
|
|
2
3
|
* Duplicate consts from `media-card`.
|
|
3
4
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -33,4 +34,26 @@ export declare const defaultSquareCardDimensions: {
|
|
|
33
34
|
* case we can consolidate them.
|
|
34
35
|
*/
|
|
35
36
|
export declare const getDefaultCardDimensions: (appearance?: "image" | "square" | "horizontal" | "auto") => Required<typeof defaultImageCardDimensions>;
|
|
36
|
-
export declare const mediaGroupSpecWithFixedToDOM: () =>
|
|
37
|
+
export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
38
|
+
toDOM: () => DOMOutputSpec;
|
|
39
|
+
content?: string;
|
|
40
|
+
marks?: string;
|
|
41
|
+
group?: string;
|
|
42
|
+
inline?: boolean;
|
|
43
|
+
atom?: boolean;
|
|
44
|
+
attrs?: {
|
|
45
|
+
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
46
|
+
};
|
|
47
|
+
selectable?: boolean;
|
|
48
|
+
draggable?: boolean;
|
|
49
|
+
code?: boolean;
|
|
50
|
+
whitespace?: "pre" | "normal";
|
|
51
|
+
definingAsContext?: boolean;
|
|
52
|
+
definingForContent?: boolean;
|
|
53
|
+
defining?: boolean;
|
|
54
|
+
isolating?: boolean;
|
|
55
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
56
|
+
toDebugString?: (node: import("prosemirror-model").Node) => string;
|
|
57
|
+
leafText?: (node: import("prosemirror-model").Node) => string;
|
|
58
|
+
linebreakReplacement?: boolean;
|
|
59
|
+
};
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
export declare const mediaInlineSpecWithFixedToDOM: () => {
|
|
3
|
+
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
4
|
+
content?: string;
|
|
5
|
+
marks?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
atom?: boolean;
|
|
9
|
+
attrs?: {
|
|
10
|
+
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
11
|
+
};
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
draggable?: boolean;
|
|
14
|
+
code?: boolean;
|
|
15
|
+
whitespace?: "pre" | "normal";
|
|
16
|
+
definingAsContext?: boolean;
|
|
17
|
+
definingForContent?: boolean;
|
|
18
|
+
defining?: boolean;
|
|
19
|
+
isolating?: boolean;
|
|
20
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
21
|
+
toDebugString?: (node: PMNode) => string;
|
|
22
|
+
leafText?: (node: PMNode) => string;
|
|
23
|
+
linebreakReplacement?: boolean;
|
|
24
|
+
};
|
|
@@ -15,7 +15,7 @@ export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntl
|
|
|
15
15
|
headPos: number;
|
|
16
16
|
isCopyPasteEnabled?: boolean;
|
|
17
17
|
mediaOptions: MediaOptions;
|
|
18
|
-
mediaProvider
|
|
18
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
19
19
|
node: PMNode;
|
|
20
20
|
view: EditorView;
|
|
21
21
|
} & WrappedComponentProps>> & {
|
|
@@ -30,7 +30,7 @@ export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntl
|
|
|
30
30
|
headPos: number;
|
|
31
31
|
isCopyPasteEnabled?: boolean;
|
|
32
32
|
mediaOptions: MediaOptions;
|
|
33
|
-
mediaProvider
|
|
33
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
34
34
|
node: PMNode;
|
|
35
35
|
view: EditorView;
|
|
36
36
|
} & WrappedComponentProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
2
|
/**
|
|
2
3
|
* Duplicate consts from `media-card`.
|
|
3
4
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -13,4 +14,26 @@ export declare const defaultImageCardDimensions: {
|
|
|
13
14
|
width: number;
|
|
14
15
|
height: number;
|
|
15
16
|
};
|
|
16
|
-
export declare const mediaSpecWithFixedToDOM: () =>
|
|
17
|
+
export declare const mediaSpecWithFixedToDOM: () => {
|
|
18
|
+
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
19
|
+
content?: string;
|
|
20
|
+
marks?: string;
|
|
21
|
+
group?: string;
|
|
22
|
+
inline?: boolean;
|
|
23
|
+
atom?: boolean;
|
|
24
|
+
attrs?: {
|
|
25
|
+
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
26
|
+
};
|
|
27
|
+
selectable?: boolean;
|
|
28
|
+
draggable?: boolean;
|
|
29
|
+
code?: boolean;
|
|
30
|
+
whitespace?: "pre" | "normal";
|
|
31
|
+
definingAsContext?: boolean;
|
|
32
|
+
definingForContent?: boolean;
|
|
33
|
+
defining?: boolean;
|
|
34
|
+
isolating?: boolean;
|
|
35
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
36
|
+
toDebugString?: (node: PMNode) => string;
|
|
37
|
+
leafText?: (node: PMNode) => string;
|
|
38
|
+
linebreakReplacement?: boolean;
|
|
39
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
|
|
1
2
|
/**
|
|
2
3
|
* Duplicate consts from `media-card`.
|
|
3
4
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -33,4 +34,26 @@ export declare const defaultSquareCardDimensions: {
|
|
|
33
34
|
* case we can consolidate them.
|
|
34
35
|
*/
|
|
35
36
|
export declare const getDefaultCardDimensions: (appearance?: "image" | "square" | "horizontal" | "auto") => Required<typeof defaultImageCardDimensions>;
|
|
36
|
-
export declare const mediaGroupSpecWithFixedToDOM: () =>
|
|
37
|
+
export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
38
|
+
toDOM: () => DOMOutputSpec;
|
|
39
|
+
content?: string;
|
|
40
|
+
marks?: string;
|
|
41
|
+
group?: string;
|
|
42
|
+
inline?: boolean;
|
|
43
|
+
atom?: boolean;
|
|
44
|
+
attrs?: {
|
|
45
|
+
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
46
|
+
};
|
|
47
|
+
selectable?: boolean;
|
|
48
|
+
draggable?: boolean;
|
|
49
|
+
code?: boolean;
|
|
50
|
+
whitespace?: "pre" | "normal";
|
|
51
|
+
definingAsContext?: boolean;
|
|
52
|
+
definingForContent?: boolean;
|
|
53
|
+
defining?: boolean;
|
|
54
|
+
isolating?: boolean;
|
|
55
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
56
|
+
toDebugString?: (node: import("prosemirror-model").Node) => string;
|
|
57
|
+
leafText?: (node: import("prosemirror-model").Node) => string;
|
|
58
|
+
linebreakReplacement?: boolean;
|
|
59
|
+
};
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
export declare const mediaInlineSpecWithFixedToDOM: () => {
|
|
3
|
+
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
4
|
+
content?: string;
|
|
5
|
+
marks?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
atom?: boolean;
|
|
9
|
+
attrs?: {
|
|
10
|
+
[name: string]: import("prosemirror-model").AttributeSpec;
|
|
11
|
+
};
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
draggable?: boolean;
|
|
14
|
+
code?: boolean;
|
|
15
|
+
whitespace?: "pre" | "normal";
|
|
16
|
+
definingAsContext?: boolean;
|
|
17
|
+
definingForContent?: boolean;
|
|
18
|
+
defining?: boolean;
|
|
19
|
+
isolating?: boolean;
|
|
20
|
+
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
21
|
+
toDebugString?: (node: PMNode) => string;
|
|
22
|
+
leafText?: (node: PMNode) => string;
|
|
23
|
+
linebreakReplacement?: boolean;
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-disabled": "^7.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
|
|
43
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^9.
|
|
43
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^9.1.0",
|
|
44
44
|
"@atlaskit/editor-plugin-focus": "^6.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-grid": "^7.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-guideline": "^7.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/form": "^15.2.0",
|
|
55
55
|
"@atlaskit/icon": "^29.3.0",
|
|
56
56
|
"@atlaskit/icon-lab": "^5.13.0",
|
|
57
|
-
"@atlaskit/media-card": "^79.
|
|
57
|
+
"@atlaskit/media-card": "^79.12.0",
|
|
58
58
|
"@atlaskit/media-client": "^35.7.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
60
60
|
"@atlaskit/media-common": "^12.3.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"uuid": "^3.1.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@atlaskit/editor-common": "^111.
|
|
81
|
+
"@atlaskit/editor-common": "^111.1.0",
|
|
82
82
|
"@atlaskit/media-core": "^37.0.0",
|
|
83
83
|
"react": "^18.2.0",
|
|
84
84
|
"react-dom": "^18.2.0",
|
|
@@ -148,9 +148,6 @@
|
|
|
148
148
|
"platform_editor_content_mode_button_mvp": {
|
|
149
149
|
"type": "boolean"
|
|
150
150
|
},
|
|
151
|
-
"platform_editor_ssr_media": {
|
|
152
|
-
"type": "boolean"
|
|
153
|
-
},
|
|
154
151
|
"confluence_frontend_preload_inline_comment_editor": {
|
|
155
152
|
"type": "boolean"
|
|
156
153
|
},
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.lazyMediaSingleView = void 0;
|
|
8
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
-
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
|
-
var _mediaSingle = require("./mediaSingle");
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
-
var lazyMediaSingleView = exports.lazyMediaSingleView = function lazyMediaSingleView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
15
|
-
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
16
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_ssr_media') || (0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
17
|
-
return (0, _mediaSingle.ReactMediaSingleNode)(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options);
|
|
18
|
-
}
|
|
19
|
-
return (0, _lazyNodeView.withLazyLoading)({
|
|
20
|
-
nodeName: 'mediaSingle',
|
|
21
|
-
getNodeViewOptions: function getNodeViewOptions() {},
|
|
22
|
-
loader: function loader() {
|
|
23
|
-
var result = Promise.resolve().then(function () {
|
|
24
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-plugin-media-single-lazy-node-view" */
|
|
25
|
-
'./mediaSingle'));
|
|
26
|
-
}).then(function (_ref) {
|
|
27
|
-
var ReactMediaSingleNode = _ref.ReactMediaSingleNode;
|
|
28
|
-
return function (node, view, getPos) {
|
|
29
|
-
return ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options)(node, view, getPos);
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.lazyMediaView = void 0;
|
|
8
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
-
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
|
-
var _mediaNodeView = require("./mediaNodeView");
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
-
var lazyMediaView = exports.lazyMediaView = function lazyMediaView(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
15
|
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
16
|
-
var api = arguments.length > 4 ? arguments[4] : undefined;
|
|
17
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_ssr_media') || (0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
18
|
-
return (0, _mediaNodeView.ReactMediaNode)(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
19
|
-
}
|
|
20
|
-
return (0, _lazyNodeView.withLazyLoading)({
|
|
21
|
-
nodeName: 'media',
|
|
22
|
-
getNodeViewOptions: function getNodeViewOptions() {},
|
|
23
|
-
loader: function loader() {
|
|
24
|
-
var result = Promise.resolve().then(function () {
|
|
25
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-plugin-media-lazy-node-view" */
|
|
26
|
-
'./mediaNodeView'));
|
|
27
|
-
}).then(function (_ref) {
|
|
28
|
-
var ReactMediaNode = _ref.ReactMediaNode;
|
|
29
|
-
return function (node, view, getPos) {
|
|
30
|
-
return ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api)(node, view, getPos);
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
return result;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
|
-
import { ReactMediaSingleNode } from './mediaSingle';
|
|
5
|
-
export const lazyMediaSingleView = (portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options = {}) => {
|
|
6
|
-
if (fg('platform_editor_ssr_media') || editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
7
|
-
return ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options);
|
|
8
|
-
}
|
|
9
|
-
return withLazyLoading({
|
|
10
|
-
nodeName: 'mediaSingle',
|
|
11
|
-
getNodeViewOptions: () => {},
|
|
12
|
-
loader: () => {
|
|
13
|
-
const result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-media-single-lazy-node-view" */
|
|
14
|
-
'./mediaSingle').then(({
|
|
15
|
-
ReactMediaSingleNode
|
|
16
|
-
}) => {
|
|
17
|
-
return (node, view, getPos) => {
|
|
18
|
-
return ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options)(node, view, getPos);
|
|
19
|
-
};
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
|
-
import { ReactMediaNode } from './mediaNodeView';
|
|
5
|
-
export const lazyMediaView = (portalProviderAPI, eventDispatcher, providerFactory, options = {}, api) => {
|
|
6
|
-
if (fg('platform_editor_ssr_media') || editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
7
|
-
return ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
8
|
-
}
|
|
9
|
-
return withLazyLoading({
|
|
10
|
-
nodeName: 'media',
|
|
11
|
-
getNodeViewOptions: () => {},
|
|
12
|
-
loader: () => {
|
|
13
|
-
const result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-media-lazy-node-view" */
|
|
14
|
-
'./mediaNodeView').then(({
|
|
15
|
-
ReactMediaNode
|
|
16
|
-
}) => {
|
|
17
|
-
return (node, view, getPos) => {
|
|
18
|
-
return ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api)(node, view, getPos);
|
|
19
|
-
};
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
};
|