@atlaskit/renderer 114.0.0 → 114.1.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/rendererHelper.js +8 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/rendererHelper.js +10 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/rendererHelper.js +8 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 114.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#124272](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/124272)
|
|
8
|
+
[`5b434be943575`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5b434be943575) -
|
|
9
|
+
[ux] Added logic to not render empty text spaces around comment content
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 114.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -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.
|
|
70
|
+
var packageVersion = "114.1.0";
|
|
71
71
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
72
72
|
containerName: 'ak-renderer-wrapper',
|
|
73
73
|
containerType: 'inline-size',
|
|
@@ -17,9 +17,15 @@ var removeEmptySpaceAroundContent = exports.removeEmptySpaceAroundContent = func
|
|
|
17
17
|
if (node.type !== 'paragraph' || !node.content || node.content.length === 0) {
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
|
-
// Check if paragraph has any content other than `hardBreak`
|
|
20
|
+
// Check if paragraph has any content other than `hardBreak` or whitespace text nodes
|
|
21
21
|
return node.content.some(function (child) {
|
|
22
|
-
|
|
22
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === 'hardBreak') {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === 'text' && typeof child.text === 'string' && child.text.trim() === '') {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
23
29
|
});
|
|
24
30
|
};
|
|
25
31
|
var content = document.content;
|
|
@@ -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.
|
|
51
|
+
const packageVersion = "114.1.0";
|
|
52
52
|
const setAsQueryContainerStyles = css({
|
|
53
53
|
containerName: 'ak-renderer-wrapper',
|
|
54
54
|
containerType: 'inline-size',
|
|
@@ -7,8 +7,16 @@ export const removeEmptySpaceAroundContent = document => {
|
|
|
7
7
|
if (node.type !== 'paragraph' || !node.content || node.content.length === 0) {
|
|
8
8
|
return false;
|
|
9
9
|
}
|
|
10
|
-
// Check if paragraph has any content other than `hardBreak`
|
|
11
|
-
return node.content.some(child =>
|
|
10
|
+
// Check if paragraph has any content other than `hardBreak` or whitespace text nodes
|
|
11
|
+
return node.content.some(child => {
|
|
12
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === 'hardBreak') {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === 'text' && typeof child.text === 'string' && child.text.trim() === '') {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
});
|
|
12
20
|
};
|
|
13
21
|
const content = document.content;
|
|
14
22
|
let firstContentIndex = -1;
|
|
@@ -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.
|
|
60
|
+
var packageVersion = "114.1.0";
|
|
61
61
|
var setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size',
|
|
@@ -10,9 +10,15 @@ export var removeEmptySpaceAroundContent = function removeEmptySpaceAroundConten
|
|
|
10
10
|
if (node.type !== 'paragraph' || !node.content || node.content.length === 0) {
|
|
11
11
|
return false;
|
|
12
12
|
}
|
|
13
|
-
// Check if paragraph has any content other than `hardBreak`
|
|
13
|
+
// Check if paragraph has any content other than `hardBreak` or whitespace text nodes
|
|
14
14
|
return node.content.some(function (child) {
|
|
15
|
-
|
|
15
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === 'hardBreak') {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === 'text' && typeof child.text === 'string' && child.text.trim() === '') {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
16
22
|
});
|
|
17
23
|
};
|
|
18
24
|
var content = document.content;
|