@atlaskit/editor-plugin-media 0.11.0 → 0.11.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 +13 -0
- package/dist/cjs/toolbar/index.js +37 -32
- package/dist/es2019/toolbar/index.js +33 -28
- package/dist/esm/toolbar/index.js +37 -32
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 0.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#66510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66510) [`de9aee7692ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/de9aee7692ab) - [ux] ED-21829 Hiding Inline and Original size floating toolbar buttons for external images
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 0.11.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 0.11.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -254,44 +254,49 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
254
254
|
|
|
255
255
|
// floating and inline switcher
|
|
256
256
|
if (pluginState.allowInlineImages && selectedNode && (0, _utils2.canShowSwitchButtons)(selectedNode.node)) {
|
|
257
|
-
var
|
|
257
|
+
var _selectedNode$node$fi;
|
|
258
258
|
var inlineSwitcherTitle = intl.formatMessage(_messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
259
259
|
var floatingSwitcherTitle = intl.formatMessage(_messages.mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
260
260
|
|
|
261
261
|
// This is temporary for PF release and can be removed once we have border and link support for inline images
|
|
262
262
|
// TODO: [ED-20261] remove this once both border and link marks are supported for inline image
|
|
263
263
|
var tempTooltipContent = /*#__PURE__*/_react.default.createElement("span", null, "Display inline ", /*#__PURE__*/_react.default.createElement("br", null), " \u26A0 This feature is being developed. The conversion process will not retain the image size, link, border, or any other data.");
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
264
|
+
|
|
265
|
+
// mediaInlne doesn't suppprt external images, so hiding buttons to prevent conversion from mediaSingle to mediaInline
|
|
266
|
+
if (((_selectedNode$node$fi = selectedNode.node.firstChild) === null || _selectedNode$node$fi === void 0 ? void 0 : _selectedNode$node$fi.attrs.type) !== 'external') {
|
|
267
|
+
var _pluginInjectionApi$a4;
|
|
268
|
+
toolbarButtons.push({
|
|
269
|
+
type: 'button',
|
|
270
|
+
id: 'editor.media.image.view.switcher.inline',
|
|
271
|
+
title: inlineSwitcherTitle,
|
|
272
|
+
tooltipContent: tempTooltipContent,
|
|
273
|
+
icon: function icon() {
|
|
274
|
+
return /*#__PURE__*/_react.default.createElement(_card.IconInline, {
|
|
275
|
+
size: "medium",
|
|
276
|
+
label: inlineSwitcherTitle
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
onClick: (0, _commands.changeMediaSingleToMediaInline)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a4 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions),
|
|
280
|
+
testId: 'image-inline-appearance'
|
|
281
|
+
}, {
|
|
282
|
+
type: 'button',
|
|
283
|
+
id: 'editor.media.image.view.switcher.floating',
|
|
284
|
+
title: floatingSwitcherTitle,
|
|
285
|
+
icon: function icon() {
|
|
286
|
+
return /*#__PURE__*/_react.default.createElement(_card.IconEmbed, {
|
|
287
|
+
size: "medium",
|
|
288
|
+
label: floatingSwitcherTitle
|
|
289
|
+
});
|
|
290
|
+
},
|
|
291
|
+
onClick: function onClick() {
|
|
292
|
+
return true;
|
|
293
|
+
},
|
|
294
|
+
testId: 'image-floating-appearance',
|
|
295
|
+
selected: true
|
|
296
|
+
}, {
|
|
297
|
+
type: 'separator'
|
|
298
|
+
});
|
|
299
|
+
}
|
|
295
300
|
}
|
|
296
301
|
|
|
297
302
|
// Pixel Entry Toolbar Support
|
|
@@ -247,40 +247,45 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
247
247
|
|
|
248
248
|
// floating and inline switcher
|
|
249
249
|
if (pluginState.allowInlineImages && selectedNode && canShowSwitchButtons(selectedNode.node)) {
|
|
250
|
-
var
|
|
250
|
+
var _selectedNode$node$fi;
|
|
251
251
|
const inlineSwitcherTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
252
252
|
const floatingSwitcherTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
253
253
|
|
|
254
254
|
// This is temporary for PF release and can be removed once we have border and link support for inline images
|
|
255
255
|
// TODO: [ED-20261] remove this once both border and link marks are supported for inline image
|
|
256
256
|
const tempTooltipContent = /*#__PURE__*/React.createElement("span", null, "Display inline ", /*#__PURE__*/React.createElement("br", null), " \u26A0 This feature is being developed. The conversion process will not retain the image size, link, border, or any other data.");
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
257
|
+
|
|
258
|
+
// mediaInlne doesn't suppprt external images, so hiding buttons to prevent conversion from mediaSingle to mediaInline
|
|
259
|
+
if (((_selectedNode$node$fi = selectedNode.node.firstChild) === null || _selectedNode$node$fi === void 0 ? void 0 : _selectedNode$node$fi.attrs.type) !== 'external') {
|
|
260
|
+
var _pluginInjectionApi$a4;
|
|
261
|
+
toolbarButtons.push({
|
|
262
|
+
type: 'button',
|
|
263
|
+
id: 'editor.media.image.view.switcher.inline',
|
|
264
|
+
title: inlineSwitcherTitle,
|
|
265
|
+
tooltipContent: tempTooltipContent,
|
|
266
|
+
icon: () => /*#__PURE__*/React.createElement(IconInline, {
|
|
267
|
+
size: "medium",
|
|
268
|
+
label: inlineSwitcherTitle
|
|
269
|
+
}),
|
|
270
|
+
onClick: changeMediaSingleToMediaInline(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a4 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions),
|
|
271
|
+
testId: 'image-inline-appearance'
|
|
272
|
+
}, {
|
|
273
|
+
type: 'button',
|
|
274
|
+
id: 'editor.media.image.view.switcher.floating',
|
|
275
|
+
title: floatingSwitcherTitle,
|
|
276
|
+
icon: () => /*#__PURE__*/React.createElement(IconEmbed, {
|
|
277
|
+
size: "medium",
|
|
278
|
+
label: floatingSwitcherTitle
|
|
279
|
+
}),
|
|
280
|
+
onClick: () => {
|
|
281
|
+
return true;
|
|
282
|
+
},
|
|
283
|
+
testId: 'image-floating-appearance',
|
|
284
|
+
selected: true
|
|
285
|
+
}, {
|
|
286
|
+
type: 'separator'
|
|
287
|
+
});
|
|
288
|
+
}
|
|
284
289
|
}
|
|
285
290
|
|
|
286
291
|
// Pixel Entry Toolbar Support
|
|
@@ -244,44 +244,49 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
244
244
|
|
|
245
245
|
// floating and inline switcher
|
|
246
246
|
if (pluginState.allowInlineImages && selectedNode && canShowSwitchButtons(selectedNode.node)) {
|
|
247
|
-
var
|
|
247
|
+
var _selectedNode$node$fi;
|
|
248
248
|
var inlineSwitcherTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
249
249
|
var floatingSwitcherTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
250
250
|
|
|
251
251
|
// This is temporary for PF release and can be removed once we have border and link support for inline images
|
|
252
252
|
// TODO: [ED-20261] remove this once both border and link marks are supported for inline image
|
|
253
253
|
var tempTooltipContent = /*#__PURE__*/React.createElement("span", null, "Display inline ", /*#__PURE__*/React.createElement("br", null), " \u26A0 This feature is being developed. The conversion process will not retain the image size, link, border, or any other data.");
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
254
|
+
|
|
255
|
+
// mediaInlne doesn't suppprt external images, so hiding buttons to prevent conversion from mediaSingle to mediaInline
|
|
256
|
+
if (((_selectedNode$node$fi = selectedNode.node.firstChild) === null || _selectedNode$node$fi === void 0 ? void 0 : _selectedNode$node$fi.attrs.type) !== 'external') {
|
|
257
|
+
var _pluginInjectionApi$a4;
|
|
258
|
+
toolbarButtons.push({
|
|
259
|
+
type: 'button',
|
|
260
|
+
id: 'editor.media.image.view.switcher.inline',
|
|
261
|
+
title: inlineSwitcherTitle,
|
|
262
|
+
tooltipContent: tempTooltipContent,
|
|
263
|
+
icon: function icon() {
|
|
264
|
+
return /*#__PURE__*/React.createElement(IconInline, {
|
|
265
|
+
size: "medium",
|
|
266
|
+
label: inlineSwitcherTitle
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
onClick: changeMediaSingleToMediaInline(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a4 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions),
|
|
270
|
+
testId: 'image-inline-appearance'
|
|
271
|
+
}, {
|
|
272
|
+
type: 'button',
|
|
273
|
+
id: 'editor.media.image.view.switcher.floating',
|
|
274
|
+
title: floatingSwitcherTitle,
|
|
275
|
+
icon: function icon() {
|
|
276
|
+
return /*#__PURE__*/React.createElement(IconEmbed, {
|
|
277
|
+
size: "medium",
|
|
278
|
+
label: floatingSwitcherTitle
|
|
279
|
+
});
|
|
280
|
+
},
|
|
281
|
+
onClick: function onClick() {
|
|
282
|
+
return true;
|
|
283
|
+
},
|
|
284
|
+
testId: 'image-floating-appearance',
|
|
285
|
+
selected: true
|
|
286
|
+
}, {
|
|
287
|
+
type: 'separator'
|
|
288
|
+
});
|
|
289
|
+
}
|
|
285
290
|
}
|
|
286
291
|
|
|
287
292
|
// Pixel Entry Toolbar Support
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
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.1.0",
|
|
39
39
|
"@atlaskit/button": "^17.2.0",
|
|
40
|
-
"@atlaskit/editor-common": "^76.
|
|
40
|
+
"@atlaskit/editor-common": "^76.39.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.5.2",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
43
43
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"@atlaskit/editor-plugin-focus": "^0.2.0",
|
|
48
48
|
"@atlaskit/editor-plugin-grid": "^0.3.0",
|
|
49
49
|
"@atlaskit/editor-plugin-guideline": "^0.5.0",
|
|
50
|
-
"@atlaskit/editor-plugin-selection": "^0.
|
|
50
|
+
"@atlaskit/editor-plugin-selection": "^0.2.0",
|
|
51
51
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
52
52
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
53
53
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
54
54
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
55
55
|
"@atlaskit/form": "^9.0.3",
|
|
56
56
|
"@atlaskit/icon": "^22.0.0",
|
|
57
|
-
"@atlaskit/media-card": "^77.
|
|
57
|
+
"@atlaskit/media-card": "^77.7.0",
|
|
58
58
|
"@atlaskit/media-client": "^26.1.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
60
60
|
"@atlaskit/media-common": "^11.0.0",
|