@atlaskit/renderer 111.1.3 → 111.1.5

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,22 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 111.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149031](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149031)
8
+ [`e6c17327bfead`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e6c17327bfead) -
9
+ Adds presentation role to hr tag for accessibility compliance
10
+
11
+ ## 111.1.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [#148229](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148229)
16
+ [`e79a40a7122b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e79a40a7122b6) -
17
+ Fix table offset in renderer when SSR fix is enabled
18
+ - Updated dependencies
19
+
3
20
  ## 111.1.3
4
21
 
5
22
  ### Patch Changes
@@ -7,5 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = Rule;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  function Rule() {
10
- return /*#__PURE__*/_react.default.createElement("hr", null);
10
+ return /*#__PURE__*/_react.default.createElement("hr", {
11
+ role: "presentation"
12
+ });
11
13
  }
@@ -124,9 +124,6 @@ var isHeaderRowEnabled = function isHeaderRowEnabled(rows) {
124
124
  var tableCanBeSticky = function tableCanBeSticky(node, children) {
125
125
  return isHeaderRowEnabled(children) && node && node.firstChild && !hasRowspan(node.firstChild);
126
126
  };
127
- var canUseLinelength = function canUseLinelength(appearance) {
128
- return appearance === 'full-page';
129
- };
130
127
  var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Component) {
131
128
  (0, _inherits2.default)(TableContainer, _React$Component);
132
129
  var _super = _createSuper(TableContainer);
@@ -363,9 +360,17 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
363
360
  left = (tableWidth - lineLength) / 2;
364
361
  leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
365
362
  }
366
- if (!shouldCalculateLeftForAlignment && canUseLinelength(rendererAppearance) && tableWidthNew > lineLengthFixedWidth) {
367
- left = lineLengthFixedWidth / 2 - tableWidth / 2;
368
- leftCSS = "".concat(lineLengthCSS, " / 2 - ").concat(tableWidthCSS, " / 2");
363
+ if (fixTableSSRResizing) {
364
+ if (!shouldCalculateLeftForAlignment && (0, _appearance.isFullPageAppearance)(rendererAppearance)) {
365
+ // Note tableWidthCSS here is the renderer width
366
+ // When the screen is super wide we want table to break out.
367
+ // However if screen is smaller than 760px. We want table align to left.
368
+ leftCSS = "min(0px, ".concat(lineLengthCSS, " - ").concat(tableWidthCSS, ") / 2");
369
+ }
370
+ } else {
371
+ if (!shouldCalculateLeftForAlignment && (0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew > lineLengthFixedWidth) {
372
+ left = lineLengthFixedWidth / 2 - tableWidth / 2;
373
+ }
369
374
  }
370
375
  var children = _react.default.Children.toArray(this.props.children);
371
376
 
@@ -65,7 +65,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
65
65
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
66
66
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
67
67
  var packageName = "@atlaskit/renderer";
68
- var packageVersion = "111.1.3";
68
+ var packageVersion = "111.1.5";
69
69
  var setAsQueryContainerStyles = (0, _react2.css)({
70
70
  containerName: 'ak-renderer-wrapper',
71
71
  containerType: 'inline-size',
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
2
  export default function Rule() {
3
- return /*#__PURE__*/React.createElement("hr", null);
3
+ return /*#__PURE__*/React.createElement("hr", {
4
+ role: "presentation"
5
+ });
4
6
  }
@@ -92,7 +92,6 @@ const isHeaderRowEnabled = rows => {
92
92
  const tableCanBeSticky = (node, children) => {
93
93
  return isHeaderRowEnabled(children) && node && node.firstChild && !hasRowspan(node.firstChild);
94
94
  };
95
- const canUseLinelength = appearance => appearance === 'full-page';
96
95
  export class TableContainer extends React.Component {
97
96
  constructor(...args) {
98
97
  super(...args);
@@ -304,9 +303,17 @@ export class TableContainer extends React.Component {
304
303
  left = (tableWidth - lineLength) / 2;
305
304
  leftCSS = `(${tableWidthCSS} - ${lineLengthCSS}) / 2`;
306
305
  }
307
- if (!shouldCalculateLeftForAlignment && canUseLinelength(rendererAppearance) && tableWidthNew > lineLengthFixedWidth) {
308
- left = lineLengthFixedWidth / 2 - tableWidth / 2;
309
- leftCSS = `${lineLengthCSS} / 2 - ${tableWidthCSS} / 2`;
306
+ if (fixTableSSRResizing) {
307
+ if (!shouldCalculateLeftForAlignment && isFullPageAppearance(rendererAppearance)) {
308
+ // Note tableWidthCSS here is the renderer width
309
+ // When the screen is super wide we want table to break out.
310
+ // However if screen is smaller than 760px. We want table align to left.
311
+ leftCSS = `min(0px, ${lineLengthCSS} - ${tableWidthCSS}) / 2`;
312
+ }
313
+ } else {
314
+ if (!shouldCalculateLeftForAlignment && isFullPageAppearance(rendererAppearance) && tableWidthNew > lineLengthFixedWidth) {
315
+ left = lineLengthFixedWidth / 2 - tableWidth / 2;
316
+ }
310
317
  }
311
318
  const children = React.Children.toArray(this.props.children);
312
319
 
@@ -45,7 +45,7 @@ import { nodeToReact } from '../../react/nodes';
45
45
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  const packageName = "@atlaskit/renderer";
48
- const packageVersion = "111.1.3";
48
+ const packageVersion = "111.1.5";
49
49
  const setAsQueryContainerStyles = css({
50
50
  containerName: 'ak-renderer-wrapper',
51
51
  containerType: 'inline-size',
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
2
  export default function Rule() {
3
- return /*#__PURE__*/React.createElement("hr", null);
3
+ return /*#__PURE__*/React.createElement("hr", {
4
+ role: "presentation"
5
+ });
4
6
  }
@@ -117,9 +117,6 @@ var isHeaderRowEnabled = function isHeaderRowEnabled(rows) {
117
117
  var tableCanBeSticky = function tableCanBeSticky(node, children) {
118
118
  return isHeaderRowEnabled(children) && node && node.firstChild && !hasRowspan(node.firstChild);
119
119
  };
120
- var canUseLinelength = function canUseLinelength(appearance) {
121
- return appearance === 'full-page';
122
- };
123
120
  export var TableContainer = /*#__PURE__*/function (_React$Component) {
124
121
  _inherits(TableContainer, _React$Component);
125
122
  var _super = _createSuper(TableContainer);
@@ -356,9 +353,17 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
356
353
  left = (tableWidth - lineLength) / 2;
357
354
  leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
358
355
  }
359
- if (!shouldCalculateLeftForAlignment && canUseLinelength(rendererAppearance) && tableWidthNew > lineLengthFixedWidth) {
360
- left = lineLengthFixedWidth / 2 - tableWidth / 2;
361
- leftCSS = "".concat(lineLengthCSS, " / 2 - ").concat(tableWidthCSS, " / 2");
356
+ if (fixTableSSRResizing) {
357
+ if (!shouldCalculateLeftForAlignment && isFullPageAppearance(rendererAppearance)) {
358
+ // Note tableWidthCSS here is the renderer width
359
+ // When the screen is super wide we want table to break out.
360
+ // However if screen is smaller than 760px. We want table align to left.
361
+ leftCSS = "min(0px, ".concat(lineLengthCSS, " - ").concat(tableWidthCSS, ") / 2");
362
+ }
363
+ } else {
364
+ if (!shouldCalculateLeftForAlignment && isFullPageAppearance(rendererAppearance) && tableWidthNew > lineLengthFixedWidth) {
365
+ left = lineLengthFixedWidth / 2 - tableWidth / 2;
366
+ }
362
367
  }
363
368
  var children = React.Children.toArray(this.props.children);
364
369
 
@@ -55,7 +55,7 @@ import { nodeToReact } from '../../react/nodes';
55
55
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
56
56
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "111.1.3";
58
+ var packageVersion = "111.1.5";
59
59
  var setAsQueryContainerStyles = css({
60
60
  containerName: 'ak-renderer-wrapper',
61
61
  containerType: 'inline-size',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "111.1.3",
3
+ "version": "111.1.5",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/analytics-next": "^10.1.0",
30
30
  "@atlaskit/button": "^20.2.0",
31
31
  "@atlaskit/code": "^15.6.0",
32
- "@atlaskit/editor-common": "^93.0.0",
32
+ "@atlaskit/editor-common": "^93.1.0",
33
33
  "@atlaskit/editor-json-transformer": "^8.18.0",
34
34
  "@atlaskit/editor-palette": "1.6.1",
35
35
  "@atlaskit/editor-prosemirror": "6.0.0",
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/emoji": "^67.8.0",
38
38
  "@atlaskit/feature-gate-js-client": "^4.19.0",
39
39
  "@atlaskit/icon": "^22.20.0",
40
- "@atlaskit/link-datasource": "^3.3.0",
40
+ "@atlaskit/link-datasource": "^3.4.0",
41
41
  "@atlaskit/media-card": "^78.5.0",
42
42
  "@atlaskit/media-client": "^28.0.0",
43
43
  "@atlaskit/media-client-react": "^2.2.0",
@@ -72,7 +72,6 @@
72
72
  "@af/visual-regression": "*",
73
73
  "@atlaskit/analytics-gas-types": "^5.1.0",
74
74
  "@atlaskit/css-reset": "^6.11.0",
75
- "@atlaskit/editor-test-helpers": "^19.0.0",
76
75
  "@atlaskit/link-provider": "^1.16.0",
77
76
  "@atlaskit/link-test-helpers": "^7.5.0",
78
77
  "@atlaskit/linking-common": "^5.11.0",