@atlaskit/renderer 114.3.0 → 114.3.2
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/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/react/marks/alignment.js +13 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +36 -13
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +165 -5
- package/dist/cjs/react/nodes/layoutColumn.js +18 -1
- package/dist/cjs/react/nodes/media/index.js +75 -32
- package/dist/cjs/react/nodes/mediaSingle/index.js +9 -2
- package/dist/cjs/react/nodes/multiBodiedExtension.js +83 -4
- package/dist/cjs/react/nodes/panel.js +162 -2
- package/dist/cjs/react/nodes/table/sticky.js +51 -1
- package/dist/cjs/ui/Expand.js +124 -8
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/draft/component.js +27 -7
- package/dist/cjs/ui/annotations/element/mark.js +85 -6
- package/dist/es2019/react/marks/alignment.js +13 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +69 -13
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +194 -4
- package/dist/es2019/react/nodes/layoutColumn.js +27 -1
- package/dist/es2019/react/nodes/media/index.js +49 -15
- package/dist/es2019/react/nodes/mediaSingle/index.js +9 -2
- package/dist/es2019/react/nodes/multiBodiedExtension.js +83 -4
- package/dist/es2019/react/nodes/panel.js +162 -2
- package/dist/es2019/react/nodes/table/sticky.js +64 -1
- package/dist/es2019/ui/Expand.js +125 -8
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/draft/component.js +28 -7
- package/dist/es2019/ui/annotations/element/mark.js +96 -6
- package/dist/esm/react/marks/alignment.js +13 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +36 -13
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +164 -4
- package/dist/esm/react/nodes/layoutColumn.js +18 -1
- package/dist/esm/react/nodes/media/index.js +75 -32
- package/dist/esm/react/nodes/mediaSingle/index.js +9 -2
- package/dist/esm/react/nodes/multiBodiedExtension.js +83 -4
- package/dist/esm/react/nodes/panel.js +163 -3
- package/dist/esm/react/nodes/table/sticky.js +51 -1
- package/dist/esm/ui/Expand.js +125 -9
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/draft/component.js +28 -7
- package/dist/esm/ui/annotations/element/mark.js +85 -7
- package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +5 -1
- package/dist/types/ui/annotations/draft/component.d.ts +0 -4
- package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +5 -1
- package/dist/types-ts4.5/ui/annotations/draft/component.d.ts +0 -4
- package/package.json +5 -4
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -24
- package/dist/es2019/react/nodes/mediaSingle/styles.js +0 -18
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -18
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +0 -2
- package/dist/types-ts4.5/react/nodes/mediaSingle/styles.d.ts +0 -2
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -2,7 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
|
-
var _excluded = ["expanded"]
|
|
5
|
+
var _excluded = ["expanded"],
|
|
6
|
+
_excluded2 = ["expanded"];
|
|
6
7
|
var _templateObject, _templateObject2, _templateObject3;
|
|
7
8
|
/**
|
|
8
9
|
* @jsxRuntime classic
|
|
@@ -14,7 +15,7 @@ import React, { useCallback, useRef } from 'react';
|
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
16
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
16
17
|
import { clearNextSiblingMarginTopStyle, ExpandIconWrapper, ExpandLayoutWrapperWithRef, expandMessages, sharedExpandStyles, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
17
|
-
import { akEditorLineHeight,
|
|
18
|
+
import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset } from '@atlaskit/editor-shared-styles';
|
|
18
19
|
import { default as ChevronRightIconLegacy } from '@atlaskit/icon/glyph/chevron-right';
|
|
19
20
|
import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
|
|
20
21
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -22,11 +23,12 @@ import _uniqueId from 'lodash/uniqueId';
|
|
|
22
23
|
import { injectIntl } from 'react-intl-next';
|
|
23
24
|
import { MODE, PLATFORM } from '../analytics/events';
|
|
24
25
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
26
|
+
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
25
27
|
var titleStyles = css({
|
|
26
28
|
outline: 'none',
|
|
27
29
|
border: 'none',
|
|
28
|
-
// eslint-disable-next-line @atlaskit/
|
|
29
|
-
fontSize:
|
|
30
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
31
|
+
fontSize: "".concat(14 / 16, "rem"),
|
|
30
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
31
33
|
lineHeight: akEditorLineHeight,
|
|
32
34
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
@@ -36,7 +38,92 @@ var titleStyles = css({
|
|
|
36
38
|
padding: "0 0 0 ".concat("var(--ds-space-050, 4px)"),
|
|
37
39
|
textAlign: 'left'
|
|
38
40
|
});
|
|
39
|
-
var
|
|
41
|
+
var containerStyles = css({
|
|
42
|
+
borderWidth: '1px',
|
|
43
|
+
borderStyle: 'solid',
|
|
44
|
+
borderColor: 'transparent',
|
|
45
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
46
|
+
minHeight: '25px',
|
|
47
|
+
background: "var(--ds-background-neutral-subtle, transparent)",
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
|
+
transition: "background 0.3s ".concat(akEditorSwoopCubicBezier, ", border-color 0.3s ").concat(akEditorSwoopCubicBezier),
|
|
50
|
+
padding: "var(--ds-space-0, 0px)",
|
|
51
|
+
paddingBottom: "var(--ds-space-0, 0px)",
|
|
52
|
+
marginTop: "var(--ds-space-050, 0.25rem)",
|
|
53
|
+
marginBottom: 0,
|
|
54
|
+
marginLeft: 0,
|
|
55
|
+
marginRight: 0,
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
57
|
+
'td > :not(style):first-child, td > style:first-child + *': {
|
|
58
|
+
marginTop: 0
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var containerStylesExpanded = css({
|
|
62
|
+
background: "var(--ds-surface, rgba(255, 255, 255, 0.6))",
|
|
63
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
64
|
+
borderColor: "var(--ds-border, #091E4224)"
|
|
65
|
+
});
|
|
66
|
+
var containerStylesFocused = css({
|
|
67
|
+
borderColor: "var(--ds-border-focused, #388BFF)"
|
|
68
|
+
});
|
|
69
|
+
var containerStylesDataNodeTypeExpand = css({
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
71
|
+
marginLeft: "-".concat(akLayoutGutterOffset, "px"),
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
73
|
+
marginRight: "-".concat(akLayoutGutterOffset, "px")
|
|
74
|
+
});
|
|
75
|
+
var titleContainerStyles = css({
|
|
76
|
+
display: 'flex',
|
|
77
|
+
alignItems: 'flex-start',
|
|
78
|
+
background: 'none',
|
|
79
|
+
border: 'none',
|
|
80
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
81
|
+
fontSize: "".concat(14 / 16, "rem"),
|
|
82
|
+
width: '100%',
|
|
83
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
84
|
+
overflow: 'hidden',
|
|
85
|
+
cursor: 'pointer',
|
|
86
|
+
padding: "var(--ds-space-100, 8px)",
|
|
87
|
+
'&:focus': {
|
|
88
|
+
outline: 0
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
var titleContainerStylesExpanded = css({
|
|
92
|
+
paddingBottom: "var(--ds-space-0, 0px)"
|
|
93
|
+
});
|
|
94
|
+
var contentContainerStyles = css({
|
|
95
|
+
paddingTop: "var(--ds-space-0, 0px)",
|
|
96
|
+
marginLeft: "var(--ds-space-050, 4px)",
|
|
97
|
+
paddingRight: "var(--ds-space-200, 16px)",
|
|
98
|
+
paddingLeft: "var(--ds-space-400, 32px)",
|
|
99
|
+
display: 'flow-root',
|
|
100
|
+
visibility: 'hidden',
|
|
101
|
+
// The follow rules inside @supports block are added as a part of ED-8893
|
|
102
|
+
// The fix is targeting mobile bridge on iOS 12 or below,
|
|
103
|
+
// We should consider remove this fix when we no longer support iOS 12
|
|
104
|
+
'@supports not (display: flow-root)': {
|
|
105
|
+
width: '100%',
|
|
106
|
+
boxSizing: 'border-box'
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var contentContainerStylesExpanded = css({
|
|
110
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
111
|
+
visibility: 'visible'
|
|
112
|
+
});
|
|
113
|
+
var contentContainerStylesNotExpanded = css({
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
115
|
+
'.expand-content-wrapper, .nestedExpand-content-wrapper': {
|
|
116
|
+
/* We visually hide the content here to preserve the content during copy+paste */
|
|
117
|
+
/* Do not add text nowrap here because inline comment navigation depends on the location of the text */
|
|
118
|
+
width: '100%',
|
|
119
|
+
display: 'block',
|
|
120
|
+
height: 0,
|
|
121
|
+
overflow: 'hidden',
|
|
122
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
123
|
+
userSelect: 'none'
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
var ContainerOld = function ContainerOld(props) {
|
|
40
127
|
var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
41
128
|
var sharedContainerStyles = sharedExpandStyles.containerStyles(props);
|
|
42
129
|
|
|
@@ -52,7 +139,15 @@ var Container = function Container(props) {
|
|
|
52
139
|
}, props), props.children)
|
|
53
140
|
);
|
|
54
141
|
};
|
|
55
|
-
var
|
|
142
|
+
var ContainerNew = function ContainerNew(props) {
|
|
143
|
+
return jsx("div", _extends({
|
|
144
|
+
css: [containerStyles, props['data-node-type'] === 'expand' && containerStylesDataNodeTypeExpand, props.expanded && containerStylesExpanded, props.focused && containerStylesFocused]
|
|
145
|
+
// Ignored via go/ees005
|
|
146
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
147
|
+
}, props), props.children);
|
|
148
|
+
};
|
|
149
|
+
var Container = componentWithFG('platform_editor_emotion_refactor_renderer', ContainerNew, ContainerOld);
|
|
150
|
+
var TitleContainerOld = function TitleContainerOld(props) {
|
|
56
151
|
var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
|
|
57
152
|
|
|
58
153
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
@@ -63,15 +158,29 @@ var TitleContainer = function TitleContainer(props) {
|
|
|
63
158
|
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
64
159
|
return (
|
|
65
160
|
// Ignored via go/ees005
|
|
66
|
-
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage
|
|
161
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/design-system/no-html-button
|
|
67
162
|
jsx("button", _extends({
|
|
68
163
|
type: "button",
|
|
69
164
|
css: styles
|
|
70
165
|
}, buttonProps), props.children)
|
|
71
166
|
);
|
|
72
167
|
};
|
|
168
|
+
var TitleContainerNew = function TitleContainerNew(props) {
|
|
169
|
+
var expanded = props.expanded,
|
|
170
|
+
buttonProps = _objectWithoutProperties(props, _excluded2);
|
|
171
|
+
return (
|
|
172
|
+
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
173
|
+
jsx("button", _extends({
|
|
174
|
+
type: "button",
|
|
175
|
+
css: [titleContainerStyles, expanded && titleContainerStylesExpanded]
|
|
176
|
+
// Ignored via go/ees005
|
|
177
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
178
|
+
}, buttonProps), props.children)
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
var TitleContainer = componentWithFG('platform_editor_emotion_refactor_renderer', TitleContainerNew, TitleContainerOld);
|
|
73
182
|
TitleContainer.displayName = 'TitleContainerButton';
|
|
74
|
-
var
|
|
183
|
+
var ContentContainerOld = function ContentContainerOld(props) {
|
|
75
184
|
var sharedContentStyles = sharedExpandStyles.contentStyles(props);
|
|
76
185
|
var visibility = props.expanded ? 'visible' : 'hidden';
|
|
77
186
|
|
|
@@ -80,7 +189,6 @@ var ContentContainer = function ContentContainer(props) {
|
|
|
80
189
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", ";\n\t\tpadding-right: ", ";\n\t\tpadding-left: ", ";\n\t\tvisibility: ", ";\n\t"])), sharedContentStyles(), "var(--ds-space-200, 16px)", "var(--ds-space-400, 32px)", visibility);
|
|
81
190
|
};
|
|
82
191
|
return (
|
|
83
|
-
// eslint-disable-next-line
|
|
84
192
|
// Ignored via go/ees005
|
|
85
193
|
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage
|
|
86
194
|
jsx("div", _extends({
|
|
@@ -88,6 +196,14 @@ var ContentContainer = function ContentContainer(props) {
|
|
|
88
196
|
}, props), props.children)
|
|
89
197
|
);
|
|
90
198
|
};
|
|
199
|
+
var ContentContainerNew = function ContentContainerNew(props) {
|
|
200
|
+
return jsx("div", _extends({
|
|
201
|
+
css: [contentContainerStyles, props.expanded && contentContainerStylesExpanded, !props.expanded && contentContainerStylesNotExpanded]
|
|
202
|
+
// Ignored via go/ees005
|
|
203
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
204
|
+
}, props), props.children);
|
|
205
|
+
};
|
|
206
|
+
var ContentContainer = componentWithFG('platform_editor_emotion_refactor_renderer', ContentContainerNew, ContentContainerOld);
|
|
91
207
|
function fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent) {
|
|
92
208
|
if (!fireAnalyticsEvent) {
|
|
93
209
|
return;
|
|
@@ -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.3.
|
|
60
|
+
var packageVersion = "114.3.2";
|
|
61
61
|
var setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size',
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
import React, { Fragment } from 'react';
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { css, jsx } from '@emotion/react';
|
|
@@ -14,6 +15,7 @@ import { dataAttributes } from './dom';
|
|
|
14
15
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
15
16
|
import { segmentText } from '../../../react/utils/segment-text';
|
|
16
17
|
import { renderTextSegments } from '../../../react/utils/render-text-segments';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
19
|
|
|
18
20
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
19
21
|
var markStyles = function markStyles() {
|
|
@@ -27,18 +29,37 @@ var markStyles = function markStyles() {
|
|
|
27
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
30
|
AnnotationSharedCSSByState().focus);
|
|
29
31
|
};
|
|
32
|
+
|
|
33
|
+
// Localized AnnotationSharedCSSByState().common and AnnotationSharedCSSByState().focus
|
|
34
|
+
var markStylesNew = css({
|
|
35
|
+
color: 'inherit',
|
|
36
|
+
backgroundColor: 'unset',
|
|
37
|
+
WebkitTapHighlightColor: 'transparent',
|
|
38
|
+
borderBottom: '2px solid transparent',
|
|
39
|
+
cursor: 'pointer',
|
|
40
|
+
padding: '1px 0 2px',
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
42
|
+
'&:has(.card), &:has([data-inline-card])': {
|
|
43
|
+
padding: '5px 0 3px 0'
|
|
44
|
+
},
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
46
|
+
'&:has(.date-lozenger-container)': {
|
|
47
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
48
|
+
},
|
|
49
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
50
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
51
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
|
|
52
|
+
});
|
|
30
53
|
export var AnnotationDraft = function AnnotationDraft(_ref) {
|
|
31
54
|
var draftPosition = _ref.draftPosition,
|
|
32
55
|
children = _ref.children;
|
|
33
|
-
return (
|
|
56
|
+
return jsx("mark", _extends({
|
|
57
|
+
"data-renderer-mark": true
|
|
34
58
|
// Ignored via go/ees005
|
|
35
59
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
css: markStyles
|
|
40
|
-
}), children)
|
|
41
|
-
);
|
|
60
|
+
}, dataAttributes(draftPosition), {
|
|
61
|
+
css: fg('platform_editor_emotion_refactor_renderer') ? markStylesNew : markStyles
|
|
62
|
+
}), children);
|
|
42
63
|
};
|
|
43
64
|
export var getAnnotationIndex = function getAnnotationIndex(annotationPosition, fragmentCount) {
|
|
44
65
|
if (annotationPosition === InsertDraftPosition.START) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject;
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -17,17 +17,65 @@ import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
18
|
import { useIntl } from 'react-intl-next';
|
|
19
19
|
import { inlineCommentMessages } from '../../../messages';
|
|
20
|
-
|
|
21
20
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
|
|
22
|
-
var
|
|
21
|
+
var markStylesOld = function markStylesOld() {
|
|
23
22
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']) {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus, fg('confluence-frontend-comments-panel') ? AnnotationSharedCSSByState().hover : '');
|
|
24
23
|
};
|
|
24
|
+
var markStylesNew = css(_defineProperty({
|
|
25
|
+
color: 'inherit',
|
|
26
|
+
backgroundColor: 'unset',
|
|
27
|
+
WebkitTapHighlightColor: 'transparent'
|
|
28
|
+
}, "&[data-mark-annotation-state='".concat(AnnotationMarkStates.ACTIVE, "']"), {
|
|
29
|
+
// was from blur in AnnotationSharedCSSByState().blur
|
|
30
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
31
|
+
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, #B38600)"),
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
33
|
+
'&:focus, &[data-has-focus="true"]': {
|
|
34
|
+
background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
|
|
35
|
+
borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, #B38600)"),
|
|
36
|
+
// TODO: DSP-4147 - Annotation shadow
|
|
37
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
38
|
+
cursor: 'pointer'
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
var markStylesNewWithInlineComments = css(_defineProperty({}, "&[data-mark-annotation-state='".concat(AnnotationMarkStates.ACTIVE, "']"), {
|
|
42
|
+
// was from common in AnnotationSharedCSSByState().common
|
|
43
|
+
borderBottom: '2px solid transparent',
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
padding: '1px 0 2px',
|
|
46
|
+
// it was under fg(annotations_align_editor_and_renderer_styles) from AnnotationSharedCSSByState().common, assume it's on as already rolled out
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
48
|
+
'&:has(.card), &:has([data-inline-card])': {
|
|
49
|
+
padding: '5px 0 3px 0'
|
|
50
|
+
},
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
52
|
+
'&:has(.date-lozenger-container)': {
|
|
53
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
54
|
+
},
|
|
55
|
+
// was from blur in AnnotationSharedCSSByState().blur
|
|
56
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
57
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
59
|
+
'&:focus, &[data-has-focus="true"]': {
|
|
60
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
61
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
62
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
var markStylesNewWithCommentsPanel = css(_defineProperty({}, "&[data-mark-annotation-state='".concat(AnnotationMarkStates.ACTIVE, "']"), {
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
67
|
+
'&[data-is-hovered="true"]:not([data-has-focus="true"])': {
|
|
68
|
+
background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
|
|
69
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
70
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
25
73
|
var isMobile = function isMobile() {
|
|
26
74
|
// Ignored via go/ees005
|
|
27
75
|
// eslint-disable-next-line require-unicode-regexp
|
|
28
76
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
29
77
|
};
|
|
30
|
-
var
|
|
78
|
+
var accessibilityStylesOld = function accessibilityStylesOld(startMarker, endMarker) {
|
|
31
79
|
return css({
|
|
32
80
|
'&::before, &::after': {
|
|
33
81
|
clipPath: 'inset(100%)',
|
|
@@ -48,6 +96,25 @@ var accessibilityStyles = function accessibilityStyles(startMarker, endMarker) {
|
|
|
48
96
|
}
|
|
49
97
|
});
|
|
50
98
|
};
|
|
99
|
+
var accessibilityStylesNew = css({
|
|
100
|
+
'&::before, &::after': {
|
|
101
|
+
clipPath: 'inset(100%)',
|
|
102
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
103
|
+
height: '1px',
|
|
104
|
+
overflow: 'hidden',
|
|
105
|
+
position: 'absolute',
|
|
106
|
+
whiteSpace: 'nowrap',
|
|
107
|
+
width: '1px'
|
|
108
|
+
},
|
|
109
|
+
'&::before': {
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
111
|
+
content: "' [var(--ak-renderer-annotation-startmarker)] '"
|
|
112
|
+
},
|
|
113
|
+
'&::after': {
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
115
|
+
content: "' [var(--ak-renderer-annotation-endmarker)] '"
|
|
116
|
+
}
|
|
117
|
+
});
|
|
51
118
|
export var MarkComponent = function MarkComponent(_ref) {
|
|
52
119
|
var annotationParentIds = _ref.annotationParentIds,
|
|
53
120
|
children = _ref.children,
|
|
@@ -119,21 +186,32 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
119
186
|
} : _objectSpread({
|
|
120
187
|
'aria-details': annotationIds.join(', ')
|
|
121
188
|
}, desktopAccessibilityAttributes);
|
|
122
|
-
var
|
|
189
|
+
var getAccessibilityStylesOld = function getAccessibilityStylesOld() {
|
|
123
190
|
if (isMobile()) {
|
|
124
191
|
return {};
|
|
125
192
|
}
|
|
126
193
|
if (state !== AnnotationMarkStates.RESOLVED) {
|
|
127
194
|
var startMarker = intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart);
|
|
128
195
|
var endMarker = intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd);
|
|
129
|
-
return
|
|
196
|
+
return accessibilityStylesOld(startMarker, endMarker);
|
|
130
197
|
} else {
|
|
131
198
|
return {};
|
|
132
199
|
}
|
|
133
200
|
};
|
|
201
|
+
if (fg('platform_editor_emotion_refactor_renderer')) {
|
|
202
|
+
return jsx(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread(_defineProperty({
|
|
203
|
+
id: id
|
|
204
|
+
}, fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
205
|
+
css: [markStylesNew, fg('editor_inline_comments_on_inline_nodes') && markStylesNewWithInlineComments, fg('confluence-frontend-comments-panel') && markStylesNewWithCommentsPanel, !isMobile() && accessibilityStylesNew],
|
|
206
|
+
style: {
|
|
207
|
+
'--ak-renderer-annotation-startmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
208
|
+
'--ak-renderer-annotation-endmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
209
|
+
}
|
|
210
|
+
}), children);
|
|
211
|
+
}
|
|
134
212
|
return jsx(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread(_defineProperty({
|
|
135
213
|
id: id
|
|
136
214
|
}, fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
137
|
-
css: [
|
|
215
|
+
css: [markStylesOld, getAccessibilityStylesOld()]
|
|
138
216
|
}), children);
|
|
139
217
|
};
|
|
@@ -7,6 +7,10 @@ import type { Props as CodeBlockProps } from '../codeBlock';
|
|
|
7
7
|
export declare const LightWeightCodeBlockCssClassName: {
|
|
8
8
|
CONTAINER: string;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
* @deprecated styles are moved to RendererStyleContainer
|
|
13
|
+
*/
|
|
10
14
|
export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => import("@emotion/react").SerializedStyles;
|
|
11
|
-
declare const LightWeightCodeBlock: React.
|
|
15
|
+
declare const LightWeightCodeBlock: React.FC<Omit<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
16
|
export default LightWeightCodeBlock;
|
|
@@ -7,6 +7,10 @@ import type { Props as CodeBlockProps } from '../codeBlock';
|
|
|
7
7
|
export declare const LightWeightCodeBlockCssClassName: {
|
|
8
8
|
CONTAINER: string;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
* @deprecated styles are moved to RendererStyleContainer
|
|
13
|
+
*/
|
|
10
14
|
export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => import("@emotion/react").SerializedStyles;
|
|
11
|
-
declare const LightWeightCodeBlock: React.
|
|
15
|
+
declare const LightWeightCodeBlock: React.FC<Omit<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
16
|
export default LightWeightCodeBlock;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "114.3.
|
|
3
|
+
"version": "114.3.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
32
32
|
"@atlaskit/button": "^21.1.0",
|
|
33
33
|
"@atlaskit/code": "^16.0.0",
|
|
34
|
-
"@atlaskit/editor-common": "^102.
|
|
34
|
+
"@atlaskit/editor-common": "^102.8.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/emoji": "^68.0.0",
|
|
40
40
|
"@atlaskit/feature-gate-js-client": "^4.26.0",
|
|
41
41
|
"@atlaskit/icon": "^25.0.0",
|
|
42
|
-
"@atlaskit/link-datasource": "^
|
|
42
|
+
"@atlaskit/link-datasource": "^4.0.0",
|
|
43
43
|
"@atlaskit/media-card": "^79.0.0",
|
|
44
44
|
"@atlaskit/media-client": "^32.0.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
@@ -48,12 +48,13 @@
|
|
|
48
48
|
"@atlaskit/media-ui": "^28.0.0",
|
|
49
49
|
"@atlaskit/media-viewer": "^52.0.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
|
+
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
51
52
|
"@atlaskit/react-ufo": "^3.4.0",
|
|
52
53
|
"@atlaskit/smart-card": "^35.2.0",
|
|
53
54
|
"@atlaskit/status": "^3.0.0",
|
|
54
55
|
"@atlaskit/task-decision": "^19.1.0",
|
|
55
56
|
"@atlaskit/theme": "^18.0.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^4.0.0",
|
|
57
58
|
"@atlaskit/tokens": "^4.5.0",
|
|
58
59
|
"@atlaskit/tooltip": "^20.0.0",
|
|
59
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.uiMediaSingleLayoutStyles = exports.uiMediaSingleBaseStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
/**
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
15
|
-
var uiMediaSingleBaseStyles = exports.uiMediaSingleBaseStyles = (0, _react.css)({
|
|
16
|
-
transition: 'all 0.1s linear'
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
20
|
-
var uiMediaSingleLayoutStyles = exports.uiMediaSingleLayoutStyles = (0, _react.css)({
|
|
21
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
22
|
-
marginLeft: '50%',
|
|
23
|
-
transform: 'translateX(-50%)'
|
|
24
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css } from '@emotion/react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
|
-
export const uiMediaSingleBaseStyles = css({
|
|
10
|
-
transition: 'all 0.1s linear'
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
|
-
export const uiMediaSingleLayoutStyles = css({
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
16
|
-
marginLeft: '50%',
|
|
17
|
-
transform: 'translateX(-50%)'
|
|
18
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css } from '@emotion/react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
|
-
export var uiMediaSingleBaseStyles = css({
|
|
10
|
-
transition: 'all 0.1s linear'
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
|
-
export var uiMediaSingleLayoutStyles = css({
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
16
|
-
marginLeft: '50%',
|
|
17
|
-
transform: 'translateX(-50%)'
|
|
18
|
-
});
|