@atlaskit/renderer 109.14.0 → 109.15.1
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 +19 -0
- package/dist/cjs/actions/index.js +18 -5
- package/dist/cjs/react/index.js +1 -1
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +7 -1
- package/dist/cjs/steps/index.js +11 -0
- package/dist/cjs/ui/MediaCard.js +3 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/actions/index.js +19 -6
- package/dist/es2019/react/index.js +1 -1
- package/dist/es2019/react/utils/EditorMediaClientProvider.js +7 -1
- package/dist/es2019/steps/index.js +9 -0
- package/dist/es2019/ui/MediaCard.js +3 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/actions/index.js +19 -6
- package/dist/esm/react/index.js +1 -1
- package/dist/esm/react/utils/EditorMediaClientProvider.js +7 -1
- package/dist/esm/steps/index.js +11 -0
- package/dist/esm/ui/MediaCard.js +3 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/ui/MediaCard.d.ts +1 -0
- package/dist/types-ts4.5/ui/MediaCard.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#87575](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87575) [`d528eb09243a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d528eb09243a) - Update renderer to force skip context media client
|
|
8
|
+
|
|
9
|
+
## 109.15.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#87820](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87820) [`120f76a32bf9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/120f76a32bf9) - [ED-22819]
|
|
14
|
+
|
|
15
|
+
- Update ApplyAnnotation to return `step` of type AddNodeMarkStep for annotation on media and correct `doc` that includes newly add annotation mark
|
|
16
|
+
- Make media node read in data attributes so that it shows data-renderer-start-pos
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 109.14.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -226,11 +226,24 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
226
226
|
to = pos.to;
|
|
227
227
|
var annotationId = annotation.annotationId,
|
|
228
228
|
annotationType = annotation.annotationType;
|
|
229
|
-
var step
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
var step;
|
|
230
|
+
|
|
231
|
+
// If from points to a node position,
|
|
232
|
+
// we need to 1 position before it for nodeAt to return the node itself
|
|
233
|
+
var beforeNodePos = Math.max(from - 1, 0);
|
|
234
|
+
var possibleNode = this.doc.nodeAt(beforeNodePos);
|
|
235
|
+
if ((possibleNode === null || possibleNode === void 0 ? void 0 : possibleNode.type.name) === 'media') {
|
|
236
|
+
step = new _transform.AddNodeMarkStep(beforeNodePos, this.schema.marks.annotation.create({
|
|
237
|
+
id: annotationId,
|
|
238
|
+
type: annotationType
|
|
239
|
+
}));
|
|
240
|
+
} else {
|
|
241
|
+
step = (0, _steps.createAnnotationStep)(from, to, {
|
|
242
|
+
annotationId: annotationId,
|
|
243
|
+
annotationType: annotationType,
|
|
244
|
+
schema: this.schema
|
|
245
|
+
});
|
|
246
|
+
}
|
|
234
247
|
var _step$apply2 = step.apply(this.doc),
|
|
235
248
|
doc = _step$apply2.doc,
|
|
236
249
|
failed = _step$apply2.failed;
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -411,7 +411,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
411
411
|
var isBorderMark = function isBorderMark(mark) {
|
|
412
412
|
return isChildOfMediaSingle && mark.type === border;
|
|
413
413
|
};
|
|
414
|
-
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
414
|
+
return _objectSpread(_objectSpread({}, this.getProps(node, path)), {}, {
|
|
415
415
|
marks: node.marks.filter(function (m) {
|
|
416
416
|
return !isLinkMark(m) || _this6.allowMediaLinking === true;
|
|
417
417
|
}),
|
|
@@ -20,6 +20,12 @@ var EditorMediaClientProvider = exports.EditorMediaClientProvider = function Edi
|
|
|
20
20
|
mediaClientConfig = _useState2[0],
|
|
21
21
|
setMediaClientConfig = _useState2[1];
|
|
22
22
|
var mediaProvider = (0, _providerFactory.useProvider)('mediaProvider');
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* If a mediaClientConfig is provided then we will force
|
|
26
|
+
* skip the mediaClient from context
|
|
27
|
+
*/
|
|
28
|
+
var shouldSkipContext = Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
|
|
23
29
|
var contextMediaClient = (0, _react.useContext)(_mediaClientReact.MediaClientContext);
|
|
24
30
|
|
|
25
31
|
// MediaClientProvider currently requires a mediaClientConfig
|
|
@@ -43,6 +49,6 @@ var EditorMediaClientProvider = exports.EditorMediaClientProvider = function Edi
|
|
|
43
49
|
}
|
|
44
50
|
}, [mediaProvider, ssr]);
|
|
45
51
|
return /*#__PURE__*/_react.default.createElement(_mediaClientReact.MediaClientContext.Provider, {
|
|
46
|
-
value: mediaClient
|
|
52
|
+
value: shouldSkipContext ? mediaClient : contextMediaClient
|
|
47
53
|
}, children);
|
|
48
54
|
};
|
package/dist/cjs/steps/index.js
CHANGED
|
@@ -10,6 +10,9 @@ var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
|
10
10
|
function getStartPos(element) {
|
|
11
11
|
return parseInt(element.dataset.rendererStartPos || '-1', 10);
|
|
12
12
|
}
|
|
13
|
+
var getNodeType = function getNodeType(element) {
|
|
14
|
+
return element.dataset.nodeType;
|
|
15
|
+
};
|
|
13
16
|
function isPositionPointer(element) {
|
|
14
17
|
return getStartPos(element) > -1;
|
|
15
18
|
}
|
|
@@ -114,6 +117,14 @@ function getPosFromRange(range) {
|
|
|
114
117
|
startOffset = range.startOffset,
|
|
115
118
|
endContainer = range.endContainer,
|
|
116
119
|
endOffset = range.endOffset;
|
|
120
|
+
var parent = findParent(startContainer);
|
|
121
|
+
if (parent && getNodeType(parent) === 'media') {
|
|
122
|
+
var pos = getStartPos(parent);
|
|
123
|
+
return {
|
|
124
|
+
from: pos,
|
|
125
|
+
to: pos
|
|
126
|
+
};
|
|
127
|
+
}
|
|
117
128
|
var from = resolvePos(startContainer, startOffset);
|
|
118
129
|
var to = resolvePos(endContainer, endOffset);
|
|
119
130
|
if (from === false || to === false) {
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -269,7 +269,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
269
269
|
shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
|
|
270
270
|
ssr = _this$props5.ssr,
|
|
271
271
|
mediaClient = _this$props5.mediaClient,
|
|
272
|
-
setHoverTarget = _this$props5.setHoverTarget
|
|
272
|
+
setHoverTarget = _this$props5.setHoverTarget,
|
|
273
|
+
dataAttributes = _this$props5.dataAttributes;
|
|
273
274
|
var isMobile = rendererAppearance === 'mobile';
|
|
274
275
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
275
276
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -304,7 +305,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
304
305
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
305
306
|
originalDimensions: originalDimensions,
|
|
306
307
|
fileState: fileState
|
|
307
|
-
}), {
|
|
308
|
+
}), dataAttributes, {
|
|
308
309
|
onMouseEnter: function onMouseEnter(event) {
|
|
309
310
|
// We will not allow a hover target to be set if any mouse button is depressed during the mouse enter state.
|
|
310
311
|
// This could be due to the user trying to select text across the document.
|
|
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
55
55
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "109.
|
|
58
|
+
var packageVersion = "109.15.1";
|
|
59
59
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
3
3
|
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
5
|
-
import { RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
|
+
import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { getIndexMatch } from './matches-utils';
|
|
@@ -204,11 +204,24 @@ export default class RendererActions {
|
|
|
204
204
|
annotationId,
|
|
205
205
|
annotationType
|
|
206
206
|
} = annotation;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
let step;
|
|
208
|
+
|
|
209
|
+
// If from points to a node position,
|
|
210
|
+
// we need to 1 position before it for nodeAt to return the node itself
|
|
211
|
+
const beforeNodePos = Math.max(from - 1, 0);
|
|
212
|
+
const possibleNode = this.doc.nodeAt(beforeNodePos);
|
|
213
|
+
if ((possibleNode === null || possibleNode === void 0 ? void 0 : possibleNode.type.name) === 'media') {
|
|
214
|
+
step = new AddNodeMarkStep(beforeNodePos, this.schema.marks.annotation.create({
|
|
215
|
+
id: annotationId,
|
|
216
|
+
type: annotationType
|
|
217
|
+
}));
|
|
218
|
+
} else {
|
|
219
|
+
step = createAnnotationStep(from, to, {
|
|
220
|
+
annotationId,
|
|
221
|
+
annotationType,
|
|
222
|
+
schema: this.schema
|
|
223
|
+
});
|
|
224
|
+
}
|
|
212
225
|
const {
|
|
213
226
|
doc,
|
|
214
227
|
failed
|
|
@@ -361,7 +361,7 @@ export default class ReactSerializer {
|
|
|
361
361
|
const isLinkMark = mark => mark.type === link;
|
|
362
362
|
const isBorderMark = mark => isChildOfMediaSingle && mark.type === border;
|
|
363
363
|
return {
|
|
364
|
-
...this.getProps(node),
|
|
364
|
+
...this.getProps(node, path),
|
|
365
365
|
marks: node.marks.filter(m => !isLinkMark(m) || this.allowMediaLinking === true),
|
|
366
366
|
isLinkMark,
|
|
367
367
|
isBorderMark,
|
|
@@ -7,6 +7,12 @@ export const EditorMediaClientProvider = ({
|
|
|
7
7
|
}) => {
|
|
8
8
|
const [mediaClientConfig, setMediaClientConfig] = useState();
|
|
9
9
|
const mediaProvider = useProvider('mediaProvider');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* If a mediaClientConfig is provided then we will force
|
|
13
|
+
* skip the mediaClient from context
|
|
14
|
+
*/
|
|
15
|
+
const shouldSkipContext = Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
|
|
10
16
|
const contextMediaClient = useContext(MediaClientContext);
|
|
11
17
|
|
|
12
18
|
// MediaClientProvider currently requires a mediaClientConfig
|
|
@@ -28,6 +34,6 @@ export const EditorMediaClientProvider = ({
|
|
|
28
34
|
}
|
|
29
35
|
}, [mediaProvider, ssr]);
|
|
30
36
|
return /*#__PURE__*/React.createElement(MediaClientContext.Provider, {
|
|
31
|
-
value: mediaClient
|
|
37
|
+
value: shouldSkipContext ? mediaClient : contextMediaClient
|
|
32
38
|
}, children);
|
|
33
39
|
};
|
|
@@ -2,6 +2,7 @@ import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
|
2
2
|
function getStartPos(element) {
|
|
3
3
|
return parseInt(element.dataset.rendererStartPos || '-1', 10);
|
|
4
4
|
}
|
|
5
|
+
const getNodeType = element => element.dataset.nodeType;
|
|
5
6
|
function isPositionPointer(element) {
|
|
6
7
|
return getStartPos(element) > -1;
|
|
7
8
|
}
|
|
@@ -112,6 +113,14 @@ export function getPosFromRange(range) {
|
|
|
112
113
|
endContainer,
|
|
113
114
|
endOffset
|
|
114
115
|
} = range;
|
|
116
|
+
const parent = findParent(startContainer);
|
|
117
|
+
if (parent && getNodeType(parent) === 'media') {
|
|
118
|
+
const pos = getStartPos(parent);
|
|
119
|
+
return {
|
|
120
|
+
from: pos,
|
|
121
|
+
to: pos
|
|
122
|
+
};
|
|
123
|
+
}
|
|
115
124
|
const from = resolvePos(startContainer, startOffset);
|
|
116
125
|
const to = resolvePos(endContainer, endOffset);
|
|
117
126
|
if (from === false || to === false) {
|
|
@@ -201,7 +201,8 @@ export class MediaCardView extends Component {
|
|
|
201
201
|
shouldEnableDownloadButton,
|
|
202
202
|
ssr,
|
|
203
203
|
mediaClient,
|
|
204
|
-
setHoverTarget
|
|
204
|
+
setHoverTarget,
|
|
205
|
+
dataAttributes
|
|
205
206
|
} = this.props;
|
|
206
207
|
const isMobile = rendererAppearance === 'mobile';
|
|
207
208
|
const shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
@@ -237,7 +238,7 @@ export class MediaCardView extends Component {
|
|
|
237
238
|
contextIdentifierProvider,
|
|
238
239
|
originalDimensions,
|
|
239
240
|
fileState
|
|
240
|
-
}), {
|
|
241
|
+
}), dataAttributes, {
|
|
241
242
|
onMouseEnter: event => {
|
|
242
243
|
// We will not allow a hover target to be set if any mouse button is depressed during the mouse enter state.
|
|
243
244
|
// This could be due to the user trying to select text across the document.
|
|
@@ -36,7 +36,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
36
36
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
37
37
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
38
38
|
const packageName = "@atlaskit/renderer";
|
|
39
|
-
const packageVersion = "109.
|
|
39
|
+
const packageVersion = "109.15.1";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
constructor(props) {
|
|
42
42
|
super(props);
|
|
@@ -5,7 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
6
6
|
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
8
|
-
import { RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
8
|
+
import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
9
9
|
import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
10
10
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { getIndexMatch } from './matches-utils';
|
|
@@ -219,11 +219,24 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
219
219
|
to = pos.to;
|
|
220
220
|
var annotationId = annotation.annotationId,
|
|
221
221
|
annotationType = annotation.annotationType;
|
|
222
|
-
var step
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
222
|
+
var step;
|
|
223
|
+
|
|
224
|
+
// If from points to a node position,
|
|
225
|
+
// we need to 1 position before it for nodeAt to return the node itself
|
|
226
|
+
var beforeNodePos = Math.max(from - 1, 0);
|
|
227
|
+
var possibleNode = this.doc.nodeAt(beforeNodePos);
|
|
228
|
+
if ((possibleNode === null || possibleNode === void 0 ? void 0 : possibleNode.type.name) === 'media') {
|
|
229
|
+
step = new AddNodeMarkStep(beforeNodePos, this.schema.marks.annotation.create({
|
|
230
|
+
id: annotationId,
|
|
231
|
+
type: annotationType
|
|
232
|
+
}));
|
|
233
|
+
} else {
|
|
234
|
+
step = createAnnotationStep(from, to, {
|
|
235
|
+
annotationId: annotationId,
|
|
236
|
+
annotationType: annotationType,
|
|
237
|
+
schema: this.schema
|
|
238
|
+
});
|
|
239
|
+
}
|
|
227
240
|
var _step$apply2 = step.apply(this.doc),
|
|
228
241
|
doc = _step$apply2.doc,
|
|
229
242
|
failed = _step$apply2.failed;
|
package/dist/esm/react/index.js
CHANGED
|
@@ -404,7 +404,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
404
404
|
var isBorderMark = function isBorderMark(mark) {
|
|
405
405
|
return isChildOfMediaSingle && mark.type === border;
|
|
406
406
|
};
|
|
407
|
-
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
407
|
+
return _objectSpread(_objectSpread({}, this.getProps(node, path)), {}, {
|
|
408
408
|
marks: node.marks.filter(function (m) {
|
|
409
409
|
return !isLinkMark(m) || _this6.allowMediaLinking === true;
|
|
410
410
|
}),
|
|
@@ -10,6 +10,12 @@ export var EditorMediaClientProvider = function EditorMediaClientProvider(_ref)
|
|
|
10
10
|
mediaClientConfig = _useState2[0],
|
|
11
11
|
setMediaClientConfig = _useState2[1];
|
|
12
12
|
var mediaProvider = useProvider('mediaProvider');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* If a mediaClientConfig is provided then we will force
|
|
16
|
+
* skip the mediaClient from context
|
|
17
|
+
*/
|
|
18
|
+
var shouldSkipContext = Boolean((ssr === null || ssr === void 0 ? void 0 : ssr.config) || mediaProvider);
|
|
13
19
|
var contextMediaClient = useContext(MediaClientContext);
|
|
14
20
|
|
|
15
21
|
// MediaClientProvider currently requires a mediaClientConfig
|
|
@@ -33,6 +39,6 @@ export var EditorMediaClientProvider = function EditorMediaClientProvider(_ref)
|
|
|
33
39
|
}
|
|
34
40
|
}, [mediaProvider, ssr]);
|
|
35
41
|
return /*#__PURE__*/React.createElement(MediaClientContext.Provider, {
|
|
36
|
-
value: mediaClient
|
|
42
|
+
value: shouldSkipContext ? mediaClient : contextMediaClient
|
|
37
43
|
}, children);
|
|
38
44
|
};
|
package/dist/esm/steps/index.js
CHANGED
|
@@ -2,6 +2,9 @@ import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
|
2
2
|
function getStartPos(element) {
|
|
3
3
|
return parseInt(element.dataset.rendererStartPos || '-1', 10);
|
|
4
4
|
}
|
|
5
|
+
var getNodeType = function getNodeType(element) {
|
|
6
|
+
return element.dataset.nodeType;
|
|
7
|
+
};
|
|
5
8
|
function isPositionPointer(element) {
|
|
6
9
|
return getStartPos(element) > -1;
|
|
7
10
|
}
|
|
@@ -106,6 +109,14 @@ export function getPosFromRange(range) {
|
|
|
106
109
|
startOffset = range.startOffset,
|
|
107
110
|
endContainer = range.endContainer,
|
|
108
111
|
endOffset = range.endOffset;
|
|
112
|
+
var parent = findParent(startContainer);
|
|
113
|
+
if (parent && getNodeType(parent) === 'media') {
|
|
114
|
+
var pos = getStartPos(parent);
|
|
115
|
+
return {
|
|
116
|
+
from: pos,
|
|
117
|
+
to: pos
|
|
118
|
+
};
|
|
119
|
+
}
|
|
109
120
|
var from = resolvePos(startContainer, startOffset);
|
|
110
121
|
var to = resolvePos(endContainer, endOffset);
|
|
111
122
|
if (from === false || to === false) {
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -259,7 +259,8 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
259
259
|
shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
|
|
260
260
|
ssr = _this$props5.ssr,
|
|
261
261
|
mediaClient = _this$props5.mediaClient,
|
|
262
|
-
setHoverTarget = _this$props5.setHoverTarget
|
|
262
|
+
setHoverTarget = _this$props5.setHoverTarget,
|
|
263
|
+
dataAttributes = _this$props5.dataAttributes;
|
|
263
264
|
var isMobile = rendererAppearance === 'mobile';
|
|
264
265
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
265
266
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -294,7 +295,7 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
294
295
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
295
296
|
originalDimensions: originalDimensions,
|
|
296
297
|
fileState: fileState
|
|
297
|
-
}), {
|
|
298
|
+
}), dataAttributes, {
|
|
298
299
|
onMouseEnter: function onMouseEnter(event) {
|
|
299
300
|
// We will not allow a hover target to be set if any mouse button is depressed during the mouse enter state.
|
|
300
301
|
// This could be due to the user trying to select text across the document.
|
|
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
46
46
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
47
47
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
48
48
|
var packageName = "@atlaskit/renderer";
|
|
49
|
-
var packageVersion = "109.
|
|
49
|
+
var packageVersion = "109.15.1";
|
|
50
50
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
51
51
|
_inherits(Renderer, _PureComponent);
|
|
52
52
|
var _super = _createSuper(Renderer);
|
|
@@ -39,6 +39,7 @@ export interface MediaCardProps {
|
|
|
39
39
|
featureFlags?: MediaFeatureFlags;
|
|
40
40
|
shouldEnableDownloadButton?: boolean;
|
|
41
41
|
ssr?: MediaSSR;
|
|
42
|
+
dataAttributes?: Record<string, any>;
|
|
42
43
|
}
|
|
43
44
|
export interface State {
|
|
44
45
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
@@ -39,6 +39,7 @@ export interface MediaCardProps {
|
|
|
39
39
|
featureFlags?: MediaFeatureFlags;
|
|
40
40
|
shouldEnableDownloadButton?: boolean;
|
|
41
41
|
ssr?: MediaSSR;
|
|
42
|
+
dataAttributes?: Record<string, any>;
|
|
42
43
|
}
|
|
43
44
|
export interface State {
|
|
44
45
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.
|
|
3
|
+
"version": "109.15.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
30
30
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
32
|
-
"@atlaskit/button": "^17.
|
|
32
|
+
"@atlaskit/button": "^17.10.0",
|
|
33
33
|
"@atlaskit/code": "^15.1.0",
|
|
34
34
|
"@atlaskit/editor-common": "^78.23.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
39
39
|
"@atlaskit/emoji": "^67.6.0",
|
|
40
40
|
"@atlaskit/icon": "^22.1.0",
|
|
41
|
-
"@atlaskit/link-datasource": "^1.
|
|
41
|
+
"@atlaskit/link-datasource": "^1.25.0",
|
|
42
42
|
"@atlaskit/media-card": "^77.10.0",
|
|
43
43
|
"@atlaskit/media-client": "^26.2.0",
|
|
44
44
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@af/integration-testing": "*",
|
|
72
72
|
"@af/visual-regression": "*",
|
|
73
73
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
74
|
-
"@atlaskit/css-reset": "^6.
|
|
74
|
+
"@atlaskit/css-reset": "^6.8.0",
|
|
75
75
|
"@atlaskit/editor-test-helpers": "^18.20.0",
|
|
76
76
|
"@atlaskit/link-provider": "^1.9.0",
|
|
77
77
|
"@atlaskit/link-test-helpers": "^7.0.0",
|