@atlaskit/editor-plugin-media 1.32.1 → 1.32.2
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.32.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#144324](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144324)
|
|
8
|
+
[`28ccc12f4b59f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/28ccc12f4b59f) -
|
|
9
|
+
Cleanup LD FF for Add comment button in the media toolbar
|
|
10
|
+
|
|
3
11
|
## 1.32.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -203,7 +203,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
203
203
|
var widthPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.width;
|
|
204
204
|
var isChangingLayoutDisabled = false;
|
|
205
205
|
var selectedNode = (0, _utils2.getSelectedMediaSingle)(state);
|
|
206
|
-
if ((0, _platformFeatureFlags.
|
|
206
|
+
if ((0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience')) {
|
|
207
207
|
var _widthPlugin$sharedSt;
|
|
208
208
|
var contentWidth = widthPlugin === null || widthPlugin === void 0 || (_widthPlugin$sharedSt = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt === void 0 ? void 0 : _widthPlugin$sharedSt.lineLength;
|
|
209
209
|
var selectedNodeMaxWidth = pluginState.currentMaxWidth || contentWidth;
|
|
@@ -290,7 +290,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
290
290
|
// Pixel Entry Toolbar Support
|
|
291
291
|
var selection = state.selection;
|
|
292
292
|
var isWithinTable = (0, _utils.hasParentNodeOfType)([state.schema.nodes.table])(selection);
|
|
293
|
-
if ((0, _platformFeatureFlags.
|
|
293
|
+
if (allowResizing && (!isWithinTable || allowResizingInTables === true) && (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience')) {
|
|
294
294
|
var selectedMediaSingleNode = (0, _utils2.getSelectedMediaSingle)(state);
|
|
295
295
|
var sizeInput = {
|
|
296
296
|
type: 'custom',
|
|
@@ -388,8 +388,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
388
388
|
type: 'separator'
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
if (editorFeatureFlags && editorFeatureFlags.commentsOnMedia && allowCommentsOnMedia
|
|
392
|
-
) {
|
|
391
|
+
if (editorFeatureFlags && editorFeatureFlags.commentsOnMedia && allowCommentsOnMedia) {
|
|
393
392
|
toolbarButtons.push((0, _comments.commentButton)(intl, state, pluginInjectionApi), {
|
|
394
393
|
type: 'separator',
|
|
395
394
|
supportsViewMode: true
|
|
@@ -601,7 +600,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
601
600
|
scrollable: true,
|
|
602
601
|
mediaAssistiveMessage: assistiveMessage
|
|
603
602
|
});
|
|
604
|
-
if ((0, _platformFeatureFlags.
|
|
603
|
+
if (allowResizing && (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience')) {
|
|
605
604
|
return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
|
|
606
605
|
width: mediaPluginState.isResizing ? undefined : (0, _utils2.getMaxToolbarWidth)()
|
|
607
606
|
});
|
|
@@ -12,7 +12,7 @@ import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
|
12
12
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
13
13
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
14
14
|
import { messages } from '@atlaskit/media-ui';
|
|
15
|
-
import {
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { showLinkingToolbar } from '../commands/linking';
|
|
17
17
|
import { MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
18
18
|
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
@@ -196,7 +196,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
196
196
|
const widthPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.width;
|
|
197
197
|
let isChangingLayoutDisabled = false;
|
|
198
198
|
const selectedNode = getSelectedMediaSingle(state);
|
|
199
|
-
if (
|
|
199
|
+
if (fg('platform.editor.media.extended-resize-experience')) {
|
|
200
200
|
var _widthPlugin$sharedSt;
|
|
201
201
|
const contentWidth = widthPlugin === null || widthPlugin === void 0 ? void 0 : (_widthPlugin$sharedSt = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt === void 0 ? void 0 : _widthPlugin$sharedSt.lineLength;
|
|
202
202
|
const selectedNodeMaxWidth = pluginState.currentMaxWidth || contentWidth;
|
|
@@ -281,7 +281,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
281
281
|
selection
|
|
282
282
|
} = state;
|
|
283
283
|
const isWithinTable = hasParentNodeOfType([state.schema.nodes.table])(selection);
|
|
284
|
-
if (
|
|
284
|
+
if (allowResizing && (!isWithinTable || allowResizingInTables === true) && fg('platform.editor.media.extended-resize-experience')) {
|
|
285
285
|
const selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
286
286
|
const sizeInput = {
|
|
287
287
|
type: 'custom',
|
|
@@ -385,8 +385,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
385
385
|
type: 'separator'
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
-
if (editorFeatureFlags && editorFeatureFlags.commentsOnMedia && allowCommentsOnMedia
|
|
389
|
-
) {
|
|
388
|
+
if (editorFeatureFlags && editorFeatureFlags.commentsOnMedia && allowCommentsOnMedia) {
|
|
390
389
|
toolbarButtons.push(commentButton(intl, state, pluginInjectionApi), {
|
|
391
390
|
type: 'separator',
|
|
392
391
|
supportsViewMode: true
|
|
@@ -603,7 +602,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
603
602
|
scrollable: true,
|
|
604
603
|
mediaAssistiveMessage: assistiveMessage
|
|
605
604
|
};
|
|
606
|
-
if (
|
|
605
|
+
if (allowResizing && fg('platform.editor.media.extended-resize-experience')) {
|
|
607
606
|
return {
|
|
608
607
|
...toolbarConfig,
|
|
609
608
|
width: mediaPluginState.isResizing ? undefined : getMaxToolbarWidth()
|
|
@@ -16,7 +16,7 @@ import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
|
16
16
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
17
17
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
18
18
|
import { messages } from '@atlaskit/media-ui';
|
|
19
|
-
import {
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { showLinkingToolbar } from '../commands/linking';
|
|
21
21
|
import { MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
22
22
|
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
@@ -193,7 +193,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
193
193
|
var widthPlugin = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.width;
|
|
194
194
|
var isChangingLayoutDisabled = false;
|
|
195
195
|
var selectedNode = getSelectedMediaSingle(state);
|
|
196
|
-
if (
|
|
196
|
+
if (fg('platform.editor.media.extended-resize-experience')) {
|
|
197
197
|
var _widthPlugin$sharedSt;
|
|
198
198
|
var contentWidth = widthPlugin === null || widthPlugin === void 0 || (_widthPlugin$sharedSt = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt === void 0 ? void 0 : _widthPlugin$sharedSt.lineLength;
|
|
199
199
|
var selectedNodeMaxWidth = pluginState.currentMaxWidth || contentWidth;
|
|
@@ -280,7 +280,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
280
280
|
// Pixel Entry Toolbar Support
|
|
281
281
|
var selection = state.selection;
|
|
282
282
|
var isWithinTable = hasParentNodeOfType([state.schema.nodes.table])(selection);
|
|
283
|
-
if (
|
|
283
|
+
if (allowResizing && (!isWithinTable || allowResizingInTables === true) && fg('platform.editor.media.extended-resize-experience')) {
|
|
284
284
|
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
285
285
|
var sizeInput = {
|
|
286
286
|
type: 'custom',
|
|
@@ -378,8 +378,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
378
378
|
type: 'separator'
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
if (editorFeatureFlags && editorFeatureFlags.commentsOnMedia && allowCommentsOnMedia
|
|
382
|
-
) {
|
|
381
|
+
if (editorFeatureFlags && editorFeatureFlags.commentsOnMedia && allowCommentsOnMedia) {
|
|
383
382
|
toolbarButtons.push(commentButton(intl, state, pluginInjectionApi), {
|
|
384
383
|
type: 'separator',
|
|
385
384
|
supportsViewMode: true
|
|
@@ -591,7 +590,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
591
590
|
scrollable: true,
|
|
592
591
|
mediaAssistiveMessage: assistiveMessage
|
|
593
592
|
});
|
|
594
|
-
if (
|
|
593
|
+
if (allowResizing && fg('platform.editor.media.extended-resize-experience')) {
|
|
595
594
|
return _objectSpread(_objectSpread({}, toolbarConfig), {}, {
|
|
596
595
|
width: mediaPluginState.isResizing ? undefined : getMaxToolbarWidth()
|
|
597
596
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.2",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -132,9 +132,6 @@
|
|
|
132
132
|
"type": "boolean",
|
|
133
133
|
"referenceOnly": "true"
|
|
134
134
|
},
|
|
135
|
-
"platform.editor.live-view.comments-in-media-toolbar-button": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
135
|
"platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
|
|
139
136
|
"type": "boolean"
|
|
140
137
|
},
|