@atlaskit/renderer 114.5.5 → 114.6.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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 114.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#132819](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132819)
8
+ [`f873ba0617c6b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f873ba0617c6b) -
9
+ ED-2684 Cleaned up platform_editor_nested_tables_renderer_colgroup to true behaviour.
10
+ - Updated dependencies
11
+
12
+ ## 114.6.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#130223](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130223)
17
+ [`f39f31807f1d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f39f31807f1d2) -
18
+ Introduce a prop UNSTABLE_isPresentational in the renderer. When true, elements may render without
19
+ their default semantic roles (e.g., using role="presentation"), indicating that they are used
20
+ solely for layout or styling purposes. Elements currently affected: Tables.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 114.5.5
4
27
 
5
28
  ### Patch Changes
@@ -205,6 +205,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
205
205
  this.textHighlighter = init.textHighlighter;
206
206
  this.allowTableAlignment = init.allowTableAlignment;
207
207
  this.allowTableResizing = init.allowTableResizing;
208
+ this.isPresentational = init.isPresentational;
208
209
  }
209
210
  return (0, _createClass2.default)(ReactSerializer, [{
210
211
  key: "resetState",
@@ -417,7 +418,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
417
418
  isInsideOfTable: isInsideOfTable,
418
419
  isInsideMultiBodiedExtension: isInsideMultiBodiedExtension,
419
420
  allowTableAlignment: this.allowTableAlignment,
420
- allowTableResizing: this.allowTableResizing
421
+ allowTableResizing: this.allowTableResizing,
422
+ isPresentational: (0, _platformFeatureFlags.fg)('platform_renderer_isPresentational') ? this.isPresentational : false
421
423
  });
422
424
  }
423
425
  }, {
@@ -11,7 +11,6 @@ var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
13
  var _nodeWidth = require("@atlaskit/editor-common/node-width");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _useFeatureFlags = require("../../../use-feature-flags");
16
15
  var _rendererContext = require("../../../renderer-context");
17
16
  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; }
@@ -90,7 +89,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
90
89
  // appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
91
90
  // When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
92
91
  var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : (0, _nodeWidth.getTableContainerWidth)(tableNode);
93
- if (allowTableResizing && !isInsideOfBlockNode && !((0, _platformFeatureFlags.fg)('platform_editor_nested_tables_renderer_colgroup') && isInsideOfTable) && !isinsideMultiBodiedExtension && !tableColumnResized) {
92
+ if (allowTableResizing && !isInsideOfBlockNode && !isInsideOfTable && !isinsideMultiBodiedExtension && !tableColumnResized) {
94
93
  // when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
95
94
  var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
96
95
  var defaultColumnWidth = _tableWidth2 / noOfColumns;
@@ -5,10 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.Table = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _colgroup = require("./colgroup");
10
11
  var _nodeWidth = require("@atlaskit/editor-common/node-width");
11
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
14
  var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
13
15
  var _tableNode$attrs;
14
16
  var innerRef = _ref.innerRef,
@@ -22,7 +24,8 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
22
24
  isInsideOfBlockNode = _ref.isInsideOfBlockNode,
23
25
  isInsideOfTable = _ref.isInsideOfTable,
24
26
  isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
25
- allowTableResizing = _ref.allowTableResizing;
27
+ allowTableResizing = _ref.allowTableResizing,
28
+ isPresentational = _ref.isPresentational;
26
29
  var tableWidth = tableNode ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : _editorSharedStyles.akEditorDefaultLayoutWidth;
27
30
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
28
31
  tableWidth = 'inherit';
@@ -32,14 +35,16 @@ var Table = exports.Table = /*#__PURE__*/_react.default.memo(function (_ref) {
32
35
  }
33
36
  var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
34
37
  var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
35
- return /*#__PURE__*/_react.default.createElement("table", {
38
+ return /*#__PURE__*/_react.default.createElement("table", (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_renderer_isPresentational') && {
39
+ role: isPresentational ? 'presentation' : undefined
40
+ }, {
36
41
  "data-testid": "renderer-table",
37
42
  "data-number-column": isNumberColumnEnabled,
38
43
  "data-table-width": tableWidth,
39
44
  "data-layout": tableLayout,
40
45
  "data-table-display-mode": tableDisplayMode,
41
46
  ref: innerRef
42
- }, /*#__PURE__*/_react.default.createElement(_colgroup.Colgroup, {
47
+ }), /*#__PURE__*/_react.default.createElement(_colgroup.Colgroup, {
43
48
  columnWidths: columnWidths,
44
49
  layout: layout,
45
50
  isNumberColumnEnabled: isNumberColumnEnabled,
@@ -344,7 +344,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
344
344
  isInsideOfTable = _this$props.isInsideOfTable,
345
345
  isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
346
346
  allowTableAlignment = _this$props.allowTableAlignment,
347
- allowTableResizing = _this$props.allowTableResizing;
347
+ allowTableResizing = _this$props.allowTableResizing,
348
+ isPresentational = _this$props.isPresentational;
348
349
  var stickyMode = this.state.stickyMode;
349
350
  var lineLengthFixedWidth = _editorSharedStyles.akEditorDefaultLayoutWidth;
350
351
  var left;
@@ -495,7 +496,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
495
496
  isInsideOfBlockNode: isInsideOfBlockNode,
496
497
  isInsideOfTable: isInsideOfTable,
497
498
  isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
498
- allowTableResizing: allowTableResizing
499
+ allowTableResizing: allowTableResizing,
500
+ isPresentational: isPresentational
499
501
  }, this.grabFirstRowRef(children))), isStickyScrollbarEnabled(this.props.rendererAppearance) && /*#__PURE__*/_react.default.createElement("div", {
500
502
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
501
503
  className: _styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
@@ -67,7 +67,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
67
67
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
68
68
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
69
69
  var packageName = "@atlaskit/renderer";
70
- var packageVersion = "114.5.5";
70
+ var packageVersion = "114.6.1";
71
71
  var setAsQueryContainerStyles = (0, _react2.css)({
72
72
  containerName: 'ak-renderer-wrapper',
73
73
  containerType: 'inline-size',
@@ -258,7 +258,7 @@ var __RendererClassComponent = exports.__RendererClassComponent = /*#__PURE__*/f
258
258
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
259
259
  var nextMedia = nextProps.media || {};
260
260
  var media = this.props.media || {};
261
- if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
261
+ if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextProps.UNSTABLE_isPresentational !== this.props.UNSTABLE_isPresentational || nextMedia.allowLinking !== media.allowLinking) {
262
262
  this.serializer = new _.ReactSerializer(this.deriveSerializerProps(nextProps));
263
263
  }
264
264
  }
@@ -303,6 +303,7 @@ var __RendererClassComponent = exports.__RendererClassComponent = /*#__PURE__*/f
303
303
  allowSelectAllTrap: props.allowSelectAllTrap,
304
304
  allowPlaceholderText: props.allowPlaceholderText,
305
305
  nodeComponents: props.nodeComponents,
306
+ isPresentational: props.UNSTABLE_isPresentational,
306
307
  // does not currently support SSR, should not be enabled in environments where Renderer is SSR-ed
307
308
  allowWindowedCodeBlock: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.allowWindowedCodeBlock,
308
309
  isInsideOfInlineExtension: props.isInsideOfInlineExtension,
@@ -641,6 +642,7 @@ var RendererFunctionalComponent = function RendererFunctionalComponent(props) {
641
642
  nodeComponents: props.nodeComponents,
642
643
  allowWindowedCodeBlock: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.allowWindowedCodeBlock,
643
644
  isInsideOfInlineExtension: props.isInsideOfInlineExtension,
645
+ isPresentational: props.UNSTABLE_isPresentational,
644
646
  textHighlighter: props.textHighlighter || props.UNSTABLE_textHighlighter,
645
647
  allowTableAlignment: props.UNSTABLE_allowTableAlignment,
646
648
  allowTableResizing: props.UNSTABLE_allowTableResizing
@@ -191,6 +191,7 @@ export default class ReactSerializer {
191
191
  this.textHighlighter = init.textHighlighter;
192
192
  this.allowTableAlignment = init.allowTableAlignment;
193
193
  this.allowTableResizing = init.allowTableResizing;
194
+ this.isPresentational = init.isPresentational;
194
195
  }
195
196
  resetState() {
196
197
  this.headingIds = [];
@@ -385,7 +386,8 @@ export default class ReactSerializer {
385
386
  isInsideOfTable,
386
387
  isInsideMultiBodiedExtension,
387
388
  allowTableAlignment: this.allowTableAlignment,
388
- allowTableResizing: this.allowTableResizing
389
+ allowTableResizing: this.allowTableResizing,
390
+ isPresentational: fg('platform_renderer_isPresentational') ? this.isPresentational : false
389
391
  };
390
392
  }
391
393
  getDateProps(node, parentInfo, path = []) {
@@ -3,7 +3,6 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
3
3
  import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
4
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { useFeatureFlags } from '../../../use-feature-flags';
8
7
  import { useRendererContext } from '../../../renderer-context';
9
8
 
@@ -78,7 +77,7 @@ const renderScaleDownColgroup = props => {
78
77
  // appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
79
78
  // When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
80
79
  const tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : getTableContainerWidth(tableNode);
81
- if (allowTableResizing && !isInsideOfBlockNode && !(fg('platform_editor_nested_tables_renderer_colgroup') && isInsideOfTable) && !isinsideMultiBodiedExtension && !tableColumnResized) {
80
+ if (allowTableResizing && !isInsideOfBlockNode && !isInsideOfTable && !isinsideMultiBodiedExtension && !tableColumnResized) {
82
81
  // when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
83
82
  const tableWidth = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
84
83
  const defaultColumnWidth = tableWidth / noOfColumns;
@@ -1,7 +1,9 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import React from 'react';
2
3
  import { Colgroup } from './colgroup';
3
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
4
5
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
5
7
  export const Table = /*#__PURE__*/React.memo(({
6
8
  innerRef,
7
9
  isNumberColumnEnabled,
@@ -14,7 +16,8 @@ export const Table = /*#__PURE__*/React.memo(({
14
16
  isInsideOfBlockNode,
15
17
  isInsideOfTable,
16
18
  isinsideMultiBodiedExtension,
17
- allowTableResizing
19
+ allowTableResizing,
20
+ isPresentational
18
21
  }) => {
19
22
  var _tableNode$attrs;
20
23
  let tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
@@ -26,14 +29,16 @@ export const Table = /*#__PURE__*/React.memo(({
26
29
  }
27
30
  const tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
28
31
  const tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
29
- return /*#__PURE__*/React.createElement("table", {
32
+ return /*#__PURE__*/React.createElement("table", _extends({}, fg('platform_renderer_isPresentational') && {
33
+ role: isPresentational ? 'presentation' : undefined
34
+ }, {
30
35
  "data-testid": "renderer-table",
31
36
  "data-number-column": isNumberColumnEnabled,
32
37
  "data-table-width": tableWidth,
33
38
  "data-layout": tableLayout,
34
39
  "data-table-display-mode": tableDisplayMode,
35
40
  ref: innerRef
36
- }, /*#__PURE__*/React.createElement(Colgroup, {
41
+ }), /*#__PURE__*/React.createElement(Colgroup, {
37
42
  columnWidths: columnWidths,
38
43
  layout: layout,
39
44
  isNumberColumnEnabled: isNumberColumnEnabled,
@@ -287,7 +287,8 @@ export class TableContainer extends React.Component {
287
287
  isInsideOfTable,
288
288
  isinsideMultiBodiedExtension,
289
289
  allowTableAlignment,
290
- allowTableResizing
290
+ allowTableResizing,
291
+ isPresentational
291
292
  } = this.props;
292
293
  const {
293
294
  stickyMode
@@ -438,7 +439,8 @@ export class TableContainer extends React.Component {
438
439
  isInsideOfBlockNode: isInsideOfBlockNode,
439
440
  isInsideOfTable: isInsideOfTable,
440
441
  isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
441
- allowTableResizing: allowTableResizing
442
+ allowTableResizing: allowTableResizing,
443
+ isPresentational: isPresentational
442
444
  }, this.grabFirstRowRef(children))), isStickyScrollbarEnabled(this.props.rendererAppearance) && /*#__PURE__*/React.createElement("div", {
443
445
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
444
446
  className: TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
@@ -48,7 +48,7 @@ import { removeEmptySpaceAroundContent } from './rendererHelper';
48
48
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  const packageName = "@atlaskit/renderer";
51
- const packageVersion = "114.5.5";
51
+ const packageVersion = "114.6.1";
52
52
  const setAsQueryContainerStyles = css({
53
53
  containerName: 'ak-renderer-wrapper',
54
54
  containerType: 'inline-size',
@@ -236,7 +236,7 @@ export class __RendererClassComponent extends PureComponent {
236
236
  UNSAFE_componentWillReceiveProps(nextProps) {
237
237
  const nextMedia = nextProps.media || {};
238
238
  const media = this.props.media || {};
239
- if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
239
+ if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextProps.UNSTABLE_isPresentational !== this.props.UNSTABLE_isPresentational || nextMedia.allowLinking !== media.allowLinking) {
240
240
  this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
241
241
  }
242
242
  }
@@ -283,6 +283,7 @@ export class __RendererClassComponent extends PureComponent {
283
283
  allowSelectAllTrap: props.allowSelectAllTrap,
284
284
  allowPlaceholderText: props.allowPlaceholderText,
285
285
  nodeComponents: props.nodeComponents,
286
+ isPresentational: props.UNSTABLE_isPresentational,
286
287
  // does not currently support SSR, should not be enabled in environments where Renderer is SSR-ed
287
288
  allowWindowedCodeBlock: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.allowWindowedCodeBlock,
288
289
  isInsideOfInlineExtension: props.isInsideOfInlineExtension,
@@ -621,6 +622,7 @@ const RendererFunctionalComponent = props => {
621
622
  nodeComponents: props.nodeComponents,
622
623
  allowWindowedCodeBlock: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.allowWindowedCodeBlock,
623
624
  isInsideOfInlineExtension: props.isInsideOfInlineExtension,
625
+ isPresentational: props.UNSTABLE_isPresentational,
624
626
  textHighlighter: props.textHighlighter || props.UNSTABLE_textHighlighter,
625
627
  allowTableAlignment: props.UNSTABLE_allowTableAlignment,
626
628
  allowTableResizing: props.UNSTABLE_allowTableResizing
@@ -198,6 +198,7 @@ var ReactSerializer = /*#__PURE__*/function () {
198
198
  this.textHighlighter = init.textHighlighter;
199
199
  this.allowTableAlignment = init.allowTableAlignment;
200
200
  this.allowTableResizing = init.allowTableResizing;
201
+ this.isPresentational = init.isPresentational;
201
202
  }
202
203
  return _createClass(ReactSerializer, [{
203
204
  key: "resetState",
@@ -410,7 +411,8 @@ var ReactSerializer = /*#__PURE__*/function () {
410
411
  isInsideOfTable: isInsideOfTable,
411
412
  isInsideMultiBodiedExtension: isInsideMultiBodiedExtension,
412
413
  allowTableAlignment: this.allowTableAlignment,
413
- allowTableResizing: this.allowTableResizing
414
+ allowTableResizing: this.allowTableResizing,
415
+ isPresentational: fg('platform_renderer_isPresentational') ? this.isPresentational : false
414
416
  });
415
417
  }
416
418
  }, {
@@ -6,7 +6,6 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
6
6
  import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
8
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { useFeatureFlags } from '../../../use-feature-flags';
11
10
  import { useRendererContext } from '../../../renderer-context';
12
11
 
@@ -84,7 +83,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
84
83
  // appearance == comment && !allowTableResizing && !tableNode?.attrs.width, means it is a inline comment
85
84
  // When comment and inline comment table width inherits from the parent container, we want tableContainerWidth === renderWidth
86
85
  var tableContainerWidth = rendererAppearance === 'comment' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) || isRendererNested ? renderWidth : getTableContainerWidth(tableNode);
87
- if (allowTableResizing && !isInsideOfBlockNode && !(fg('platform_editor_nested_tables_renderer_colgroup') && isInsideOfTable) && !isinsideMultiBodiedExtension && !tableColumnResized) {
86
+ if (allowTableResizing && !isInsideOfBlockNode && !isInsideOfTable && !isinsideMultiBodiedExtension && !tableColumnResized) {
88
87
  // when no columns are resized, each column should have equal width, equals to tableWidth / noOfColumns
89
88
  var _tableWidth2 = (isNumberColumnEnabled ? tableContainerWidth - akEditorTableNumberColumnWidth : tableContainerWidth) - 1;
90
89
  var defaultColumnWidth = _tableWidth2 / noOfColumns;
@@ -1,7 +1,9 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import React from 'react';
2
3
  import { Colgroup } from './colgroup';
3
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
4
5
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
5
7
  export var Table = /*#__PURE__*/React.memo(function (_ref) {
6
8
  var _tableNode$attrs;
7
9
  var innerRef = _ref.innerRef,
@@ -15,7 +17,8 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
15
17
  isInsideOfBlockNode = _ref.isInsideOfBlockNode,
16
18
  isInsideOfTable = _ref.isInsideOfTable,
17
19
  isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension,
18
- allowTableResizing = _ref.allowTableResizing;
20
+ allowTableResizing = _ref.allowTableResizing,
21
+ isPresentational = _ref.isPresentational;
19
22
  var tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
20
23
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
21
24
  tableWidth = 'inherit';
@@ -25,14 +28,16 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
25
28
  }
26
29
  var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
27
30
  var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
28
- return /*#__PURE__*/React.createElement("table", {
31
+ return /*#__PURE__*/React.createElement("table", _extends({}, fg('platform_renderer_isPresentational') && {
32
+ role: isPresentational ? 'presentation' : undefined
33
+ }, {
29
34
  "data-testid": "renderer-table",
30
35
  "data-number-column": isNumberColumnEnabled,
31
36
  "data-table-width": tableWidth,
32
37
  "data-layout": tableLayout,
33
38
  "data-table-display-mode": tableDisplayMode,
34
39
  ref: innerRef
35
- }, /*#__PURE__*/React.createElement(Colgroup, {
40
+ }), /*#__PURE__*/React.createElement(Colgroup, {
36
41
  columnWidths: columnWidths,
37
42
  layout: layout,
38
43
  isNumberColumnEnabled: isNumberColumnEnabled,
@@ -337,7 +337,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
337
337
  isInsideOfTable = _this$props.isInsideOfTable,
338
338
  isinsideMultiBodiedExtension = _this$props.isinsideMultiBodiedExtension,
339
339
  allowTableAlignment = _this$props.allowTableAlignment,
340
- allowTableResizing = _this$props.allowTableResizing;
340
+ allowTableResizing = _this$props.allowTableResizing,
341
+ isPresentational = _this$props.isPresentational;
341
342
  var stickyMode = this.state.stickyMode;
342
343
  var lineLengthFixedWidth = akEditorDefaultLayoutWidth;
343
344
  var left;
@@ -488,7 +489,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
488
489
  isInsideOfBlockNode: isInsideOfBlockNode,
489
490
  isInsideOfTable: isInsideOfTable,
490
491
  isinsideMultiBodiedExtension: isinsideMultiBodiedExtension,
491
- allowTableResizing: allowTableResizing
492
+ allowTableResizing: allowTableResizing,
493
+ isPresentational: isPresentational
492
494
  }, this.grabFirstRowRef(children))), isStickyScrollbarEnabled(this.props.rendererAppearance) && /*#__PURE__*/React.createElement("div", {
493
495
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
494
496
  className: TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
@@ -57,7 +57,7 @@ import { removeEmptySpaceAroundContent } from './rendererHelper';
57
57
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
58
58
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  var packageName = "@atlaskit/renderer";
60
- var packageVersion = "114.5.5";
60
+ var packageVersion = "114.6.1";
61
61
  var setAsQueryContainerStyles = css({
62
62
  containerName: 'ak-renderer-wrapper',
63
63
  containerType: 'inline-size',
@@ -248,7 +248,7 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
248
248
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
249
249
  var nextMedia = nextProps.media || {};
250
250
  var media = this.props.media || {};
251
- if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
251
+ if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.extensionHandlers !== this.props.extensionHandlers || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextProps.UNSTABLE_isPresentational !== this.props.UNSTABLE_isPresentational || nextMedia.allowLinking !== media.allowLinking) {
252
252
  this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
253
253
  }
254
254
  }
@@ -293,6 +293,7 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
293
293
  allowSelectAllTrap: props.allowSelectAllTrap,
294
294
  allowPlaceholderText: props.allowPlaceholderText,
295
295
  nodeComponents: props.nodeComponents,
296
+ isPresentational: props.UNSTABLE_isPresentational,
296
297
  // does not currently support SSR, should not be enabled in environments where Renderer is SSR-ed
297
298
  allowWindowedCodeBlock: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.allowWindowedCodeBlock,
298
299
  isInsideOfInlineExtension: props.isInsideOfInlineExtension,
@@ -631,6 +632,7 @@ var RendererFunctionalComponent = function RendererFunctionalComponent(props) {
631
632
  nodeComponents: props.nodeComponents,
632
633
  allowWindowedCodeBlock: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.allowWindowedCodeBlock,
633
634
  isInsideOfInlineExtension: props.isInsideOfInlineExtension,
635
+ isPresentational: props.UNSTABLE_isPresentational,
634
636
  textHighlighter: props.textHighlighter || props.UNSTABLE_textHighlighter,
635
637
  allowTableAlignment: props.UNSTABLE_allowTableAlignment,
636
638
  allowTableResizing: props.UNSTABLE_allowTableResizing
@@ -50,6 +50,7 @@ export interface ReactSerializerInit {
50
50
  textHighlighter?: TextHighlighter;
51
51
  allowTableAlignment?: boolean;
52
52
  allowTableResizing?: boolean;
53
+ isPresentational?: boolean;
53
54
  }
54
55
  interface ParentInfo {
55
56
  parentIsIncompleteTask: boolean;
@@ -101,6 +102,7 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
101
102
  private textHighlighter?;
102
103
  private allowTableAlignment?;
103
104
  private allowTableResizing?;
105
+ private isPresentational?;
104
106
  constructor(init: ReactSerializerInit);
105
107
  private resetState;
106
108
  private getNodeProps;
@@ -3,6 +3,7 @@ import type { SharedTableProps } from './types';
3
3
  type TableProps = SharedTableProps & {
4
4
  innerRef?: React.RefObject<HTMLTableElement>;
5
5
  children: React.ReactNode[];
6
+ isPresentational?: boolean;
6
7
  };
7
- export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, }: TableProps) => React.JSX.Element>;
8
+ export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, isPresentational, }: TableProps) => React.JSX.Element>;
8
9
  export {};
@@ -18,6 +18,7 @@ type TableProps = SharedTableProps & {
18
18
  stickyHeaders?: StickyHeaderConfig;
19
19
  allowTableAlignment?: boolean;
20
20
  allowTableResizing?: boolean;
21
+ isPresentational?: boolean;
21
22
  };
22
23
  interface TableOrderStatus {
23
24
  columnIndex: number;
@@ -76,6 +77,7 @@ declare const _default: {
76
77
  stickyHeaders?: StickyHeaderConfig | undefined;
77
78
  allowTableAlignment?: boolean | undefined;
78
79
  allowTableResizing?: boolean | undefined;
80
+ isPresentational?: boolean | undefined;
79
81
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps> | Readonly<import("@atlaskit/editor-common/utils").Diff<{
80
82
  renderWidth?: number | undefined;
81
83
  } & Omit<SharedTableProps & {
@@ -86,6 +88,7 @@ declare const _default: {
86
88
  stickyHeaders?: StickyHeaderConfig | undefined;
87
89
  allowTableAlignment?: boolean | undefined;
88
90
  allowTableResizing?: boolean | undefined;
91
+ isPresentational?: boolean | undefined;
89
92
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>): {
90
93
  render(): React.JSX.Element;
91
94
  context: unknown;
@@ -99,6 +102,7 @@ declare const _default: {
99
102
  stickyHeaders?: StickyHeaderConfig | undefined;
100
103
  allowTableAlignment?: boolean | undefined;
101
104
  allowTableResizing?: boolean | undefined;
105
+ isPresentational?: boolean | undefined;
102
106
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
103
107
  forceUpdate(callback?: (() => void) | undefined): void;
104
108
  readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
@@ -111,6 +115,7 @@ declare const _default: {
111
115
  stickyHeaders?: StickyHeaderConfig | undefined;
112
116
  allowTableAlignment?: boolean | undefined;
113
117
  allowTableResizing?: boolean | undefined;
118
+ isPresentational?: boolean | undefined;
114
119
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
115
120
  state: Readonly<{}>;
116
121
  refs: {
@@ -127,6 +132,7 @@ declare const _default: {
127
132
  stickyHeaders?: StickyHeaderConfig | undefined;
128
133
  allowTableAlignment?: boolean | undefined;
129
134
  allowTableResizing?: boolean | undefined;
135
+ isPresentational?: boolean | undefined;
130
136
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
131
137
  componentWillUnmount?(): void;
132
138
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
@@ -140,6 +146,7 @@ declare const _default: {
140
146
  stickyHeaders?: StickyHeaderConfig | undefined;
141
147
  allowTableAlignment?: boolean | undefined;
142
148
  allowTableResizing?: boolean | undefined;
149
+ isPresentational?: boolean | undefined;
143
150
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
144
151
  componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
145
152
  renderWidth?: number | undefined;
@@ -151,6 +158,7 @@ declare const _default: {
151
158
  stickyHeaders?: StickyHeaderConfig | undefined;
152
159
  allowTableAlignment?: boolean | undefined;
153
160
  allowTableResizing?: boolean | undefined;
161
+ isPresentational?: boolean | undefined;
154
162
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
155
163
  componentWillMount?(): void;
156
164
  UNSAFE_componentWillMount?(): void;
@@ -164,6 +172,7 @@ declare const _default: {
164
172
  stickyHeaders?: StickyHeaderConfig | undefined;
165
173
  allowTableAlignment?: boolean | undefined;
166
174
  allowTableResizing?: boolean | undefined;
175
+ isPresentational?: boolean | undefined;
167
176
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
168
177
  UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
169
178
  renderWidth?: number | undefined;
@@ -175,6 +184,7 @@ declare const _default: {
175
184
  stickyHeaders?: StickyHeaderConfig | undefined;
176
185
  allowTableAlignment?: boolean | undefined;
177
186
  allowTableResizing?: boolean | undefined;
187
+ isPresentational?: boolean | undefined;
178
188
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
179
189
  componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
180
190
  renderWidth?: number | undefined;
@@ -186,6 +196,7 @@ declare const _default: {
186
196
  stickyHeaders?: StickyHeaderConfig | undefined;
187
197
  allowTableAlignment?: boolean | undefined;
188
198
  allowTableResizing?: boolean | undefined;
199
+ isPresentational?: boolean | undefined;
189
200
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
190
201
  UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
191
202
  renderWidth?: number | undefined;
@@ -197,6 +208,7 @@ declare const _default: {
197
208
  stickyHeaders?: StickyHeaderConfig | undefined;
198
209
  allowTableAlignment?: boolean | undefined;
199
210
  allowTableResizing?: boolean | undefined;
211
+ isPresentational?: boolean | undefined;
200
212
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
201
213
  };
202
214
  new (props: import("@atlaskit/editor-common/utils").Diff<{
@@ -209,6 +221,7 @@ declare const _default: {
209
221
  stickyHeaders?: StickyHeaderConfig | undefined;
210
222
  allowTableAlignment?: boolean | undefined;
211
223
  allowTableResizing?: boolean | undefined;
224
+ isPresentational?: boolean | undefined;
212
225
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>, context: any): {
213
226
  render(): React.JSX.Element;
214
227
  context: unknown;
@@ -222,6 +235,7 @@ declare const _default: {
222
235
  stickyHeaders?: StickyHeaderConfig | undefined;
223
236
  allowTableAlignment?: boolean | undefined;
224
237
  allowTableResizing?: boolean | undefined;
238
+ isPresentational?: boolean | undefined;
225
239
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
226
240
  forceUpdate(callback?: (() => void) | undefined): void;
227
241
  readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
@@ -234,6 +248,7 @@ declare const _default: {
234
248
  stickyHeaders?: StickyHeaderConfig | undefined;
235
249
  allowTableAlignment?: boolean | undefined;
236
250
  allowTableResizing?: boolean | undefined;
251
+ isPresentational?: boolean | undefined;
237
252
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
238
253
  state: Readonly<{}>;
239
254
  refs: {
@@ -250,6 +265,7 @@ declare const _default: {
250
265
  stickyHeaders?: StickyHeaderConfig | undefined;
251
266
  allowTableAlignment?: boolean | undefined;
252
267
  allowTableResizing?: boolean | undefined;
268
+ isPresentational?: boolean | undefined;
253
269
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
254
270
  componentWillUnmount?(): void;
255
271
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
@@ -263,6 +279,7 @@ declare const _default: {
263
279
  stickyHeaders?: StickyHeaderConfig | undefined;
264
280
  allowTableAlignment?: boolean | undefined;
265
281
  allowTableResizing?: boolean | undefined;
282
+ isPresentational?: boolean | undefined;
266
283
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
267
284
  componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
268
285
  renderWidth?: number | undefined;
@@ -274,6 +291,7 @@ declare const _default: {
274
291
  stickyHeaders?: StickyHeaderConfig | undefined;
275
292
  allowTableAlignment?: boolean | undefined;
276
293
  allowTableResizing?: boolean | undefined;
294
+ isPresentational?: boolean | undefined;
277
295
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
278
296
  componentWillMount?(): void;
279
297
  UNSAFE_componentWillMount?(): void;
@@ -287,6 +305,7 @@ declare const _default: {
287
305
  stickyHeaders?: StickyHeaderConfig | undefined;
288
306
  allowTableAlignment?: boolean | undefined;
289
307
  allowTableResizing?: boolean | undefined;
308
+ isPresentational?: boolean | undefined;
290
309
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
291
310
  UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
292
311
  renderWidth?: number | undefined;
@@ -298,6 +317,7 @@ declare const _default: {
298
317
  stickyHeaders?: StickyHeaderConfig | undefined;
299
318
  allowTableAlignment?: boolean | undefined;
300
319
  allowTableResizing?: boolean | undefined;
320
+ isPresentational?: boolean | undefined;
301
321
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
302
322
  componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
303
323
  renderWidth?: number | undefined;
@@ -309,6 +329,7 @@ declare const _default: {
309
329
  stickyHeaders?: StickyHeaderConfig | undefined;
310
330
  allowTableAlignment?: boolean | undefined;
311
331
  allowTableResizing?: boolean | undefined;
332
+ isPresentational?: boolean | undefined;
312
333
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
313
334
  UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
314
335
  renderWidth?: number | undefined;
@@ -320,6 +341,7 @@ declare const _default: {
320
341
  stickyHeaders?: StickyHeaderConfig | undefined;
321
342
  allowTableAlignment?: boolean | undefined;
322
343
  allowTableResizing?: boolean | undefined;
344
+ isPresentational?: boolean | undefined;
323
345
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
324
346
  };
325
347
  contextType?: React.Context<any> | undefined;
@@ -80,6 +80,12 @@ export interface RendererProps {
80
80
  */
81
81
  addTelepointer?: boolean;
82
82
  textHighlighter?: TextHighlighter;
83
+ /**
84
+ * When true, elements may render without their default semantic roles
85
+ * (e.g., using role="presentation"), indicating that they are used solely for layout or styling purposes.
86
+ * Elements currently affected: Tables.
87
+ */
88
+ UNSTABLE_isPresentational?: boolean;
83
89
  /**
84
90
  * @default undefined
85
91
  * @description
@@ -50,6 +50,7 @@ export interface ReactSerializerInit {
50
50
  textHighlighter?: TextHighlighter;
51
51
  allowTableAlignment?: boolean;
52
52
  allowTableResizing?: boolean;
53
+ isPresentational?: boolean;
53
54
  }
54
55
  interface ParentInfo {
55
56
  parentIsIncompleteTask: boolean;
@@ -101,6 +102,7 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
101
102
  private textHighlighter?;
102
103
  private allowTableAlignment?;
103
104
  private allowTableResizing?;
105
+ private isPresentational?;
104
106
  constructor(init: ReactSerializerInit);
105
107
  private resetState;
106
108
  private getNodeProps;
@@ -3,6 +3,7 @@ import type { SharedTableProps } from './types';
3
3
  type TableProps = SharedTableProps & {
4
4
  innerRef?: React.RefObject<HTMLTableElement>;
5
5
  children: React.ReactNode[];
6
+ isPresentational?: boolean;
6
7
  };
7
- export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, }: TableProps) => React.JSX.Element>;
8
+ export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, tableNode, rendererAppearance, isInsideOfBlockNode, isInsideOfTable, isinsideMultiBodiedExtension, allowTableResizing, isPresentational, }: TableProps) => React.JSX.Element>;
8
9
  export {};
@@ -18,6 +18,7 @@ type TableProps = SharedTableProps & {
18
18
  stickyHeaders?: StickyHeaderConfig;
19
19
  allowTableAlignment?: boolean;
20
20
  allowTableResizing?: boolean;
21
+ isPresentational?: boolean;
21
22
  };
22
23
  interface TableOrderStatus {
23
24
  columnIndex: number;
@@ -76,6 +77,7 @@ declare const _default: {
76
77
  stickyHeaders?: StickyHeaderConfig | undefined;
77
78
  allowTableAlignment?: boolean | undefined;
78
79
  allowTableResizing?: boolean | undefined;
80
+ isPresentational?: boolean | undefined;
79
81
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps> | Readonly<import("@atlaskit/editor-common/utils").Diff<{
80
82
  renderWidth?: number | undefined;
81
83
  } & Omit<SharedTableProps & {
@@ -86,6 +88,7 @@ declare const _default: {
86
88
  stickyHeaders?: StickyHeaderConfig | undefined;
87
89
  allowTableAlignment?: boolean | undefined;
88
90
  allowTableResizing?: boolean | undefined;
91
+ isPresentational?: boolean | undefined;
89
92
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>): {
90
93
  render(): React.JSX.Element;
91
94
  context: unknown;
@@ -99,6 +102,7 @@ declare const _default: {
99
102
  stickyHeaders?: StickyHeaderConfig | undefined;
100
103
  allowTableAlignment?: boolean | undefined;
101
104
  allowTableResizing?: boolean | undefined;
105
+ isPresentational?: boolean | undefined;
102
106
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
103
107
  forceUpdate(callback?: (() => void) | undefined): void;
104
108
  readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
@@ -111,6 +115,7 @@ declare const _default: {
111
115
  stickyHeaders?: StickyHeaderConfig | undefined;
112
116
  allowTableAlignment?: boolean | undefined;
113
117
  allowTableResizing?: boolean | undefined;
118
+ isPresentational?: boolean | undefined;
114
119
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
115
120
  state: Readonly<{}>;
116
121
  refs: {
@@ -127,6 +132,7 @@ declare const _default: {
127
132
  stickyHeaders?: StickyHeaderConfig | undefined;
128
133
  allowTableAlignment?: boolean | undefined;
129
134
  allowTableResizing?: boolean | undefined;
135
+ isPresentational?: boolean | undefined;
130
136
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
131
137
  componentWillUnmount?(): void;
132
138
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
@@ -140,6 +146,7 @@ declare const _default: {
140
146
  stickyHeaders?: StickyHeaderConfig | undefined;
141
147
  allowTableAlignment?: boolean | undefined;
142
148
  allowTableResizing?: boolean | undefined;
149
+ isPresentational?: boolean | undefined;
143
150
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
144
151
  componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
145
152
  renderWidth?: number | undefined;
@@ -151,6 +158,7 @@ declare const _default: {
151
158
  stickyHeaders?: StickyHeaderConfig | undefined;
152
159
  allowTableAlignment?: boolean | undefined;
153
160
  allowTableResizing?: boolean | undefined;
161
+ isPresentational?: boolean | undefined;
154
162
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
155
163
  componentWillMount?(): void;
156
164
  UNSAFE_componentWillMount?(): void;
@@ -164,6 +172,7 @@ declare const _default: {
164
172
  stickyHeaders?: StickyHeaderConfig | undefined;
165
173
  allowTableAlignment?: boolean | undefined;
166
174
  allowTableResizing?: boolean | undefined;
175
+ isPresentational?: boolean | undefined;
167
176
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
168
177
  UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
169
178
  renderWidth?: number | undefined;
@@ -175,6 +184,7 @@ declare const _default: {
175
184
  stickyHeaders?: StickyHeaderConfig | undefined;
176
185
  allowTableAlignment?: boolean | undefined;
177
186
  allowTableResizing?: boolean | undefined;
187
+ isPresentational?: boolean | undefined;
178
188
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
179
189
  componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
180
190
  renderWidth?: number | undefined;
@@ -186,6 +196,7 @@ declare const _default: {
186
196
  stickyHeaders?: StickyHeaderConfig | undefined;
187
197
  allowTableAlignment?: boolean | undefined;
188
198
  allowTableResizing?: boolean | undefined;
199
+ isPresentational?: boolean | undefined;
189
200
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
190
201
  UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
191
202
  renderWidth?: number | undefined;
@@ -197,6 +208,7 @@ declare const _default: {
197
208
  stickyHeaders?: StickyHeaderConfig | undefined;
198
209
  allowTableAlignment?: boolean | undefined;
199
210
  allowTableResizing?: boolean | undefined;
211
+ isPresentational?: boolean | undefined;
200
212
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
201
213
  };
202
214
  new (props: import("@atlaskit/editor-common/utils").Diff<{
@@ -209,6 +221,7 @@ declare const _default: {
209
221
  stickyHeaders?: StickyHeaderConfig | undefined;
210
222
  allowTableAlignment?: boolean | undefined;
211
223
  allowTableResizing?: boolean | undefined;
224
+ isPresentational?: boolean | undefined;
212
225
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>, context: any): {
213
226
  render(): React.JSX.Element;
214
227
  context: unknown;
@@ -222,6 +235,7 @@ declare const _default: {
222
235
  stickyHeaders?: StickyHeaderConfig | undefined;
223
236
  allowTableAlignment?: boolean | undefined;
224
237
  allowTableResizing?: boolean | undefined;
238
+ isPresentational?: boolean | undefined;
225
239
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
226
240
  forceUpdate(callback?: (() => void) | undefined): void;
227
241
  readonly props: Readonly<import("@atlaskit/editor-common/utils").Diff<{
@@ -234,6 +248,7 @@ declare const _default: {
234
248
  stickyHeaders?: StickyHeaderConfig | undefined;
235
249
  allowTableAlignment?: boolean | undefined;
236
250
  allowTableResizing?: boolean | undefined;
251
+ isPresentational?: boolean | undefined;
237
252
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>;
238
253
  state: Readonly<{}>;
239
254
  refs: {
@@ -250,6 +265,7 @@ declare const _default: {
250
265
  stickyHeaders?: StickyHeaderConfig | undefined;
251
266
  allowTableAlignment?: boolean | undefined;
252
267
  allowTableResizing?: boolean | undefined;
268
+ isPresentational?: boolean | undefined;
253
269
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
254
270
  componentWillUnmount?(): void;
255
271
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
@@ -263,6 +279,7 @@ declare const _default: {
263
279
  stickyHeaders?: StickyHeaderConfig | undefined;
264
280
  allowTableAlignment?: boolean | undefined;
265
281
  allowTableResizing?: boolean | undefined;
282
+ isPresentational?: boolean | undefined;
266
283
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
267
284
  componentDidUpdate?(prevProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
268
285
  renderWidth?: number | undefined;
@@ -274,6 +291,7 @@ declare const _default: {
274
291
  stickyHeaders?: StickyHeaderConfig | undefined;
275
292
  allowTableAlignment?: boolean | undefined;
276
293
  allowTableResizing?: boolean | undefined;
294
+ isPresentational?: boolean | undefined;
277
295
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
278
296
  componentWillMount?(): void;
279
297
  UNSAFE_componentWillMount?(): void;
@@ -287,6 +305,7 @@ declare const _default: {
287
305
  stickyHeaders?: StickyHeaderConfig | undefined;
288
306
  allowTableAlignment?: boolean | undefined;
289
307
  allowTableResizing?: boolean | undefined;
308
+ isPresentational?: boolean | undefined;
290
309
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
291
310
  UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
292
311
  renderWidth?: number | undefined;
@@ -298,6 +317,7 @@ declare const _default: {
298
317
  stickyHeaders?: StickyHeaderConfig | undefined;
299
318
  allowTableAlignment?: boolean | undefined;
300
319
  allowTableResizing?: boolean | undefined;
320
+ isPresentational?: boolean | undefined;
301
321
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextContext: any): void;
302
322
  componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
303
323
  renderWidth?: number | undefined;
@@ -309,6 +329,7 @@ declare const _default: {
309
329
  stickyHeaders?: StickyHeaderConfig | undefined;
310
330
  allowTableAlignment?: boolean | undefined;
311
331
  allowTableResizing?: boolean | undefined;
332
+ isPresentational?: boolean | undefined;
312
333
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
313
334
  UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@atlaskit/editor-common/utils").Diff<{
314
335
  renderWidth?: number | undefined;
@@ -320,6 +341,7 @@ declare const _default: {
320
341
  stickyHeaders?: StickyHeaderConfig | undefined;
321
342
  allowTableAlignment?: boolean | undefined;
322
343
  allowTableResizing?: boolean | undefined;
344
+ isPresentational?: boolean | undefined;
323
345
  } & WithSmartCardStorageProps, "renderWidth">, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
324
346
  };
325
347
  contextType?: React.Context<any> | undefined;
@@ -80,6 +80,12 @@ export interface RendererProps {
80
80
  */
81
81
  addTelepointer?: boolean;
82
82
  textHighlighter?: TextHighlighter;
83
+ /**
84
+ * When true, elements may render without their default semantic roles
85
+ * (e.g., using role="presentation"), indicating that they are used solely for layout or styling purposes.
86
+ * Elements currently affected: Tables.
87
+ */
88
+ UNSTABLE_isPresentational?: boolean;
83
89
  /**
84
90
  * @default undefined
85
91
  * @description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "114.5.5",
3
+ "version": "114.6.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -172,9 +172,6 @@
172
172
  "platform_editor_accessible_heading_copy_link": {
173
173
  "type": "boolean"
174
174
  },
175
- "platform_editor_nested_tables_renderer_colgroup": {
176
- "type": "boolean"
177
- },
178
175
  "use_comments_data_annotation_updater": {
179
176
  "type": "boolean"
180
177
  },
@@ -200,6 +197,9 @@
200
197
  },
201
198
  "platform_editor_tables_numbered_column_correction": {
202
199
  "type": "boolean"
200
+ },
201
+ "platform_renderer_isPresentational": {
202
+ "type": "boolean"
203
203
  }
204
204
  },
205
205
  "af:exports": {