@atlaskit/editor-plugin-media 9.0.0 → 9.0.1
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 +11 -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/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/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/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 +1 -4
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 9.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b429c01ce6af9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b429c01ce6af9) -
|
|
8
|
+
icon migration entry point update
|
|
9
|
+
- [`1c2342ca6f2b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c2342ca6f2b0) -
|
|
10
|
+
tidy up fg platform_editor_ssr_media, clean up lazy node view for media, and fix re-mount issue in
|
|
11
|
+
media group
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 9.0.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cjs/mediaPlugin.js
CHANGED
|
@@ -14,14 +14,14 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _lazyMedia = require("./nodeviews/lazy-media");
|
|
18
17
|
var _lazyMediaGroup = require("./nodeviews/lazy-media-group");
|
|
19
18
|
var _lazyMediaInline = require("./nodeviews/lazy-media-inline");
|
|
20
|
-
var
|
|
19
|
+
var _mediaNodeView = require("./nodeviews/mediaNodeView");
|
|
20
|
+
var _mediaSingle = require("./nodeviews/mediaSingle");
|
|
21
21
|
var _media = require("./nodeviews/toDOM-fixes/media");
|
|
22
22
|
var _mediaGroup = require("./nodeviews/toDOM-fixes/mediaGroup");
|
|
23
23
|
var _mediaInline = require("./nodeviews/toDOM-fixes/mediaInline");
|
|
24
|
-
var
|
|
24
|
+
var _mediaSingle2 = require("./nodeviews/toDOM-fixes/mediaSingle");
|
|
25
25
|
var _altText = require("./pm-plugins/alt-text");
|
|
26
26
|
var _keymap = _interopRequireDefault(require("./pm-plugins/alt-text/keymap"));
|
|
27
27
|
var _commands = require("./pm-plugins/commands");
|
|
@@ -33,7 +33,7 @@ var _main = require("./pm-plugins/main");
|
|
|
33
33
|
var _pixelResizing = require("./pm-plugins/pixel-resizing");
|
|
34
34
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
35
35
|
var _mediaCommon2 = require("./pm-plugins/utils/media-common");
|
|
36
|
-
var
|
|
36
|
+
var _mediaSingle3 = require("./pm-plugins/utils/media-single");
|
|
37
37
|
var _MediaPicker = require("./ui/MediaPicker");
|
|
38
38
|
var _PortalWrapper = require("./ui/MediaViewer/PortalWrapper");
|
|
39
39
|
var _toolbar = require("./ui/toolbar");
|
|
@@ -139,7 +139,7 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
139
139
|
},
|
|
140
140
|
insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, insertMediaVia) {
|
|
141
141
|
var _api$analytics2;
|
|
142
|
-
return (0,
|
|
142
|
+
return (0, _mediaSingle3.insertMediaAsMediaSingle)(view, node, inputMethod, api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, insertMediaVia, options === null || options === void 0 ? void 0 : options.allowPixelResizing);
|
|
143
143
|
},
|
|
144
144
|
setProvider: function setProvider(provider) {
|
|
145
145
|
var _api$core$actions$exe;
|
|
@@ -182,7 +182,7 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
182
182
|
node: (0, _mediaGroup.mediaGroupSpecWithFixedToDOM)()
|
|
183
183
|
}, {
|
|
184
184
|
name: 'mediaSingle',
|
|
185
|
-
node: (0,
|
|
185
|
+
node: (0, _mediaSingle2.mediaSingleSpecWithFixedToDOM)(mediaSingleOption)
|
|
186
186
|
}, {
|
|
187
187
|
name: 'media',
|
|
188
188
|
node: (0, _media.mediaSpecWithFixedToDOM)()
|
|
@@ -219,8 +219,8 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
219
219
|
providerFactory: providerFactory,
|
|
220
220
|
nodeViews: {
|
|
221
221
|
mediaGroup: (0, _lazyMediaGroup.lazyMediaGroupView)(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
222
|
-
mediaSingle: (0,
|
|
223
|
-
media: (0,
|
|
222
|
+
mediaSingle: (0, _mediaSingle.ReactMediaSingleNode)(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options),
|
|
223
|
+
media: (0, _mediaNodeView.ReactMediaNode)(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
224
224
|
mediaInline: (0, _lazyMediaInline.lazyMediaInlineView)(portalProviderAPI, eventDispatcher, providerFactory, api)
|
|
225
225
|
},
|
|
226
226
|
errorReporter: errorReporter,
|
|
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.lazyMediaGroupView = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
-
var
|
|
10
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
11
|
var _mediaGroup = require("./mediaGroup");
|
|
12
12
|
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); }
|
|
13
13
|
var lazyMediaGroupView = exports.lazyMediaGroupView = function lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
14
14
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
15
15
|
var api = arguments.length > 4 ? arguments[4] : undefined;
|
|
16
|
-
if ((0,
|
|
16
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true)) {
|
|
17
17
|
return (0, _mediaGroup.ReactMediaGroupNode)(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
18
18
|
}
|
|
19
19
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
@@ -7,13 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.lazyMediaInlineView = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
|
-
var _mediaInline = require("./mediaInline");
|
|
12
10
|
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); }
|
|
13
11
|
var lazyMediaInlineView = exports.lazyMediaInlineView = function lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
14
|
-
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
15
|
-
return (0, _mediaInline.ReactMediaInlineNode)(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent);
|
|
16
|
-
}
|
|
17
12
|
return (0, _lazyNodeView.withLazyLoading)({
|
|
18
13
|
nodeName: 'mediaInline',
|
|
19
14
|
getNodeViewOptions: function getNodeViewOptions() {},
|
|
@@ -14,6 +14,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
14
14
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
15
15
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
16
16
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
17
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
18
|
var _useMediaProvider = require("../ui/hooks/useMediaProvider");
|
|
18
19
|
var _mediaGroupNext = require("./mediaGroupNext");
|
|
19
20
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -62,7 +63,7 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
62
63
|
editorDisabled = _ref3.editorDisabled,
|
|
63
64
|
editorViewMode = _ref3.editorViewMode;
|
|
64
65
|
var mediaProvider = mediaProviderFromState ? Promise.resolve(mediaProviderFromState) : undefined;
|
|
65
|
-
if (!mediaProvider) {
|
|
66
|
+
if (!mediaProvider && !(0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true)) {
|
|
66
67
|
return null;
|
|
67
68
|
}
|
|
68
69
|
return /*#__PURE__*/_react.default.createElement(_mediaGroupNext.MediaGroupNext, {
|
|
@@ -304,10 +304,7 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
304
304
|
return {};
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
|
-
var ssr;
|
|
308
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_ssr_media')) {
|
|
309
|
-
ssr = process.env.REACT_SSR ? 'server' : 'client';
|
|
310
|
-
}
|
|
307
|
+
var ssr = process.env.REACT_SSR ? 'server' : 'client';
|
|
311
308
|
return /*#__PURE__*/_react.default.createElement(_styles.MediaCardWrapper, {
|
|
312
309
|
dimensions: originalDimensions,
|
|
313
310
|
onContextMenu: this.selectMediaSingle,
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
12
|
var _toDOMAttrs = require("./toDOMAttrs");
|
|
14
13
|
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; }
|
|
15
14
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -31,9 +30,6 @@ var defaultImageCardDimensions = exports.defaultImageCardDimensions = {
|
|
|
31
30
|
|
|
32
31
|
// @nodeSpecException:toDOM patch
|
|
33
32
|
var mediaSpecWithFixedToDOM = exports.mediaSpecWithFixedToDOM = function mediaSpecWithFixedToDOM() {
|
|
34
|
-
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
35
|
-
return _adfSchema.media;
|
|
36
|
-
}
|
|
37
33
|
return _objectSpread(_objectSpread({}, _adfSchema.media), {}, {
|
|
38
34
|
toDOM: function toDOM(node) {
|
|
39
35
|
var attrs = (0, _toDOMAttrs.getMediaAttrs)('media', node);
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.mediaGroupSpecWithFixedToDOM = exports.getDefaultCardDimensions = exports.defaultSquareCardDimensions = exports.defaultImageCardDimensions = exports.defaultHorizontalCardDimensions = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
10
|
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; }
|
|
12
11
|
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) { (0, _defineProperty2.default)(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; }
|
|
13
12
|
/**
|
|
@@ -61,11 +60,8 @@ var getDefaultCardDimensions = exports.getDefaultCardDimensions = function getDe
|
|
|
61
60
|
|
|
62
61
|
// @nodeSpecException:toDOM patch
|
|
63
62
|
var mediaGroupSpecWithFixedToDOM = exports.mediaGroupSpecWithFixedToDOM = function mediaGroupSpecWithFixedToDOM() {
|
|
64
|
-
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
65
|
-
return _adfSchema.mediaGroup;
|
|
66
|
-
}
|
|
67
63
|
return _objectSpread(_objectSpread({}, _adfSchema.mediaGroup), {}, {
|
|
68
|
-
toDOM: function toDOM(
|
|
64
|
+
toDOM: function toDOM() {
|
|
69
65
|
// Margin margin that consolidates the margin in the
|
|
70
66
|
return ['div', {
|
|
71
67
|
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"),
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.mediaInlineSpecWithFixedToDOM = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
10
|
var _toDOMAttrs = require("./toDOMAttrs");
|
|
12
11
|
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; }
|
|
13
12
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -17,9 +16,6 @@ var fallbackAspectRatio = 1.25;
|
|
|
17
16
|
|
|
18
17
|
// @nodeSpecException:toDOM patch
|
|
19
18
|
var mediaInlineSpecWithFixedToDOM = exports.mediaInlineSpecWithFixedToDOM = function mediaInlineSpecWithFixedToDOM() {
|
|
20
|
-
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
21
|
-
return _adfSchema.mediaInline;
|
|
22
|
-
}
|
|
23
19
|
return _objectSpread(_objectSpread({}, _adfSchema.mediaInline), {}, {
|
|
24
20
|
toDOM: function toDOM(node) {
|
|
25
21
|
var dataAttrs = (0, _toDOMAttrs.getMediaAttrs)('mediaInline', node);
|
|
@@ -10,7 +10,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _toDOMAttrs = require("./toDOMAttrs");
|
|
15
14
|
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; }
|
|
16
15
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -222,9 +221,6 @@ var getToDom = exports.getToDom = function getToDom(allowPixelResizing) {
|
|
|
222
221
|
// @nodeSpecException:toDOM patch
|
|
223
222
|
var mediaSingleSpecWithFixedToDOM = exports.mediaSingleSpecWithFixedToDOM = function mediaSingleSpecWithFixedToDOM(mediaSingleOption) {
|
|
224
223
|
var mediaSingleNode = (0, _adfSchema.mediaSingleSpec)(mediaSingleOption);
|
|
225
|
-
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
226
|
-
return mediaSingleNode;
|
|
227
|
-
}
|
|
228
224
|
var toDOM = getToDom(mediaSingleOption.withExtendedWidthTypes);
|
|
229
225
|
return _objectSpread(_objectSpread({}, mediaSingleNode), {}, {
|
|
230
226
|
toDOM: toDOM
|
|
@@ -195,7 +195,7 @@ var ResizableMediaSingleNextFunctional = exports.ResizableMediaSingleNextFunctio
|
|
|
195
195
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
196
196
|
isResizing = _useState6[0],
|
|
197
197
|
setIsResizing = _useState6[1];
|
|
198
|
-
var _useState7 = (0, _react.useState)(!(
|
|
198
|
+
var _useState7 = (0, _react.useState)(!(0, _platformFeatureFlags.fg)('platform_editor_media_video_check_fix')),
|
|
199
199
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
200
200
|
isVideoFile = _useState8[0],
|
|
201
201
|
setIsVideoFile = _useState8[1];
|
|
@@ -23,11 +23,11 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
23
23
|
var _imageCrop = _interopRequireDefault(require("@atlaskit/icon-lab/core/image-crop"));
|
|
24
24
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
25
25
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
26
|
+
var _download = _interopRequireDefault(require("@atlaskit/icon/core/download"));
|
|
26
27
|
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
27
28
|
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
28
29
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
29
30
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
30
|
-
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
31
31
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
32
32
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
33
33
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
@@ -13,8 +13,8 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
13
13
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
14
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
15
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
16
|
+
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
16
17
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
17
|
-
var _link = _interopRequireDefault(require("@atlaskit/icon/core/migration/link"));
|
|
18
18
|
var _currentMediaNode = require("../../pm-plugins//utils/current-media-node");
|
|
19
19
|
var _pluginKey = require("../../pm-plugins/plugin-key");
|
|
20
20
|
var _checkMediaType = require("../../pm-plugins/utils/check-media-type");
|
|
@@ -13,11 +13,11 @@ var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/message
|
|
|
13
13
|
var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
14
14
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
16
|
+
var _download = _interopRequireDefault(require("@atlaskit/icon/core/download"));
|
|
16
17
|
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
17
18
|
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
18
19
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
19
20
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
20
|
-
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
21
21
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
22
22
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
23
23
|
var _linking = require("../../pm-plugins/commands/linking");
|
|
@@ -6,10 +6,10 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
6
6
|
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { lazyMediaView } from './nodeviews/lazy-media';
|
|
10
9
|
import { lazyMediaGroupView } from './nodeviews/lazy-media-group';
|
|
11
10
|
import { lazyMediaInlineView } from './nodeviews/lazy-media-inline';
|
|
12
|
-
import {
|
|
11
|
+
import { ReactMediaNode } from './nodeviews/mediaNodeView';
|
|
12
|
+
import { ReactMediaSingleNode } from './nodeviews/mediaSingle';
|
|
13
13
|
import { mediaSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/media';
|
|
14
14
|
import { mediaGroupSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/mediaGroup';
|
|
15
15
|
import { mediaInlineSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/mediaInline';
|
|
@@ -212,8 +212,8 @@ export const mediaPlugin = ({
|
|
|
212
212
|
providerFactory,
|
|
213
213
|
nodeViews: {
|
|
214
214
|
mediaGroup: lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
215
|
-
mediaSingle:
|
|
216
|
-
media:
|
|
215
|
+
mediaSingle: ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options),
|
|
216
|
+
media: ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
217
217
|
mediaInline: lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api)
|
|
218
218
|
},
|
|
219
219
|
errorReporter,
|
|
@@ -1,8 +1,8 @@
|
|
|
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 const lazyMediaGroupView = (portalProviderAPI, eventDispatcher, providerFactory, options = {}, api) => {
|
|
5
|
-
if (
|
|
5
|
+
if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
|
|
6
6
|
return ReactMediaGroupNode(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
7
7
|
}
|
|
8
8
|
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 const 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: () => {},
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
6
|
import { useMediaProvider } from '../ui/hooks/useMediaProvider';
|
|
6
7
|
import { MediaGroupNext } from './mediaGroupNext';
|
|
7
8
|
const selector = states => {
|
|
@@ -46,7 +47,7 @@ class MediaGroupNodeView extends ReactNodeView {
|
|
|
46
47
|
editorViewMode
|
|
47
48
|
}) => {
|
|
48
49
|
const mediaProvider = mediaProviderFromState ? Promise.resolve(mediaProviderFromState) : undefined;
|
|
49
|
-
if (!mediaProvider) {
|
|
50
|
+
if (!mediaProvider && !expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
|
|
50
51
|
return null;
|
|
51
52
|
}
|
|
52
53
|
return /*#__PURE__*/React.createElement(MediaGroupNext, {
|
|
@@ -244,10 +244,7 @@ export class MediaNode extends Component {
|
|
|
244
244
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
245
245
|
authProvider: () => ({})
|
|
246
246
|
};
|
|
247
|
-
|
|
248
|
-
if (fg('platform_editor_ssr_media')) {
|
|
249
|
-
ssr = process.env.REACT_SSR ? 'server' : 'client';
|
|
250
|
-
}
|
|
247
|
+
const ssr = process.env.REACT_SSR ? 'server' : 'client';
|
|
251
248
|
return /*#__PURE__*/React.createElement(MediaCardWrapper, {
|
|
252
249
|
dimensions: originalDimensions,
|
|
253
250
|
onContextMenu: this.selectMediaSingle,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { media } from '@atlaskit/adf-schema';
|
|
2
2
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
4
|
import { getMediaAttrs } from './toDOMAttrs';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -22,9 +21,6 @@ export const defaultImageCardDimensions = {
|
|
|
22
21
|
|
|
23
22
|
// @nodeSpecException:toDOM patch
|
|
24
23
|
export const mediaSpecWithFixedToDOM = () => {
|
|
25
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
26
|
-
return media;
|
|
27
|
-
}
|
|
28
24
|
return {
|
|
29
25
|
...media,
|
|
30
26
|
toDOM: node => {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { mediaGroup } from '@atlaskit/adf-schema';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
|
-
|
|
4
2
|
/**
|
|
5
3
|
* Duplicate consts from `media-card`.
|
|
6
4
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -51,12 +49,9 @@ export const getDefaultCardDimensions = (appearance = 'auto') => {
|
|
|
51
49
|
|
|
52
50
|
// @nodeSpecException:toDOM patch
|
|
53
51
|
export const mediaGroupSpecWithFixedToDOM = () => {
|
|
54
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
55
|
-
return mediaGroup;
|
|
56
|
-
}
|
|
57
52
|
return {
|
|
58
53
|
...mediaGroup,
|
|
59
|
-
toDOM:
|
|
54
|
+
toDOM: () => {
|
|
60
55
|
// Margin margin that consolidates the margin in the
|
|
61
56
|
return ['div', {
|
|
62
57
|
style: `
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { mediaInline } from '@atlaskit/adf-schema';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
2
|
import { getMediaAttrs } from './toDOMAttrs';
|
|
4
3
|
const skeletonStyling = `background: ${"var(--ds-background-neutral, #0515240F)"};`;
|
|
5
4
|
// Matches media
|
|
@@ -7,9 +6,6 @@ const fallbackAspectRatio = 1.25;
|
|
|
7
6
|
|
|
8
7
|
// @nodeSpecException:toDOM patch
|
|
9
8
|
export const mediaInlineSpecWithFixedToDOM = () => {
|
|
10
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
11
|
-
return mediaInline;
|
|
12
|
-
}
|
|
13
9
|
return {
|
|
14
10
|
...mediaInline,
|
|
15
11
|
toDOM: node => {
|
|
@@ -2,7 +2,6 @@ import { mediaSingleSpec } from '@atlaskit/adf-schema';
|
|
|
2
2
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
3
|
import { N20, N50 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
|
|
7
6
|
const WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
|
|
8
7
|
const ALIGNED_LAYOUTS = ['align-end', 'align-start'];
|
|
@@ -216,9 +215,6 @@ export const getToDom = allowPixelResizing => node => {
|
|
|
216
215
|
// @nodeSpecException:toDOM patch
|
|
217
216
|
export const mediaSingleSpecWithFixedToDOM = mediaSingleOption => {
|
|
218
217
|
const mediaSingleNode = mediaSingleSpec(mediaSingleOption);
|
|
219
|
-
if (editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
220
|
-
return mediaSingleNode;
|
|
221
|
-
}
|
|
222
218
|
const toDOM = getToDom(mediaSingleOption.withExtendedWidthTypes);
|
|
223
219
|
return {
|
|
224
220
|
...mediaSingleNode,
|
|
@@ -178,7 +178,7 @@ export const ResizableMediaSingleNextFunctional = props => {
|
|
|
178
178
|
const lastSnappedGuidelineKeysRef = useRef([]);
|
|
179
179
|
const [snaps, setSnaps] = useState({});
|
|
180
180
|
const [isResizing, setIsResizing] = useState(false);
|
|
181
|
-
const [isVideoFile, setIsVideoFile] = useState(!
|
|
181
|
+
const [isVideoFile, setIsVideoFile] = useState(!fg('platform_editor_media_video_check_fix'));
|
|
182
182
|
const [hasResized, setHasResized] = useState(false);
|
|
183
183
|
const nodePosition = useMemo(() => {
|
|
184
184
|
if (typeof getPos !== 'function') {
|
|
@@ -13,11 +13,11 @@ import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
|
13
13
|
import ImageCropIcon from '@atlaskit/icon-lab/core/image-crop';
|
|
14
14
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
15
15
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
16
|
+
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
16
17
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
17
18
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
18
19
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
19
20
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
20
|
-
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
21
21
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
22
22
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
23
23
|
import { messages } from '@atlaskit/media-ui';
|
|
@@ -10,8 +10,8 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
|
10
10
|
import { addLink, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
11
11
|
import { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { FloatingToolbarSeparator as Separator, FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import LinkIcon from '@atlaskit/icon/core/link';
|
|
13
14
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
14
|
-
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
15
15
|
import { currentMediaInlineNode, currentMediaNode } from '../../pm-plugins//utils/current-media-node';
|
|
16
16
|
import { stateKey } from '../../pm-plugins/plugin-key';
|
|
17
17
|
import { checkMediaType } from '../../pm-plugins/utils/check-media-type';
|
|
@@ -4,11 +4,11 @@ import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atl
|
|
|
4
4
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
7
|
+
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
7
8
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
8
9
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
9
10
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
10
11
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
11
|
-
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
12
12
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
13
13
|
import { messages } from '@atlaskit/media-ui';
|
|
14
14
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
package/dist/esm/mediaPlugin.js
CHANGED
|
@@ -6,10 +6,10 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
6
6
|
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { lazyMediaView } from './nodeviews/lazy-media';
|
|
10
9
|
import { lazyMediaGroupView } from './nodeviews/lazy-media-group';
|
|
11
10
|
import { lazyMediaInlineView } from './nodeviews/lazy-media-inline';
|
|
12
|
-
import {
|
|
11
|
+
import { ReactMediaNode } from './nodeviews/mediaNodeView';
|
|
12
|
+
import { ReactMediaSingleNode } from './nodeviews/mediaSingle';
|
|
13
13
|
import { mediaSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/media';
|
|
14
14
|
import { mediaGroupSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/mediaGroup';
|
|
15
15
|
import { mediaInlineSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/mediaInline';
|
|
@@ -210,8 +210,8 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
210
210
|
providerFactory: providerFactory,
|
|
211
211
|
nodeViews: {
|
|
212
212
|
mediaGroup: lazyMediaGroupView(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
213
|
-
mediaSingle:
|
|
214
|
-
media:
|
|
213
|
+
mediaSingle: ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options),
|
|
214
|
+
media: ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api),
|
|
215
215
|
mediaInline: lazyMediaInlineView(portalProviderAPI, eventDispatcher, providerFactory, api)
|
|
216
216
|
},
|
|
217
217
|
errorReporter: errorReporter,
|
|
@@ -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
|
|
@@ -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.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-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
|
-
};
|
|
@@ -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 var lazyMediaSingleView = function lazyMediaSingleView(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent) {
|
|
6
|
-
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
7
|
-
if (fg('platform_editor_ssr_media') || editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
8
|
-
return ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options);
|
|
9
|
-
}
|
|
10
|
-
return withLazyLoading({
|
|
11
|
-
nodeName: 'mediaSingle',
|
|
12
|
-
getNodeViewOptions: function getNodeViewOptions() {},
|
|
13
|
-
loader: function loader() {
|
|
14
|
-
var result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-media-single-lazy-node-view" */
|
|
15
|
-
'./mediaSingle').then(function (_ref) {
|
|
16
|
-
var ReactMediaSingleNode = _ref.ReactMediaSingleNode;
|
|
17
|
-
return function (node, view, getPos) {
|
|
18
|
-
return ReactMediaSingleNode(portalProviderAPI, eventDispatcher, providerFactory, api, dispatchAnalyticsEvent, options)(node, view, getPos);
|
|
19
|
-
};
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
};
|
|
@@ -1,25 +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 var lazyMediaView = function lazyMediaView(portalProviderAPI, eventDispatcher, providerFactory) {
|
|
6
|
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7
|
-
var api = arguments.length > 4 ? arguments[4] : undefined;
|
|
8
|
-
if (fg('platform_editor_ssr_media') || editorExperiment('platform_editor_exp_lazy_node_views', false)) {
|
|
9
|
-
return ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api);
|
|
10
|
-
}
|
|
11
|
-
return withLazyLoading({
|
|
12
|
-
nodeName: 'media',
|
|
13
|
-
getNodeViewOptions: function getNodeViewOptions() {},
|
|
14
|
-
loader: function loader() {
|
|
15
|
-
var result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-media-lazy-node-view" */
|
|
16
|
-
'./mediaNodeView').then(function (_ref) {
|
|
17
|
-
var ReactMediaNode = _ref.ReactMediaNode;
|
|
18
|
-
return function (node, view, getPos) {
|
|
19
|
-
return ReactMediaNode(portalProviderAPI, eventDispatcher, providerFactory, options, api)(node, view, getPos);
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
|
-
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
import type { MediaOptions } from '../types';
|
|
9
|
-
export declare const lazyMediaSingleView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, options?: MediaOptions) => NodeViewConstructor;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
|
-
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
7
|
-
import type { MediaOptions } from '../types';
|
|
8
|
-
export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
|
-
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
import type { MediaOptions } from '../types';
|
|
9
|
-
export declare const lazyMediaSingleView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, options?: MediaOptions) => NodeViewConstructor;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
|
-
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
7
|
-
import type { MediaOptions } from '../types';
|
|
8
|
-
export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|