@atlaskit/renderer 109.12.2 → 109.12.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 +12 -0
- package/dist/cjs/react/nodes/blockCard.js +5 -8
- package/dist/cjs/steps/index.js +5 -5
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/blockCard.js +5 -8
- package/dist/es2019/steps/index.js +5 -5
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/blockCard.js +5 -8
- package/dist/esm/steps/index.js +5 -5
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#85294](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85294) [`be63992e342e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/be63992e342e) - Fixes bug regarding datasources not expanding to full width in renderer
|
|
8
|
+
|
|
9
|
+
## 109.12.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#85984](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85984) [`3689328bd7c4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3689328bd7c4) - Fix resolvePos for renderer TextHighlight
|
|
14
|
+
|
|
3
15
|
## 109.12.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -22,11 +22,10 @@ var _utils2 = require("@atlaskit/editor-common/utils");
|
|
|
22
22
|
|
|
23
23
|
var datasourceContainerStyle = (0, _react2.css)({
|
|
24
24
|
borderRadius: "var(--ds-border-radius-200, 8px)",
|
|
25
|
-
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"))
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
justifyContent: 'center'
|
|
25
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
27
|
+
marginLeft: '50%',
|
|
28
|
+
transform: 'translateX(-50%)'
|
|
30
29
|
});
|
|
31
30
|
function BlockCard(props) {
|
|
32
31
|
var url = props.url,
|
|
@@ -104,8 +103,6 @@ function BlockCard(props) {
|
|
|
104
103
|
}, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref5) {
|
|
105
104
|
var width = _ref5.width;
|
|
106
105
|
return (0, _react2.jsx)("div", {
|
|
107
|
-
css: parentContainerStyle
|
|
108
|
-
}, (0, _react2.jsx)("div", {
|
|
109
106
|
css: datasourceContainerStyle,
|
|
110
107
|
"data-testid": "renderer-datasource-table",
|
|
111
108
|
style: {
|
|
@@ -118,7 +115,7 @@ function BlockCard(props) {
|
|
|
118
115
|
columnCustomSizes: columnCustomSizes,
|
|
119
116
|
wrappedColumnKeys: wrappedColumnKeys && wrappedColumnKeys.length > 0 ? wrappedColumnKeys : undefined,
|
|
120
117
|
url: url
|
|
121
|
-
}))
|
|
118
|
+
}));
|
|
122
119
|
})));
|
|
123
120
|
}
|
|
124
121
|
return (0, _react2.jsx)(_inlineCard.default, {
|
package/dist/cjs/steps/index.js
CHANGED
|
@@ -41,7 +41,7 @@ function isTextNode(node) {
|
|
|
41
41
|
}
|
|
42
42
|
function isHighlightTextNode(node) {
|
|
43
43
|
var _dataset;
|
|
44
|
-
return !!((_dataset = node.dataset) !== null && _dataset !== void 0 && _dataset.highlighted);
|
|
44
|
+
return !!(node !== null && node !== void 0 && (_dataset = node.dataset) !== null && _dataset !== void 0 && _dataset.highlighted);
|
|
45
45
|
}
|
|
46
46
|
function isNodeInlineMark(node) {
|
|
47
47
|
return isElementNode(node) && Boolean(node.dataset.rendererMark);
|
|
@@ -70,7 +70,7 @@ function isRoot(element) {
|
|
|
70
70
|
return !!element && element.classList.contains('ak-renderer-document');
|
|
71
71
|
}
|
|
72
72
|
function resolvePos(node, offset) {
|
|
73
|
-
// If the passed node
|
|
73
|
+
// If the passed node doesn't exist, we should abort
|
|
74
74
|
if (!node) {
|
|
75
75
|
return false;
|
|
76
76
|
}
|
|
@@ -88,12 +88,12 @@ function resolvePos(node, offset) {
|
|
|
88
88
|
var current = node;
|
|
89
89
|
if (current.parentElement && current.parentElement !== parent) {
|
|
90
90
|
// Find the parent element that is a direct child of the position pointer
|
|
91
|
-
// the
|
|
91
|
+
// the outer most element from our text position.
|
|
92
92
|
var preParentPointer = findParentBeforePointer(current.parentElement);
|
|
93
93
|
// If our range is inside an inline node
|
|
94
94
|
// We need to move our pointers to parent element
|
|
95
|
-
// since we
|
|
96
|
-
if (!isElementInlineMark(preParentPointer)) {
|
|
95
|
+
// since we don't want to count text inside inline nodes at all
|
|
96
|
+
if (!(isElementInlineMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
97
97
|
current = current.parentElement;
|
|
98
98
|
offset = 0;
|
|
99
99
|
}
|
|
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
55
55
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "109.12.
|
|
58
|
+
var packageVersion = "109.12.4";
|
|
59
59
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -14,11 +14,10 @@ import { N40 } from '@atlaskit/theme/colors';
|
|
|
14
14
|
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
15
15
|
const datasourceContainerStyle = css({
|
|
16
16
|
borderRadius: `${"var(--ds-border-radius-200, 8px)"}`,
|
|
17
|
-
border: `1px solid ${`var(--ds-border, ${N40})`}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
justifyContent: 'center'
|
|
17
|
+
border: `1px solid ${`var(--ds-border, ${N40})`}`,
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
19
|
+
marginLeft: '50%',
|
|
20
|
+
transform: 'translateX(-50%)'
|
|
22
21
|
});
|
|
23
22
|
export default function BlockCard(props) {
|
|
24
23
|
const {
|
|
@@ -90,8 +89,6 @@ export default function BlockCard(props) {
|
|
|
90
89
|
}, cardProps), jsx(WidthConsumer, null, ({
|
|
91
90
|
width
|
|
92
91
|
}) => jsx("div", {
|
|
93
|
-
css: parentContainerStyle
|
|
94
|
-
}, jsx("div", {
|
|
95
92
|
css: datasourceContainerStyle,
|
|
96
93
|
"data-testid": "renderer-datasource-table",
|
|
97
94
|
style: {
|
|
@@ -104,7 +101,7 @@ export default function BlockCard(props) {
|
|
|
104
101
|
columnCustomSizes: columnCustomSizes,
|
|
105
102
|
wrappedColumnKeys: wrappedColumnKeys && wrappedColumnKeys.length > 0 ? wrappedColumnKeys : undefined,
|
|
106
103
|
url: url
|
|
107
|
-
})))))
|
|
104
|
+
})))));
|
|
108
105
|
}
|
|
109
106
|
return jsx(InlineCard, {
|
|
110
107
|
data: data,
|
|
@@ -37,7 +37,7 @@ function isTextNode(node) {
|
|
|
37
37
|
}
|
|
38
38
|
function isHighlightTextNode(node) {
|
|
39
39
|
var _dataset;
|
|
40
|
-
return !!((_dataset = node.dataset) !== null && _dataset !== void 0 && _dataset.highlighted);
|
|
40
|
+
return !!(node !== null && node !== void 0 && (_dataset = node.dataset) !== null && _dataset !== void 0 && _dataset.highlighted);
|
|
41
41
|
}
|
|
42
42
|
function isNodeInlineMark(node) {
|
|
43
43
|
return isElementNode(node) && Boolean(node.dataset.rendererMark);
|
|
@@ -66,7 +66,7 @@ function isRoot(element) {
|
|
|
66
66
|
return !!element && element.classList.contains('ak-renderer-document');
|
|
67
67
|
}
|
|
68
68
|
export function resolvePos(node, offset) {
|
|
69
|
-
// If the passed node
|
|
69
|
+
// If the passed node doesn't exist, we should abort
|
|
70
70
|
if (!node) {
|
|
71
71
|
return false;
|
|
72
72
|
}
|
|
@@ -84,12 +84,12 @@ export function resolvePos(node, offset) {
|
|
|
84
84
|
let current = node;
|
|
85
85
|
if (current.parentElement && current.parentElement !== parent) {
|
|
86
86
|
// Find the parent element that is a direct child of the position pointer
|
|
87
|
-
// the
|
|
87
|
+
// the outer most element from our text position.
|
|
88
88
|
const preParentPointer = findParentBeforePointer(current.parentElement);
|
|
89
89
|
// If our range is inside an inline node
|
|
90
90
|
// We need to move our pointers to parent element
|
|
91
|
-
// since we
|
|
92
|
-
if (!isElementInlineMark(preParentPointer)) {
|
|
91
|
+
// since we don't want to count text inside inline nodes at all
|
|
92
|
+
if (!(isElementInlineMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
93
93
|
current = current.parentElement;
|
|
94
94
|
offset = 0;
|
|
95
95
|
}
|
|
@@ -36,7 +36,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
36
36
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
37
37
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
38
38
|
const packageName = "@atlaskit/renderer";
|
|
39
|
-
const packageVersion = "109.12.
|
|
39
|
+
const packageVersion = "109.12.4";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
constructor(props) {
|
|
42
42
|
super(props);
|
|
@@ -14,11 +14,10 @@ import { N40 } from '@atlaskit/theme/colors';
|
|
|
14
14
|
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
15
15
|
var datasourceContainerStyle = css({
|
|
16
16
|
borderRadius: "var(--ds-border-radius-200, 8px)",
|
|
17
|
-
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
justifyContent: 'center'
|
|
17
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
19
|
+
marginLeft: '50%',
|
|
20
|
+
transform: 'translateX(-50%)'
|
|
22
21
|
});
|
|
23
22
|
export default function BlockCard(props) {
|
|
24
23
|
var url = props.url,
|
|
@@ -96,8 +95,6 @@ export default function BlockCard(props) {
|
|
|
96
95
|
}, cardProps), jsx(WidthConsumer, null, function (_ref5) {
|
|
97
96
|
var width = _ref5.width;
|
|
98
97
|
return jsx("div", {
|
|
99
|
-
css: parentContainerStyle
|
|
100
|
-
}, jsx("div", {
|
|
101
98
|
css: datasourceContainerStyle,
|
|
102
99
|
"data-testid": "renderer-datasource-table",
|
|
103
100
|
style: {
|
|
@@ -110,7 +107,7 @@ export default function BlockCard(props) {
|
|
|
110
107
|
columnCustomSizes: columnCustomSizes,
|
|
111
108
|
wrappedColumnKeys: wrappedColumnKeys && wrappedColumnKeys.length > 0 ? wrappedColumnKeys : undefined,
|
|
112
109
|
url: url
|
|
113
|
-
}))
|
|
110
|
+
}));
|
|
114
111
|
})));
|
|
115
112
|
}
|
|
116
113
|
return jsx(InlineCard, {
|
package/dist/esm/steps/index.js
CHANGED
|
@@ -33,7 +33,7 @@ function isTextNode(node) {
|
|
|
33
33
|
}
|
|
34
34
|
function isHighlightTextNode(node) {
|
|
35
35
|
var _dataset;
|
|
36
|
-
return !!((_dataset = node.dataset) !== null && _dataset !== void 0 && _dataset.highlighted);
|
|
36
|
+
return !!(node !== null && node !== void 0 && (_dataset = node.dataset) !== null && _dataset !== void 0 && _dataset.highlighted);
|
|
37
37
|
}
|
|
38
38
|
function isNodeInlineMark(node) {
|
|
39
39
|
return isElementNode(node) && Boolean(node.dataset.rendererMark);
|
|
@@ -62,7 +62,7 @@ function isRoot(element) {
|
|
|
62
62
|
return !!element && element.classList.contains('ak-renderer-document');
|
|
63
63
|
}
|
|
64
64
|
export function resolvePos(node, offset) {
|
|
65
|
-
// If the passed node
|
|
65
|
+
// If the passed node doesn't exist, we should abort
|
|
66
66
|
if (!node) {
|
|
67
67
|
return false;
|
|
68
68
|
}
|
|
@@ -80,12 +80,12 @@ export function resolvePos(node, offset) {
|
|
|
80
80
|
var current = node;
|
|
81
81
|
if (current.parentElement && current.parentElement !== parent) {
|
|
82
82
|
// Find the parent element that is a direct child of the position pointer
|
|
83
|
-
// the
|
|
83
|
+
// the outer most element from our text position.
|
|
84
84
|
var preParentPointer = findParentBeforePointer(current.parentElement);
|
|
85
85
|
// If our range is inside an inline node
|
|
86
86
|
// We need to move our pointers to parent element
|
|
87
|
-
// since we
|
|
88
|
-
if (!isElementInlineMark(preParentPointer)) {
|
|
87
|
+
// since we don't want to count text inside inline nodes at all
|
|
88
|
+
if (!(isElementInlineMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
|
|
89
89
|
current = current.parentElement;
|
|
90
90
|
offset = 0;
|
|
91
91
|
}
|
|
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
46
46
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
47
47
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
48
48
|
var packageName = "@atlaskit/renderer";
|
|
49
|
-
var packageVersion = "109.12.
|
|
49
|
+
var packageVersion = "109.12.4";
|
|
50
50
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
51
51
|
_inherits(Renderer, _PureComponent);
|
|
52
52
|
var _super = _createSuper(Renderer);
|