@atlaskit/renderer 109.19.5 → 109.20.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 +11 -0
- package/dist/cjs/react/nodes/inlineCard.js +30 -3
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/inlineCard.js +30 -3
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/inlineCard.js +30 -3
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934) [`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) - bumped editor-prosemirror version to 4.0.0
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#93451](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93451) [`33ccdcc238ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/33ccdcc238ab) - [ED-22917] Wrap inline cards in data attributes used by clipboard handlers, and annotation calculations.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 109.19.5
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -18,7 +18,9 @@ var _getCardClickHandler = require("../utils/getCardClickHandler");
|
|
|
18
18
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
|
|
21
|
-
var annotatedCard = (0,
|
|
21
|
+
var annotatedCard = (0, _react.css)({
|
|
22
|
+
// This is expected to be reworked as part of https://team.atlassian.com/project/ATLAS-61846/updates
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
22
24
|
"[data-mark-type='annotation'][data-mark-annotation-state='active'] &": {
|
|
23
25
|
background: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
|
|
24
26
|
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")")),
|
|
@@ -26,7 +28,7 @@ var annotatedCard = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.all
|
|
|
26
28
|
cursor: 'pointer',
|
|
27
29
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
28
30
|
}
|
|
29
|
-
})
|
|
31
|
+
});
|
|
30
32
|
var InlineCard = function InlineCard(props) {
|
|
31
33
|
var url = props.url,
|
|
32
34
|
data = props.data,
|
|
@@ -54,6 +56,31 @@ var InlineCard = function InlineCard(props) {
|
|
|
54
56
|
location: 'renderer'
|
|
55
57
|
};
|
|
56
58
|
if (ssr && url) {
|
|
59
|
+
// platform.editor.allow-inline-comments-for-inline-nodes requires this change to work -- however this feature flag is only intended to go to HELLO (and is expected to last for Q4).
|
|
60
|
+
// platform.editor.renderer-inline-card-ssr-fix_kqcwl is the feature flag that allows this change to be safely released more widely.
|
|
61
|
+
// Once platform.editor.renderer-inline-card-ssr-fix_kqcwl reaches 100% we can remove both checks
|
|
62
|
+
if (
|
|
63
|
+
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
|
|
64
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.editor.renderer-inline-card-ssr-fix_kqcwl') ||
|
|
65
|
+
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
|
|
66
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
67
|
+
return (0, _react.jsx)("span", {
|
|
68
|
+
"data-inline-card": true,
|
|
69
|
+
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
70
|
+
"data-card-url": url,
|
|
71
|
+
css: annotatedCard
|
|
72
|
+
}, (0, _react.jsx)(_analyticsNext.AnalyticsContext, {
|
|
73
|
+
data: analyticsData
|
|
74
|
+
}, (0, _react.jsx)(_ssr.CardSSR, {
|
|
75
|
+
appearance: "inline",
|
|
76
|
+
url: url,
|
|
77
|
+
showAuthTooltip: showAuthTooltip,
|
|
78
|
+
showHoverPreview: !hideHoverPreview,
|
|
79
|
+
actionOptions: actionOptions,
|
|
80
|
+
showServerActions: showServerActions,
|
|
81
|
+
onClick: onClick
|
|
82
|
+
})));
|
|
83
|
+
}
|
|
57
84
|
return (0, _react.jsx)(_analyticsNext.AnalyticsContext, {
|
|
58
85
|
data: analyticsData
|
|
59
86
|
}, (0, _react.jsx)(_ssr.CardSSR, {
|
|
@@ -78,7 +105,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
78
105
|
"data-inline-card": true,
|
|
79
106
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
80
107
|
"data-card-url": url,
|
|
81
|
-
css: annotatedCard
|
|
108
|
+
css: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes') ? annotatedCard : undefined
|
|
82
109
|
}, (0, _react.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
|
|
83
110
|
unsupportedComponent: _ui.UnsupportedInline
|
|
84
111
|
}, cardProps), (0, _react.jsx)(_smartCard.Card, (0, _extends2.default)({
|
|
@@ -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.
|
|
58
|
+
var packageVersion = "109.20.0";
|
|
59
59
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -10,7 +10,9 @@ import { CardErrorBoundary } from './fallback';
|
|
|
10
10
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
11
11
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
12
12
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
13
|
-
const annotatedCard =
|
|
13
|
+
const annotatedCard = css({
|
|
14
|
+
// This is expected to be reworked as part of https://team.atlassian.com/project/ATLAS-61846/updates
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
16
|
"[data-mark-type='annotation'][data-mark-annotation-state='active'] &": {
|
|
15
17
|
background: `var(--ds-background-accent-yellow-subtler, ${Y75})`,
|
|
16
18
|
borderBottom: `2px solid ${`var(--ds-border-accent-yellow, ${Y300})`}`,
|
|
@@ -18,7 +20,7 @@ const annotatedCard = getBooleanFF('platform.editor.allow-inline-comments-for-in
|
|
|
18
20
|
cursor: 'pointer',
|
|
19
21
|
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"}`
|
|
20
22
|
}
|
|
21
|
-
})
|
|
23
|
+
});
|
|
22
24
|
const InlineCard = props => {
|
|
23
25
|
const {
|
|
24
26
|
url,
|
|
@@ -49,6 +51,31 @@ const InlineCard = props => {
|
|
|
49
51
|
location: 'renderer'
|
|
50
52
|
};
|
|
51
53
|
if (ssr && url) {
|
|
54
|
+
// platform.editor.allow-inline-comments-for-inline-nodes requires this change to work -- however this feature flag is only intended to go to HELLO (and is expected to last for Q4).
|
|
55
|
+
// platform.editor.renderer-inline-card-ssr-fix_kqcwl is the feature flag that allows this change to be safely released more widely.
|
|
56
|
+
// Once platform.editor.renderer-inline-card-ssr-fix_kqcwl reaches 100% we can remove both checks
|
|
57
|
+
if (
|
|
58
|
+
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
|
|
59
|
+
getBooleanFF('platform.editor.renderer-inline-card-ssr-fix_kqcwl') ||
|
|
60
|
+
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
|
|
61
|
+
getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
62
|
+
return jsx("span", {
|
|
63
|
+
"data-inline-card": true,
|
|
64
|
+
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
65
|
+
"data-card-url": url,
|
|
66
|
+
css: annotatedCard
|
|
67
|
+
}, jsx(AnalyticsContext, {
|
|
68
|
+
data: analyticsData
|
|
69
|
+
}, jsx(CardSSR, {
|
|
70
|
+
appearance: "inline",
|
|
71
|
+
url: url,
|
|
72
|
+
showAuthTooltip: showAuthTooltip,
|
|
73
|
+
showHoverPreview: !hideHoverPreview,
|
|
74
|
+
actionOptions: actionOptions,
|
|
75
|
+
showServerActions: showServerActions,
|
|
76
|
+
onClick: onClick
|
|
77
|
+
})));
|
|
78
|
+
}
|
|
52
79
|
return jsx(AnalyticsContext, {
|
|
53
80
|
data: analyticsData
|
|
54
81
|
}, jsx(CardSSR, {
|
|
@@ -74,7 +101,7 @@ const InlineCard = props => {
|
|
|
74
101
|
"data-inline-card": true,
|
|
75
102
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
76
103
|
"data-card-url": url,
|
|
77
|
-
css: annotatedCard
|
|
104
|
+
css: getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? annotatedCard : undefined
|
|
78
105
|
}, jsx(CardErrorBoundary, _extends({
|
|
79
106
|
unsupportedComponent: UnsupportedInline
|
|
80
107
|
}, cardProps), jsx(Card, _extends({
|
|
@@ -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.
|
|
39
|
+
const packageVersion = "109.20.0";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
constructor(props) {
|
|
42
42
|
super(props);
|
|
@@ -10,7 +10,9 @@ import { CardErrorBoundary } from './fallback';
|
|
|
10
10
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
11
11
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
12
12
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
13
|
-
var annotatedCard =
|
|
13
|
+
var annotatedCard = css({
|
|
14
|
+
// This is expected to be reworked as part of https://team.atlassian.com/project/ATLAS-61846/updates
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
16
|
"[data-mark-type='annotation'][data-mark-annotation-state='active'] &": {
|
|
15
17
|
background: "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"),
|
|
16
18
|
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y300, ")")),
|
|
@@ -18,7 +20,7 @@ var annotatedCard = getBooleanFF('platform.editor.allow-inline-comments-for-inli
|
|
|
18
20
|
cursor: 'pointer',
|
|
19
21
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
20
22
|
}
|
|
21
|
-
})
|
|
23
|
+
});
|
|
22
24
|
var InlineCard = function InlineCard(props) {
|
|
23
25
|
var url = props.url,
|
|
24
26
|
data = props.data,
|
|
@@ -46,6 +48,31 @@ var InlineCard = function InlineCard(props) {
|
|
|
46
48
|
location: 'renderer'
|
|
47
49
|
};
|
|
48
50
|
if (ssr && url) {
|
|
51
|
+
// platform.editor.allow-inline-comments-for-inline-nodes requires this change to work -- however this feature flag is only intended to go to HELLO (and is expected to last for Q4).
|
|
52
|
+
// platform.editor.renderer-inline-card-ssr-fix_kqcwl is the feature flag that allows this change to be safely released more widely.
|
|
53
|
+
// Once platform.editor.renderer-inline-card-ssr-fix_kqcwl reaches 100% we can remove both checks
|
|
54
|
+
if (
|
|
55
|
+
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
|
|
56
|
+
getBooleanFF('platform.editor.renderer-inline-card-ssr-fix_kqcwl') ||
|
|
57
|
+
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
|
|
58
|
+
getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
59
|
+
return jsx("span", {
|
|
60
|
+
"data-inline-card": true,
|
|
61
|
+
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
62
|
+
"data-card-url": url,
|
|
63
|
+
css: annotatedCard
|
|
64
|
+
}, jsx(AnalyticsContext, {
|
|
65
|
+
data: analyticsData
|
|
66
|
+
}, jsx(CardSSR, {
|
|
67
|
+
appearance: "inline",
|
|
68
|
+
url: url,
|
|
69
|
+
showAuthTooltip: showAuthTooltip,
|
|
70
|
+
showHoverPreview: !hideHoverPreview,
|
|
71
|
+
actionOptions: actionOptions,
|
|
72
|
+
showServerActions: showServerActions,
|
|
73
|
+
onClick: onClick
|
|
74
|
+
})));
|
|
75
|
+
}
|
|
49
76
|
return jsx(AnalyticsContext, {
|
|
50
77
|
data: analyticsData
|
|
51
78
|
}, jsx(CardSSR, {
|
|
@@ -70,7 +97,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
70
97
|
"data-inline-card": true,
|
|
71
98
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
72
99
|
"data-card-url": url,
|
|
73
|
-
css: annotatedCard
|
|
100
|
+
css: getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? annotatedCard : undefined
|
|
74
101
|
}, jsx(CardErrorBoundary, _extends({
|
|
75
102
|
unsupportedComponent: UnsupportedInline
|
|
76
103
|
}, cardProps), jsx(Card, _extends({
|
|
@@ -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.
|
|
49
|
+
var packageVersion = "109.20.0";
|
|
50
50
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
51
51
|
_inherits(Renderer, _PureComponent);
|
|
52
52
|
var _super = _createSuper(Renderer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.
|
|
3
|
+
"version": "109.20.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
29
29
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
30
30
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
31
|
-
"@atlaskit/analytics-next": "^9.
|
|
32
|
-
"@atlaskit/button": "^17.
|
|
31
|
+
"@atlaskit/analytics-next": "^9.3.0",
|
|
32
|
+
"@atlaskit/button": "^17.14.0",
|
|
33
33
|
"@atlaskit/code": "^15.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^78.
|
|
35
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
34
|
+
"@atlaskit/editor-common": "^78.31.0",
|
|
35
|
+
"@atlaskit/editor-json-transformer": "^8.11.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.5.3",
|
|
37
|
-
"@atlaskit/editor-prosemirror": "
|
|
37
|
+
"@atlaskit/editor-prosemirror": "4.0.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
39
39
|
"@atlaskit/emoji": "^67.6.0",
|
|
40
40
|
"@atlaskit/icon": "^22.1.0",
|
|
41
|
-
"@atlaskit/link-datasource": "^1.
|
|
41
|
+
"@atlaskit/link-datasource": "^1.29.0",
|
|
42
42
|
"@atlaskit/media-card": "^77.11.0",
|
|
43
43
|
"@atlaskit/media-client": "^26.3.0",
|
|
44
44
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@af/visual-regression": "*",
|
|
73
73
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
74
74
|
"@atlaskit/css-reset": "^6.9.0",
|
|
75
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
75
|
+
"@atlaskit/editor-test-helpers": "^18.21.0",
|
|
76
76
|
"@atlaskit/link-provider": "^1.9.0",
|
|
77
77
|
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
78
78
|
"@atlaskit/linking-common": "^5.6.0",
|
|
@@ -119,6 +119,9 @@
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
"platform-feature-flags": {
|
|
122
|
+
"platform.editor.renderer-inline-card-ssr-fix_kqcwl": {
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
122
125
|
"platform.media-experience.media-viewer-v2_hgsii": {
|
|
123
126
|
"type": "boolean",
|
|
124
127
|
"referenceOnly": "true"
|