@atlaskit/renderer 110.5.2 → 110.5.4

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,19 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 110.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#146688](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/146688)
8
+ [`f834ba0388625`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f834ba0388625) -
9
+ [ux] Fix double horizontal scrollbar issue on table in the Preview.
10
+
11
+ ## 110.5.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 110.5.2
4
18
 
5
19
  ### Patch Changes
@@ -8,7 +8,6 @@ exports.TableStickyScrollbar = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _ui = require("@atlaskit/editor-common/ui");
12
11
  var _styles = require("@atlaskit/editor-common/styles");
13
12
  var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function () {
14
13
  function TableStickyScrollbar(wrapper) {
@@ -60,7 +59,7 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
60
59
  var _this2 = this,
61
60
  _this$wrapper,
62
61
  _this$wrapper2;
63
- this.rendererScrollableElement = (0, _ui.findOverflowScrollParent)(window.document.querySelector('.pm-table-container')) || window.document;
62
+ this.rendererScrollableElement = window.document;
64
63
  if (!this.rendererScrollableElement || !this.wrapper) {
65
64
  return;
66
65
  }
@@ -69,12 +68,7 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
69
68
  return;
70
69
  }
71
70
  entries.forEach(function (entry) {
72
- var _entry$rootBounds;
73
71
  var target = entry.target;
74
- // if the rootBounds has 0 height, e.g. confluence preview mode, we do nothing.
75
- if (((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.height) === 0) {
76
- return;
77
- }
78
72
  if (target.classList.contains(_styles.TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM)) {
79
73
  _this2.sentinelBottomCallback(entry);
80
74
  }
@@ -104,16 +98,16 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
104
98
  }, {
105
99
  key: "sentinelBottomCallback",
106
100
  value: function sentinelBottomCallback(entry) {
107
- var _entry$rootBounds2;
108
- var sentinelIsAboveScrollArea = entry.boundingClientRect.top < (((_entry$rootBounds2 = entry.rootBounds) === null || _entry$rootBounds2 === void 0 ? void 0 : _entry$rootBounds2.top) || 0);
101
+ var _entry$rootBounds;
102
+ var sentinelIsAboveScrollArea = entry.boundingClientRect.top < (((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.top) || 0);
109
103
  this.bottomSentinelState = sentinelIsAboveScrollArea ? 'above' : entry.isIntersecting ? 'visible' : 'below';
110
104
  this.toggle();
111
105
  }
112
106
  }, {
113
107
  key: "sentinelTopCallback",
114
108
  value: function sentinelTopCallback(entry) {
115
- var _entry$rootBounds3;
116
- var sentinelIsBelowScrollArea = (((_entry$rootBounds3 = entry.rootBounds) === null || _entry$rootBounds3 === void 0 ? void 0 : _entry$rootBounds3.bottom) || 0) < entry.boundingClientRect.top;
109
+ var _entry$rootBounds2;
110
+ var sentinelIsBelowScrollArea = (((_entry$rootBounds2 = entry.rootBounds) === null || _entry$rootBounds2 === void 0 ? void 0 : _entry$rootBounds2.bottom) || 0) < entry.boundingClientRect.top;
117
111
  this.topSentinelState = sentinelIsBelowScrollArea ? 'below' : entry.isIntersecting ? 'visible' : 'above';
118
112
  this.toggle();
119
113
  }
@@ -63,7 +63,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
63
63
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
64
64
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
65
65
  var packageName = "@atlaskit/renderer";
66
- var packageVersion = "110.5.2";
66
+ var packageVersion = "110.5.4";
67
67
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
68
68
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
69
69
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
3
2
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
4
3
  export class TableStickyScrollbar {
5
4
  constructor(wrapper) {
@@ -39,7 +38,7 @@ export class TableStickyScrollbar {
39
38
  }
40
39
  createIntersectionObserver() {
41
40
  var _this$wrapper, _this$wrapper$parentE2, _this$wrapper$parentE3, _this$wrapper2, _this$wrapper2$parent, _this$wrapper2$parent2;
42
- this.rendererScrollableElement = findOverflowScrollParent(window.document.querySelector('.pm-table-container')) || window.document;
41
+ this.rendererScrollableElement = window.document;
43
42
  if (!this.rendererScrollableElement || !this.wrapper) {
44
43
  return;
45
44
  }
@@ -48,12 +47,7 @@ export class TableStickyScrollbar {
48
47
  return;
49
48
  }
50
49
  entries.forEach(entry => {
51
- var _entry$rootBounds;
52
50
  const target = entry.target;
53
- // if the rootBounds has 0 height, e.g. confluence preview mode, we do nothing.
54
- if (((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.height) === 0) {
55
- return;
56
- }
57
51
  if (target.classList.contains(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM)) {
58
52
  this.sentinelBottomCallback(entry);
59
53
  }
@@ -77,14 +71,14 @@ export class TableStickyScrollbar {
77
71
  }
78
72
  }
79
73
  sentinelBottomCallback(entry) {
80
- var _entry$rootBounds2;
81
- const sentinelIsAboveScrollArea = entry.boundingClientRect.top < (((_entry$rootBounds2 = entry.rootBounds) === null || _entry$rootBounds2 === void 0 ? void 0 : _entry$rootBounds2.top) || 0);
74
+ var _entry$rootBounds;
75
+ const sentinelIsAboveScrollArea = entry.boundingClientRect.top < (((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.top) || 0);
82
76
  this.bottomSentinelState = sentinelIsAboveScrollArea ? 'above' : entry.isIntersecting ? 'visible' : 'below';
83
77
  this.toggle();
84
78
  }
85
79
  sentinelTopCallback(entry) {
86
- var _entry$rootBounds3;
87
- const sentinelIsBelowScrollArea = (((_entry$rootBounds3 = entry.rootBounds) === null || _entry$rootBounds3 === void 0 ? void 0 : _entry$rootBounds3.bottom) || 0) < entry.boundingClientRect.top;
80
+ var _entry$rootBounds2;
81
+ const sentinelIsBelowScrollArea = (((_entry$rootBounds2 = entry.rootBounds) === null || _entry$rootBounds2 === void 0 ? void 0 : _entry$rootBounds2.bottom) || 0) < entry.boundingClientRect.top;
88
82
  this.topSentinelState = sentinelIsBelowScrollArea ? 'below' : entry.isIntersecting ? 'visible' : 'above';
89
83
  this.toggle();
90
84
  }
@@ -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 = "110.5.2";
48
+ const packageVersion = "110.5.4";
49
49
  export const defaultNodeComponents = nodeToReact;
50
50
  export class Renderer extends PureComponent {
51
51
  constructor(props) {
@@ -1,7 +1,6 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
5
4
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
6
5
  export var TableStickyScrollbar = /*#__PURE__*/function () {
7
6
  function TableStickyScrollbar(wrapper) {
@@ -53,7 +52,7 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
53
52
  var _this2 = this,
54
53
  _this$wrapper,
55
54
  _this$wrapper2;
56
- this.rendererScrollableElement = findOverflowScrollParent(window.document.querySelector('.pm-table-container')) || window.document;
55
+ this.rendererScrollableElement = window.document;
57
56
  if (!this.rendererScrollableElement || !this.wrapper) {
58
57
  return;
59
58
  }
@@ -62,12 +61,7 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
62
61
  return;
63
62
  }
64
63
  entries.forEach(function (entry) {
65
- var _entry$rootBounds;
66
64
  var target = entry.target;
67
- // if the rootBounds has 0 height, e.g. confluence preview mode, we do nothing.
68
- if (((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.height) === 0) {
69
- return;
70
- }
71
65
  if (target.classList.contains(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM)) {
72
66
  _this2.sentinelBottomCallback(entry);
73
67
  }
@@ -97,16 +91,16 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
97
91
  }, {
98
92
  key: "sentinelBottomCallback",
99
93
  value: function sentinelBottomCallback(entry) {
100
- var _entry$rootBounds2;
101
- var sentinelIsAboveScrollArea = entry.boundingClientRect.top < (((_entry$rootBounds2 = entry.rootBounds) === null || _entry$rootBounds2 === void 0 ? void 0 : _entry$rootBounds2.top) || 0);
94
+ var _entry$rootBounds;
95
+ var sentinelIsAboveScrollArea = entry.boundingClientRect.top < (((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.top) || 0);
102
96
  this.bottomSentinelState = sentinelIsAboveScrollArea ? 'above' : entry.isIntersecting ? 'visible' : 'below';
103
97
  this.toggle();
104
98
  }
105
99
  }, {
106
100
  key: "sentinelTopCallback",
107
101
  value: function sentinelTopCallback(entry) {
108
- var _entry$rootBounds3;
109
- var sentinelIsBelowScrollArea = (((_entry$rootBounds3 = entry.rootBounds) === null || _entry$rootBounds3 === void 0 ? void 0 : _entry$rootBounds3.bottom) || 0) < entry.boundingClientRect.top;
102
+ var _entry$rootBounds2;
103
+ var sentinelIsBelowScrollArea = (((_entry$rootBounds2 = entry.rootBounds) === null || _entry$rootBounds2 === void 0 ? void 0 : _entry$rootBounds2.bottom) || 0) < entry.boundingClientRect.top;
110
104
  this.topSentinelState = sentinelIsBelowScrollArea ? 'below' : entry.isIntersecting ? 'visible' : 'above';
111
105
  this.toggle();
112
106
  }
@@ -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 = "110.5.2";
58
+ var packageVersion = "110.5.4";
59
59
  export var defaultNodeComponents = nodeToReact;
60
60
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
61
61
  _inherits(Renderer, _PureComponent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "110.5.2",
3
+ "version": "110.5.4",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,14 +29,14 @@
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": "^91.1.0",
32
+ "@atlaskit/editor-common": "^91.2.0",
33
33
  "@atlaskit/editor-json-transformer": "^8.18.0",
34
- "@atlaskit/editor-palette": "1.6.0",
34
+ "@atlaskit/editor-palette": "1.6.1",
35
35
  "@atlaskit/editor-prosemirror": "6.0.0",
36
36
  "@atlaskit/editor-shared-styles": "^3.0.0",
37
37
  "@atlaskit/emoji": "^67.8.0",
38
38
  "@atlaskit/feature-gate-js-client": "^4.19.0",
39
- "@atlaskit/icon": "^22.18.0",
39
+ "@atlaskit/icon": "^22.19.0",
40
40
  "@atlaskit/link-datasource": "^3.1.0",
41
41
  "@atlaskit/media-card": "^78.5.0",
42
42
  "@atlaskit/media-client": "^28.0.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/task-decision": "^17.11.0",
52
52
  "@atlaskit/theme": "^13.0.0",
53
53
  "@atlaskit/tmp-editor-statsig": "*",
54
- "@atlaskit/tokens": "^1.61.0",
54
+ "@atlaskit/tokens": "^2.0.0",
55
55
  "@atlaskit/tooltip": "^18.7.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1",