@atlaskit/editor-plugin-media 2.3.16 → 2.3.18
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 +15 -0
- package/dist/cjs/ui/toolbar/index.js +15 -10
- package/dist/cjs/ui/toolbar/mediaInline.js +2 -4
- package/dist/es2019/ui/toolbar/index.js +15 -10
- package/dist/es2019/ui/toolbar/mediaInline.js +2 -4
- package/dist/esm/ui/toolbar/index.js +16 -11
- package/dist/esm/ui/toolbar/mediaInline.js +2 -4
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 2.3.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.3.17
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#134468](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134468)
|
|
14
|
+
[`e312ec529d05a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e312ec529d05a) -
|
|
15
|
+
[ux] Apply hover decoration when hovering on copy/delete button on overflow menu
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 2.3.16
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@ var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
|
16
16
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
17
17
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
18
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
19
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
20
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
20
21
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
21
22
|
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
@@ -25,7 +26,6 @@ var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
|
25
26
|
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
26
27
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
27
28
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
28
|
-
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
29
29
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
30
30
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
31
31
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -94,8 +94,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
94
94
|
testId: 'file-preview-toolbar-button',
|
|
95
95
|
type: 'button',
|
|
96
96
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
97
|
-
|
|
98
|
-
iconFallback: _filePreview.default,
|
|
97
|
+
iconFallback: _maximize.default,
|
|
99
98
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
100
99
|
onClick: function onClick() {
|
|
101
100
|
var _handleShowMediaViewe;
|
|
@@ -539,8 +538,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
539
538
|
testId: 'file-preview-toolbar-button',
|
|
540
539
|
type: 'button',
|
|
541
540
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
542
|
-
|
|
543
|
-
iconFallback: _filePreview.default,
|
|
541
|
+
iconFallback: _maximize.default,
|
|
544
542
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
545
543
|
onClick: function onClick() {
|
|
546
544
|
var _handleShowMediaViewe2;
|
|
@@ -626,8 +624,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
626
624
|
testId: 'file-preview-toolbar-button',
|
|
627
625
|
type: 'button',
|
|
628
626
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
629
|
-
|
|
630
|
-
iconFallback: _filePreview.default,
|
|
627
|
+
iconFallback: _maximize.default,
|
|
631
628
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
632
629
|
onClick: function onClick() {
|
|
633
630
|
var _handleShowMediaViewe3;
|
|
@@ -778,10 +775,18 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
778
775
|
type: 'separator'
|
|
779
776
|
});
|
|
780
777
|
}
|
|
778
|
+
var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
|
|
779
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') ? {
|
|
780
|
+
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
781
|
+
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
782
|
+
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
783
|
+
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
784
|
+
} : undefined;
|
|
785
|
+
};
|
|
781
786
|
items.push({
|
|
782
787
|
type: 'overflow-dropdown',
|
|
783
788
|
id: 'media',
|
|
784
|
-
options: [].concat((0, _toConsumableArray2.default)(customOptions), [{
|
|
789
|
+
options: [].concat((0, _toConsumableArray2.default)(customOptions), [_objectSpread({
|
|
785
790
|
title: 'Copy',
|
|
786
791
|
onClick: function onClick() {
|
|
787
792
|
var _pluginInjectionApi$c4, _pluginInjectionApi$f3;
|
|
@@ -792,13 +797,13 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
792
797
|
icon: /*#__PURE__*/_react.default.createElement(_copy.default, {
|
|
793
798
|
label: ""
|
|
794
799
|
})
|
|
795
|
-
}, {
|
|
800
|
+
}, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
796
801
|
title: 'Delete',
|
|
797
802
|
onClick: remove,
|
|
798
803
|
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
799
804
|
label: ""
|
|
800
805
|
})
|
|
801
|
-
}])
|
|
806
|
+
}, hoverDecorationProps(nodeType))])
|
|
802
807
|
});
|
|
803
808
|
}
|
|
804
809
|
|
|
@@ -20,7 +20,6 @@ var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
|
20
20
|
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
21
21
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
22
22
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
23
|
-
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
24
23
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
25
24
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
25
|
var _linking = require("../../pm-plugins/commands/linking");
|
|
@@ -58,7 +57,7 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
58
57
|
type: 'button',
|
|
59
58
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
60
59
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
61
|
-
iconFallback:
|
|
60
|
+
iconFallback: _maximize.default,
|
|
62
61
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
63
62
|
onClick: function onClick() {
|
|
64
63
|
var _handleShowMediaViewe;
|
|
@@ -382,8 +381,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
382
381
|
testId: 'file-preview-toolbar-button',
|
|
383
382
|
type: 'button',
|
|
384
383
|
icon: isEditorControlsEnabled ? _growDiagonal.default : _maximize.default,
|
|
385
|
-
|
|
386
|
-
iconFallback: _filePreview.default,
|
|
384
|
+
iconFallback: _maximize.default,
|
|
387
385
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
388
386
|
onClick: function onClick() {
|
|
389
387
|
var _handleShowMediaViewe2;
|
|
@@ -6,6 +6,7 @@ import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
|
6
6
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { contains, findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
+
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
10
11
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
11
12
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
@@ -15,7 +16,6 @@ import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
|
15
16
|
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
16
17
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
17
18
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
18
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
19
19
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
20
20
|
import { messages } from '@atlaskit/media-ui';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -30,7 +30,7 @@ import { stateKey } from '../../pm-plugins/plugin-key';
|
|
|
30
30
|
import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/current-media-node';
|
|
31
31
|
import { isVideo } from '../../pm-plugins/utils/media-single';
|
|
32
32
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
33
|
-
import { altTextButton,
|
|
33
|
+
import { altTextButton, getAltTextDropdownOption, getAltTextToolbar } from './alt-text';
|
|
34
34
|
import { changeMediaCardToInline, changeMediaSingleToMediaInline, setBorderMark, toggleBorderMark } from './commands';
|
|
35
35
|
import { commentButton } from './comments';
|
|
36
36
|
import { shouldShowImageBorder } from './imageBorder';
|
|
@@ -81,8 +81,7 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
81
81
|
testId: 'file-preview-toolbar-button',
|
|
82
82
|
type: 'button',
|
|
83
83
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
84
|
-
|
|
85
|
-
iconFallback: FilePreviewIcon,
|
|
84
|
+
iconFallback: MaximizeIcon,
|
|
86
85
|
title: intl.formatMessage(messages.preview),
|
|
87
86
|
onClick: () => {
|
|
88
87
|
var _handleShowMediaViewe;
|
|
@@ -534,8 +533,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
534
533
|
testId: 'file-preview-toolbar-button',
|
|
535
534
|
type: 'button',
|
|
536
535
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
537
|
-
|
|
538
|
-
iconFallback: FilePreviewIcon,
|
|
536
|
+
iconFallback: MaximizeIcon,
|
|
539
537
|
title: intl.formatMessage(messages.preview),
|
|
540
538
|
onClick: () => {
|
|
541
539
|
var _handleShowMediaViewe2;
|
|
@@ -621,8 +619,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
621
619
|
testId: 'file-preview-toolbar-button',
|
|
622
620
|
type: 'button',
|
|
623
621
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
624
|
-
|
|
625
|
-
iconFallback: FilePreviewIcon,
|
|
622
|
+
iconFallback: MaximizeIcon,
|
|
626
623
|
title: intl.formatMessage(messages.preview),
|
|
627
624
|
onClick: () => {
|
|
628
625
|
var _handleShowMediaViewe3;
|
|
@@ -773,6 +770,12 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
773
770
|
type: 'separator'
|
|
774
771
|
});
|
|
775
772
|
}
|
|
773
|
+
const hoverDecorationProps = (nodeType, className) => fg('platform_editor_controls_patch_1') ? {
|
|
774
|
+
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
775
|
+
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
776
|
+
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
777
|
+
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
778
|
+
} : undefined;
|
|
776
779
|
items.push({
|
|
777
780
|
type: 'overflow-dropdown',
|
|
778
781
|
id: 'media',
|
|
@@ -786,13 +789,15 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
786
789
|
},
|
|
787
790
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
788
791
|
label: ""
|
|
789
|
-
})
|
|
792
|
+
}),
|
|
793
|
+
...hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)
|
|
790
794
|
}, {
|
|
791
795
|
title: 'Delete',
|
|
792
796
|
onClick: remove,
|
|
793
797
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
794
798
|
label: ""
|
|
795
|
-
})
|
|
799
|
+
}),
|
|
800
|
+
...hoverDecorationProps(nodeType)
|
|
796
801
|
}]
|
|
797
802
|
});
|
|
798
803
|
}
|
|
@@ -11,7 +11,6 @@ import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
|
11
11
|
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
12
12
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
13
13
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
14
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
15
14
|
import { messages } from '@atlaskit/media-ui';
|
|
16
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
16
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
@@ -46,7 +45,7 @@ export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState
|
|
|
46
45
|
type: 'button',
|
|
47
46
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
48
47
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
49
|
-
iconFallback:
|
|
48
|
+
iconFallback: MaximizeIcon,
|
|
50
49
|
title: intl.formatMessage(messages.preview),
|
|
51
50
|
onClick: () => {
|
|
52
51
|
var _handleShowMediaViewe;
|
|
@@ -371,8 +370,7 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
371
370
|
testId: 'file-preview-toolbar-button',
|
|
372
371
|
type: 'button',
|
|
373
372
|
icon: isEditorControlsEnabled ? GrowDiagonalIcon : MaximizeIcon,
|
|
374
|
-
|
|
375
|
-
iconFallback: FilePreviewIcon,
|
|
373
|
+
iconFallback: MaximizeIcon,
|
|
376
374
|
title: intl.formatMessage(messages.preview),
|
|
377
375
|
onClick: () => {
|
|
378
376
|
var _handleShowMediaViewe2;
|
|
@@ -10,6 +10,7 @@ import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
|
10
10
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { contains, findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
13
|
+
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
13
14
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
14
15
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
15
16
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
@@ -19,7 +20,6 @@ import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
|
19
20
|
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
20
21
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
21
22
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
22
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
23
23
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
24
24
|
import { messages } from '@atlaskit/media-ui';
|
|
25
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -34,7 +34,7 @@ import { stateKey } from '../../pm-plugins/plugin-key';
|
|
|
34
34
|
import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/current-media-node';
|
|
35
35
|
import { isVideo } from '../../pm-plugins/utils/media-single';
|
|
36
36
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
37
|
-
import { altTextButton,
|
|
37
|
+
import { altTextButton, getAltTextDropdownOption, getAltTextToolbar } from './alt-text';
|
|
38
38
|
import { changeMediaCardToInline, changeMediaSingleToMediaInline, setBorderMark, toggleBorderMark } from './commands';
|
|
39
39
|
import { commentButton } from './comments';
|
|
40
40
|
import { shouldShowImageBorder } from './imageBorder';
|
|
@@ -84,8 +84,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
84
84
|
testId: 'file-preview-toolbar-button',
|
|
85
85
|
type: 'button',
|
|
86
86
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
87
|
-
|
|
88
|
-
iconFallback: FilePreviewIcon,
|
|
87
|
+
iconFallback: MaximizeIcon,
|
|
89
88
|
title: intl.formatMessage(messages.preview),
|
|
90
89
|
onClick: function onClick() {
|
|
91
90
|
var _handleShowMediaViewe;
|
|
@@ -529,8 +528,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
529
528
|
testId: 'file-preview-toolbar-button',
|
|
530
529
|
type: 'button',
|
|
531
530
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
532
|
-
|
|
533
|
-
iconFallback: FilePreviewIcon,
|
|
531
|
+
iconFallback: MaximizeIcon,
|
|
534
532
|
title: intl.formatMessage(messages.preview),
|
|
535
533
|
onClick: function onClick() {
|
|
536
534
|
var _handleShowMediaViewe2;
|
|
@@ -616,8 +614,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
616
614
|
testId: 'file-preview-toolbar-button',
|
|
617
615
|
type: 'button',
|
|
618
616
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
619
|
-
|
|
620
|
-
iconFallback: FilePreviewIcon,
|
|
617
|
+
iconFallback: MaximizeIcon,
|
|
621
618
|
title: intl.formatMessage(messages.preview),
|
|
622
619
|
onClick: function onClick() {
|
|
623
620
|
var _handleShowMediaViewe3;
|
|
@@ -768,10 +765,18 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
768
765
|
type: 'separator'
|
|
769
766
|
});
|
|
770
767
|
}
|
|
768
|
+
var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
|
|
769
|
+
return fg('platform_editor_controls_patch_1') ? {
|
|
770
|
+
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
771
|
+
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
772
|
+
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
773
|
+
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
774
|
+
} : undefined;
|
|
775
|
+
};
|
|
771
776
|
items.push({
|
|
772
777
|
type: 'overflow-dropdown',
|
|
773
778
|
id: 'media',
|
|
774
|
-
options: [].concat(_toConsumableArray(customOptions), [{
|
|
779
|
+
options: [].concat(_toConsumableArray(customOptions), [_objectSpread({
|
|
775
780
|
title: 'Copy',
|
|
776
781
|
onClick: function onClick() {
|
|
777
782
|
var _pluginInjectionApi$c4, _pluginInjectionApi$f3;
|
|
@@ -782,13 +787,13 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
782
787
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
783
788
|
label: ""
|
|
784
789
|
})
|
|
785
|
-
}, {
|
|
790
|
+
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)), _objectSpread({
|
|
786
791
|
title: 'Delete',
|
|
787
792
|
onClick: remove,
|
|
788
793
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
789
794
|
label: ""
|
|
790
795
|
})
|
|
791
|
-
}])
|
|
796
|
+
}, hoverDecorationProps(nodeType))])
|
|
792
797
|
});
|
|
793
798
|
}
|
|
794
799
|
|
|
@@ -14,7 +14,6 @@ import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
|
14
14
|
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
15
15
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
16
16
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
17
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
18
17
|
import { messages } from '@atlaskit/media-ui';
|
|
19
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
19
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
@@ -48,7 +47,7 @@ export var generateMediaInlineFloatingToolbar = function generateMediaInlineFloa
|
|
|
48
47
|
type: 'button',
|
|
49
48
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
50
49
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
51
|
-
iconFallback:
|
|
50
|
+
iconFallback: MaximizeIcon,
|
|
52
51
|
title: intl.formatMessage(messages.preview),
|
|
53
52
|
onClick: function onClick() {
|
|
54
53
|
var _handleShowMediaViewe;
|
|
@@ -372,8 +371,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
372
371
|
testId: 'file-preview-toolbar-button',
|
|
373
372
|
type: 'button',
|
|
374
373
|
icon: isEditorControlsEnabled ? GrowDiagonalIcon : MaximizeIcon,
|
|
375
|
-
|
|
376
|
-
iconFallback: FilePreviewIcon,
|
|
374
|
+
iconFallback: MaximizeIcon,
|
|
377
375
|
title: intl.formatMessage(messages.preview),
|
|
378
376
|
onClick: function onClick() {
|
|
379
377
|
var _handleShowMediaViewe2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.18",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
|
-
"@atlaskit/button": "^
|
|
41
|
-
"@atlaskit/editor-common": "^102.
|
|
40
|
+
"@atlaskit/button": "^23.0.0",
|
|
41
|
+
"@atlaskit/editor-common": "^102.16.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-annotation": "^2.
|
|
44
|
+
"@atlaskit/editor-plugin-annotation": "^2.2.0",
|
|
45
45
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
47
47
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
57
57
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
58
58
|
"@atlaskit/form": "^12.0.0",
|
|
59
|
-
"@atlaskit/icon": "^25.
|
|
59
|
+
"@atlaskit/icon": "^25.4.0",
|
|
60
60
|
"@atlaskit/media-card": "^79.0.0",
|
|
61
61
|
"@atlaskit/media-client": "^32.0.0",
|
|
62
62
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/primitives": "^14.2.0",
|
|
70
70
|
"@atlaskit/textfield": "^8.0.0",
|
|
71
71
|
"@atlaskit/theme": "^18.0.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
73
73
|
"@atlaskit/tokens": "^4.5.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.0.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -170,6 +170,9 @@
|
|
|
170
170
|
},
|
|
171
171
|
"platform_editor_multi_images_overridden_upload_fix": {
|
|
172
172
|
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"platform_editor_controls_patch_1": {
|
|
175
|
+
"type": "boolean"
|
|
173
176
|
}
|
|
174
177
|
},
|
|
175
178
|
"stricter": {
|