@atlaskit/renderer 128.2.3 → 128.3.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/react/index.js +8 -6
  3. package/dist/cjs/react/marks/data-consumer.js +3 -1
  4. package/dist/cjs/react/marks/link.js +4 -2
  5. package/dist/cjs/react/nodes/blockCard.js +7 -1
  6. package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -1
  7. package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +3 -1
  8. package/dist/cjs/react/nodes/emoji.js +6 -2
  9. package/dist/cjs/react/nodes/heading.js +3 -1
  10. package/dist/cjs/react/nodes/inlineCard.js +19 -6
  11. package/dist/cjs/react/nodes/media/index.js +20 -5
  12. package/dist/cjs/react/nodes/mediaInline.js +4 -1
  13. package/dist/cjs/react/nodes/mediaSingle/index.js +3 -1
  14. package/dist/cjs/react/nodes/status.js +6 -2
  15. package/dist/cjs/react/nodes/table.js +7 -4
  16. package/dist/cjs/react/nodes/taskItem.js +9 -3
  17. package/dist/cjs/ui/Expand.js +6 -2
  18. package/dist/cjs/ui/ExtensionRenderer.js +3 -1
  19. package/dist/cjs/ui/MediaCard.js +3 -1
  20. package/dist/cjs/ui/Renderer/index.js +22 -10
  21. package/dist/es2019/react/index.js +7 -6
  22. package/dist/es2019/react/marks/data-consumer.js +3 -1
  23. package/dist/es2019/react/marks/link.js +4 -2
  24. package/dist/es2019/react/nodes/blockCard.js +7 -1
  25. package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -1
  26. package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +3 -1
  27. package/dist/es2019/react/nodes/emoji.js +6 -2
  28. package/dist/es2019/react/nodes/heading.js +3 -1
  29. package/dist/es2019/react/nodes/inlineCard.js +19 -6
  30. package/dist/es2019/react/nodes/media/index.js +20 -5
  31. package/dist/es2019/react/nodes/mediaInline.js +5 -2
  32. package/dist/es2019/react/nodes/mediaSingle/index.js +3 -1
  33. package/dist/es2019/react/nodes/status.js +6 -2
  34. package/dist/es2019/react/nodes/table.js +7 -4
  35. package/dist/es2019/react/nodes/taskItem.js +9 -3
  36. package/dist/es2019/ui/Expand.js +6 -2
  37. package/dist/es2019/ui/ExtensionRenderer.js +3 -1
  38. package/dist/es2019/ui/MediaCard.js +3 -1
  39. package/dist/es2019/ui/Renderer/index.js +22 -10
  40. package/dist/esm/react/index.js +8 -6
  41. package/dist/esm/react/marks/data-consumer.js +3 -1
  42. package/dist/esm/react/marks/link.js +4 -2
  43. package/dist/esm/react/nodes/blockCard.js +7 -1
  44. package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -1
  45. package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +3 -1
  46. package/dist/esm/react/nodes/emoji.js +6 -2
  47. package/dist/esm/react/nodes/heading.js +3 -1
  48. package/dist/esm/react/nodes/inlineCard.js +19 -6
  49. package/dist/esm/react/nodes/media/index.js +20 -5
  50. package/dist/esm/react/nodes/mediaInline.js +4 -1
  51. package/dist/esm/react/nodes/mediaSingle/index.js +3 -1
  52. package/dist/esm/react/nodes/status.js +6 -2
  53. package/dist/esm/react/nodes/table.js +7 -4
  54. package/dist/esm/react/nodes/taskItem.js +9 -3
  55. package/dist/esm/ui/Expand.js +6 -2
  56. package/dist/esm/ui/ExtensionRenderer.js +3 -1
  57. package/dist/esm/ui/MediaCard.js +3 -1
  58. package/dist/esm/ui/Renderer/index.js +22 -10
  59. package/dist/types/types/mediaOptions.d.ts +3 -0
  60. package/dist/types/ui/MediaCard.d.ts +3 -0
  61. package/dist/types-ts4.5/types/mediaOptions.d.ts +3 -0
  62. package/dist/types-ts4.5/ui/MediaCard.d.ts +3 -0
  63. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 128.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`6e25e8bbb01c3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e25e8bbb01c3) -
8
+ [ux] Adds mediaViewerExtensions prop to media-viewer/src/header and threads it through parents.
9
+ Allows callers to pass in additional buttons to the image / video preview'
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 128.2.3
4
16
 
5
17
  ### Patch Changes
@@ -492,7 +492,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
492
492
  value: function getMediaProps(node) {
493
493
  var _this6 = this,
494
494
  _this$media,
495
- _this$media2;
495
+ _this$media2,
496
+ _this$media3;
496
497
  var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
497
498
  var _node$type$schema$mar = node.type.schema.marks,
498
499
  annotation = _node$type$schema$mar.annotation,
@@ -527,6 +528,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
527
528
  // surroundTextNodesWithTextWrapper checks inlineComment.allowDraftMode
528
529
  allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
529
530
  enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard,
531
+ mediaViewerExtensions: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.mediaViewerExtensions,
530
532
  nestedUnder: nestedUnder
531
533
  });
532
534
  }
@@ -579,21 +581,21 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
579
581
  }, {
580
582
  key: "getMediaGroupProps",
581
583
  value: function getMediaGroupProps(node) {
582
- var _this$media3, _this$media4;
584
+ var _this$media4, _this$media5;
583
585
  return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
584
586
  shouldOpenMediaViewer: this.shouldOpenMediaViewer,
585
587
  allowAltTextOnImages: this.allowAltTextOnImages,
586
588
  featureFlags: this.media && this.media.featureFlags,
587
- enableDownloadButton: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.enableDownloadButton,
588
- ssr: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.ssr
589
+ enableDownloadButton: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.enableDownloadButton,
590
+ ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
589
591
  });
590
592
  }
591
593
  }, {
592
594
  key: "getMediaInlineProps",
593
595
  value: function getMediaInlineProps(node) {
594
- var _this$media5;
596
+ var _this$media6;
595
597
  return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
596
- ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
598
+ ssr: (_this$media6 = this.media) === null || _this$media6 === void 0 ? void 0 : _this$media6.ssr
597
599
  });
598
600
  }
599
601
  }, {
@@ -9,7 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  function DataConsumer(props) {
11
11
  var WrapperElement = props.isInline ? 'span' : 'div';
12
- return /*#__PURE__*/_react.default.createElement(WrapperElement, (0, _extends2.default)({
12
+ return /*#__PURE__*/_react.default.createElement(WrapperElement
13
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
14
+ , (0, _extends2.default)({
13
15
  "data-source": props.sources ? JSON.stringify(props.sources) : undefined,
14
16
  "data-mark-type": "dataConsumer"
15
17
  // Ignored via go/ees005
@@ -47,7 +47,7 @@ function Link(props) {
47
47
  try {
48
48
  var _onSetLinkTarget;
49
49
  actualTarget = (_onSetLinkTarget = onSetLinkTarget(href)) !== null && _onSetLinkTarget !== void 0 ? _onSetLinkTarget : actualTarget;
50
- } catch (error) {
50
+ } catch (error) {// eslint-disable-line no-unused-vars
51
51
  // If URL parsing fails, use the original target
52
52
  }
53
53
  }
@@ -73,7 +73,9 @@ function Link(props) {
73
73
  return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
74
74
  data: analyticsData
75
75
  }, (0, _react2.jsx)(_linkUrl.default, (0, _extends2.default)({
76
- css: anchorStyles,
76
+ css: anchorStyles
77
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
78
+ ,
77
79
  onClick: function onClick(e) {
78
80
  if (fireAnalyticsEvent) {
79
81
  fireAnalyticsEvent({
@@ -104,6 +104,8 @@ function BlockCard(props) {
104
104
  var key = _ref3.key;
105
105
  return key;
106
106
  });
107
+
108
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
107
109
  var columnCustomSizesEntries = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
108
110
  return !!c.width;
109
111
  }).map(function (_ref4) {
@@ -112,6 +114,8 @@ function BlockCard(props) {
112
114
  return [key, width];
113
115
  });
114
116
  var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
117
+
118
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
115
119
  var wrappedColumnKeys = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
116
120
  return c.isWrapped;
117
121
  }).map(function (c) {
@@ -199,7 +203,9 @@ function BlockCard(props) {
199
203
  }, (0, _react.jsx)("div", {
200
204
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
201
205
  className: "blockCardView-content-wrap",
202
- "data-block-card": true,
206
+ "data-block-card": true
207
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
208
+ ,
203
209
  "data-card-data": data ? JSON.stringify(data) : undefined,
204
210
  "data-card-url": url,
205
211
  "data-local-id": localId
@@ -57,7 +57,9 @@ var CopyButton = function CopyButton(_ref) {
57
57
  className: className,
58
58
  iconBefore: (0, _react.jsx)(_copy.default, {
59
59
  label: tooltip
60
- }),
60
+ })
61
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
62
+ ,
61
63
  onClick: function onClick(event) {
62
64
  fireAnalyticsEvent({
63
65
  // @ts-expect-error - Type 'ACTION.CLICKED' is not assignable to type 'ACTION.CLICKED | ACTION.MEDIA_LINK_TRANSFORMED | ACTION.STARTED | ACTION.TOGGLE_EXPAND | ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED | ACTION.VISITED | ACTION.RENDERED | ACTION.INVALID_PROSEMIRROR_DOCUMENT | ACTION.CRASHED | ... 6 more ... | AnnotationActionType'.
@@ -40,7 +40,9 @@ var CodeBlockWrapButton = function CodeBlockWrapButton(_ref) {
40
40
  iconBefore: (0, _react.jsx)(_textWrap.default, {
41
41
  label: ""
42
42
  }),
43
- isSelected: wrapLongLines,
43
+ isSelected: wrapLongLines
44
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
45
+ ,
44
46
  onClick: function onClick(event) {
45
47
  fireAnalyticsEvent({
46
48
  // @ts-expect-error - Type 'ACTION.CLICKED' is not assignable to type 'ACTION.CLICKED | ACTION.MEDIA_LINK_TRANSFORMED | ACTION.STARTED | ACTION.TOGGLE_EXPAND | ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED | ACTION.VISITED | ACTION.RENDERED | ACTION.INVALID_PROSEMIRROR_DOCUMENT | ACTION.CRASHED | ... 6 more ... | AnnotationActionType'
@@ -48,7 +48,9 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
48
48
  if (!providers.emojiProvider) {
49
49
  return null;
50
50
  }
51
- return (0, _react.jsx)(_element.ResourcedEmoji, {
51
+ return (0, _react.jsx)(_element.ResourcedEmoji
52
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
53
+ , {
52
54
  emojiId: {
53
55
  id: id,
54
56
  fallback: fallback,
@@ -84,7 +86,9 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
84
86
  }, {
85
87
  key: "render",
86
88
  value: function render() {
87
- return (0, _react.jsx)(_providerFactory.WithProviders, {
89
+ return (0, _react.jsx)(_providerFactory.WithProviders
90
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
91
+ , {
88
92
  providers: ['emojiProvider'],
89
93
  providerFactory: this.providerFactory,
90
94
  renderNode: this.renderWithProvider
@@ -54,7 +54,9 @@ function WrappedHeadingAnchor(_ref) {
54
54
  var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
55
55
  return (0, _react2.jsx)(_headingAnchor.default, {
56
56
  enableNestedHeaderLinks: enableNestedHeaderLinks,
57
- level: level,
57
+ level: level
58
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
59
+ ,
58
60
  onCopyText: function onCopyText() {
59
61
  fireAnalyticsEvent({
60
62
  action: _analytics.ACTION.CLICKED,
@@ -110,7 +110,9 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
110
110
  url: url,
111
111
  compactPadding: rendererAppearance === 'comment',
112
112
  showPanelButton: showPanelButton,
113
- showPanelButtonIcon: showPanelButtonIcon,
113
+ showPanelButtonIcon: showPanelButtonIcon
114
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
115
+ ,
114
116
  onClick: function onClick(event) {
115
117
  if (isPreviewPanelAvailable) {
116
118
  var _extractSmartLinkEmbe;
@@ -212,7 +214,9 @@ var InlineCard = function InlineCard(props) {
212
214
  appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.INLINE,
213
215
  source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.RENDERER
214
216
  }, (0, _react2.jsx)("span", (0, _extends2.default)({
215
- "data-inline-card": true,
217
+ "data-inline-card": true
218
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
219
+ ,
216
220
  "data-card-data": data ? JSON.stringify(data) : undefined,
217
221
  "data-card-url": url
218
222
  // Ignored via go/ees005
@@ -251,7 +255,9 @@ var InlineCard = function InlineCard(props) {
251
255
  appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.INLINE,
252
256
  source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.RENDERER
253
257
  }, (0, _react2.jsx)("span", {
254
- "data-inline-card": true,
258
+ "data-inline-card": true
259
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
260
+ ,
255
261
  "data-card-data": data ? JSON.stringify(data) : undefined,
256
262
  "data-card-url": url,
257
263
  "data-renderer-mark": inlineAnnotationProps['data-renderer-mark'],
@@ -271,7 +277,9 @@ var InlineCard = function InlineCard(props) {
271
277
  url: url,
272
278
  showHoverPreview: !hideHoverPreview,
273
279
  actionOptions: actionOptions,
274
- onClick: onClick,
280
+ onClick: onClick
281
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
282
+ ,
275
283
  onResolve: function onResolve(data) {
276
284
  if (!data.url || !data.title) {
277
285
  return;
@@ -301,7 +309,9 @@ var InlineCard = function InlineCard(props) {
301
309
  url: url,
302
310
  showHoverPreview: !hideHoverPreview,
303
311
  actionOptions: actionOptions,
304
- onClick: onClick,
312
+ onClick: onClick
313
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
314
+ ,
305
315
  onResolve: function onResolve(data) {
306
316
  if (!data.url || !data.title) {
307
317
  return;
@@ -322,7 +332,9 @@ var InlineCard = function InlineCard(props) {
322
332
  }, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
323
333
  data: analyticsData
324
334
  }, (0, _react2.jsx)("span", (0, _extends2.default)({
325
- "data-inline-card": true,
335
+ "data-inline-card": true
336
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
337
+ ,
326
338
  "data-card-data": data ? JSON.stringify(data) : undefined,
327
339
  "data-card-url": url
328
340
  // Ignored via go/ees005
@@ -345,6 +357,7 @@ var InlineCard = function InlineCard(props) {
345
357
  // Ignored via go/ees005
346
358
  // eslint-disable-next-line react/jsx-props-no-spreading
347
359
  }, cardProps, {
360
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
348
361
  onResolve: function onResolve(data) {
349
362
  if (!data.url || !data.title) {
350
363
  return;
@@ -115,12 +115,15 @@ var MediaAnnotation = function MediaAnnotation(_ref3) {
115
115
  }
116
116
  return (0, _react2.jsx)(_annotation.default, {
117
117
  id: mark.attrs.id,
118
- annotationType: mark.attrs.annotationType,
118
+ annotationType: mark.attrs.annotationType
119
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
120
+ ,
119
121
  dataAttributes: {
120
122
  'data-renderer-mark': true,
121
123
  'data-block-mark': true
122
124
  }
123
125
  // This should be fine being empty [] since the serializer serializeFragmentChild getMarkProps call always passes
126
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
124
127
  ,
125
128
  annotationParentIds: [],
126
129
  allowAnnotations: true,
@@ -209,10 +212,14 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref5) {
209
212
  });
210
213
  }
211
214
  };
212
- return (0, _react2.jsx)(_mediaSingle.CommentBadgeNext, (0, _extends2.default)({
215
+ return (0, _react2.jsx)(_mediaSingle.CommentBadgeNext
216
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
217
+ , (0, _extends2.default)({
213
218
  onMouseEnter: function onMouseEnter() {
214
219
  return setEntered(true);
215
- },
220
+ }
221
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
222
+ ,
216
223
  onMouseLeave: function onMouseLeave() {
217
224
  return setEntered(false);
218
225
  },
@@ -262,7 +269,9 @@ var Media = /*#__PURE__*/function (_PureComponent) {
262
269
  marks: annotationMarks
263
270
  }, (0, _react2.jsx)(MediaBorder, {
264
271
  mark: borderMark
265
- }, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
272
+ }, (0, _react2.jsx)(_analyticsNext.AnalyticsContext
273
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
274
+ , {
266
275
  data: (0, _defineProperty2.default)({}, _analyticsNamespacedContext.MEDIA_CONTEXT, {
267
276
  border: !!borderMark
268
277
  })
@@ -330,7 +339,9 @@ var Media = /*#__PURE__*/function (_PureComponent) {
330
339
  if (!providers) {
331
340
  return this.renderCard();
332
341
  }
333
- return (0, _react2.jsx)(_providerFactory.WithProviders, {
342
+ return (0, _react2.jsx)(_providerFactory.WithProviders
343
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
344
+ , {
334
345
  providers: ['mediaProvider', 'contextIdentifierProvider'],
335
346
  providerFactory: providers,
336
347
  renderNode: this.renderCard
@@ -358,10 +369,14 @@ var MediaWithDraftAnnotation = function MediaWithDraftAnnotation(props) {
358
369
  }
359
370
  var posToCheck = ((_draftPosition$from = draftPosition === null || draftPosition === void 0 ? void 0 : draftPosition.from) !== null && _draftPosition$from !== void 0 ? _draftPosition$from : 0) + 1;
360
371
  if (draftPosition !== null && posToCheck === pos) {
372
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
361
373
  setShouldApplyDraftAnnotation(true);
374
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
362
375
  setPosition(posToCheck);
363
376
  } else if (draftPosition === null && shouldApplyDraftAnnotation) {
377
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
364
378
  setShouldApplyDraftAnnotation(false);
379
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
365
380
  setPosition(undefined);
366
381
  }
367
382
  }, [draftPosition, pos, shouldApplyDraftAnnotation]);
@@ -100,6 +100,7 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
100
100
  }, [identifier, collectionName]);
101
101
  (0, _react.useEffect)(function () {
102
102
  var id = clipboardAttrs.id;
103
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
103
104
  id && updateFileState(id);
104
105
  }, [contextIdentifier, clipboardAttrs, updateFileState]);
105
106
 
@@ -190,7 +191,9 @@ var MediaInline = function MediaInline(props) {
190
191
  alt: alt,
191
192
  width: width,
192
193
  height: height,
193
- ssr: ssr,
194
+ ssr: ssr
195
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
196
+ ,
194
197
  border: {
195
198
  borderSize: borderSize,
196
199
  borderColor: borderColor
@@ -247,7 +247,9 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
247
247
  width: width,
248
248
  height: height,
249
249
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
250
- containerWidth: containerWidth,
250
+ containerWidth: containerWidth
251
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
252
+ ,
251
253
  size: {
252
254
  width: widthAttr,
253
255
  widthType: widthType
@@ -21,7 +21,9 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(p
21
21
  if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
22
22
  return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, inlineAnnotationProps, {
23
23
  role: 'emphasis'
24
- }), /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
24
+ }), /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext
25
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
26
+ , {
25
27
  data: {
26
28
  userContext: 'document'
27
29
  }
@@ -33,7 +35,9 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(p
33
35
  isBold: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh')
34
36
  })));
35
37
  }
36
- return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
38
+ return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext
39
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
40
+ , {
37
41
  data: {
38
42
  userContext: 'document'
39
43
  }
@@ -99,8 +99,7 @@ var shouldHeaderPinBottom = exports.shouldHeaderPinBottom = function shouldHeade
99
99
  return tableBottom - rowHeight <= scrollTop && !(tableBottom < scrollTop);
100
100
  };
101
101
  var addSortableColumn = exports.addSortableColumn = function addSortableColumn(rows, tableOrderStatus, onSorting
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
102
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-explicit-any
104
103
  ) {
105
104
  return _react.default.Children.map(rows, function (row, index) {
106
105
  if (index === 0) {
@@ -709,7 +708,9 @@ var TableWithShadows = (0, _ui.overflowShadow)(TableProcessor, {
709
708
  var TableWithWidth = function TableWithWidth(props) {
710
709
  if ((0, _platformFeatureFlags.fg)('platform-ssr-table-resize')) {
711
710
  var _props$columnWidths;
712
- var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
711
+ var colWidthsSum =
712
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
713
+ ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
713
714
  return total + val;
714
715
  }, 0)) || 0;
715
716
  if (colWidthsSum || props.allowTableResizing) {
@@ -726,7 +727,9 @@ var TableWithWidth = function TableWithWidth(props) {
726
727
  var _props$columnWidths2;
727
728
  var width = _ref3.width;
728
729
  var renderWidth = props.rendererAppearance === 'full-page' ? width - _style.FullPagePadding * 2 : width;
729
- var colWidthsSum = ((_props$columnWidths2 = props.columnWidths) === null || _props$columnWidths2 === void 0 ? void 0 : _props$columnWidths2.reduce(function (total, val) {
730
+ var colWidthsSum =
731
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
732
+ ((_props$columnWidths2 = props.columnWidths) === null || _props$columnWidths2 === void 0 ? void 0 : _props$columnWidths2.reduce(function (total, val) {
730
733
  return total + val;
731
734
  }, 0)) || 0;
732
735
  if (colWidthsSum || props.allowTableResizing) {
@@ -45,7 +45,9 @@ var TaskItem = exports.default = /*#__PURE__*/function (_PureComponent) {
45
45
  if (rendererContext) {
46
46
  objectAri = rendererContext.objectAri || '';
47
47
  }
48
- return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
48
+ return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext
49
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
50
+ , {
49
51
  data: {
50
52
  userContext: 'document'
51
53
  }
@@ -61,7 +63,9 @@ var TaskItem = exports.default = /*#__PURE__*/function (_PureComponent) {
61
63
  disableOnChange: disableOnChange,
62
64
  taskDecisionProvider: taskDecisionProvider,
63
65
  contextIdentifierProvider: contextIdentifierProvider,
64
- dataAttributes: dataAttributes,
66
+ dataAttributes: dataAttributes
67
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
68
+ ,
65
69
  onChange: function onChange(_, isChecked) {
66
70
  dispatch(isChecked);
67
71
  }
@@ -84,7 +88,9 @@ var TaskItem = exports.default = /*#__PURE__*/function (_PureComponent) {
84
88
  }, {
85
89
  key: "render",
86
90
  value: function render() {
87
- return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders, {
91
+ return /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders
92
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
93
+ , {
88
94
  providers: ['taskDecisionProvider', 'contextIdentifierProvider'],
89
95
  providerFactory: this.providerFactory,
90
96
  renderNode: this.renderWithProvider
@@ -239,14 +239,18 @@ function Expand(_ref2) {
239
239
  expanded: expanded,
240
240
  focused: focused
241
241
  }, nestedHeaderIds && nestedHeaderIds.length > 0 ? (0, _react.jsx)(_activeHeaderIdProvider.ActiveHeaderIdConsumer, {
242
- nestedHeaderIds: nestedHeaderIds,
242
+ nestedHeaderIds: nestedHeaderIds
243
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
244
+ ,
243
245
  onNestedHeaderIdMatch: function onNestedHeaderIdMatch() {
244
246
  if (!hasLoadedChildren) {
245
247
  setHasLoadedChildren(true);
246
248
  }
247
249
  setExpanded(true);
248
250
  }
249
- }) : null, (0, _react.jsx)(TitleContainer, {
251
+ }) : null, (0, _react.jsx)(TitleContainer
252
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
253
+ , {
250
254
  onClick: function onClick(e) {
251
255
  e.preventDefault();
252
256
  e.stopPropagation();
@@ -139,7 +139,9 @@ function ExtensionRenderer(props) {
139
139
  if (!props.providers) {
140
140
  return setupAndRenderExtensionNode({});
141
141
  }
142
- return (0, _react.jsx)(_providerFactory.WithProviders, {
142
+ return (0, _react.jsx)(_providerFactory.WithProviders
143
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
144
+ , {
143
145
  providers: ['extensionProvider'],
144
146
  providerFactory: props.providers,
145
147
  renderNode: setupAndRenderExtensionNode
@@ -308,7 +308,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
308
308
  mediaClient = _this$props7.mediaClient,
309
309
  dataAttributes = _this$props7.dataAttributes,
310
310
  enableSyncMediaCard = _this$props7.enableSyncMediaCard,
311
- localId = _this$props7.localId;
311
+ localId = _this$props7.localId,
312
+ mediaViewerExtensions = _this$props7.mediaViewerExtensions;
312
313
  var isMobile = false;
313
314
  var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
314
315
  var isInlinePlayer = isMobile ? false : shouldPlayInline;
@@ -369,6 +370,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
369
370
  shouldEnableDownloadButton: shouldEnableDownloadButton,
370
371
  ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
371
372
  shouldHideTooltip: isMobile,
373
+ mediaViewerExtensions: mediaViewerExtensions,
372
374
  onError: (0, _expValEquals.expValEquals)('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
373
375
  }));
374
376
  }
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
71
71
  var TABLE_INFO_TIMEOUT = 10000;
72
72
  var RENDER_EVENT_SAMPLE_RATE = 0.2;
73
73
  var packageName = "@atlaskit/renderer";
74
- var packageVersion = "0.0.0-development";
74
+ var packageVersion = "128.2.3";
75
75
  var setAsQueryContainerStyles = (0, _react2.css)({
76
76
  containerName: 'ak-renderer-wrapper',
77
77
  containerType: 'inline-size'
@@ -456,6 +456,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
456
456
  }, (0, _react2.jsx)(_activeHeaderIdProvider.ActiveHeaderIdProvider, {
457
457
  value: (0, _links.getActiveHeadingId)(props.allowHeadingAnchorLinks)
458
458
  }, (0, _react2.jsx)(_analyticsContext.default.Provider, {
459
+ // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
459
460
  value: {
460
461
  fireAnalyticsEvent: function fireAnalyticsEvent(event) {
461
462
  return _fireAnalyticsEvent(event);
@@ -475,7 +476,9 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
475
476
  allowPlaceholderText: props.allowPlaceholderText,
476
477
  useBlockRenderForCodeBlock: (_rendererContext$feat = rendererContext.featureFlags.useBlockRenderForCodeBlock) !== null && _rendererContext$feat !== void 0 ? _rendererContext$feat : true,
477
478
  addTelepointer: props.addTelepointer,
478
- innerRef: editorRef,
479
+ innerRef: editorRef
480
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
481
+ ,
479
482
  onClick: function onClick(event) {
480
483
  return handleWrapperOnClick(event, props, mouseDownSelection);
481
484
  },
@@ -512,7 +515,9 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
512
515
  allowColumnSorting: props.allowColumnSorting,
513
516
  allowNestedHeaderLinks: (0, _links.isNestedHeaderLinksEnabled)(props.allowHeadingAnchorLinks),
514
517
  useBlockRenderForCodeBlock: (_rendererContext$feat2 = rendererContext.featureFlags.useBlockRenderForCodeBlock) !== null && _rendererContext$feat2 !== void 0 ? _rendererContext$feat2 : true,
515
- addTelepointer: props.addTelepointer,
518
+ addTelepointer: props.addTelepointer
519
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
520
+ ,
516
521
  onClick: function onClick(event) {
517
522
  return handleWrapperOnClick(event, props, mouseDownSelection);
518
523
  },
@@ -569,7 +574,9 @@ function Renderer(props) {
569
574
  // Used by Confluence for View page renderer
570
575
  // For the nested renderers - see RendererWithAnnotationSelection.
571
576
  var RendererWithAnalytics = exports.RendererWithAnalytics = /*#__PURE__*/_react.default.memo(function (props) {
572
- return (0, _react2.jsx)(_analyticsNamespacedContext.FabricEditorAnalyticsContext, {
577
+ return (0, _react2.jsx)(_analyticsNamespacedContext.FabricEditorAnalyticsContext
578
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
579
+ , {
573
580
  data: {
574
581
  appearance: (0, _utils.getAnalyticsAppearance)(props.appearance),
575
582
  packageName: packageName,
@@ -578,7 +585,9 @@ var RendererWithAnalytics = exports.RendererWithAnalytics = /*#__PURE__*/_react.
578
585
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
579
586
  editorSessionId: (0, _v.default)()
580
587
  }
581
- }, (0, _react2.jsx)(_ui.WithCreateAnalyticsEvent, {
588
+ }, (0, _react2.jsx)(_ui.WithCreateAnalyticsEvent
589
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
590
+ , {
582
591
  render: function render(createAnalyticsEvent) {
583
592
  // `IntlErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
584
593
  return (0, _react2.jsx)(_ErrorBoundary.ErrorBoundary, {
@@ -776,11 +785,14 @@ function RendererActionsInternalUpdater(_ref2) {
776
785
  };
777
786
  }, [actions, schema, _doc, onAnalyticsEvent]);
778
787
  if ((0, _experiments.editorExperiment)('comment_on_bodied_extensions', true)) {
779
- return (0, _react2.jsx)(RootRendererContext.Provider, {
780
- value: {
781
- doc: _doc
782
- }
783
- }, children);
788
+ return (
789
+ // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
790
+ (0, _react2.jsx)(RootRendererContext.Provider, {
791
+ value: {
792
+ doc: _doc
793
+ }
794
+ }, children)
795
+ );
784
796
  }
785
797
  return children;
786
798
  }
@@ -449,7 +449,7 @@ export default class ReactSerializer {
449
449
  };
450
450
  }
451
451
  getMediaProps(node, path = []) {
452
- var _this$media, _this$media2;
452
+ var _this$media, _this$media2, _this$media3;
453
453
  const {
454
454
  marks: {
455
455
  annotation,
@@ -479,6 +479,7 @@ export default class ReactSerializer {
479
479
  // surroundTextNodesWithTextWrapper checks inlineComment.allowDraftMode
480
480
  allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
481
481
  enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard,
482
+ mediaViewerExtensions: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.mediaViewerExtensions,
482
483
  nestedUnder
483
484
  };
484
485
  }
@@ -519,21 +520,21 @@ export default class ReactSerializer {
519
520
  };
520
521
  }
521
522
  getMediaGroupProps(node) {
522
- var _this$media3, _this$media4;
523
+ var _this$media4, _this$media5;
523
524
  return {
524
525
  ...this.getProps(node),
525
526
  shouldOpenMediaViewer: this.shouldOpenMediaViewer,
526
527
  allowAltTextOnImages: this.allowAltTextOnImages,
527
528
  featureFlags: this.media && this.media.featureFlags,
528
- enableDownloadButton: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.enableDownloadButton,
529
- ssr: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.ssr
529
+ enableDownloadButton: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.enableDownloadButton,
530
+ ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
530
531
  };
531
532
  }
532
533
  getMediaInlineProps(node) {
533
- var _this$media5;
534
+ var _this$media6;
534
535
  return {
535
536
  ...this.getProps(node),
536
- ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
537
+ ssr: (_this$media6 = this.media) === null || _this$media6 === void 0 ? void 0 : _this$media6.ssr
537
538
  };
538
539
  }
539
540
  getTaskItemProps(node, path = []) {
@@ -2,7 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  export default function DataConsumer(props) {
4
4
  const WrapperElement = props.isInline ? 'span' : 'div';
5
- return /*#__PURE__*/React.createElement(WrapperElement, _extends({
5
+ return /*#__PURE__*/React.createElement(WrapperElement
6
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
7
+ , _extends({
6
8
  "data-source": props.sources ? JSON.stringify(props.sources) : undefined,
7
9
  "data-mark-type": "dataConsumer"
8
10
  // Ignored via go/ees005