@atlaskit/editor-plugin-media 1.43.10 → 1.43.12
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/pm-plugins/commands/helpers.js +1 -2
- package/dist/cjs/ui/ImageBorder/styles.js +1 -1
- package/dist/es2019/pm-plugins/commands/helpers.js +1 -2
- package/dist/es2019/pm-plugins/keymap.js +3 -3
- package/dist/es2019/pm-plugins/utils/media-files.js +2 -2
- package/dist/es2019/ui/ImageBorder/styles.js +6 -0
- package/dist/es2019/ui/toolbar/commands.js +1 -1
- package/dist/es2019/ui/toolbar/imageBorder.js +1 -1
- package/dist/esm/pm-plugins/commands/helpers.js +1 -2
- package/dist/esm/ui/ImageBorder/styles.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.43.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#99080](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99080)
|
|
8
|
+
[`8b2f0af25c400`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b2f0af25c400) -
|
|
9
|
+
[ux] ED-26062: Removed icon blue borders when selected
|
|
10
|
+
|
|
11
|
+
## 1.43.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.43.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -47,8 +47,7 @@ var updateAllMediaNodesAttrs = exports.updateAllMediaNodesAttrs = function updat
|
|
|
47
47
|
if (!mediaPluginState) {
|
|
48
48
|
return false;
|
|
49
49
|
}
|
|
50
|
-
var mediaNodes;
|
|
51
|
-
mediaNodes = findAllMediaNodes(mediaPluginState, id);
|
|
50
|
+
var mediaNodes = findAllMediaNodes(mediaPluginState, id);
|
|
52
51
|
var validMediaNodePositions = mediaNodes.reduce(function (acc, _ref) {
|
|
53
52
|
var getPos = _ref.getPos;
|
|
54
53
|
var pos = getPos();
|
|
@@ -56,7 +56,7 @@ var getHoverStyles = function getHoverStyles(selector) {
|
|
|
56
56
|
var toolbarButtonWrapper = exports.toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
|
|
57
57
|
var enabled = _ref.enabled,
|
|
58
58
|
isOpen = _ref.isOpen;
|
|
59
|
-
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\t.image-border-toolbar-btn {\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\t.image-border-toolbar-dropdown {\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\twidth: 16px !important;\n\t\tborder-top-left-radius: 0 !important;\n\t\tborder-bottom-left-radius: 0 !important;\n\t\tmargin-left: ", ";\n\t}\n\n\t", "\n\t", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
|
|
59
|
+
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\t.image-border-toolbar-btn {\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\t&:not([disabled])::after {\n\t\t\tborder: none;\n\t\t}\n\t}\n\t.image-border-toolbar-dropdown {\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\twidth: 16px !important;\n\t\tborder-top-left-radius: 0 !important;\n\t\tborder-bottom-left-radius: 0 !important;\n\t\tmargin-left: ", ";\n\t\t&:not([disabled])::after {\n\t\t\tborder: none;\n\t\t}\n\t}\n\n\t", "\n\t", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
@@ -40,8 +40,7 @@ export const updateAllMediaNodesAttrs = (id, attrs) => (state, dispatch) => {
|
|
|
40
40
|
if (!mediaPluginState) {
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
mediaNodes = findAllMediaNodes(mediaPluginState, id);
|
|
43
|
+
const mediaNodes = findAllMediaNodes(mediaPluginState, id);
|
|
45
44
|
const validMediaNodePositions = mediaNodes.reduce((acc, {
|
|
46
45
|
getPos
|
|
47
46
|
}) => {
|
|
@@ -98,7 +98,7 @@ const createAnnouncer = (action, mediaWidth, changeAmount, validation, getIntl
|
|
|
98
98
|
// Ignored via go/ees005
|
|
99
99
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
100
100
|
) => {
|
|
101
|
-
|
|
101
|
+
const announcerContainer = document.getElementById('media-announcer') || document.createElement('div');
|
|
102
102
|
const intl = getIntl();
|
|
103
103
|
if (!announcerContainer.id) {
|
|
104
104
|
announcerContainer.id = 'media-announcer';
|
|
@@ -152,8 +152,8 @@ const handleMediaSizeChange = (editorAnalyticsAPI, widthPlugin, options, changeA
|
|
|
152
152
|
var _widthPlugin$sharedSt3;
|
|
153
153
|
maxWidth = options !== null && options !== void 0 && options.fullWidthEnabled ? widthPlugin === null || widthPlugin === void 0 ? void 0 : (_widthPlugin$sharedSt3 = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt3 === void 0 ? void 0 : _widthPlugin$sharedSt3.lineLength : calcMediaSingleMaxWidth(currentMaxWidth, options === null || options === void 0 ? void 0 : options.editorAppearance);
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
const validation = 'valid';
|
|
156
|
+
const newWidth = mediaWidth + changeAmount;
|
|
157
157
|
if (options !== null && options !== void 0 && options.fullWidthEnabled) {
|
|
158
158
|
var _widthPlugin$sharedSt4;
|
|
159
159
|
maxWidth = widthPlugin === null || widthPlugin === void 0 ? void 0 : (_widthPlugin$sharedSt4 = widthPlugin.sharedState.currentState()) === null || _widthPlugin$sharedSt4 === void 0 ? void 0 : _widthPlugin$sharedSt4.lineLength;
|
|
@@ -110,7 +110,7 @@ export const insertMediaInlineNode = editorAnalyticsAPI => (view, mediaState, co
|
|
|
110
110
|
scaleFactor = 1,
|
|
111
111
|
fileName
|
|
112
112
|
} = mediaState;
|
|
113
|
-
|
|
113
|
+
const mediaInlineAttrs = {
|
|
114
114
|
id,
|
|
115
115
|
collection
|
|
116
116
|
};
|
|
@@ -137,7 +137,7 @@ export const insertMediaInlineNode = editorAnalyticsAPI => (view, mediaState, co
|
|
|
137
137
|
if (isInSupportedInlineImageParent(state) && isInsidePotentialEmptyParagraph(state)) {
|
|
138
138
|
pos = pos + 1;
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
const content = Fragment.from([mediaInlineNode, space]);
|
|
141
141
|
|
|
142
142
|
// Delete the selection if a selection is made
|
|
143
143
|
const deleteRange = findDeleteRange(state);
|
|
@@ -117,6 +117,9 @@ export const toolbarButtonWrapper = ({
|
|
|
117
117
|
& > span {
|
|
118
118
|
margin: 0;
|
|
119
119
|
}
|
|
120
|
+
&:not([disabled])::after {
|
|
121
|
+
border: none;
|
|
122
|
+
}
|
|
120
123
|
}
|
|
121
124
|
.image-border-toolbar-dropdown {
|
|
122
125
|
padding: 0;
|
|
@@ -127,6 +130,9 @@ export const toolbarButtonWrapper = ({
|
|
|
127
130
|
border-top-left-radius: 0 !important;
|
|
128
131
|
border-bottom-left-radius: 0 !important;
|
|
129
132
|
margin-left: ${"var(--ds-space-025, 2px)"};
|
|
133
|
+
&:not([disabled])::after {
|
|
134
|
+
border: none;
|
|
135
|
+
}
|
|
130
136
|
}
|
|
131
137
|
|
|
132
138
|
${!enabled && getHoverStyles('.image-border-toolbar-btn')}
|
|
@@ -97,7 +97,7 @@ export const changeMediaCardToInline = (editorAnalyticsAPI, forceFocusSelector)
|
|
|
97
97
|
collection: selectedNode.attrs.collection
|
|
98
98
|
});
|
|
99
99
|
const space = state.schema.text(' ');
|
|
100
|
-
|
|
100
|
+
const content = Fragment.from([mediaInlineNode, space]);
|
|
101
101
|
const node = paragraph.createChecked({}, content);
|
|
102
102
|
const nodePos = state.tr.doc.resolve(state.selection.from).start();
|
|
103
103
|
let tr = removeMediaGroupNode(state);
|
|
@@ -40,8 +40,7 @@ export var updateAllMediaNodesAttrs = function updateAllMediaNodesAttrs(id, attr
|
|
|
40
40
|
if (!mediaPluginState) {
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
|
-
var mediaNodes;
|
|
44
|
-
mediaNodes = findAllMediaNodes(mediaPluginState, id);
|
|
43
|
+
var mediaNodes = findAllMediaNodes(mediaPluginState, id);
|
|
45
44
|
var validMediaNodePositions = mediaNodes.reduce(function (acc, _ref) {
|
|
46
45
|
var getPos = _ref.getPos;
|
|
47
46
|
var pos = getPos();
|
|
@@ -46,7 +46,7 @@ var getHoverStyles = function getHoverStyles(selector) {
|
|
|
46
46
|
export var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
|
|
47
47
|
var enabled = _ref.enabled,
|
|
48
48
|
isOpen = _ref.isOpen;
|
|
49
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\t.image-border-toolbar-btn {\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\t.image-border-toolbar-dropdown {\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\twidth: 16px !important;\n\t\tborder-top-left-radius: 0 !important;\n\t\tborder-bottom-left-radius: 0 !important;\n\t\tmargin-left: ", ";\n\t}\n\n\t", "\n\t", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
|
|
49
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\t.image-border-toolbar-btn {\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\t&:not([disabled])::after {\n\t\t\tborder: none;\n\t\t}\n\t}\n\t.image-border-toolbar-dropdown {\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\twidth: 16px !important;\n\t\tborder-top-left-radius: 0 !important;\n\t\tborder-bottom-left-radius: 0 !important;\n\t\tmargin-left: ", ";\n\t\t&:not([disabled])::after {\n\t\t\tborder: none;\n\t\t}\n\t}\n\n\t", "\n\t", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.12",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
38
38
|
"@atlaskit/button": "^20.3.0",
|
|
39
|
-
"@atlaskit/editor-common": "^
|
|
39
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
40
40
|
"@atlaskit/editor-palette": "1.6.3",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
42
|
-
"@atlaskit/editor-plugin-annotation": "1.26.
|
|
42
|
+
"@atlaskit/editor-plugin-annotation": "1.26.9",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^1.1.0",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/primitives": "^13.3.0",
|
|
68
68
|
"@atlaskit/textfield": "^6.7.0",
|
|
69
69
|
"@atlaskit/theme": "^14.0.0",
|
|
70
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
70
|
+
"@atlaskit/tmp-editor-statsig": "^2.31.0",
|
|
71
71
|
"@atlaskit/tokens": "^2.5.0",
|
|
72
72
|
"@atlaskit/tooltip": "^19.0.0",
|
|
73
73
|
"@babel/runtime": "^7.0.0",
|