@atlaskit/editor-plugin-media 18.0.8 → 18.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 +17 -0
- package/dist/cjs/nodeviews/mediaGroupNext.js +3 -3
- package/dist/cjs/nodeviews/mediaNodeView/media.js +2 -2
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +2 -2
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +2 -2
- package/dist/cjs/ui/ToolbarMedia/index.js +1 -1
- package/dist/cjs/ui/toolbar/comments.js +3 -3
- package/dist/es2019/nodeviews/mediaGroupNext.js +2 -2
- package/dist/es2019/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/es2019/ui/ToolbarMedia/index.js +1 -1
- package/dist/es2019/ui/toolbar/comments.js +1 -1
- package/dist/esm/nodeviews/mediaGroupNext.js +2 -2
- package/dist/esm/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/esm/ui/ToolbarMedia/index.js +1 -1
- package/dist/esm/ui/toolbar/comments.js +1 -1
- package/package.json +34 -34
- package/report.api.md +0 -454
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 18.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
|
|
8
|
+
Remove stale API report artifacts from published Platform packages.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 18.0.9
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 18.0.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
|
|
|
19
19
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
20
20
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
21
21
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
|
-
var
|
|
22
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
23
23
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
24
24
|
var _mediaNodeUpdater = require("./mediaNodeUpdater");
|
|
25
25
|
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" != _typeof(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); }
|
|
@@ -172,7 +172,7 @@ var runMediaNodeUpdate = /*#__PURE__*/function () {
|
|
|
172
172
|
};
|
|
173
173
|
}();
|
|
174
174
|
var noop = function noop() {};
|
|
175
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
176
176
|
var MediaGroupNext = exports.MediaGroupNext = (0, _reactIntl.injectIntl)( /*#__PURE__*/_react.default.memo(function (props) {
|
|
177
177
|
var _props$mediaOptions = props.mediaOptions,
|
|
178
178
|
allowLazyLoading = _props$mediaOptions.allowLazyLoading,
|
|
@@ -296,7 +296,7 @@ var MediaGroupNext = exports.MediaGroupNext = (0, _reactIntl.injectIntl)( /*#__P
|
|
|
296
296
|
items: items,
|
|
297
297
|
mediaClientConfig: viewMediaClientConfig,
|
|
298
298
|
featureFlags: featureFlags,
|
|
299
|
-
shouldOpenMediaViewer: editorViewMode && (0,
|
|
299
|
+
shouldOpenMediaViewer: editorViewMode && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control'),
|
|
300
300
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
301
301
|
});
|
|
302
302
|
}));
|
|
@@ -27,7 +27,7 @@ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
|
27
27
|
var _mediaCard = require("@atlaskit/media-card");
|
|
28
28
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
29
29
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
|
-
var
|
|
30
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
31
31
|
var _pluginKey = require("../../pm-plugins/plugin-key");
|
|
32
32
|
var _styles = require("../styles");
|
|
33
33
|
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" != _typeof(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 _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); }
|
|
@@ -97,7 +97,7 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
97
97
|
// Hence it should be removed
|
|
98
98
|
// We need to call "stopPropagation" here in order to prevent the browser from navigating to
|
|
99
99
|
// another URL if the media node is wrapped in a link mark.
|
|
100
|
-
if ((0,
|
|
100
|
+
if ((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control')) {
|
|
101
101
|
event.stopPropagation();
|
|
102
102
|
}
|
|
103
103
|
var state = _this.props.view.state;
|
|
@@ -9,7 +9,7 @@ exports.MediaViewerContainer = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var
|
|
12
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
13
|
var _isType = require("../../pm-plugins/utils/is-type");
|
|
14
14
|
var _utils = require("../../ui/toolbar/utils");
|
|
15
15
|
var _PortalWrapper = require("./PortalWrapper");
|
|
@@ -54,7 +54,7 @@ var MediaViewerContainer = exports.MediaViewerContainer = function MediaViewerCo
|
|
|
54
54
|
setShowMediaViewer(false);
|
|
55
55
|
};
|
|
56
56
|
var isVideoMedia = (0, _isType.isVideo)((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
57
|
-
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && (0,
|
|
57
|
+
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control');
|
|
58
58
|
return (0, _react2.jsx)(_react.Fragment, null, isEditorViewMode ? (0, _react2.jsx)(_react.Fragment, null, isInline ? (0, _react2.jsx)("span", {
|
|
59
59
|
onClick: showMediaViewer,
|
|
60
60
|
css: interactiveStyles,
|
|
@@ -22,7 +22,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
22
22
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
23
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
|
-
var
|
|
25
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
26
26
|
var _main = require("../../pm-plugins/main");
|
|
27
27
|
var _analytics = require("../../pm-plugins/utils/analytics");
|
|
28
28
|
var _checkMediaType = require("../../pm-plugins/utils/check-media-type");
|
|
@@ -99,7 +99,7 @@ var calcUnwrappedLayout = function calcUnwrappedLayout(width, containerWidth, co
|
|
|
99
99
|
if (width <= contentWidth) {
|
|
100
100
|
return 'center';
|
|
101
101
|
}
|
|
102
|
-
var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0,
|
|
102
|
+
var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _editorExperiment.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
103
103
|
exposure: true
|
|
104
104
|
}) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
|
|
105
105
|
if (width < Math.min(containerWidth - padding * 2, _editorSharedStyles.akEditorFullWidthLayoutWidth)) {
|
|
@@ -48,6 +48,6 @@ var ToolbarMedia = function ToolbarMedia(_ref) {
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
52
52
|
var _default_1 = (0, _reactIntl.injectIntl)(ToolbarMedia);
|
|
53
53
|
var _default = exports.default = _default_1;
|
|
@@ -13,7 +13,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
14
14
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
|
|
15
15
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
|
-
var
|
|
16
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
17
17
|
var _utils = require("./utils");
|
|
18
18
|
var commentButton = exports.commentButton = function commentButton(intl, state, api, onCommentButtonMount, createCommentExperience) {
|
|
19
19
|
var _getSelectedMediaSing, _api$annotation, _api$connectivity;
|
|
@@ -57,8 +57,8 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
|
|
|
57
57
|
type: 'button',
|
|
58
58
|
testId: 'add-comment-media-button',
|
|
59
59
|
icon: _comment.default,
|
|
60
|
-
title: (0,
|
|
61
|
-
showTitle: (0,
|
|
60
|
+
title: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') ? title : buttonLabel,
|
|
61
|
+
showTitle: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') ? undefined : true,
|
|
62
62
|
onClick: onClickHandler,
|
|
63
63
|
tooltipContent: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
|
|
64
64
|
description: title
|
|
@@ -7,7 +7,7 @@ import EditorCloseIcon from '@atlaskit/icon/core/cross';
|
|
|
7
7
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
8
8
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
11
|
import { stateKey as mediaStateKey } from '../pm-plugins/plugin-key';
|
|
12
12
|
import { createMediaNodeUpdater } from './mediaNodeUpdater';
|
|
13
13
|
const getIdentifier = item => {
|
|
@@ -127,7 +127,7 @@ const runMediaNodeUpdate = async ({
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
const noop = () => {};
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
131
131
|
export const MediaGroupNext = injectIntl( /*#__PURE__*/React.memo(props => {
|
|
132
132
|
const {
|
|
133
133
|
mediaOptions: {
|
|
@@ -12,7 +12,7 @@ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
|
12
12
|
import { Card, CardLoading } from '@atlaskit/media-card';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
15
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
16
16
|
import { stateKey as mediaStateKey } from '../../pm-plugins/plugin-key';
|
|
17
17
|
import { MediaCardWrapper } from '../styles';
|
|
18
18
|
|
|
@@ -6,7 +6,7 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { isVideo } from '../../pm-plugins/utils/is-type';
|
|
11
11
|
import { getSelectedNearestMediaContainerNodeAttrsFunction } from '../../ui/toolbar/utils';
|
|
12
12
|
import { RenderMediaViewer } from './PortalWrapper';
|
|
@@ -18,7 +18,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
18
18
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
19
19
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
21
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
22
|
import { MEDIA_PLUGIN_IS_RESIZING_KEY, MEDIA_PLUGIN_RESIZING_WIDTH_KEY } from '../../pm-plugins/main';
|
|
23
23
|
import { getMediaResizeAnalyticsEvent } from '../../pm-plugins/utils/analytics';
|
|
24
24
|
import { checkMediaType } from '../../pm-plugins/utils/check-media-type';
|
|
@@ -6,7 +6,7 @@ import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
7
7
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { getSelectedMediaSingle } from './utils';
|
|
11
11
|
export const commentButton = (intl, state, api, onCommentButtonMount, createCommentExperience) => {
|
|
12
12
|
var _getSelectedMediaSing, _api$annotation, _api$annotation$share, _api$connectivity, _api$connectivity$sha, _api$connectivity$sha2;
|
|
@@ -13,7 +13,7 @@ import EditorCloseIcon from '@atlaskit/icon/core/cross';
|
|
|
13
13
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
14
14
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
16
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
17
17
|
import { stateKey as mediaStateKey } from '../pm-plugins/plugin-key';
|
|
18
18
|
import { createMediaNodeUpdater } from './mediaNodeUpdater';
|
|
19
19
|
var getIdentifier = function getIdentifier(item) {
|
|
@@ -163,7 +163,7 @@ var runMediaNodeUpdate = /*#__PURE__*/function () {
|
|
|
163
163
|
};
|
|
164
164
|
}();
|
|
165
165
|
var noop = function noop() {};
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
167
167
|
export var MediaGroupNext = injectIntl( /*#__PURE__*/React.memo(function (props) {
|
|
168
168
|
var _props$mediaOptions = props.mediaOptions,
|
|
169
169
|
allowLazyLoading = _props$mediaOptions.allowLazyLoading,
|
|
@@ -21,7 +21,7 @@ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
|
21
21
|
import { Card, CardLoading } from '@atlaskit/media-card';
|
|
22
22
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
23
23
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
24
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
25
25
|
import { stateKey as mediaStateKey } from '../../pm-plugins/plugin-key';
|
|
26
26
|
import { MediaCardWrapper } from '../styles';
|
|
27
27
|
|
|
@@ -7,7 +7,7 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
11
|
import { isVideo } from '../../pm-plugins/utils/is-type';
|
|
12
12
|
import { getSelectedNearestMediaContainerNodeAttrsFunction } from '../../ui/toolbar/utils';
|
|
13
13
|
import { RenderMediaViewer } from './PortalWrapper';
|
|
@@ -20,7 +20,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
20
20
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
21
21
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
|
|
22
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
23
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
24
24
|
import { MEDIA_PLUGIN_IS_RESIZING_KEY, MEDIA_PLUGIN_RESIZING_WIDTH_KEY } from '../../pm-plugins/main';
|
|
25
25
|
import { getMediaResizeAnalyticsEvent } from '../../pm-plugins/utils/analytics';
|
|
26
26
|
import { checkMediaType } from '../../pm-plugins/utils/check-media-type';
|
|
@@ -41,6 +41,6 @@ var ToolbarMedia = function ToolbarMedia(_ref) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
45
45
|
var _default_1 = injectIntl(ToolbarMedia);
|
|
46
46
|
export default _default_1;
|
|
@@ -6,7 +6,7 @@ import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
7
7
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { getSelectedMediaSingle } from './utils';
|
|
11
11
|
export var commentButton = function commentButton(intl, state, api, onCommentButtonMount, createCommentExperience) {
|
|
12
12
|
var _getSelectedMediaSing, _api$annotation, _api$connectivity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "18.0
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,47 +22,47 @@
|
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^57.2.0",
|
|
25
|
-
"@atlaskit/analytics-namespaced-context": "^8.
|
|
26
|
-
"@atlaskit/analytics-next": "^12.
|
|
27
|
-
"@atlaskit/button": "^25.
|
|
28
|
-
"@atlaskit/editor-palette": "^3.
|
|
29
|
-
"@atlaskit/editor-plugin-analytics": "^16.
|
|
25
|
+
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
26
|
+
"@atlaskit/analytics-next": "^12.5.0",
|
|
27
|
+
"@atlaskit/button": "^25.3.0",
|
|
28
|
+
"@atlaskit/editor-palette": "^3.5.0",
|
|
29
|
+
"@atlaskit/editor-plugin-analytics": "^16.1.0",
|
|
30
30
|
"@atlaskit/editor-plugin-annotation": "^16.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-connectivity": "^16.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-decorations": "^16.
|
|
33
|
-
"@atlaskit/editor-plugin-editor-disabled": "^16.
|
|
32
|
+
"@atlaskit/editor-plugin-decorations": "^16.1.0",
|
|
33
|
+
"@atlaskit/editor-plugin-editor-disabled": "^16.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-editor-viewmode": "^18.0.0",
|
|
35
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^18.
|
|
36
|
-
"@atlaskit/editor-plugin-focus": "^15.
|
|
37
|
-
"@atlaskit/editor-plugin-grid": "^16.
|
|
38
|
-
"@atlaskit/editor-plugin-guideline": "^16.
|
|
35
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^18.1.0",
|
|
36
|
+
"@atlaskit/editor-plugin-focus": "^15.1.0",
|
|
37
|
+
"@atlaskit/editor-plugin-grid": "^16.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-guideline": "^16.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-interaction": "^27.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-limited-mode": "^13.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-media-editing": "^10.0.0",
|
|
42
|
-
"@atlaskit/editor-plugin-selection": "^16.
|
|
42
|
+
"@atlaskit/editor-plugin-selection": "^16.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-toolbar": "^13.0.0",
|
|
44
|
-
"@atlaskit/editor-plugin-width": "^17.
|
|
44
|
+
"@atlaskit/editor-plugin-width": "^17.1.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
46
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
47
|
-
"@atlaskit/editor-tables": "^3.
|
|
48
|
-
"@atlaskit/form": "^17.
|
|
49
|
-
"@atlaskit/icon": "^37.
|
|
46
|
+
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
47
|
+
"@atlaskit/editor-tables": "^3.1.0",
|
|
48
|
+
"@atlaskit/form": "^17.2.0",
|
|
49
|
+
"@atlaskit/icon": "^37.6.0",
|
|
50
50
|
"@atlaskit/icon-lab": "^7.7.0",
|
|
51
|
-
"@atlaskit/media-card": "^81.
|
|
52
|
-
"@atlaskit/media-client": "^37.
|
|
53
|
-
"@atlaskit/media-client-react": "^6.
|
|
54
|
-
"@atlaskit/media-common": "^14.
|
|
55
|
-
"@atlaskit/media-filmstrip": "^52.
|
|
56
|
-
"@atlaskit/media-picker": "^72.
|
|
57
|
-
"@atlaskit/media-ui": "^30.
|
|
58
|
-
"@atlaskit/media-viewer": "^54.
|
|
51
|
+
"@atlaskit/media-card": "^81.9.0",
|
|
52
|
+
"@atlaskit/media-client": "^37.6.0",
|
|
53
|
+
"@atlaskit/media-client-react": "^6.3.0",
|
|
54
|
+
"@atlaskit/media-common": "^14.6.0",
|
|
55
|
+
"@atlaskit/media-filmstrip": "^52.4.0",
|
|
56
|
+
"@atlaskit/media-picker": "^72.4.0",
|
|
57
|
+
"@atlaskit/media-ui": "^30.15.0",
|
|
58
|
+
"@atlaskit/media-viewer": "^54.8.0",
|
|
59
59
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
60
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
61
|
-
"@atlaskit/primitives": "^22.
|
|
62
|
-
"@atlaskit/textfield": "^10.
|
|
63
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
64
|
-
"@atlaskit/tokens": "^16.
|
|
65
|
-
"@atlaskit/tooltip": "^24.
|
|
60
|
+
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
61
|
+
"@atlaskit/primitives": "^22.5.0",
|
|
62
|
+
"@atlaskit/textfield": "^10.2.0",
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
64
|
+
"@atlaskit/tokens": "^16.10.0",
|
|
65
|
+
"@atlaskit/tooltip": "^24.3.0",
|
|
66
66
|
"@babel/runtime": "^7.0.0",
|
|
67
67
|
"@emotion/react": "^11.7.1",
|
|
68
68
|
"bind-event-listener": "^3.0.0",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^120.
|
|
76
|
-
"@atlaskit/media-core": "^38.
|
|
75
|
+
"@atlaskit/editor-common": "^120.9.0",
|
|
76
|
+
"@atlaskit/media-core": "^38.2.0",
|
|
77
77
|
"react": "^18.2.0 || ^19.2.0",
|
|
78
78
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
79
79
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
package/report.api.md
DELETED
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/editor-plugin-media"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
20
|
-
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
21
|
-
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
22
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
23
|
-
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
24
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
25
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
|
-
import type { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
27
|
-
import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
|
|
28
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
29
|
-
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
30
|
-
import type { FocusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
31
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
32
|
-
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
33
|
-
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
34
|
-
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
35
|
-
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
36
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
37
|
-
import type { MediaFeatureFlags as MediaFeatureFlags_2 } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
38
|
-
import type { MediaFile } from '@atlaskit/media-picker/types';
|
|
39
|
-
import type { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
40
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
41
|
-
import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
42
|
-
import type { NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
43
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
44
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
45
|
-
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
46
|
-
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
47
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
48
|
-
import type { UploadEndEventPayload } from '@atlaskit/media-picker/types';
|
|
49
|
-
import type { UploadErrorEventPayload } from '@atlaskit/media-picker/types';
|
|
50
|
-
import type { UploadParams } from '@atlaskit/media-picker/types';
|
|
51
|
-
import type { UploadPreviewUpdateEventPayload } from '@atlaskit/media-picker/types';
|
|
52
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
53
|
-
|
|
54
|
-
// @public (undocumented)
|
|
55
|
-
interface CustomMediaPicker {
|
|
56
|
-
// (undocumented)
|
|
57
|
-
destroy(): void;
|
|
58
|
-
// (undocumented)
|
|
59
|
-
emit(event: string, data: any): void;
|
|
60
|
-
// (undocumented)
|
|
61
|
-
on(event: string, cb: Listener): void;
|
|
62
|
-
// (undocumented)
|
|
63
|
-
removeAllListeners(event: any): void;
|
|
64
|
-
// (undocumented)
|
|
65
|
-
setUploadParams(uploadParams: UploadParams): void;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// @public (undocumented)
|
|
69
|
-
type getPosHandler = getPosHandlerNode;
|
|
70
|
-
|
|
71
|
-
// @public (undocumented)
|
|
72
|
-
type getPosHandlerNode = () => number | undefined;
|
|
73
|
-
|
|
74
|
-
// @public (undocumented)
|
|
75
|
-
type InsertMediaAsMediaSingle = (
|
|
76
|
-
view: EditorView,
|
|
77
|
-
node: Node_2,
|
|
78
|
-
inputMethod: InputMethodInsertMedia,
|
|
79
|
-
) => boolean;
|
|
80
|
-
|
|
81
|
-
// @public (undocumented)
|
|
82
|
-
type Listener = (data: any) => void;
|
|
83
|
-
|
|
84
|
-
// @public (undocumented)
|
|
85
|
-
interface MediaNodeWithPosHandler {
|
|
86
|
-
// (undocumented)
|
|
87
|
-
getPos: ProsemirrorGetPosHandler;
|
|
88
|
-
// (undocumented)
|
|
89
|
-
node: Node_2;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// @public (undocumented)
|
|
93
|
-
interface MediaOptions {
|
|
94
|
-
// (undocumented)
|
|
95
|
-
alignLeftOnInsert?: boolean;
|
|
96
|
-
// (undocumented)
|
|
97
|
-
allowAdvancedToolBarOptions?: boolean;
|
|
98
|
-
// (undocumented)
|
|
99
|
-
allowAltTextOnImages?: boolean;
|
|
100
|
-
// (undocumented)
|
|
101
|
-
allowBreakoutSnapPoints?: boolean;
|
|
102
|
-
// (undocumented)
|
|
103
|
-
allowCaptions?: boolean;
|
|
104
|
-
// (undocumented)
|
|
105
|
-
allowDropzoneDropLine?: boolean;
|
|
106
|
-
// (undocumented)
|
|
107
|
-
allowLazyLoading?: boolean;
|
|
108
|
-
// (undocumented)
|
|
109
|
-
allowLinking?: boolean;
|
|
110
|
-
// (undocumented)
|
|
111
|
-
allowMarkingUploadsAsIncomplete?: boolean;
|
|
112
|
-
// (undocumented)
|
|
113
|
-
allowMediaGroup?: boolean;
|
|
114
|
-
// (undocumented)
|
|
115
|
-
allowMediaSingle?: MediaSingleOptions | boolean;
|
|
116
|
-
// (undocumented)
|
|
117
|
-
allowMediaSingleEditable?: boolean;
|
|
118
|
-
// (undocumented)
|
|
119
|
-
allowRemoteDimensionsFetch?: boolean;
|
|
120
|
-
// (undocumented)
|
|
121
|
-
allowResizing?: boolean;
|
|
122
|
-
// (undocumented)
|
|
123
|
-
allowResizingInTables?: boolean;
|
|
124
|
-
// (undocumented)
|
|
125
|
-
allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
|
|
126
|
-
// (undocumented)
|
|
127
|
-
altTextValidator?: (value: string) => string[];
|
|
128
|
-
// (undocumented)
|
|
129
|
-
customDropzoneContainer?: HTMLElement;
|
|
130
|
-
// (undocumented)
|
|
131
|
-
customMediaPicker?: CustomMediaPicker;
|
|
132
|
-
// (undocumented)
|
|
133
|
-
editorSelectionAPI?: EditorSelectionAPI;
|
|
134
|
-
// (undocumented)
|
|
135
|
-
enableDownloadButton?: boolean;
|
|
136
|
-
// (undocumented)
|
|
137
|
-
featureFlags?: MediaFeatureFlags;
|
|
138
|
-
// (undocumented)
|
|
139
|
-
fullWidthEnabled?: boolean;
|
|
140
|
-
// (undocumented)
|
|
141
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
142
|
-
// (undocumented)
|
|
143
|
-
isCopyPasteEnabled?: boolean;
|
|
144
|
-
// (undocumented)
|
|
145
|
-
provider?: Providers['mediaProvider'];
|
|
146
|
-
// (undocumented)
|
|
147
|
-
uploadErrorHandler?: (state: MediaState) => void;
|
|
148
|
-
// (undocumented)
|
|
149
|
-
useForgePlugins?: boolean;
|
|
150
|
-
// (undocumented)
|
|
151
|
-
waitForMediaUpload?: boolean;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// @public (undocumented)
|
|
155
|
-
export type MediaPlugin = NextEditorPlugin<
|
|
156
|
-
'media',
|
|
157
|
-
{
|
|
158
|
-
pluginConfiguration: MediaOptions | undefined;
|
|
159
|
-
dependencies: [
|
|
160
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
161
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
162
|
-
GuidelinePlugin,
|
|
163
|
-
GridPlugin,
|
|
164
|
-
WidthPlugin,
|
|
165
|
-
DecorationsPlugin,
|
|
166
|
-
FloatingToolbarPlugin,
|
|
167
|
-
EditorDisabledPlugin,
|
|
168
|
-
FocusPlugin,
|
|
169
|
-
SelectionPlugin,
|
|
170
|
-
];
|
|
171
|
-
sharedState: MediaPluginState | null;
|
|
172
|
-
actions: {
|
|
173
|
-
insertMediaAsMediaSingle: InsertMediaAsMediaSingle;
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
>;
|
|
177
|
-
|
|
178
|
-
// @public (undocumented)
|
|
179
|
-
export const mediaPlugin: MediaPlugin;
|
|
180
|
-
|
|
181
|
-
// @public (undocumented)
|
|
182
|
-
type MediaPluginOptions = {
|
|
183
|
-
providerFactory: ProviderFactory;
|
|
184
|
-
nodeViews: {
|
|
185
|
-
[name: string]: (node: Node_2, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
186
|
-
};
|
|
187
|
-
errorReporter?: ErrorReporter;
|
|
188
|
-
uploadErrorHandler?: (state: MediaState) => void;
|
|
189
|
-
waitForMediaUpload?: boolean;
|
|
190
|
-
customDropzoneContainer?: HTMLElement;
|
|
191
|
-
customMediaPicker?: CustomMediaPicker;
|
|
192
|
-
allowResizing: boolean;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// @public (undocumented)
|
|
196
|
-
interface MediaPluginState {
|
|
197
|
-
// (undocumented)
|
|
198
|
-
addPendingTask: (promise: Promise<any>) => void;
|
|
199
|
-
// (undocumented)
|
|
200
|
-
allowsUploads: boolean;
|
|
201
|
-
// (undocumented)
|
|
202
|
-
allUploadsFinished: boolean;
|
|
203
|
-
// (undocumented)
|
|
204
|
-
clone(): MediaPluginState;
|
|
205
|
-
// (undocumented)
|
|
206
|
-
currentMaxWidth?: number;
|
|
207
|
-
// (undocumented)
|
|
208
|
-
destroy(): void;
|
|
209
|
-
// (undocumented)
|
|
210
|
-
dispatch?: Dispatch;
|
|
211
|
-
// (undocumented)
|
|
212
|
-
editingMediaSinglePos?: number;
|
|
213
|
-
// (undocumented)
|
|
214
|
-
element?: HTMLElement;
|
|
215
|
-
// (undocumented)
|
|
216
|
-
findMediaNode: (id: string) => MediaNodeWithPosHandler | null;
|
|
217
|
-
// (undocumented)
|
|
218
|
-
getMediaOptions: () => MediaPluginOptions;
|
|
219
|
-
// (undocumented)
|
|
220
|
-
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
221
|
-
// (undocumented)
|
|
222
|
-
handleMediaGroupUpdate: (oldNodes: Node_2[], newNodes: Node_2[]) => void;
|
|
223
|
-
// (undocumented)
|
|
224
|
-
handleMediaNodeMount: (node: Node_2, getPos: ProsemirrorGetPosHandler) => void;
|
|
225
|
-
// (undocumented)
|
|
226
|
-
handleMediaNodeRemoval: (node: Node_2 | undefined, getPos: ProsemirrorGetPosHandler) => void;
|
|
227
|
-
// (undocumented)
|
|
228
|
-
handleMediaNodeUnmount: (oldNode: Node_2) => void;
|
|
229
|
-
// (undocumented)
|
|
230
|
-
ignoreLinks: boolean;
|
|
231
|
-
// (undocumented)
|
|
232
|
-
insertFile: (
|
|
233
|
-
mediaState: MediaState,
|
|
234
|
-
onMediaStateChanged: MediaStateEventSubscriber,
|
|
235
|
-
pickerType?: string,
|
|
236
|
-
) => void;
|
|
237
|
-
// (undocumented)
|
|
238
|
-
isFullscreen: boolean;
|
|
239
|
-
// (undocumented)
|
|
240
|
-
isResizing: boolean;
|
|
241
|
-
// (undocumented)
|
|
242
|
-
layout: RichMediaLayout;
|
|
243
|
-
// (undocumented)
|
|
244
|
-
mediaClientConfig?: MediaClientConfig;
|
|
245
|
-
// (undocumented)
|
|
246
|
-
mediaNodes: MediaNodeWithPosHandler[];
|
|
247
|
-
// (undocumented)
|
|
248
|
-
mediaOptions?: MediaOptions;
|
|
249
|
-
// (undocumented)
|
|
250
|
-
mediaProvider?: MediaProvider_2;
|
|
251
|
-
// (undocumented)
|
|
252
|
-
onContextIdentifierProvider: (
|
|
253
|
-
_name: string,
|
|
254
|
-
provider?: Promise<ContextIdentifierProvider>,
|
|
255
|
-
) => Promise<void>;
|
|
256
|
-
// (undocumented)
|
|
257
|
-
onPopupPickerClose: () => void;
|
|
258
|
-
// (undocumented)
|
|
259
|
-
onPopupToggle: (onPopupToogleCallback: (isOpen: boolean) => void) => void;
|
|
260
|
-
// (undocumented)
|
|
261
|
-
options: MediaPluginOptions;
|
|
262
|
-
// (undocumented)
|
|
263
|
-
pickerPromises: Array<Promise<PickerFacade>>;
|
|
264
|
-
// (undocumented)
|
|
265
|
-
pickers: PickerFacade[];
|
|
266
|
-
// (undocumented)
|
|
267
|
-
removeSelectedMediaContainer: () => boolean;
|
|
268
|
-
// (undocumented)
|
|
269
|
-
resizingWidth: number;
|
|
270
|
-
// (undocumented)
|
|
271
|
-
selectedMediaContainerNode: () => Node_2 | undefined;
|
|
272
|
-
// (undocumented)
|
|
273
|
-
setBrowseFn: (browseFn: () => void) => void;
|
|
274
|
-
// (undocumented)
|
|
275
|
-
setIsResizing(isResizing: boolean): void;
|
|
276
|
-
// (undocumented)
|
|
277
|
-
setMediaProvider: (mediaProvider?: Promise<MediaProvider_2>) => Promise<void>;
|
|
278
|
-
// (undocumented)
|
|
279
|
-
setResizingWidth(width: number): void;
|
|
280
|
-
// (undocumented)
|
|
281
|
-
setView(view: EditorView): void;
|
|
282
|
-
// (undocumented)
|
|
283
|
-
showDropzone: boolean;
|
|
284
|
-
// (undocumented)
|
|
285
|
-
showEditingDialog?: boolean;
|
|
286
|
-
// (undocumented)
|
|
287
|
-
showMediaPicker: () => void;
|
|
288
|
-
// (undocumented)
|
|
289
|
-
splitMediaGroup: () => boolean;
|
|
290
|
-
// (undocumented)
|
|
291
|
-
updateAndDispatch(
|
|
292
|
-
props: Partial<Pick<this, 'allUploadsFinished' | 'allowsUploads' | 'isFullscreen'>>,
|
|
293
|
-
): void;
|
|
294
|
-
// (undocumented)
|
|
295
|
-
updateElement(): void;
|
|
296
|
-
// (undocumented)
|
|
297
|
-
updateMediaSingleNodeAttrs: (id: string, attrs: object) => boolean | undefined;
|
|
298
|
-
// (undocumented)
|
|
299
|
-
uploadMediaClientConfig?: MediaClientConfig;
|
|
300
|
-
// (undocumented)
|
|
301
|
-
waitForMediaUpload: boolean;
|
|
302
|
-
// (undocumented)
|
|
303
|
-
waitForPendingTasks: (
|
|
304
|
-
timeout?: number,
|
|
305
|
-
lastTask?: Promise<MediaState | null>,
|
|
306
|
-
) => Promise<MediaState | null>;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
// @public (undocumented)
|
|
310
|
-
interface MediaSingleOptions {
|
|
311
|
-
// (undocumented)
|
|
312
|
-
disableLayout?: boolean;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// @public (undocumented)
|
|
316
|
-
interface MediaState {
|
|
317
|
-
// (undocumented)
|
|
318
|
-
collection?: string;
|
|
319
|
-
// (undocumented)
|
|
320
|
-
contextId?: string;
|
|
321
|
-
// (undocumented)
|
|
322
|
-
dimensions?: {
|
|
323
|
-
width: number | undefined;
|
|
324
|
-
height: number | undefined;
|
|
325
|
-
};
|
|
326
|
-
// (undocumented)
|
|
327
|
-
error?: {
|
|
328
|
-
name: string;
|
|
329
|
-
description: string;
|
|
330
|
-
};
|
|
331
|
-
// (undocumented)
|
|
332
|
-
fileMimeType?: string;
|
|
333
|
-
// (undocumented)
|
|
334
|
-
fileName?: string;
|
|
335
|
-
// (undocumented)
|
|
336
|
-
fileSize?: number;
|
|
337
|
-
// (undocumented)
|
|
338
|
-
id: string;
|
|
339
|
-
publicId?: string;
|
|
340
|
-
// (undocumented)
|
|
341
|
-
scaleFactor?: number;
|
|
342
|
-
// (undocumented)
|
|
343
|
-
status?: MediaStateStatus;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// @public (undocumented)
|
|
347
|
-
type MediaStateEvent = MediaState;
|
|
348
|
-
|
|
349
|
-
// @public (undocumented)
|
|
350
|
-
type MediaStateEventListener = (evt: MediaStateEvent) => void;
|
|
351
|
-
|
|
352
|
-
// @public (undocumented)
|
|
353
|
-
type MediaStateEventSubscriber = (listener: MediaStateEventListener) => void;
|
|
354
|
-
|
|
355
|
-
// @public (undocumented)
|
|
356
|
-
type MediaStateStatus =
|
|
357
|
-
| 'cancelled'
|
|
358
|
-
| 'error'
|
|
359
|
-
| 'mobile-upload-end'
|
|
360
|
-
| 'preview'
|
|
361
|
-
| 'ready'
|
|
362
|
-
| 'unknown';
|
|
363
|
-
|
|
364
|
-
// @public (undocumented)
|
|
365
|
-
type MobileUploadEndEventPayload = {
|
|
366
|
-
readonly file: MediaFile & {
|
|
367
|
-
readonly collectionName?: string;
|
|
368
|
-
readonly publicId?: string;
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
// @public (undocumented)
|
|
373
|
-
type NewMediaEvent = (
|
|
374
|
-
state: MediaState,
|
|
375
|
-
onStateChanged: MediaStateEventSubscriber,
|
|
376
|
-
pickerType?: string,
|
|
377
|
-
) => void;
|
|
378
|
-
|
|
379
|
-
// @public (undocumented)
|
|
380
|
-
class PickerFacade {
|
|
381
|
-
constructor(
|
|
382
|
-
pickerType: PickerType,
|
|
383
|
-
config: PickerFacadeConfig,
|
|
384
|
-
pickerConfig?: CustomMediaPicker | null | undefined,
|
|
385
|
-
analyticsName?: string,
|
|
386
|
-
);
|
|
387
|
-
// (undocumented)
|
|
388
|
-
readonly config: PickerFacadeConfig;
|
|
389
|
-
// (undocumented)
|
|
390
|
-
destroy(): void;
|
|
391
|
-
// (undocumented)
|
|
392
|
-
erroredFiles: Set<string>;
|
|
393
|
-
// (undocumented)
|
|
394
|
-
handleMobileUploadEnd: (event: MobileUploadEndEventPayload) => void;
|
|
395
|
-
// (undocumented)
|
|
396
|
-
handleReady: (event: UploadEndEventPayload) => void;
|
|
397
|
-
// (undocumented)
|
|
398
|
-
handleUploadError: ({ error, fileId }: UploadErrorEventPayload) => void;
|
|
399
|
-
// (undocumented)
|
|
400
|
-
handleUploadPreviewUpdate: (event: UploadPreviewUpdateEventPayload) => void;
|
|
401
|
-
// (undocumented)
|
|
402
|
-
init(): Promise<PickerFacade>;
|
|
403
|
-
// (undocumented)
|
|
404
|
-
get mediaPicker(): CustomMediaPicker | undefined;
|
|
405
|
-
// (undocumented)
|
|
406
|
-
onDrag(cb: (state: 'enter' | 'leave') => any): void;
|
|
407
|
-
// (undocumented)
|
|
408
|
-
onNewMedia(cb: NewMediaEvent): void;
|
|
409
|
-
// (undocumented)
|
|
410
|
-
readonly pickerConfig?: CustomMediaPicker | null | undefined;
|
|
411
|
-
// (undocumented)
|
|
412
|
-
setUploadParams(params: UploadParams): void;
|
|
413
|
-
// (undocumented)
|
|
414
|
-
get type(): PickerType;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// @public (undocumented)
|
|
418
|
-
type PickerFacadeConfig = {
|
|
419
|
-
mediaClientConfig: MediaClientConfig;
|
|
420
|
-
errorReporter: ErrorReportingHandler;
|
|
421
|
-
featureFlags?: MediaFeatureFlags_2;
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
// @public (undocumented)
|
|
425
|
-
type PickerType = 'clipboard' | 'customMediaPicker' | 'dropzone';
|
|
426
|
-
|
|
427
|
-
// @public (undocumented)
|
|
428
|
-
interface PlaceholderTextOptions {
|
|
429
|
-
// (undocumented)
|
|
430
|
-
allowInserting?: boolean;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// @public (undocumented)
|
|
434
|
-
type ProsemirrorGetPosHandler = getPosHandlerNode;
|
|
435
|
-
|
|
436
|
-
// (No @packageDocumentation comment for this package)
|
|
437
|
-
```
|
|
438
|
-
|
|
439
|
-
<!--SECTION END: Main Entry Types-->
|
|
440
|
-
|
|
441
|
-
### Peer Dependencies
|
|
442
|
-
|
|
443
|
-
<!--SECTION START: Peer Dependencies-->
|
|
444
|
-
|
|
445
|
-
```json
|
|
446
|
-
{
|
|
447
|
-
"@atlaskit/media-core": "^34.1.2",
|
|
448
|
-
"react": "^16.8.0",
|
|
449
|
-
"react-dom": "^16.8.0",
|
|
450
|
-
"react-intl": "npm:react-intl@^5.18.1"
|
|
451
|
-
}
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
<!--SECTION END: Peer Dependencies-->
|