@atlaskit/renderer 136.2.3 → 136.2.5
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 +17 -0
- package/dist/cjs/react/index.js +1 -3
- package/dist/cjs/react/marks/breakout.js +10 -38
- package/dist/cjs/react/nodes/blockCard.js +3 -15
- package/dist/cjs/react/nodes/embedCard.js +1 -13
- package/dist/cjs/react/nodes/extension.js +2 -2
- package/dist/cjs/react/nodes/multiBodiedExtension.js +2 -2
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +16 -14
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +2 -4
- package/dist/es2019/react/marks/breakout.js +10 -39
- package/dist/es2019/react/nodes/blockCard.js +3 -15
- package/dist/es2019/react/nodes/embedCard.js +1 -13
- package/dist/es2019/react/nodes/extension.js +2 -2
- package/dist/es2019/react/nodes/multiBodiedExtension.js +2 -2
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +15 -17
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +2 -4
- package/dist/esm/react/marks/breakout.js +10 -39
- package/dist/esm/react/nodes/blockCard.js +3 -15
- package/dist/esm/react/nodes/embedCard.js +1 -13
- package/dist/esm/react/nodes/extension.js +2 -2
- package/dist/esm/react/nodes/multiBodiedExtension.js +2 -2
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +16 -14
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 136.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4067622b56b33`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4067622b56b33) -
|
|
8
|
+
Clean up experiment `platform_editor_flex_based_centering`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 136.2.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`b6733d7c1b79e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b6733d7c1b79e) -
|
|
16
|
+
[ux] Updated styles for collapsible headings to ensure any element with height set via inline
|
|
17
|
+
style is not taking space when heading is collapsed.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 136.2.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -447,9 +447,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
447
447
|
var isInsideOfBlockNode = (0, _rendererNode.insideBlockNode)(path, node.type.schema);
|
|
448
448
|
var isInsideMultiBodiedExtension = (0, _rendererNode.insideMultiBodiedExtension)(path, node.type.schema);
|
|
449
449
|
var isInsideOfTable = (0, _rendererNode.insideTable)(path, node.type.schema);
|
|
450
|
-
var
|
|
451
|
-
var isInsideBreakoutExpand = !isStickySafeCenteringEnabled && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _rendererNode.insideBreakoutExpand)(path);
|
|
452
|
-
var stickyHeaders = isStickySafeCenteringEnabled ? !isInsideOfTable ? this.stickyHeaders : undefined : !isInsideOfTable && !(0, _rendererNode.insideBreakoutLayout)(path) && !isInsideBreakoutExpand ? this.stickyHeaders : undefined;
|
|
450
|
+
var stickyHeaders = !isInsideOfTable ? this.stickyHeaders : undefined;
|
|
453
451
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
454
452
|
allowColumnSorting: this.allowColumnSorting,
|
|
455
453
|
columnWidths: (0, _utils.getColumnWidths)(node),
|
|
@@ -17,14 +17,6 @@ var _consts = require("../../consts");
|
|
|
17
17
|
*/
|
|
18
18
|
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
19
19
|
|
|
20
|
-
// Legacy centering (breaks position: sticky in nested content).
|
|
21
|
-
var legacyWrapperStyles = (0, _react.css)({
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
|
-
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0"),
|
|
24
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
25
|
-
marginLeft: '50%',
|
|
26
|
-
transform: 'translateX(-50%)'
|
|
27
|
-
});
|
|
28
20
|
var flexWrapperStyles = (0, _react.css)({
|
|
29
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
22
|
margin: "".concat(_editorSharedStyles.blockNodesVerticalMargin, " 0")
|
|
@@ -63,32 +55,15 @@ function Breakout(props) {
|
|
|
63
55
|
var _props$width;
|
|
64
56
|
var breakoutWidth = (_props$width = props.width) !== null && _props$width !== void 0 ? _props$width : null;
|
|
65
57
|
var width = getWidth(breakoutWidth, props.mode);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
,
|
|
76
|
-
className: "".concat(_consts.RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " fabric-editor-breakout-mark fabric-editor-block-mark"),
|
|
77
|
-
"data-mode": props.mode
|
|
78
|
-
// Ignored via go/ees005
|
|
79
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
80
|
-
}, (0, _experiments.editorExperiment)('advanced_layouts', true) && {
|
|
81
|
-
'data-has-width': !!props.width,
|
|
82
|
-
'data-width': props.width
|
|
83
|
-
}, {
|
|
84
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
85
|
-
style: {
|
|
86
|
-
width: width
|
|
87
|
-
}
|
|
88
|
-
}), props.children));
|
|
89
|
-
}
|
|
90
|
-
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
91
|
-
css: legacyWrapperStyles,
|
|
58
|
+
return (0, _react.jsx)("div", {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
60
|
+
className: _consts.RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER + ' ' + _consts.RendererCssClassName.FLEX_CENTER_WRAPPER,
|
|
61
|
+
css: flexWrapperStyles
|
|
62
|
+
}, (0, _react.jsx)("div", (0, _extends2.default)({
|
|
63
|
+
css: innerWrapperStyles
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
65
|
+
,
|
|
66
|
+
className: "".concat(_consts.RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " fabric-editor-breakout-mark fabric-editor-block-mark"),
|
|
92
67
|
"data-mode": props.mode
|
|
93
68
|
// Ignored via go/ees005
|
|
94
69
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -100,8 +75,5 @@ function Breakout(props) {
|
|
|
100
75
|
style: {
|
|
101
76
|
width: width
|
|
102
77
|
}
|
|
103
|
-
|
|
104
|
-
,
|
|
105
|
-
className: "fabric-editor-breakout-mark fabric-editor-block-mark"
|
|
106
|
-
}), props.children);
|
|
78
|
+
}), props.children));
|
|
107
79
|
}
|
|
@@ -18,7 +18,6 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
18
18
|
var _linkDatasource = require("@atlaskit/link-datasource");
|
|
19
19
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
20
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
21
|
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
23
22
|
var _PortalContext = require("../../ui/Renderer/PortalContext");
|
|
24
23
|
var _consts = require("../../consts");
|
|
@@ -40,22 +39,12 @@ var datasourceContainerStyleWithMarginTop = (0, _react.css)({
|
|
|
40
39
|
marginBottom: "var(--ds-space-150, 12px)"
|
|
41
40
|
});
|
|
42
41
|
|
|
43
|
-
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse).
|
|
42
|
+
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse).
|
|
44
43
|
var datasourceContainerStyleNoVerticalMargin = (0, _react.css)({
|
|
45
44
|
borderRadius: "var(--ds-radius-large, 8px)",
|
|
46
45
|
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
47
46
|
overflow: 'hidden'
|
|
48
47
|
});
|
|
49
|
-
var datasourceContainerStyleLegacy = (0, _react.css)({
|
|
50
|
-
borderRadius: "var(--ds-radius-large, 8px)",
|
|
51
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
52
|
-
overflow: 'hidden',
|
|
53
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
54
|
-
marginLeft: '50%',
|
|
55
|
-
marginBottom: "var(--ds-space-150, 12px)",
|
|
56
|
-
transform: 'translateX(-50%)',
|
|
57
|
-
marginTop: "var(--ds-space-150, 12px)"
|
|
58
|
-
});
|
|
59
48
|
function BlockCard(props) {
|
|
60
49
|
var url = props.url,
|
|
61
50
|
data = props.data,
|
|
@@ -140,10 +129,9 @@ function BlockCard(props) {
|
|
|
140
129
|
onClick: onConsumerClick
|
|
141
130
|
}), (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref5) {
|
|
142
131
|
var width = _ref5.width;
|
|
143
|
-
var
|
|
144
|
-
var useCenterWrapper = !isNodeNested && useStickySafeCentering;
|
|
132
|
+
var useCenterWrapper = !isNodeNested;
|
|
145
133
|
var datasourceDiv = (0, _react.jsx)("div", {
|
|
146
|
-
css: useCenterWrapper ? datasourceContainerStyleNoVerticalMargin :
|
|
134
|
+
css: useCenterWrapper ? datasourceContainerStyleNoVerticalMargin : datasourceContainerStyleWithMarginTop,
|
|
147
135
|
"data-testid": "renderer-datasource-table",
|
|
148
136
|
"data-local-id": localId,
|
|
149
137
|
style: {
|
|
@@ -16,7 +16,6 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
19
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
19
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
20
|
var _fallback = require("./fallback");
|
|
22
21
|
var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
|
|
@@ -52,14 +51,6 @@ var embedCardCenterWrapperStyles = (0, _react.css)({
|
|
|
52
51
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- Matches editor-common MediaSingle calcMargin
|
|
53
52
|
margin: '24px 0'
|
|
54
53
|
});
|
|
55
|
-
|
|
56
|
-
// Legacy centering when platform_editor_flex_based_centering is off.
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
58
|
-
var uIMediaSingleLayoutStylesLegacy = (0, _react.css)({
|
|
59
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
60
|
-
marginLeft: '50%',
|
|
61
|
-
transform: 'translateX(-50%)'
|
|
62
|
-
});
|
|
63
54
|
function EmbedCardInternal(props) {
|
|
64
55
|
var _smartLinks$frameStyl;
|
|
65
56
|
var url = props.url,
|
|
@@ -164,8 +155,6 @@ function EmbedCardInternal(props) {
|
|
|
164
155
|
}
|
|
165
156
|
}
|
|
166
157
|
var lineLength = isFullWidth ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, containerWidth - padding) : nonFullWidthSize;
|
|
167
|
-
var useStickySafeCentering = (0, _expValEquals.expValEquals)('platform_editor_flex_based_centering', 'isEnabled', true);
|
|
168
|
-
var uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? useStickySafeCentering ? undefined : uIMediaSingleLayoutStylesLegacy : '';
|
|
169
158
|
var onError = function onError(_ref4) {
|
|
170
159
|
var err = _ref4.err;
|
|
171
160
|
if (err) {
|
|
@@ -221,9 +210,8 @@ function EmbedCardInternal(props) {
|
|
|
221
210
|
embedIframeRef: embedIframeRef,
|
|
222
211
|
onHeightUpdate: setLiveHeight
|
|
223
212
|
}, function () {
|
|
224
|
-
var useCenterWrapper =
|
|
213
|
+
var useCenterWrapper = layout === 'full-width' || layout === 'wide';
|
|
225
214
|
var mediaSingle = (0, _react.jsx)(_ui.MediaSingle, {
|
|
226
|
-
css: uiMediaSingleStyles,
|
|
227
215
|
layout: layout,
|
|
228
216
|
width: originalWidth,
|
|
229
217
|
containerWidth: containerWidth,
|
|
@@ -136,7 +136,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
136
136
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
137
137
|
css: [!(isInsideOfTable && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
138
138
|
}, asInlineAnalytics, content));
|
|
139
|
-
return centerAlignClass
|
|
139
|
+
return centerAlignClass ? (0, _react.jsx)("div", {
|
|
140
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
141
141
|
className: _consts.RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + _consts.RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
142
142
|
}, extensionDiv) : extensionDiv;
|
|
@@ -166,7 +166,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
166
166
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
167
167
|
css: [!(isInsideOfTable && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && (0, _platformFeatureFlags.fg)('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
168
168
|
}, asInlineAnalytics, content));
|
|
169
|
-
return centerAlignClass
|
|
169
|
+
return centerAlignClass ? (0, _react.jsx)("div", {
|
|
170
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
171
171
|
className: _consts.RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + _consts.RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
172
172
|
}, extensionDiv) : extensionDiv;
|
|
@@ -181,7 +181,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
181
181
|
var containerActiveFrameStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t& [data-extension-frame='true']:nth-of-type(", ") {\n\t\t\tdisplay: block;\n\t\t}\n\t"])), activeChildIndex + 1);
|
|
182
182
|
if ((0, _expValEquals.expValEquals)('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
183
183
|
var _isTopLevel = path.length < 1;
|
|
184
|
-
var _useCenterWrapper = _isTopLevel && ['wide', 'full-width'].includes(layout)
|
|
184
|
+
var _useCenterWrapper = _isTopLevel && ['wide', 'full-width'].includes(layout);
|
|
185
185
|
var wrapper = (0, _react.jsx)(MultiBodiedExtensionWrapperNext, {
|
|
186
186
|
layout: layout,
|
|
187
187
|
path: path,
|
|
@@ -201,7 +201,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
201
201
|
}, wrapper) : wrapper);
|
|
202
202
|
}
|
|
203
203
|
var isTopLevel = path.length < 1;
|
|
204
|
-
var useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout)
|
|
204
|
+
var useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout);
|
|
205
205
|
return (0, _react.jsx)("section", {
|
|
206
206
|
css: [containerStyles, containerActiveFrameStyles],
|
|
207
207
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -29,7 +29,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
29
29
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
30
30
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
31
31
|
var _collapsibleHeadingsDom = require("../collapsible-headings-dom");
|
|
32
|
-
var _css9, _$concat3, _$
|
|
32
|
+
var _css9, _$concat3, _$concat5;
|
|
33
33
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
34
34
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
35
35
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -99,10 +99,17 @@ var baseStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProper
|
|
|
99
99
|
clear: 'both'
|
|
100
100
|
}), ".".concat(_consts.RendererCssClassName.DOCUMENT), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "> [".concat(_collapsibleHeadingsDom.COLLAPSED_CONTENT_OWNERS_ATTRIBUTE, "][hidden='until-found']"), {
|
|
101
101
|
display: 'block',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
// `hidden='until-found'` maps to `content-visibility: hidden`, which skips the element's
|
|
103
|
+
// contents but keeps its own box, sized by its own specified sizes. Everything below
|
|
104
|
+
// needs `!important` because extension nodes are sized and spaced by declarations that
|
|
105
|
+
// would otherwise win: an inline `height`/`min-height` reserving macro height (see
|
|
106
|
+
// `react/nodes/extension.tsx`), and `!important` alignment margins from
|
|
107
|
+
// `@atlaskit/native-embeds-common`. Without it the collapsed section keeps a visible gap.
|
|
108
|
+
blockSize: '0 !important',
|
|
109
|
+
minBlockSize: '0 !important',
|
|
110
|
+
marginBlock: '0 !important',
|
|
111
|
+
paddingBlock: '0 !important',
|
|
112
|
+
borderBlockWidth: '0 !important'
|
|
106
113
|
}), ".".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
107
114
|
height: '22px',
|
|
108
115
|
transform: "translateY(-2px)"
|
|
@@ -1038,7 +1045,7 @@ var headerSmartCardStyles = (0, _react.css)({
|
|
|
1038
1045
|
}
|
|
1039
1046
|
});
|
|
1040
1047
|
|
|
1041
|
-
// Flex wrapper for centering without transform
|
|
1048
|
+
// Flex wrapper for centering without transform.
|
|
1042
1049
|
// flex: 1 1 0% + minWidth: 0 so the wrapper takes full width when it's a flex item (full-width nodes otherwise render narrow).
|
|
1043
1050
|
// flexShrink: 0 on child so the node keeps size.
|
|
1044
1051
|
var centerWrapperStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.FLEX_CENTER_WRAPPER), {
|
|
@@ -1141,11 +1148,6 @@ var baseOtherStylesDuplicateAnchor = (0, _react.css)((0, _defineProperty2.defaul
|
|
|
1141
1148
|
var hideExtensionStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.EXTENSION, ":has([data-extension-key='hide'])"), {
|
|
1142
1149
|
marginTop: 0
|
|
1143
1150
|
}));
|
|
1144
|
-
var extensionCenterAlignLegacyStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT), (0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.EXTENSION_CENTER_ALIGN), {
|
|
1145
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
1146
|
-
marginLeft: '50%',
|
|
1147
|
-
transform: 'translateX(-50%)'
|
|
1148
|
-
})));
|
|
1149
1151
|
var baseOtherStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
1150
1152
|
'& .UnknownBlock': {
|
|
1151
1153
|
fontFamily: "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
@@ -1207,7 +1209,7 @@ var baseOtherStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineP
|
|
|
1207
1209
|
overflowX: 'auto'
|
|
1208
1210
|
}), "& .".concat(_consts.RendererCssClassName.EXTENSION, ":first-child"), {
|
|
1209
1211
|
marginTop: 0
|
|
1210
|
-
})), ".".concat(_consts.RendererCssClassName.DOCUMENT), (_$
|
|
1212
|
+
})), ".".concat(_consts.RendererCssClassName.DOCUMENT), (_$concat5 = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_$concat5, ".".concat(_consts.RendererCssClassName.EXTENSION), {
|
|
1211
1213
|
marginTop: "".concat(_editorSharedStyles.blockNodesVerticalMargin)
|
|
1212
1214
|
}), ".".concat(_consts.RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER, " .").concat(_consts.RendererCssClassName.EXTENSION), {
|
|
1213
1215
|
marginBottom: 0
|
|
@@ -1228,7 +1230,7 @@ var baseOtherStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineP
|
|
|
1228
1230
|
marginBottom: 0
|
|
1229
1231
|
}), ".".concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER), {
|
|
1230
1232
|
overflowX: 'auto'
|
|
1231
|
-
}), (0, _defineProperty2.default)(_$
|
|
1233
|
+
}), (0, _defineProperty2.default)(_$concat5, ".".concat(_ui.shadowObserverClassNames.SHADOW_CONTAINER, " .").concat(_styles.TableSharedCssClassName.TABLE_NODE_WRAPPER), {
|
|
1232
1234
|
display: 'flex'
|
|
1233
1235
|
}))));
|
|
1234
1236
|
var alignedHeadingAnchorStyleDuplicateAnchor = (0, _react.css)({
|
|
@@ -2289,7 +2291,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2289
2291
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2290
2292
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2291
2293
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2292
|
-
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2294
|
+
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2293
2295
|
// this should be placed after baseOtherStyles
|
|
2294
2296
|
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2295
2297
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
@@ -74,7 +74,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
74
74
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
75
75
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
76
76
|
var packageName = "@atlaskit/renderer";
|
|
77
|
-
var packageVersion = "136.2.
|
|
77
|
+
var packageVersion = "136.2.4";
|
|
78
78
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
79
79
|
containerName: 'ak-renderer-wrapper',
|
|
80
80
|
containerType: 'inline-size'
|
|
@@ -14,7 +14,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
14
14
|
import { getText } from '../utils';
|
|
15
15
|
import { isAnnotationMark, toReact as markToReact } from './marks';
|
|
16
16
|
import { isCodeMark } from './marks/code';
|
|
17
|
-
import { getNestedUnderNodes, insideBlockNode,
|
|
17
|
+
import { getNestedUnderNodes, insideBlockNode, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
18
18
|
import { renderTextSegments } from './utils/render-text-segments';
|
|
19
19
|
import { segmentText } from './utils/segment-text';
|
|
20
20
|
import { getStandaloneBackgroundColorMarks } from './utils/getStandaloneBackgroundColorMarks';
|
|
@@ -413,9 +413,7 @@ export default class ReactSerializer {
|
|
|
413
413
|
const isInsideOfBlockNode = insideBlockNode(path, node.type.schema);
|
|
414
414
|
const isInsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
|
|
415
415
|
const isInsideOfTable = insideTable(path, node.type.schema);
|
|
416
|
-
const
|
|
417
|
-
const isInsideBreakoutExpand = !isStickySafeCenteringEnabled && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && insideBreakoutExpand(path);
|
|
418
|
-
const stickyHeaders = isStickySafeCenteringEnabled ? !isInsideOfTable ? this.stickyHeaders : undefined : !isInsideOfTable && !insideBreakoutLayout(path) && !isInsideBreakoutExpand ? this.stickyHeaders : undefined;
|
|
416
|
+
const stickyHeaders = !isInsideOfTable ? this.stickyHeaders : undefined;
|
|
419
417
|
return {
|
|
420
418
|
...this.getProps(node),
|
|
421
419
|
allowColumnSorting: this.allowColumnSorting,
|
|
@@ -9,15 +9,6 @@ import { akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVertica
|
|
|
9
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import { RendererCssClassName } from '../../consts';
|
|
12
|
-
|
|
13
|
-
// Legacy centering (breaks position: sticky in nested content).
|
|
14
|
-
const legacyWrapperStyles = css({
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
16
|
-
margin: `${blockNodesVerticalMargin} 0`,
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
18
|
-
marginLeft: '50%',
|
|
19
|
-
transform: 'translateX(-50%)'
|
|
20
|
-
});
|
|
21
12
|
const flexWrapperStyles = css({
|
|
22
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
14
|
margin: `${blockNodesVerticalMargin} 0`
|
|
@@ -56,32 +47,15 @@ export default function Breakout(props) {
|
|
|
56
47
|
var _props$width;
|
|
57
48
|
const breakoutWidth = (_props$width = props.width) !== null && _props$width !== void 0 ? _props$width : null;
|
|
58
49
|
const width = getWidth(breakoutWidth, props.mode);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
,
|
|
69
|
-
className: `${RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER} fabric-editor-breakout-mark fabric-editor-block-mark`,
|
|
70
|
-
"data-mode": props.mode
|
|
71
|
-
// Ignored via go/ees005
|
|
72
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
73
|
-
}, editorExperiment('advanced_layouts', true) && {
|
|
74
|
-
'data-has-width': !!props.width,
|
|
75
|
-
'data-width': props.width
|
|
76
|
-
}, {
|
|
77
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
78
|
-
style: {
|
|
79
|
-
width
|
|
80
|
-
}
|
|
81
|
-
}), props.children));
|
|
82
|
-
}
|
|
83
|
-
return jsx("div", _extends({
|
|
84
|
-
css: legacyWrapperStyles,
|
|
50
|
+
return jsx("div", {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
52
|
+
className: RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER,
|
|
53
|
+
css: flexWrapperStyles
|
|
54
|
+
}, jsx("div", _extends({
|
|
55
|
+
css: innerWrapperStyles
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
57
|
+
,
|
|
58
|
+
className: `${RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER} fabric-editor-breakout-mark fabric-editor-block-mark`,
|
|
85
59
|
"data-mode": props.mode
|
|
86
60
|
// Ignored via go/ees005
|
|
87
61
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -93,8 +67,5 @@ export default function Breakout(props) {
|
|
|
93
67
|
style: {
|
|
94
68
|
width
|
|
95
69
|
}
|
|
96
|
-
|
|
97
|
-
,
|
|
98
|
-
className: "fabric-editor-breakout-mark fabric-editor-block-mark"
|
|
99
|
-
}), props.children);
|
|
70
|
+
}), props.children));
|
|
100
71
|
}
|
|
@@ -16,7 +16,6 @@ import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
16
16
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
17
17
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
19
|
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
21
20
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
22
21
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -32,22 +31,12 @@ const datasourceContainerStyleWithMarginTop = css({
|
|
|
32
31
|
marginBottom: `${"var(--ds-space-150, 12px)"}`
|
|
33
32
|
});
|
|
34
33
|
|
|
35
|
-
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse).
|
|
34
|
+
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse).
|
|
36
35
|
const datasourceContainerStyleNoVerticalMargin = css({
|
|
37
36
|
borderRadius: `${"var(--ds-radius-large, 8px)"}`,
|
|
38
37
|
border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #0B120E24)"}`,
|
|
39
38
|
overflow: 'hidden'
|
|
40
39
|
});
|
|
41
|
-
const datasourceContainerStyleLegacy = css({
|
|
42
|
-
borderRadius: `${"var(--ds-radius-large, 8px)"}`,
|
|
43
|
-
border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #0B120E24)"}`,
|
|
44
|
-
overflow: 'hidden',
|
|
45
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
46
|
-
marginLeft: '50%',
|
|
47
|
-
marginBottom: `${"var(--ds-space-150, 12px)"}`,
|
|
48
|
-
transform: 'translateX(-50%)',
|
|
49
|
-
marginTop: `${"var(--ds-space-150, 12px)"}`
|
|
50
|
-
});
|
|
51
40
|
export default function BlockCard(props) {
|
|
52
41
|
const {
|
|
53
42
|
url,
|
|
@@ -129,10 +118,9 @@ export default function BlockCard(props) {
|
|
|
129
118
|
}), jsx(WidthConsumer, null, ({
|
|
130
119
|
width
|
|
131
120
|
}) => {
|
|
132
|
-
const
|
|
133
|
-
const useCenterWrapper = !isNodeNested && useStickySafeCentering;
|
|
121
|
+
const useCenterWrapper = !isNodeNested;
|
|
134
122
|
const datasourceDiv = jsx("div", {
|
|
135
|
-
css: useCenterWrapper ? datasourceContainerStyleNoVerticalMargin :
|
|
123
|
+
css: useCenterWrapper ? datasourceContainerStyleNoVerticalMargin : datasourceContainerStyleWithMarginTop,
|
|
136
124
|
"data-testid": "renderer-datasource-table",
|
|
137
125
|
"data-local-id": localId,
|
|
138
126
|
style: {
|
|
@@ -14,7 +14,6 @@ import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle, WidthCon
|
|
|
14
14
|
import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
17
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
18
|
import { CardErrorBoundary } from './fallback';
|
|
20
19
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
@@ -43,14 +42,6 @@ const embedCardCenterWrapperStyles = css({
|
|
|
43
42
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- Matches editor-common MediaSingle calcMargin
|
|
44
43
|
margin: '24px 0'
|
|
45
44
|
});
|
|
46
|
-
|
|
47
|
-
// Legacy centering when platform_editor_flex_based_centering is off.
|
|
48
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
49
|
-
const uIMediaSingleLayoutStylesLegacy = css({
|
|
50
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
51
|
-
marginLeft: '50%',
|
|
52
|
-
transform: 'translateX(-50%)'
|
|
53
|
-
});
|
|
54
45
|
function EmbedCardInternal(props) {
|
|
55
46
|
var _smartLinks$frameStyl;
|
|
56
47
|
const {
|
|
@@ -151,8 +142,6 @@ function EmbedCardInternal(props) {
|
|
|
151
142
|
}
|
|
152
143
|
}
|
|
153
144
|
const lineLength = isFullWidth ? Math.min(akEditorFullWidthLayoutWidth, containerWidth - padding) : nonFullWidthSize;
|
|
154
|
-
const useStickySafeCentering = expValEquals('platform_editor_flex_based_centering', 'isEnabled', true);
|
|
155
|
-
const uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? useStickySafeCentering ? undefined : uIMediaSingleLayoutStylesLegacy : '';
|
|
156
145
|
const onError = ({
|
|
157
146
|
err
|
|
158
147
|
}) => {
|
|
@@ -209,9 +198,8 @@ function EmbedCardInternal(props) {
|
|
|
209
198
|
embedIframeRef: embedIframeRef,
|
|
210
199
|
onHeightUpdate: setLiveHeight
|
|
211
200
|
}, (() => {
|
|
212
|
-
const useCenterWrapper =
|
|
201
|
+
const useCenterWrapper = layout === 'full-width' || layout === 'wide';
|
|
213
202
|
const mediaSingle = jsx(UIMediaSingle, {
|
|
214
|
-
css: uiMediaSingleStyles,
|
|
215
203
|
layout: layout,
|
|
216
204
|
width: originalWidth,
|
|
217
205
|
containerWidth: containerWidth,
|
|
@@ -115,7 +115,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
115
115
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
116
116
|
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
117
117
|
}, asInlineAnalytics, content));
|
|
118
|
-
return centerAlignClass
|
|
118
|
+
return centerAlignClass ? jsx("div", {
|
|
119
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
120
120
|
className: RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
121
121
|
}, extensionDiv) : extensionDiv;
|
|
@@ -146,7 +146,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
146
146
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
147
147
|
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
148
148
|
}, asInlineAnalytics, content));
|
|
149
|
-
return centerAlignClass
|
|
149
|
+
return centerAlignClass ? jsx("div", {
|
|
150
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
151
151
|
className: RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
152
152
|
}, extensionDiv) : extensionDiv;
|
|
@@ -177,7 +177,7 @@ const MultiBodiedExtension = props => {
|
|
|
177
177
|
`;
|
|
178
178
|
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
179
179
|
const isTopLevel = path.length < 1;
|
|
180
|
-
const useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout)
|
|
180
|
+
const useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout);
|
|
181
181
|
const wrapper = jsx(MultiBodiedExtensionWrapperNext, {
|
|
182
182
|
layout: layout,
|
|
183
183
|
path: path,
|
|
@@ -197,7 +197,7 @@ const MultiBodiedExtension = props => {
|
|
|
197
197
|
}, wrapper) : wrapper);
|
|
198
198
|
}
|
|
199
199
|
const isTopLevel = path.length < 1;
|
|
200
|
-
const useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout)
|
|
200
|
+
const useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout);
|
|
201
201
|
return jsx("section", {
|
|
202
202
|
css: [containerStyles, containerActiveFrameStyles],
|
|
203
203
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -90,10 +90,17 @@ const baseStyles = css({
|
|
|
90
90
|
[`.${RendererCssClassName.DOCUMENT}`]: {
|
|
91
91
|
[`> [${COLLAPSED_CONTENT_OWNERS_ATTRIBUTE}][hidden='until-found']`]: {
|
|
92
92
|
display: 'block',
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
// `hidden='until-found'` maps to `content-visibility: hidden`, which skips the element's
|
|
94
|
+
// contents but keeps its own box, sized by its own specified sizes. Everything below
|
|
95
|
+
// needs `!important` because extension nodes are sized and spaced by declarations that
|
|
96
|
+
// would otherwise win: an inline `height`/`min-height` reserving macro height (see
|
|
97
|
+
// `react/nodes/extension.tsx`), and `!important` alignment margins from
|
|
98
|
+
// `@atlaskit/native-embeds-common`. Without it the collapsed section keeps a visible gap.
|
|
99
|
+
blockSize: '0 !important',
|
|
100
|
+
minBlockSize: '0 !important',
|
|
101
|
+
marginBlock: '0 !important',
|
|
102
|
+
paddingBlock: '0 !important',
|
|
103
|
+
borderBlockWidth: '0 !important'
|
|
97
104
|
},
|
|
98
105
|
// p, h3, and action items
|
|
99
106
|
[`.${INLINE_IMAGE_WRAPPER_CLASS_NAME}`]: {
|
|
@@ -1228,7 +1235,7 @@ const headerSmartCardStyles = css({
|
|
|
1228
1235
|
}
|
|
1229
1236
|
});
|
|
1230
1237
|
|
|
1231
|
-
// Flex wrapper for centering without transform
|
|
1238
|
+
// Flex wrapper for centering without transform.
|
|
1232
1239
|
// flex: 1 1 0% + minWidth: 0 so the wrapper takes full width when it's a flex item (full-width nodes otherwise render narrow).
|
|
1233
1240
|
// flexShrink: 0 on child so the node keeps size.
|
|
1234
1241
|
const centerWrapperStyles = css({
|
|
@@ -1333,7 +1340,7 @@ const baseOtherStylesDuplicateAnchor = css({
|
|
|
1333
1340
|
[`.${RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER} .${RendererCssClassName.EXTENSION}`]: {
|
|
1334
1341
|
marginBottom: 0
|
|
1335
1342
|
},
|
|
1336
|
-
/*
|
|
1343
|
+
/* Embed card center wrapper has margin; zero MediaSingle vertical margin when wrapped so it doesn't double */
|
|
1337
1344
|
[`.${RendererCssClassName.EMBED_CARD_CENTER_WRAPPER} .mediaSingleView-content-wrap`]: {
|
|
1338
1345
|
marginTop: 0,
|
|
1339
1346
|
marginBottom: 0
|
|
@@ -1369,15 +1376,6 @@ const hideExtensionStyles = css({
|
|
|
1369
1376
|
marginTop: 0
|
|
1370
1377
|
}
|
|
1371
1378
|
});
|
|
1372
|
-
const extensionCenterAlignLegacyStyles = css({
|
|
1373
|
-
[`.${RendererCssClassName.DOCUMENT}`]: {
|
|
1374
|
-
[`.${RendererCssClassName.EXTENSION_CENTER_ALIGN}`]: {
|
|
1375
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
1376
|
-
marginLeft: '50%',
|
|
1377
|
-
transform: 'translateX(-50%)'
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
});
|
|
1381
1379
|
const baseOtherStyles = css({
|
|
1382
1380
|
'& .UnknownBlock': {
|
|
1383
1381
|
fontFamily: "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
@@ -1466,7 +1464,7 @@ const baseOtherStyles = css({
|
|
|
1466
1464
|
[`.${RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER} .${RendererCssClassName.EXTENSION}`]: {
|
|
1467
1465
|
marginBottom: 0
|
|
1468
1466
|
},
|
|
1469
|
-
/*
|
|
1467
|
+
/* Embed card center wrapper has margin; zero MediaSingle vertical margin when wrapped so it doesn't double */
|
|
1470
1468
|
[`.${RendererCssClassName.EMBED_CARD_CENTER_WRAPPER} .mediaSingleView-content-wrap`]: {
|
|
1471
1469
|
marginTop: 0,
|
|
1472
1470
|
marginBottom: 0
|
|
@@ -2915,7 +2913,7 @@ export const RendererStyleContainer = props => {
|
|
|
2915
2913
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2916
2914
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2917
2915
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2918
|
-
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2916
|
+
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2919
2917
|
// this should be placed after baseOtherStyles
|
|
2920
2918
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2921
2919
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
61
61
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
62
62
|
const packageName = "@atlaskit/renderer";
|
|
63
|
-
const packageVersion = "136.2.
|
|
63
|
+
const packageVersion = "136.2.4";
|
|
64
64
|
const setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
package/dist/esm/react/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
21
21
|
import { getText } from '../utils';
|
|
22
22
|
import { isAnnotationMark, toReact as markToReact } from './marks';
|
|
23
23
|
import { isCodeMark } from './marks/code';
|
|
24
|
-
import { getNestedUnderNodes, insideBlockNode,
|
|
24
|
+
import { getNestedUnderNodes, insideBlockNode, insideMultiBodiedExtension, insideTable } from './renderer-node';
|
|
25
25
|
import { renderTextSegments } from './utils/render-text-segments';
|
|
26
26
|
import { segmentText } from './utils/segment-text';
|
|
27
27
|
import { getStandaloneBackgroundColorMarks } from './utils/getStandaloneBackgroundColorMarks';
|
|
@@ -440,9 +440,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
440
440
|
var isInsideOfBlockNode = insideBlockNode(path, node.type.schema);
|
|
441
441
|
var isInsideMultiBodiedExtension = insideMultiBodiedExtension(path, node.type.schema);
|
|
442
442
|
var isInsideOfTable = insideTable(path, node.type.schema);
|
|
443
|
-
var
|
|
444
|
-
var isInsideBreakoutExpand = !isStickySafeCenteringEnabled && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && insideBreakoutExpand(path);
|
|
445
|
-
var stickyHeaders = isStickySafeCenteringEnabled ? !isInsideOfTable ? this.stickyHeaders : undefined : !isInsideOfTable && !insideBreakoutLayout(path) && !isInsideBreakoutExpand ? this.stickyHeaders : undefined;
|
|
443
|
+
var stickyHeaders = !isInsideOfTable ? this.stickyHeaders : undefined;
|
|
446
444
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
447
445
|
allowColumnSorting: this.allowColumnSorting,
|
|
448
446
|
columnWidths: getColumnWidths(node),
|
|
@@ -9,15 +9,6 @@ import { akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVertica
|
|
|
9
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import { RendererCssClassName } from '../../consts';
|
|
12
|
-
|
|
13
|
-
// Legacy centering (breaks position: sticky in nested content).
|
|
14
|
-
var legacyWrapperStyles = css({
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
16
|
-
margin: "".concat(blockNodesVerticalMargin, " 0"),
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
18
|
-
marginLeft: '50%',
|
|
19
|
-
transform: 'translateX(-50%)'
|
|
20
|
-
});
|
|
21
12
|
var flexWrapperStyles = css({
|
|
22
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
14
|
margin: "".concat(blockNodesVerticalMargin, " 0")
|
|
@@ -56,32 +47,15 @@ export default function Breakout(props) {
|
|
|
56
47
|
var _props$width;
|
|
57
48
|
var breakoutWidth = (_props$width = props.width) !== null && _props$width !== void 0 ? _props$width : null;
|
|
58
49
|
var width = getWidth(breakoutWidth, props.mode);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
,
|
|
69
|
-
className: "".concat(RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " fabric-editor-breakout-mark fabric-editor-block-mark"),
|
|
70
|
-
"data-mode": props.mode
|
|
71
|
-
// Ignored via go/ees005
|
|
72
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
73
|
-
}, editorExperiment('advanced_layouts', true) && {
|
|
74
|
-
'data-has-width': !!props.width,
|
|
75
|
-
'data-width': props.width
|
|
76
|
-
}, {
|
|
77
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
78
|
-
style: {
|
|
79
|
-
width: width
|
|
80
|
-
}
|
|
81
|
-
}), props.children));
|
|
82
|
-
}
|
|
83
|
-
return jsx("div", _extends({
|
|
84
|
-
css: legacyWrapperStyles,
|
|
50
|
+
return jsx("div", {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
52
|
+
className: RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER,
|
|
53
|
+
css: flexWrapperStyles
|
|
54
|
+
}, jsx("div", _extends({
|
|
55
|
+
css: innerWrapperStyles
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
57
|
+
,
|
|
58
|
+
className: "".concat(RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " fabric-editor-breakout-mark fabric-editor-block-mark"),
|
|
85
59
|
"data-mode": props.mode
|
|
86
60
|
// Ignored via go/ees005
|
|
87
61
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -93,8 +67,5 @@ export default function Breakout(props) {
|
|
|
93
67
|
style: {
|
|
94
68
|
width: width
|
|
95
69
|
}
|
|
96
|
-
|
|
97
|
-
,
|
|
98
|
-
className: "fabric-editor-breakout-mark fabric-editor-block-mark"
|
|
99
|
-
}), props.children);
|
|
70
|
+
}), props.children));
|
|
100
71
|
}
|
|
@@ -16,7 +16,6 @@ import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
16
16
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
17
17
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
19
|
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
21
20
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
22
21
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -32,22 +31,12 @@ var datasourceContainerStyleWithMarginTop = css({
|
|
|
32
31
|
marginBottom: "var(--ds-space-150, 12px)"
|
|
33
32
|
});
|
|
34
33
|
|
|
35
|
-
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse).
|
|
34
|
+
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse).
|
|
36
35
|
var datasourceContainerStyleNoVerticalMargin = css({
|
|
37
36
|
borderRadius: "var(--ds-radius-large, 8px)",
|
|
38
37
|
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
39
38
|
overflow: 'hidden'
|
|
40
39
|
});
|
|
41
|
-
var datasourceContainerStyleLegacy = css({
|
|
42
|
-
borderRadius: "var(--ds-radius-large, 8px)",
|
|
43
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
44
|
-
overflow: 'hidden',
|
|
45
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
46
|
-
marginLeft: '50%',
|
|
47
|
-
marginBottom: "var(--ds-space-150, 12px)",
|
|
48
|
-
transform: 'translateX(-50%)',
|
|
49
|
-
marginTop: "var(--ds-space-150, 12px)"
|
|
50
|
-
});
|
|
51
40
|
export default function BlockCard(props) {
|
|
52
41
|
var url = props.url,
|
|
53
42
|
data = props.data,
|
|
@@ -132,10 +121,9 @@ export default function BlockCard(props) {
|
|
|
132
121
|
onClick: onConsumerClick
|
|
133
122
|
}), jsx(WidthConsumer, null, function (_ref5) {
|
|
134
123
|
var width = _ref5.width;
|
|
135
|
-
var
|
|
136
|
-
var useCenterWrapper = !isNodeNested && useStickySafeCentering;
|
|
124
|
+
var useCenterWrapper = !isNodeNested;
|
|
137
125
|
var datasourceDiv = jsx("div", {
|
|
138
|
-
css: useCenterWrapper ? datasourceContainerStyleNoVerticalMargin :
|
|
126
|
+
css: useCenterWrapper ? datasourceContainerStyleNoVerticalMargin : datasourceContainerStyleWithMarginTop,
|
|
139
127
|
"data-testid": "renderer-datasource-table",
|
|
140
128
|
"data-local-id": localId,
|
|
141
129
|
style: {
|
|
@@ -15,7 +15,6 @@ import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle, WidthCon
|
|
|
15
15
|
import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
18
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
19
|
import { CardErrorBoundary } from './fallback';
|
|
21
20
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
@@ -44,14 +43,6 @@ var embedCardCenterWrapperStyles = css({
|
|
|
44
43
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- Matches editor-common MediaSingle calcMargin
|
|
45
44
|
margin: '24px 0'
|
|
46
45
|
});
|
|
47
|
-
|
|
48
|
-
// Legacy centering when platform_editor_flex_based_centering is off.
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
50
|
-
var uIMediaSingleLayoutStylesLegacy = css({
|
|
51
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
52
|
-
marginLeft: '50%',
|
|
53
|
-
transform: 'translateX(-50%)'
|
|
54
|
-
});
|
|
55
46
|
function EmbedCardInternal(props) {
|
|
56
47
|
var _smartLinks$frameStyl;
|
|
57
48
|
var url = props.url,
|
|
@@ -156,8 +147,6 @@ function EmbedCardInternal(props) {
|
|
|
156
147
|
}
|
|
157
148
|
}
|
|
158
149
|
var lineLength = isFullWidth ? Math.min(akEditorFullWidthLayoutWidth, containerWidth - padding) : nonFullWidthSize;
|
|
159
|
-
var useStickySafeCentering = expValEquals('platform_editor_flex_based_centering', 'isEnabled', true);
|
|
160
|
-
var uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? useStickySafeCentering ? undefined : uIMediaSingleLayoutStylesLegacy : '';
|
|
161
150
|
var onError = function onError(_ref4) {
|
|
162
151
|
var err = _ref4.err;
|
|
163
152
|
if (err) {
|
|
@@ -213,9 +202,8 @@ function EmbedCardInternal(props) {
|
|
|
213
202
|
embedIframeRef: embedIframeRef,
|
|
214
203
|
onHeightUpdate: setLiveHeight
|
|
215
204
|
}, function () {
|
|
216
|
-
var useCenterWrapper =
|
|
205
|
+
var useCenterWrapper = layout === 'full-width' || layout === 'wide';
|
|
217
206
|
var mediaSingle = jsx(UIMediaSingle, {
|
|
218
|
-
css: uiMediaSingleStyles,
|
|
219
207
|
layout: layout,
|
|
220
208
|
width: originalWidth,
|
|
221
209
|
containerWidth: containerWidth,
|
|
@@ -126,7 +126,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
126
126
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
127
127
|
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
128
128
|
}, asInlineAnalytics, content));
|
|
129
|
-
return centerAlignClass
|
|
129
|
+
return centerAlignClass ? jsx("div", {
|
|
130
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
131
131
|
className: RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
132
132
|
}, extensionDiv) : extensionDiv;
|
|
@@ -156,7 +156,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
156
156
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
157
157
|
css: [!(isInsideOfTable && isExperimentEnabled('platform_editor_table_fit_to_content_patch_1')) && !isInsideOfInlineExtension && fg('platform_fix_macro_renders_in_layouts') && containerStyle]
|
|
158
158
|
}, asInlineAnalytics, content));
|
|
159
|
-
return centerAlignClass
|
|
159
|
+
return centerAlignClass ? jsx("div", {
|
|
160
160
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
161
161
|
className: RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER + ' ' + RendererCssClassName.FLEX_CENTER_WRAPPER
|
|
162
162
|
}, extensionDiv) : extensionDiv;
|
|
@@ -173,7 +173,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
173
173
|
var containerActiveFrameStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t& [data-extension-frame='true']:nth-of-type(", ") {\n\t\t\tdisplay: block;\n\t\t}\n\t"])), activeChildIndex + 1);
|
|
174
174
|
if (expValEquals('platform_editor_renderer_extension_width_fix', 'isEnabled', true)) {
|
|
175
175
|
var _isTopLevel = path.length < 1;
|
|
176
|
-
var _useCenterWrapper = _isTopLevel && ['wide', 'full-width'].includes(layout)
|
|
176
|
+
var _useCenterWrapper = _isTopLevel && ['wide', 'full-width'].includes(layout);
|
|
177
177
|
var wrapper = jsx(MultiBodiedExtensionWrapperNext, {
|
|
178
178
|
layout: layout,
|
|
179
179
|
path: path,
|
|
@@ -193,7 +193,7 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
193
193
|
}, wrapper) : wrapper);
|
|
194
194
|
}
|
|
195
195
|
var isTopLevel = path.length < 1;
|
|
196
|
-
var useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout)
|
|
196
|
+
var useCenterWrapper = isTopLevel && ['wide', 'full-width'].includes(layout);
|
|
197
197
|
return jsx("section", {
|
|
198
198
|
css: [containerStyles, containerActiveFrameStyles],
|
|
199
199
|
"data-testid": "multiBodiedExtension--container",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css9, _$concat3, _$
|
|
2
|
+
var _css9, _$concat3, _$concat5;
|
|
3
3
|
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; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
@@ -92,10 +92,17 @@ var baseStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProp
|
|
|
92
92
|
clear: 'both'
|
|
93
93
|
}), ".".concat(RendererCssClassName.DOCUMENT), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "> [".concat(COLLAPSED_CONTENT_OWNERS_ATTRIBUTE, "][hidden='until-found']"), {
|
|
94
94
|
display: 'block',
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
// `hidden='until-found'` maps to `content-visibility: hidden`, which skips the element's
|
|
96
|
+
// contents but keeps its own box, sized by its own specified sizes. Everything below
|
|
97
|
+
// needs `!important` because extension nodes are sized and spaced by declarations that
|
|
98
|
+
// would otherwise win: an inline `height`/`min-height` reserving macro height (see
|
|
99
|
+
// `react/nodes/extension.tsx`), and `!important` alignment margins from
|
|
100
|
+
// `@atlaskit/native-embeds-common`. Without it the collapsed section keeps a visible gap.
|
|
101
|
+
blockSize: '0 !important',
|
|
102
|
+
minBlockSize: '0 !important',
|
|
103
|
+
marginBlock: '0 !important',
|
|
104
|
+
paddingBlock: '0 !important',
|
|
105
|
+
borderBlockWidth: '0 !important'
|
|
99
106
|
}), ".".concat(INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
100
107
|
height: '22px',
|
|
101
108
|
transform: "translateY(-2px)"
|
|
@@ -1031,7 +1038,7 @@ var headerSmartCardStyles = css({
|
|
|
1031
1038
|
}
|
|
1032
1039
|
});
|
|
1033
1040
|
|
|
1034
|
-
// Flex wrapper for centering without transform
|
|
1041
|
+
// Flex wrapper for centering without transform.
|
|
1035
1042
|
// flex: 1 1 0% + minWidth: 0 so the wrapper takes full width when it's a flex item (full-width nodes otherwise render narrow).
|
|
1036
1043
|
// flexShrink: 0 on child so the node keeps size.
|
|
1037
1044
|
var centerWrapperStyles = css(_defineProperty({}, ".".concat(RendererCssClassName.FLEX_CENTER_WRAPPER), {
|
|
@@ -1134,11 +1141,6 @@ var baseOtherStylesDuplicateAnchor = css(_defineProperty(_defineProperty(_define
|
|
|
1134
1141
|
var hideExtensionStyles = css(_defineProperty({}, ".".concat(RendererCssClassName.EXTENSION, ":has([data-extension-key='hide'])"), {
|
|
1135
1142
|
marginTop: 0
|
|
1136
1143
|
}));
|
|
1137
|
-
var extensionCenterAlignLegacyStyles = css(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT), _defineProperty({}, ".".concat(RendererCssClassName.EXTENSION_CENTER_ALIGN), {
|
|
1138
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
1139
|
-
marginLeft: '50%',
|
|
1140
|
-
transform: 'translateX(-50%)'
|
|
1141
|
-
})));
|
|
1142
1144
|
var baseOtherStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
1143
1145
|
'& .UnknownBlock': {
|
|
1144
1146
|
fontFamily: "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
@@ -1200,7 +1202,7 @@ var baseOtherStyles = css(_defineProperty(_defineProperty(_defineProperty(_defin
|
|
|
1200
1202
|
overflowX: 'auto'
|
|
1201
1203
|
}), "& .".concat(RendererCssClassName.EXTENSION, ":first-child"), {
|
|
1202
1204
|
marginTop: 0
|
|
1203
|
-
})), ".".concat(RendererCssClassName.DOCUMENT), (_$
|
|
1205
|
+
})), ".".concat(RendererCssClassName.DOCUMENT), (_$concat5 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat5, ".".concat(RendererCssClassName.EXTENSION), {
|
|
1204
1206
|
marginTop: "".concat(blockNodesVerticalMargin)
|
|
1205
1207
|
}), ".".concat(RendererCssClassName.STICKY_SAFE_CENTER_WRAPPER, " .").concat(RendererCssClassName.EXTENSION), {
|
|
1206
1208
|
marginBottom: 0
|
|
@@ -1221,7 +1223,7 @@ var baseOtherStyles = css(_defineProperty(_defineProperty(_defineProperty(_defin
|
|
|
1221
1223
|
marginBottom: 0
|
|
1222
1224
|
}), ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER), {
|
|
1223
1225
|
overflowX: 'auto'
|
|
1224
|
-
}), _defineProperty(_$
|
|
1226
|
+
}), _defineProperty(_$concat5, ".".concat(shadowObserverClassNames.SHADOW_CONTAINER, " .").concat(TableSharedCssClassName.TABLE_NODE_WRAPPER), {
|
|
1225
1227
|
display: 'flex'
|
|
1226
1228
|
}))));
|
|
1227
1229
|
var alignedHeadingAnchorStyleDuplicateAnchor = css({
|
|
@@ -2282,7 +2284,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2282
2284
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2283
2285
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2284
2286
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2285
|
-
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2287
|
+
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2286
2288
|
// this should be placed after baseOtherStyles
|
|
2287
2289
|
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2288
2290
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
@@ -65,7 +65,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
65
65
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
66
66
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
67
67
|
var packageName = "@atlaskit/renderer";
|
|
68
|
-
var packageVersion = "136.2.
|
|
68
|
+
var packageVersion = "136.2.4";
|
|
69
69
|
var setAsQueryContainerStyles = css({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "136.2.
|
|
3
|
+
"version": "136.2.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/status": "^5.8.0",
|
|
71
71
|
"@atlaskit/task-decision": "^21.8.0",
|
|
72
72
|
"@atlaskit/theme": "^28.1.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^159.0.0",
|
|
74
74
|
"@atlaskit/tokens": "^16.8.0",
|
|
75
75
|
"@atlaskit/tooltip": "^24.2.0",
|
|
76
76
|
"@atlaskit/visually-hidden": "^4.3.0",
|