@atlaskit/editor-plugin-media 1.19.5 → 1.19.7
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 +14 -0
- package/dist/cjs/nodeviews/mediaInline.js +0 -10
- package/dist/cjs/nodeviews/styles.js +1 -2
- package/dist/cjs/toolbar/index.js +2 -7
- package/dist/es2019/nodeviews/mediaInline.js +0 -8
- package/dist/es2019/nodeviews/styles.js +0 -1
- package/dist/es2019/toolbar/index.js +3 -8
- package/dist/esm/nodeviews/mediaInline.js +0 -10
- package/dist/esm/nodeviews/styles.js +0 -1
- package/dist/esm/toolbar/index.js +3 -8
- package/dist/types/nodeviews/mediaInline.d.ts +0 -3
- package/dist/types/nodeviews/styles.d.ts +0 -1
- package/dist/types-ts4.5/nodeviews/mediaInline.d.ts +0 -3
- package/dist/types-ts4.5/nodeviews/styles.d.ts +0 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.19.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#99511](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99511)
|
|
8
|
+
[`85eb87c88183`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85eb87c88183) -
|
|
9
|
+
Removed unused logic that was creating an empty span element when new portal provider is enabled
|
|
10
|
+
|
|
11
|
+
## 1.19.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.19.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -27,7 +27,6 @@ var _mediaUi = require("@atlaskit/media-ui");
|
|
|
27
27
|
var _MediaViewerContainer = require("../ui/MediaViewer/MediaViewerContainer");
|
|
28
28
|
var _isType = require("../utils/is-type");
|
|
29
29
|
var _mediaNodeUpdater = require("./mediaNodeUpdater");
|
|
30
|
-
var _styles = require("./styles");
|
|
31
30
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
32
31
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
32
|
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; }
|
|
@@ -254,15 +253,6 @@ var MediaInlineNodeView = exports.MediaInlineNodeView = /*#__PURE__*/function (_
|
|
|
254
253
|
domRef.contentEditable = 'false';
|
|
255
254
|
return domRef;
|
|
256
255
|
}
|
|
257
|
-
}, {
|
|
258
|
-
key: "getContentDOM",
|
|
259
|
-
value: function getContentDOM() {
|
|
260
|
-
var dom = document.createElement('span');
|
|
261
|
-
dom.classList.add(_styles.MediaInlineNodeSelector);
|
|
262
|
-
return {
|
|
263
|
-
dom: dom
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
256
|
}, {
|
|
267
257
|
key: "ignoreMutation",
|
|
268
258
|
value: function ignoreMutation() {
|
|
@@ -4,13 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.MediaSingleNodeSelector = exports.
|
|
7
|
+
exports.MediaSingleNodeSelector = exports.MediaCardWrapper = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
11
11
|
/** @jsx jsx */
|
|
12
12
|
|
|
13
|
-
var MediaInlineNodeSelector = exports.MediaInlineNodeSelector = 'media-inline-node';
|
|
14
13
|
var MediaSingleNodeSelector = exports.MediaSingleNodeSelector = 'media-single-node';
|
|
15
14
|
var absoluteDivStyles = (0, _react2.css)({
|
|
16
15
|
position: 'absolute',
|
|
@@ -597,16 +597,11 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
597
597
|
};
|
|
598
598
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
599
599
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
600
|
-
baseToolbar.getDomRef = function () {
|
|
601
|
-
var _mediaPluginState$ele2;
|
|
602
|
-
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(_styles.MediaInlineNodeSelector));
|
|
603
|
-
return element || mediaPluginState.element;
|
|
604
|
-
};
|
|
605
600
|
items = (0, _mediaInline2.generateMediaInlineFloatingToolbar)(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
606
601
|
} else {
|
|
607
602
|
baseToolbar.getDomRef = function () {
|
|
608
|
-
var _mediaPluginState$
|
|
609
|
-
var element = (_mediaPluginState$
|
|
603
|
+
var _mediaPluginState$ele2;
|
|
604
|
+
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(_styles.MediaSingleNodeSelector));
|
|
610
605
|
return element || mediaPluginState.element;
|
|
611
606
|
};
|
|
612
607
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
@@ -11,7 +11,6 @@ import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
|
|
|
11
11
|
import { MediaViewerContainer } from '../ui/MediaViewer/MediaViewerContainer';
|
|
12
12
|
import { isImage } from '../utils/is-type';
|
|
13
13
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
14
|
-
import { MediaInlineNodeSelector } from './styles';
|
|
15
14
|
export const createMediaNodeUpdater = props => {
|
|
16
15
|
const node = props.node;
|
|
17
16
|
return new MediaNodeUpdater({
|
|
@@ -179,13 +178,6 @@ export class MediaInlineNodeView extends SelectionBasedNodeView {
|
|
|
179
178
|
domRef.contentEditable = 'false';
|
|
180
179
|
return domRef;
|
|
181
180
|
}
|
|
182
|
-
getContentDOM() {
|
|
183
|
-
const dom = document.createElement('span');
|
|
184
|
-
dom.classList.add(MediaInlineNodeSelector);
|
|
185
|
-
return {
|
|
186
|
-
dom
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
181
|
ignoreMutation() {
|
|
190
182
|
return true;
|
|
191
183
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { MediaBorderGapFiller } from '@atlaskit/editor-common/ui';
|
|
5
|
-
export const MediaInlineNodeSelector = 'media-inline-node';
|
|
6
5
|
export const MediaSingleNodeSelector = 'media-single-node';
|
|
7
6
|
const absoluteDivStyles = css({
|
|
8
7
|
position: 'absolute',
|
|
@@ -14,7 +14,7 @@ import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
|
14
14
|
import { messages } from '@atlaskit/media-ui';
|
|
15
15
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { showLinkingToolbar } from '../commands/linking';
|
|
17
|
-
import {
|
|
17
|
+
import { MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
18
18
|
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
19
19
|
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
20
20
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
@@ -598,16 +598,11 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
598
598
|
};
|
|
599
599
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : (_pluginInjectionApi$f4 = _pluginInjectionApi$f3.actions) === null || _pluginInjectionApi$f4 === void 0 ? void 0 : _pluginInjectionApi$f4.forceFocusSelector, isViewOnly);
|
|
600
600
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
601
|
-
baseToolbar.getDomRef = () => {
|
|
602
|
-
var _mediaPluginState$ele2;
|
|
603
|
-
const element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(`.${MediaInlineNodeSelector}`);
|
|
604
|
-
return element || mediaPluginState.element;
|
|
605
|
-
};
|
|
606
601
|
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
607
602
|
} else {
|
|
608
603
|
baseToolbar.getDomRef = () => {
|
|
609
|
-
var _mediaPluginState$
|
|
610
|
-
const element = (_mediaPluginState$
|
|
604
|
+
var _mediaPluginState$ele2;
|
|
605
|
+
const element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(`.${MediaSingleNodeSelector}`);
|
|
611
606
|
return element || mediaPluginState.element;
|
|
612
607
|
};
|
|
613
608
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
@@ -25,7 +25,6 @@ import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
|
|
|
25
25
|
import { MediaViewerContainer } from '../ui/MediaViewer/MediaViewerContainer';
|
|
26
26
|
import { isImage } from '../utils/is-type';
|
|
27
27
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
28
|
-
import { MediaInlineNodeSelector } from './styles';
|
|
29
28
|
export var createMediaNodeUpdater = function createMediaNodeUpdater(props) {
|
|
30
29
|
var node = props.node;
|
|
31
30
|
return new MediaNodeUpdater(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -248,15 +247,6 @@ export var MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
248
247
|
domRef.contentEditable = 'false';
|
|
249
248
|
return domRef;
|
|
250
249
|
}
|
|
251
|
-
}, {
|
|
252
|
-
key: "getContentDOM",
|
|
253
|
-
value: function getContentDOM() {
|
|
254
|
-
var dom = document.createElement('span');
|
|
255
|
-
dom.classList.add(MediaInlineNodeSelector);
|
|
256
|
-
return {
|
|
257
|
-
dom: dom
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
250
|
}, {
|
|
261
251
|
key: "ignoreMutation",
|
|
262
252
|
value: function ignoreMutation() {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { MediaBorderGapFiller } from '@atlaskit/editor-common/ui';
|
|
5
|
-
export var MediaInlineNodeSelector = 'media-inline-node';
|
|
6
5
|
export var MediaSingleNodeSelector = 'media-single-node';
|
|
7
6
|
var absoluteDivStyles = css({
|
|
8
7
|
position: 'absolute',
|
|
@@ -18,7 +18,7 @@ import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
|
18
18
|
import { messages } from '@atlaskit/media-ui';
|
|
19
19
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { showLinkingToolbar } from '../commands/linking';
|
|
21
|
-
import {
|
|
21
|
+
import { MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
22
22
|
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
23
23
|
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
24
24
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
@@ -587,16 +587,11 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
587
587
|
};
|
|
588
588
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
589
589
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
590
|
-
baseToolbar.getDomRef = function () {
|
|
591
|
-
var _mediaPluginState$ele2;
|
|
592
|
-
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(MediaInlineNodeSelector));
|
|
593
|
-
return element || mediaPluginState.element;
|
|
594
|
-
};
|
|
595
590
|
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
596
591
|
} else {
|
|
597
592
|
baseToolbar.getDomRef = function () {
|
|
598
|
-
var _mediaPluginState$
|
|
599
|
-
var element = (_mediaPluginState$
|
|
593
|
+
var _mediaPluginState$ele2;
|
|
594
|
+
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(MediaSingleNodeSelector));
|
|
600
595
|
return element || mediaPluginState.element;
|
|
601
596
|
};
|
|
602
597
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
@@ -42,9 +42,6 @@ export interface MediaInlineNodeViewProps {
|
|
|
42
42
|
}
|
|
43
43
|
export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
|
|
44
44
|
createDomRef(): HTMLSpanElement;
|
|
45
|
-
getContentDOM(): {
|
|
46
|
-
dom: HTMLSpanElement;
|
|
47
|
-
};
|
|
48
45
|
ignoreMutation(): boolean;
|
|
49
46
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
50
47
|
render(props: MediaInlineNodeViewProps): jsx.JSX.Element;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
|
-
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
6
5
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
7
6
|
type MediaCardWrapperProps = {
|
|
8
7
|
dimensions: NumericalCardDimensions;
|
|
@@ -42,9 +42,6 @@ export interface MediaInlineNodeViewProps {
|
|
|
42
42
|
}
|
|
43
43
|
export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
|
|
44
44
|
createDomRef(): HTMLSpanElement;
|
|
45
|
-
getContentDOM(): {
|
|
46
|
-
dom: HTMLSpanElement;
|
|
47
|
-
};
|
|
48
45
|
ignoreMutation(): boolean;
|
|
49
46
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
50
47
|
render(props: MediaInlineNodeViewProps): jsx.JSX.Element;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
|
-
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
6
5
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
7
6
|
type MediaCardWrapperProps = {
|
|
8
7
|
dimensions: NumericalCardDimensions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.7",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
39
39
|
"@atlaskit/button": "^17.14.0",
|
|
40
|
-
"@atlaskit/editor-common": "^79.
|
|
40
|
+
"@atlaskit/editor-common": "^79.3.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.6.0",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^1.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-annotation": "1.7.3",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
54
54
|
"@atlaskit/editor-shared-styles": "^2.10.0",
|
|
55
55
|
"@atlaskit/editor-tables": "^2.7.0",
|
|
56
|
-
"@atlaskit/form": "^
|
|
56
|
+
"@atlaskit/form": "^10.0.0",
|
|
57
57
|
"@atlaskit/icon": "^22.1.0",
|
|
58
58
|
"@atlaskit/media-card": "^77.11.0",
|
|
59
59
|
"@atlaskit/media-client": "^27.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/primitives": "^6.1.0",
|
|
68
68
|
"@atlaskit/textfield": "^6.3.0",
|
|
69
69
|
"@atlaskit/theme": "^12.8.0",
|
|
70
|
-
"@atlaskit/tokens": "^1.
|
|
70
|
+
"@atlaskit/tokens": "^1.48.0",
|
|
71
71
|
"@atlaskit/tooltip": "^18.3.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
73
73
|
"@emotion/react": "^11.7.1",
|