@atlaskit/editor-plugin-media 8.0.0 → 8.1.0
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 +18 -0
- package/dist/cjs/nodeviews/mediaSingle.js +1 -4
- package/dist/cjs/nodeviews/mediaSingleNext.js +1 -1
- package/dist/cjs/nodeviews/toDOM-fixes/mediaSingle.js +3 -5
- package/dist/cjs/ui/ImageBorder/index.js +1 -0
- package/dist/es2019/nodeviews/mediaSingle.js +1 -4
- package/dist/es2019/nodeviews/mediaSingleNext.js +1 -1
- package/dist/es2019/nodeviews/toDOM-fixes/mediaSingle.js +2 -5
- package/dist/es2019/ui/ImageBorder/index.js +1 -0
- package/dist/esm/nodeviews/mediaSingle.js +1 -4
- package/dist/esm/nodeviews/mediaSingleNext.js +1 -1
- package/dist/esm/nodeviews/toDOM-fixes/mediaSingle.js +3 -5
- package/dist/esm/ui/ImageBorder/index.js +1 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 8.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2e913b897ced3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e913b897ced3) -
|
|
8
|
+
[https://product-fabric.atlassian.net/browse/ED-29463](ED-29463) - clean up
|
|
9
|
+
platform_editor_media_card_vc_wrapper_attribute Statsig experiment
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 8.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 8.0.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -19,7 +19,6 @@ var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
|
19
19
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
20
20
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
21
21
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
22
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
22
|
var _main = require("../pm-plugins/main");
|
|
24
23
|
var _mediaSingleNext = require("./mediaSingleNext");
|
|
25
24
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -144,9 +143,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
144
143
|
if ((_this$reactComponentP2 = this.reactComponentProps.mediaOptions) !== null && _this$reactComponentP2 !== void 0 && _this$reactComponentP2.allowPixelResizing) {
|
|
145
144
|
domRef.classList.add('media-extended-resize-experience');
|
|
146
145
|
}
|
|
147
|
-
|
|
148
|
-
domRef.setAttribute('data-media-vc-wrapper', 'true');
|
|
149
|
-
}
|
|
146
|
+
domRef.setAttribute('data-media-vc-wrapper', 'true');
|
|
150
147
|
return domRef;
|
|
151
148
|
}
|
|
152
149
|
}, {
|
|
@@ -466,7 +466,7 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
466
466
|
};
|
|
467
467
|
}, [widthType, mediaSingleWidthAttribute]);
|
|
468
468
|
var MediaChildren =
|
|
469
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
469
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
|
|
470
470
|
(0, _react2.jsx)("figure", {
|
|
471
471
|
ref: mediaSingleWrapperRef,
|
|
472
472
|
css: figureWrapperStyles
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _toDOMAttrs = require("./toDOMAttrs");
|
|
15
14
|
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; }
|
|
@@ -191,9 +190,10 @@ var getToDom = exports.getToDom = function getToDom(allowPixelResizing) {
|
|
|
191
190
|
childMediaWidth: childMediaWidth,
|
|
192
191
|
mediaSingleDimensionWidth: mediaSingleAttrs === null || mediaSingleAttrs === void 0 ? void 0 : mediaSingleAttrs.width
|
|
193
192
|
});
|
|
194
|
-
return ['div',
|
|
193
|
+
return ['div', {
|
|
195
194
|
class: 'mediaSingleView-content-wrap',
|
|
196
195
|
layout: layout,
|
|
196
|
+
'data-media-vc-wrapper': 'true',
|
|
197
197
|
style: (0, _lazyNodeView.convertToInlineCss)({
|
|
198
198
|
'--ak-editor-media-single--proportion': proportionCalc,
|
|
199
199
|
'--ak-editor-media-card-display': 'block',
|
|
@@ -206,9 +206,7 @@ var getToDom = exports.getToDom = function getToDom(allowPixelResizing) {
|
|
|
206
206
|
marginLeft: isMediaWrapped ? layout === 'wrap-left' ? 'auto' : HALF_GUTTER_SIZE : 0,
|
|
207
207
|
width: contentWrapperWidth
|
|
208
208
|
})
|
|
209
|
-
},
|
|
210
|
-
'data-media-vc-wrapper': 'true'
|
|
211
|
-
} : {}), content];
|
|
209
|
+
}, content];
|
|
212
210
|
};
|
|
213
211
|
};
|
|
214
212
|
|
|
@@ -353,6 +353,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
353
353
|
forcePlacement: true,
|
|
354
354
|
stick: true
|
|
355
355
|
}, (0, _react2.jsx)("div", {
|
|
356
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
356
357
|
onMouseLeave: function onMouseLeave() {
|
|
357
358
|
setIsColorSubmenuOpen(false);
|
|
358
359
|
setIsSizeSubmenuOpen(false);
|
|
@@ -13,7 +13,6 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
|
13
13
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
15
|
import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
16
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
18
17
|
import { MediaSingleNodeNext } from './mediaSingleNext';
|
|
19
18
|
const selector = states => {
|
|
@@ -122,9 +121,7 @@ class MediaSingleNodeView extends ReactNodeView {
|
|
|
122
121
|
if ((_this$reactComponentP4 = this.reactComponentProps.mediaOptions) !== null && _this$reactComponentP4 !== void 0 && _this$reactComponentP4.allowPixelResizing) {
|
|
123
122
|
domRef.classList.add('media-extended-resize-experience');
|
|
124
123
|
}
|
|
125
|
-
|
|
126
|
-
domRef.setAttribute('data-media-vc-wrapper', 'true');
|
|
127
|
-
}
|
|
124
|
+
domRef.setAttribute('data-media-vc-wrapper', 'true');
|
|
128
125
|
return domRef;
|
|
129
126
|
}
|
|
130
127
|
getContentDOM() {
|
|
@@ -428,7 +428,7 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
428
428
|
};
|
|
429
429
|
}, [widthType, mediaSingleWidthAttribute]);
|
|
430
430
|
const MediaChildren =
|
|
431
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
431
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
|
|
432
432
|
jsx("figure", {
|
|
433
433
|
ref: mediaSingleWrapperRef,
|
|
434
434
|
css: figureWrapperStyles
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { mediaSingleSpec } from '@atlaskit/adf-schema';
|
|
2
2
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
3
|
import { N20, N50 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
|
|
7
6
|
const WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
|
|
@@ -189,6 +188,7 @@ export const getToDom = allowPixelResizing => node => {
|
|
|
189
188
|
return ['div', {
|
|
190
189
|
class: 'mediaSingleView-content-wrap',
|
|
191
190
|
layout,
|
|
191
|
+
'data-media-vc-wrapper': 'true',
|
|
192
192
|
style: convertToInlineCss({
|
|
193
193
|
'--ak-editor-media-single--proportion': proportionCalc,
|
|
194
194
|
'--ak-editor-media-card-display': 'block',
|
|
@@ -200,10 +200,7 @@ export const getToDom = allowPixelResizing => node => {
|
|
|
200
200
|
marginRight: isMediaWrapped ? layout === 'wrap-right' ? 'auto' : HALF_GUTTER_SIZE : 0,
|
|
201
201
|
marginLeft: isMediaWrapped ? layout === 'wrap-left' ? 'auto' : HALF_GUTTER_SIZE : 0,
|
|
202
202
|
width: contentWrapperWidth
|
|
203
|
-
})
|
|
204
|
-
...(expValEquals('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true) ? {
|
|
205
|
-
'data-media-vc-wrapper': 'true'
|
|
206
|
-
} : {})
|
|
203
|
+
})
|
|
207
204
|
}, content];
|
|
208
205
|
};
|
|
209
206
|
|
|
@@ -322,6 +322,7 @@ const ImageBorder = ({
|
|
|
322
322
|
forcePlacement: true,
|
|
323
323
|
stick: true
|
|
324
324
|
}, jsx("div", {
|
|
325
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
325
326
|
onMouseLeave: () => {
|
|
326
327
|
setIsColorSubmenuOpen(false);
|
|
327
328
|
setIsSizeSubmenuOpen(false);
|
|
@@ -22,7 +22,6 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
|
22
22
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
23
23
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
24
24
|
import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
25
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
25
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
27
26
|
import { MediaSingleNodeNext } from './mediaSingleNext';
|
|
28
27
|
var selector = function selector(states) {
|
|
@@ -140,9 +139,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
140
139
|
if ((_this$reactComponentP2 = this.reactComponentProps.mediaOptions) !== null && _this$reactComponentP2 !== void 0 && _this$reactComponentP2.allowPixelResizing) {
|
|
141
140
|
domRef.classList.add('media-extended-resize-experience');
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
domRef.setAttribute('data-media-vc-wrapper', 'true');
|
|
145
|
-
}
|
|
142
|
+
domRef.setAttribute('data-media-vc-wrapper', 'true');
|
|
146
143
|
return domRef;
|
|
147
144
|
}
|
|
148
145
|
}, {
|
|
@@ -460,7 +460,7 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
460
460
|
};
|
|
461
461
|
}, [widthType, mediaSingleWidthAttribute]);
|
|
462
462
|
var MediaChildren =
|
|
463
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
463
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
|
|
464
464
|
jsx("figure", {
|
|
465
465
|
ref: mediaSingleWrapperRef,
|
|
466
466
|
css: figureWrapperStyles
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { mediaSingleSpec } from '@atlaskit/adf-schema';
|
|
5
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
6
|
import { N20, N50 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
|
|
10
9
|
var WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
|
|
@@ -184,9 +183,10 @@ export var getToDom = function getToDom(allowPixelResizing) {
|
|
|
184
183
|
childMediaWidth: childMediaWidth,
|
|
185
184
|
mediaSingleDimensionWidth: mediaSingleAttrs === null || mediaSingleAttrs === void 0 ? void 0 : mediaSingleAttrs.width
|
|
186
185
|
});
|
|
187
|
-
return ['div',
|
|
186
|
+
return ['div', {
|
|
188
187
|
class: 'mediaSingleView-content-wrap',
|
|
189
188
|
layout: layout,
|
|
189
|
+
'data-media-vc-wrapper': 'true',
|
|
190
190
|
style: convertToInlineCss({
|
|
191
191
|
'--ak-editor-media-single--proportion': proportionCalc,
|
|
192
192
|
'--ak-editor-media-card-display': 'block',
|
|
@@ -199,9 +199,7 @@ export var getToDom = function getToDom(allowPixelResizing) {
|
|
|
199
199
|
marginLeft: isMediaWrapped ? layout === 'wrap-left' ? 'auto' : HALF_GUTTER_SIZE : 0,
|
|
200
200
|
width: contentWrapperWidth
|
|
201
201
|
})
|
|
202
|
-
},
|
|
203
|
-
'data-media-vc-wrapper': 'true'
|
|
204
|
-
} : {}), content];
|
|
202
|
+
}, content];
|
|
205
203
|
};
|
|
206
204
|
};
|
|
207
205
|
|
|
@@ -345,6 +345,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
345
345
|
forcePlacement: true,
|
|
346
346
|
stick: true
|
|
347
347
|
}, jsx("div", {
|
|
348
|
+
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
348
349
|
onMouseLeave: function onMouseLeave() {
|
|
349
350
|
setIsColorSubmenuOpen(false);
|
|
350
351
|
setIsSizeSubmenuOpen(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^51.2.0",
|
|
33
33
|
"@atlaskit/analytics-namespaced-context": "^7.1.0",
|
|
34
34
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
35
|
-
"@atlaskit/button": "^23.
|
|
35
|
+
"@atlaskit/button": "^23.5.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^6.
|
|
38
|
-
"@atlaskit/editor-plugin-annotation": "^6.
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^6.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-annotation": "^6.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-connectivity": "^6.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-decorations": "^6.
|
|
40
|
+
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
|
|
43
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^8.
|
|
43
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-focus": "^5.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-grid": "^6.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-guideline": "^6.0.0",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
54
54
|
"@atlaskit/form": "^14.2.0",
|
|
55
55
|
"@atlaskit/icon": "^28.3.0",
|
|
56
|
-
"@atlaskit/icon-lab": "^5.
|
|
56
|
+
"@atlaskit/icon-lab": "^5.8.0",
|
|
57
57
|
"@atlaskit/media-card": "^79.5.0",
|
|
58
|
-
"@atlaskit/media-client": "^35.
|
|
58
|
+
"@atlaskit/media-client": "^35.4.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
60
60
|
"@atlaskit/media-common": "^12.3.0",
|
|
61
61
|
"@atlaskit/media-filmstrip": "^51.0.0",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"@atlaskit/primitives": "^14.15.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.0.0",
|
|
68
68
|
"@atlaskit/theme": "^21.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
70
|
-
"@atlaskit/tokens": "^6.
|
|
71
|
-
"@atlaskit/tooltip": "^20.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^13.2.0",
|
|
70
|
+
"@atlaskit/tokens": "^6.4.0",
|
|
71
|
+
"@atlaskit/tooltip": "^20.5.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
73
73
|
"@emotion/react": "^11.7.1",
|
|
74
74
|
"bind-event-listener": "^3.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"uuid": "^3.1.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@atlaskit/editor-common": "^110.
|
|
81
|
+
"@atlaskit/editor-common": "^110.4.0",
|
|
82
82
|
"@atlaskit/media-core": "^37.0.0",
|
|
83
83
|
"react": "^18.2.0",
|
|
84
84
|
"react-dom": "^18.2.0",
|