@atlaskit/editor-plugin-media 8.0.1 → 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 +12 -0
- package/dist/cjs/nodeviews/mediaSingle.js +1 -4
- package/dist/cjs/nodeviews/toDOM-fixes/mediaSingle.js +3 -5
- package/dist/es2019/nodeviews/mediaSingle.js +1 -4
- package/dist/es2019/nodeviews/toDOM-fixes/mediaSingle.js +2 -5
- package/dist/esm/nodeviews/mediaSingle.js +1 -4
- package/dist/esm/nodeviews/toDOM-fixes/mediaSingle.js +3 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
3
15
|
## 8.0.1
|
|
4
16
|
|
|
5
17
|
### 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
|
}, {
|
|
@@ -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
|
|
|
@@ -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() {
|
|
@@ -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
|
|
|
@@ -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
|
}, {
|
|
@@ -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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "8.0
|
|
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,7 +32,7 @@
|
|
|
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
37
|
"@atlaskit/editor-plugin-analytics": "^6.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-annotation": "^6.1.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/icon": "^28.3.0",
|
|
56
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,7 +66,7 @@
|
|
|
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": "^13.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^13.2.0",
|
|
70
70
|
"@atlaskit/tokens": "^6.4.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.5.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|