@atlaskit/renderer 126.8.10 → 126.8.11
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 +8 -0
- package/dist/cjs/messages.js +1 -1
- package/dist/cjs/react/nodes/bodiedExtension.js +4 -2
- package/dist/cjs/react/nodes/extension.js +14 -7
- package/dist/cjs/react/nodes/multiBodiedExtension.js +20 -8
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +35 -4
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/react/nodes/bodiedExtension.js +4 -2
- package/dist/es2019/react/nodes/extension.js +14 -7
- package/dist/es2019/react/nodes/multiBodiedExtension.js +20 -8
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +40 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/messages.js +1 -1
- package/dist/esm/react/nodes/bodiedExtension.js +4 -2
- package/dist/esm/react/nodes/extension.js +14 -7
- package/dist/esm/react/nodes/multiBodiedExtension.js +20 -8
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +35 -4
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/bodiedExtension.d.ts +2 -0
- package/dist/types/react/nodes/extension.d.ts +4 -1
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/bodiedExtension.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/extension.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/multiBodiedExtension.d.ts +2 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 126.8.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4ba962abdce44`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4ba962abdce44) -
|
|
8
|
+
EDITOR-4667 - Inline Bodied Extension: Remove important from existing extension width style
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 126.8.10
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/messages.js
CHANGED
|
@@ -37,7 +37,7 @@ var headingAnchorLinkMessages = exports.headingAnchorLinkMessages = (0, _reactIn
|
|
|
37
37
|
copyAriaLabel: {
|
|
38
38
|
id: 'fabric.editor.headingLink.copyAriaLabel',
|
|
39
39
|
defaultMessage: 'Copy',
|
|
40
|
-
description: '
|
|
40
|
+
description: 'Aria label for the copy link button displayed next to a heading. Used by screen readers to describe the button that copies the heading anchor link to the clipboard.'
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
var tableCellMessages = exports.tableCellMessages = (0, _reactIntlNext.defineMessages)({
|
|
@@ -65,7 +65,8 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
65
65
|
if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
|
|
66
66
|
// Return the content directly if it's a valid JSX.Element
|
|
67
67
|
return (0, _extension.renderExtension)(result, layout, {
|
|
68
|
-
isTopLevel: path.length < 1
|
|
68
|
+
isTopLevel: path.length < 1,
|
|
69
|
+
rendererAppearance: props.rendererAppearance
|
|
69
70
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
70
71
|
}
|
|
71
72
|
} catch (_unused) {
|
|
@@ -75,7 +76,8 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
75
76
|
|
|
76
77
|
// Always return default content if anything goes wrong
|
|
77
78
|
return (0, _extension.renderExtension)(children, layout, {
|
|
78
|
-
isTopLevel: path.length < 1
|
|
79
|
+
isTopLevel: path.length < 1,
|
|
80
|
+
rendererAppearance: props.rendererAppearance
|
|
79
81
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
80
82
|
}))));
|
|
81
83
|
};
|
|
@@ -61,8 +61,12 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
61
61
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
62
62
|
var _ref = options || {},
|
|
63
63
|
_ref$isTopLevel = _ref.isTopLevel,
|
|
64
|
-
isTopLevel = _ref$isTopLevel === void 0 ? true : _ref$isTopLevel
|
|
65
|
-
|
|
64
|
+
isTopLevel = _ref$isTopLevel === void 0 ? true : _ref$isTopLevel,
|
|
65
|
+
rendererAppearance = _ref.rendererAppearance;
|
|
66
|
+
// we should only use custom layout for full-page appearance
|
|
67
|
+
var canUseCustomLayout = (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
68
|
+
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
69
|
+
var centerAlignClass = isCustomLayout ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
66
70
|
/**
|
|
67
71
|
* To reduce cumulative layout shift, we check installed manifest values (viewportSize) for Forge and extension node parameters
|
|
68
72
|
* for Connect (legacy). As Connect is being phased out, we want Forge to also start to store its expected height
|
|
@@ -80,9 +84,9 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
80
84
|
,
|
|
81
85
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(inlineClassName, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
82
86
|
style: {
|
|
83
|
-
width: isInline ? undefined : isTopLevel ?
|
|
87
|
+
width: isInline ? undefined : ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
84
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
85
|
-
(0, _breakout.calcBreakoutWidthCss)(layout) : '100%',
|
|
89
|
+
(0, _breakout.calcBreakoutWidthCss)(layout) : (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%',
|
|
86
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
87
91
|
minHeight: isInline ? undefined : extensionHeight && "".concat(extensionHeight, "px")
|
|
88
92
|
},
|
|
@@ -106,8 +110,9 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
106
110
|
,
|
|
107
111
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(inlineClassName, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
108
112
|
style: {
|
|
113
|
+
width: isInline ? undefined : ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
109
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
110
|
-
|
|
115
|
+
(0, _utils.calcBreakoutWidth)(layout, width) : (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%',
|
|
111
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
112
117
|
minHeight: isInline ? undefined : "".concat(extensionHeight, "px")
|
|
113
118
|
},
|
|
@@ -149,7 +154,8 @@ var Extension = function Extension(props) {
|
|
|
149
154
|
isTopLevel: path.length < 1,
|
|
150
155
|
handleRef: handleRef,
|
|
151
156
|
shadowClassNames: shadowClassNames,
|
|
152
|
-
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
157
|
+
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined,
|
|
158
|
+
rendererAppearance: props.rendererAppearance
|
|
153
159
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
154
160
|
}
|
|
155
161
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -162,7 +168,8 @@ var Extension = function Extension(props) {
|
|
|
162
168
|
isTopLevel: path.length < 1,
|
|
163
169
|
handleRef: handleRef,
|
|
164
170
|
shadowClassNames: shadowClassNames,
|
|
165
|
-
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
171
|
+
tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined,
|
|
172
|
+
rendererAppearance: props.rendererAppearance
|
|
166
173
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
167
174
|
});
|
|
168
175
|
};
|
|
@@ -49,17 +49,22 @@ var MultiBodiedExtensionWrapperLegacy = function MultiBodiedExtensionWrapperLega
|
|
|
49
49
|
var width = _ref3.width,
|
|
50
50
|
path = _ref3.path,
|
|
51
51
|
layout = _ref3.layout,
|
|
52
|
+
rendererAppearance = _ref3.rendererAppearance,
|
|
52
53
|
children = _ref3.children;
|
|
53
54
|
var isTopLevel = path.length < 1;
|
|
54
|
-
|
|
55
|
+
// we should only use custom layout for full-page appearance
|
|
56
|
+
var canUseCustomLayout = (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
57
|
+
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
58
|
+
var centerAlignClass = isCustomLayout ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
55
59
|
|
|
56
60
|
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
57
61
|
return (0, _react.jsx)("div", {
|
|
58
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
59
63
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
60
64
|
style: {
|
|
65
|
+
width: ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
61
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
62
|
-
|
|
67
|
+
(0, _utils.calcBreakoutWidth)(layout, width) : (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%'
|
|
63
68
|
},
|
|
64
69
|
"data-layout": layout,
|
|
65
70
|
"data-testid": "multiBodiedExtension--wrapper-renderer"
|
|
@@ -71,18 +76,22 @@ var MultiBodiedExtensionWrapperLegacy = function MultiBodiedExtensionWrapperLega
|
|
|
71
76
|
var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_ref4) {
|
|
72
77
|
var path = _ref4.path,
|
|
73
78
|
layout = _ref4.layout,
|
|
79
|
+
rendererAppearance = _ref4.rendererAppearance,
|
|
74
80
|
children = _ref4.children;
|
|
75
81
|
var isTopLevel = path.length < 1;
|
|
76
|
-
|
|
82
|
+
// we should only use custom layout for full-page appearance
|
|
83
|
+
var canUseCustomLayout = (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
84
|
+
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
85
|
+
var centerAlignClass = isCustomLayout ? _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
77
86
|
|
|
78
87
|
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
79
88
|
return (0, _react.jsx)("div", {
|
|
80
89
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
90
|
className: "".concat(_consts.RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
82
91
|
style: {
|
|
83
|
-
width: isTopLevel ?
|
|
92
|
+
width: ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
84
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
85
|
-
(0, _breakout.calcBreakoutWidthCss)(layout) : '100%'
|
|
94
|
+
(0, _breakout.calcBreakoutWidthCss)(layout) : (0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%'
|
|
86
95
|
},
|
|
87
96
|
"data-layout": layout,
|
|
88
97
|
"data-testid": "multiBodiedExtension--wrapper-renderer"
|
|
@@ -103,7 +112,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
103
112
|
extensionKey = props.extensionKey,
|
|
104
113
|
content = props.content,
|
|
105
114
|
marks = props.marks,
|
|
106
|
-
localId = props.localId
|
|
115
|
+
localId = props.localId,
|
|
116
|
+
rendererAppearance = props.rendererAppearance;
|
|
107
117
|
var _useState = (0, _react2.useState)(0),
|
|
108
118
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
109
119
|
activeChildIndex = _useState2[0],
|
|
@@ -166,7 +176,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
166
176
|
"data-node-type": "multiBodiedExtension"
|
|
167
177
|
}, (0, _react.jsx)(MultiBodiedExtensionWrapperNext, {
|
|
168
178
|
layout: layout,
|
|
169
|
-
path: path
|
|
179
|
+
path: path,
|
|
180
|
+
rendererAppearance: rendererAppearance
|
|
170
181
|
}, renderContent()));
|
|
171
182
|
}
|
|
172
183
|
return (0, _react.jsx)("section", {
|
|
@@ -181,7 +192,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
181
192
|
return (0, _react.jsx)(MultiBodiedExtensionWrapperLegacy, {
|
|
182
193
|
layout: layout,
|
|
183
194
|
width: width,
|
|
184
|
-
path: path
|
|
195
|
+
path: path,
|
|
196
|
+
rendererAppearance: rendererAppearance
|
|
185
197
|
}, renderContent());
|
|
186
198
|
}));
|
|
187
199
|
};
|
|
@@ -275,11 +275,29 @@ var rendererFullPageStylesWithReducedPadding = (0, _react.css)((0, _defineProper
|
|
|
275
275
|
}, "@media (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
|
|
276
276
|
'--ak-renderer--full-page-gutter': "".concat(_editorSharedStyles.akEditorGutterPaddingReduced, "px")
|
|
277
277
|
}));
|
|
278
|
+
var oldRendererFullWidthStyles = (0, _react.css)({
|
|
279
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
280
|
+
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px"),
|
|
281
|
+
margin: "0 auto",
|
|
282
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
283
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
284
|
+
width: '100% !important'
|
|
285
|
+
}
|
|
286
|
+
});
|
|
278
287
|
var rendererFullWidthStyles = (0, _react.css)({
|
|
279
288
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
280
289
|
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px"),
|
|
281
290
|
margin: "0 auto",
|
|
282
291
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
292
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"])': {
|
|
293
|
+
width: '100% !important'
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
var oldRendererMaxWidthStyles = (0, _react.css)({
|
|
297
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
298
|
+
maxWidth: "".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px"),
|
|
299
|
+
margin: "0 auto",
|
|
300
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
283
301
|
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
284
302
|
width: '100% !important'
|
|
285
303
|
}
|
|
@@ -289,7 +307,7 @@ var rendererMaxWidthStyles = (0, _react.css)({
|
|
|
289
307
|
maxWidth: "".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px"),
|
|
290
308
|
margin: "0 auto",
|
|
291
309
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
292
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"])
|
|
310
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"])': {
|
|
293
311
|
width: '100% !important'
|
|
294
312
|
}
|
|
295
313
|
});
|
|
@@ -777,7 +795,7 @@ var extensionStyle = (0, _react.css)({
|
|
|
777
795
|
fontSize: 'var(--ak-renderer-base-font-size)'
|
|
778
796
|
}
|
|
779
797
|
});
|
|
780
|
-
var
|
|
798
|
+
var oldExtensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
781
799
|
display: 'inline-block'
|
|
782
800
|
}), ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
783
801
|
display: 'inline-block',
|
|
@@ -792,6 +810,19 @@ var extensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _
|
|
|
792
810
|
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " div, .").concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " p"), {
|
|
793
811
|
display: 'inline-block'
|
|
794
812
|
}));
|
|
813
|
+
var extensionAsInlineStyle = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts.RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
814
|
+
display: 'inline-block'
|
|
815
|
+
}), ".".concat(_consts.RendererCssClassName.DOCUMENT, " .").concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
816
|
+
display: 'inline-block',
|
|
817
|
+
width: 'auto',
|
|
818
|
+
marginTop: 0
|
|
819
|
+
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(_consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER), {
|
|
820
|
+
display: 'inline-block',
|
|
821
|
+
overflowX: 'visible',
|
|
822
|
+
containerType: 'normal'
|
|
823
|
+
}), ".".concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " div, .").concat(_consts.RendererCssClassName.EXTENSION_AS_INLINE, " p"), {
|
|
824
|
+
display: 'inline-block'
|
|
825
|
+
}));
|
|
795
826
|
|
|
796
827
|
// Removes the blockNodesVerticalMargin styling for inline extensions, i.e. borderless excerpt-include
|
|
797
828
|
var inlineExtensionRendererMarginFix = (0, _react.css)({
|
|
@@ -1901,13 +1932,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1901
1932
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
1902
1933
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
1903
1934
|
},
|
|
1904
|
-
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1935
|
+
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1905
1936
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1906
1937
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1907
1938
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1908
1939
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
1909
1940
|
// this should be placed after baseOtherStyles
|
|
1910
|
-
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, (0, _expValEquals.expValEquals)('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
1941
|
+
(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), (0, _expValEquals.expValEquals)('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
1911
1942
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1912
1943
|
(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, (0, _experiments.editorExperiment)('platform_synced_block', true) && syncBlockStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_2') && syncBlockPatch2Styles],
|
|
1913
1944
|
"data-testid": testId
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "126.8.
|
|
74
|
+
var packageVersion = "126.8.10";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
package/dist/es2019/messages.js
CHANGED
|
@@ -31,7 +31,7 @@ export const headingAnchorLinkMessages = defineMessages({
|
|
|
31
31
|
copyAriaLabel: {
|
|
32
32
|
id: 'fabric.editor.headingLink.copyAriaLabel',
|
|
33
33
|
defaultMessage: 'Copy',
|
|
34
|
-
description: '
|
|
34
|
+
description: 'Aria label for the copy link button displayed next to a heading. Used by screen readers to describe the button that copies the heading anchor link to the clipboard.'
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
export const tableCellMessages = defineMessages({
|
|
@@ -54,7 +54,8 @@ const BodiedExtension = props => {
|
|
|
54
54
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
55
55
|
// Return the content directly if it's a valid JSX.Element
|
|
56
56
|
return renderExtension(result, layout, {
|
|
57
|
-
isTopLevel: path.length < 1
|
|
57
|
+
isTopLevel: path.length < 1,
|
|
58
|
+
rendererAppearance: props.rendererAppearance
|
|
58
59
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
59
60
|
}
|
|
60
61
|
} catch {
|
|
@@ -64,7 +65,8 @@ const BodiedExtension = props => {
|
|
|
64
65
|
|
|
65
66
|
// Always return default content if anything goes wrong
|
|
66
67
|
return renderExtension(children, layout, {
|
|
67
|
-
isTopLevel: path.length < 1
|
|
68
|
+
isTopLevel: path.length < 1,
|
|
69
|
+
rendererAppearance: props.rendererAppearance
|
|
68
70
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
69
71
|
}))));
|
|
70
72
|
};
|
|
@@ -41,9 +41,13 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
41
41
|
|
|
42
42
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
43
43
|
const {
|
|
44
|
-
isTopLevel = true
|
|
44
|
+
isTopLevel = true,
|
|
45
|
+
rendererAppearance
|
|
45
46
|
} = options || {};
|
|
46
|
-
|
|
47
|
+
// we should only use custom layout for full-page appearance
|
|
48
|
+
const canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
49
|
+
const isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
50
|
+
const centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
47
51
|
/**
|
|
48
52
|
* To reduce cumulative layout shift, we check installed manifest values (viewportSize) for Forge and extension node parameters
|
|
49
53
|
* for Connect (legacy). As Connect is being phased out, we want Forge to also start to store its expected height
|
|
@@ -61,9 +65,9 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
61
65
|
,
|
|
62
66
|
className: `${RendererCssClassName.EXTENSION} ${inlineClassName} ${options.shadowClassNames} ${centerAlignClass}`,
|
|
63
67
|
style: {
|
|
64
|
-
width: isInline ? undefined : isTopLevel ?
|
|
68
|
+
width: isInline ? undefined : (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
65
69
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
66
|
-
calcBreakoutWidthCss(layout) : '100%',
|
|
70
|
+
calcBreakoutWidthCss(layout) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%',
|
|
67
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
68
72
|
minHeight: isInline ? undefined : extensionHeight && `${extensionHeight}px`
|
|
69
73
|
},
|
|
@@ -87,8 +91,9 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
87
91
|
,
|
|
88
92
|
className: `${RendererCssClassName.EXTENSION} ${inlineClassName} ${options.shadowClassNames} ${centerAlignClass}`,
|
|
89
93
|
style: {
|
|
94
|
+
width: isInline ? undefined : (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
90
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
91
|
-
width:
|
|
96
|
+
calcBreakoutWidth(layout, width) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%',
|
|
92
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
93
98
|
minHeight: isInline ? undefined : `${extensionHeight}px`
|
|
94
99
|
},
|
|
@@ -130,7 +135,8 @@ const Extension = props => {
|
|
|
130
135
|
isTopLevel: path.length < 1,
|
|
131
136
|
handleRef,
|
|
132
137
|
shadowClassNames,
|
|
133
|
-
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
138
|
+
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined,
|
|
139
|
+
rendererAppearance: props.rendererAppearance
|
|
134
140
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
135
141
|
}
|
|
136
142
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -143,7 +149,8 @@ const Extension = props => {
|
|
|
143
149
|
isTopLevel: path.length < 1,
|
|
144
150
|
handleRef,
|
|
145
151
|
shadowClassNames,
|
|
146
|
-
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
152
|
+
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined,
|
|
153
|
+
rendererAppearance: props.rendererAppearance
|
|
147
154
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
148
155
|
});
|
|
149
156
|
};
|
|
@@ -40,18 +40,23 @@ const MultiBodiedExtensionWrapperLegacy = ({
|
|
|
40
40
|
width,
|
|
41
41
|
path,
|
|
42
42
|
layout,
|
|
43
|
+
rendererAppearance,
|
|
43
44
|
children
|
|
44
45
|
}) => {
|
|
45
46
|
const isTopLevel = path.length < 1;
|
|
46
|
-
|
|
47
|
+
// we should only use custom layout for full-page appearance
|
|
48
|
+
const canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
49
|
+
const isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
50
|
+
const centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
47
51
|
|
|
48
52
|
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
49
53
|
return jsx("div", {
|
|
50
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
51
55
|
className: `${RendererCssClassName.EXTENSION} ${centerAlignClass}`,
|
|
52
56
|
style: {
|
|
57
|
+
width: (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
53
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
54
|
-
|
|
59
|
+
calcBreakoutWidth(layout, width) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%'
|
|
55
60
|
},
|
|
56
61
|
"data-layout": layout,
|
|
57
62
|
"data-testid": "multiBodiedExtension--wrapper-renderer"
|
|
@@ -63,19 +68,23 @@ const MultiBodiedExtensionWrapperLegacy = ({
|
|
|
63
68
|
const MultiBodiedExtensionWrapperNext = ({
|
|
64
69
|
path,
|
|
65
70
|
layout,
|
|
71
|
+
rendererAppearance,
|
|
66
72
|
children
|
|
67
73
|
}) => {
|
|
68
74
|
const isTopLevel = path.length < 1;
|
|
69
|
-
|
|
75
|
+
// we should only use custom layout for full-page appearance
|
|
76
|
+
const canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
77
|
+
const isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
78
|
+
const centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
70
79
|
|
|
71
80
|
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
72
81
|
return jsx("div", {
|
|
73
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
83
|
className: `${RendererCssClassName.EXTENSION} ${centerAlignClass}`,
|
|
75
84
|
style: {
|
|
76
|
-
width: isTopLevel ?
|
|
85
|
+
width: (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
77
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
78
|
-
calcBreakoutWidthCss(layout) : '100%'
|
|
87
|
+
calcBreakoutWidthCss(layout) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%'
|
|
79
88
|
},
|
|
80
89
|
"data-layout": layout,
|
|
81
90
|
"data-testid": "multiBodiedExtension--wrapper-renderer"
|
|
@@ -95,7 +104,8 @@ const MultiBodiedExtension = props => {
|
|
|
95
104
|
extensionKey,
|
|
96
105
|
content,
|
|
97
106
|
marks,
|
|
98
|
-
localId
|
|
107
|
+
localId,
|
|
108
|
+
rendererAppearance
|
|
99
109
|
} = props;
|
|
100
110
|
const [activeChildIndex, setActiveChildIndex] = useState(0);
|
|
101
111
|
const {
|
|
@@ -161,7 +171,8 @@ const MultiBodiedExtension = props => {
|
|
|
161
171
|
"data-node-type": "multiBodiedExtension"
|
|
162
172
|
}, jsx(MultiBodiedExtensionWrapperNext, {
|
|
163
173
|
layout: layout,
|
|
164
|
-
path: path
|
|
174
|
+
path: path,
|
|
175
|
+
rendererAppearance: rendererAppearance
|
|
165
176
|
}, renderContent()));
|
|
166
177
|
}
|
|
167
178
|
return jsx("section", {
|
|
@@ -176,7 +187,8 @@ const MultiBodiedExtension = props => {
|
|
|
176
187
|
}) => jsx(MultiBodiedExtensionWrapperLegacy, {
|
|
177
188
|
layout: layout,
|
|
178
189
|
width: width,
|
|
179
|
-
path: path
|
|
190
|
+
path: path,
|
|
191
|
+
rendererAppearance: rendererAppearance
|
|
180
192
|
}, renderContent())));
|
|
181
193
|
};
|
|
182
194
|
export default MultiBodiedExtension;
|
|
@@ -370,11 +370,29 @@ const rendererFullPageStylesWithReducedPadding = css({
|
|
|
370
370
|
'--ak-renderer--full-page-gutter': `${akEditorGutterPaddingReduced}px`
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
|
+
const oldRendererFullWidthStyles = css({
|
|
374
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
375
|
+
maxWidth: `${akEditorFullWidthLayoutWidth}px`,
|
|
376
|
+
margin: `0 auto`,
|
|
377
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
378
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
379
|
+
width: '100% !important'
|
|
380
|
+
}
|
|
381
|
+
});
|
|
373
382
|
const rendererFullWidthStyles = css({
|
|
374
383
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
375
384
|
maxWidth: `${akEditorFullWidthLayoutWidth}px`,
|
|
376
385
|
margin: `0 auto`,
|
|
377
386
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
387
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"])': {
|
|
388
|
+
width: '100% !important'
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
const oldRendererMaxWidthStyles = css({
|
|
392
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
393
|
+
maxWidth: `${akEditorMaxWidthLayoutWidth}px`,
|
|
394
|
+
margin: `0 auto`,
|
|
395
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
378
396
|
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
379
397
|
width: '100% !important'
|
|
380
398
|
}
|
|
@@ -384,7 +402,7 @@ const rendererMaxWidthStyles = css({
|
|
|
384
402
|
maxWidth: `${akEditorMaxWidthLayoutWidth}px`,
|
|
385
403
|
margin: `0 auto`,
|
|
386
404
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
387
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"])
|
|
405
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"])': {
|
|
388
406
|
width: '100% !important'
|
|
389
407
|
}
|
|
390
408
|
});
|
|
@@ -924,7 +942,7 @@ const extensionStyle = css({
|
|
|
924
942
|
fontSize: 'var(--ak-renderer-base-font-size)'
|
|
925
943
|
}
|
|
926
944
|
});
|
|
927
|
-
const
|
|
945
|
+
const oldExtensionAsInlineStyle = css({
|
|
928
946
|
[`.${RendererCssClassName.DOCUMENT} [data-as-inline="on"]`]: {
|
|
929
947
|
display: 'inline-block'
|
|
930
948
|
},
|
|
@@ -944,6 +962,24 @@ const extensionAsInlineStyle = css({
|
|
|
944
962
|
display: 'inline-block'
|
|
945
963
|
}
|
|
946
964
|
});
|
|
965
|
+
const extensionAsInlineStyle = css({
|
|
966
|
+
[`.${RendererCssClassName.DOCUMENT} [data-as-inline="on"]`]: {
|
|
967
|
+
display: 'inline-block'
|
|
968
|
+
},
|
|
969
|
+
[`.${RendererCssClassName.DOCUMENT} .${RendererCssClassName.EXTENSION_AS_INLINE}`]: {
|
|
970
|
+
display: 'inline-block',
|
|
971
|
+
width: 'auto',
|
|
972
|
+
marginTop: 0
|
|
973
|
+
},
|
|
974
|
+
[`.${RendererCssClassName.EXTENSION_AS_INLINE} .${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER}`]: {
|
|
975
|
+
display: 'inline-block',
|
|
976
|
+
overflowX: 'visible',
|
|
977
|
+
containerType: 'normal'
|
|
978
|
+
},
|
|
979
|
+
[`.${RendererCssClassName.EXTENSION_AS_INLINE} div, .${RendererCssClassName.EXTENSION_AS_INLINE} p`]: {
|
|
980
|
+
display: 'inline-block'
|
|
981
|
+
}
|
|
982
|
+
});
|
|
947
983
|
|
|
948
984
|
// Removes the blockNodesVerticalMargin styling for inline extensions, i.e. borderless excerpt-include
|
|
949
985
|
const inlineExtensionRendererMarginFix = css({
|
|
@@ -2421,13 +2457,13 @@ export const RendererStyleContainer = props => {
|
|
|
2421
2457
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
2422
2458
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
2423
2459
|
},
|
|
2424
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2460
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
2425
2461
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2426
2462
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2427
2463
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2428
2464
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
2429
2465
|
// this should be placed after baseOtherStyles
|
|
2430
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2466
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
2431
2467
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
2432
2468
|
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2') && syncBlockPatch2Styles],
|
|
2433
2469
|
"data-testid": testId
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "126.8.
|
|
60
|
+
const packageVersion = "126.8.10";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
package/dist/esm/messages.js
CHANGED
|
@@ -31,7 +31,7 @@ export var headingAnchorLinkMessages = defineMessages({
|
|
|
31
31
|
copyAriaLabel: {
|
|
32
32
|
id: 'fabric.editor.headingLink.copyAriaLabel',
|
|
33
33
|
defaultMessage: 'Copy',
|
|
34
|
-
description: '
|
|
34
|
+
description: 'Aria label for the copy link button displayed next to a heading. Used by screen readers to describe the button that copies the heading anchor link to the clipboard.'
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
export var tableCellMessages = defineMessages({
|
|
@@ -56,7 +56,8 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
56
56
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
57
57
|
// Return the content directly if it's a valid JSX.Element
|
|
58
58
|
return renderExtension(result, layout, {
|
|
59
|
-
isTopLevel: path.length < 1
|
|
59
|
+
isTopLevel: path.length < 1,
|
|
60
|
+
rendererAppearance: props.rendererAppearance
|
|
60
61
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
61
62
|
}
|
|
62
63
|
} catch (_unused) {
|
|
@@ -66,7 +67,8 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
66
67
|
|
|
67
68
|
// Always return default content if anything goes wrong
|
|
68
69
|
return renderExtension(children, layout, {
|
|
69
|
-
isTopLevel: path.length < 1
|
|
70
|
+
isTopLevel: path.length < 1,
|
|
71
|
+
rendererAppearance: props.rendererAppearance
|
|
70
72
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
71
73
|
}))));
|
|
72
74
|
};
|
|
@@ -53,8 +53,12 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
53
53
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
54
54
|
var _ref = options || {},
|
|
55
55
|
_ref$isTopLevel = _ref.isTopLevel,
|
|
56
|
-
isTopLevel = _ref$isTopLevel === void 0 ? true : _ref$isTopLevel
|
|
57
|
-
|
|
56
|
+
isTopLevel = _ref$isTopLevel === void 0 ? true : _ref$isTopLevel,
|
|
57
|
+
rendererAppearance = _ref.rendererAppearance;
|
|
58
|
+
// we should only use custom layout for full-page appearance
|
|
59
|
+
var canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
60
|
+
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
61
|
+
var centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
58
62
|
/**
|
|
59
63
|
* To reduce cumulative layout shift, we check installed manifest values (viewportSize) for Forge and extension node parameters
|
|
60
64
|
* for Connect (legacy). As Connect is being phased out, we want Forge to also start to store its expected height
|
|
@@ -72,9 +76,9 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
72
76
|
,
|
|
73
77
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(inlineClassName, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
74
78
|
style: {
|
|
75
|
-
width: isInline ? undefined : isTopLevel ?
|
|
79
|
+
width: isInline ? undefined : (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
76
80
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
77
|
-
calcBreakoutWidthCss(layout) : '100%',
|
|
81
|
+
calcBreakoutWidthCss(layout) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%',
|
|
78
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
79
83
|
minHeight: isInline ? undefined : extensionHeight && "".concat(extensionHeight, "px")
|
|
80
84
|
},
|
|
@@ -98,8 +102,9 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
98
102
|
,
|
|
99
103
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(inlineClassName, " ").concat(options.shadowClassNames, " ").concat(centerAlignClass),
|
|
100
104
|
style: {
|
|
105
|
+
width: isInline ? undefined : (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
101
106
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
102
|
-
width:
|
|
107
|
+
calcBreakoutWidth(layout, width) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%',
|
|
103
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
104
109
|
minHeight: isInline ? undefined : "".concat(extensionHeight, "px")
|
|
105
110
|
},
|
|
@@ -141,7 +146,8 @@ var Extension = function Extension(props) {
|
|
|
141
146
|
isTopLevel: path.length < 1,
|
|
142
147
|
handleRef: handleRef,
|
|
143
148
|
shadowClassNames: shadowClassNames,
|
|
144
|
-
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
149
|
+
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined,
|
|
150
|
+
rendererAppearance: props.rendererAppearance
|
|
145
151
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
146
152
|
}
|
|
147
153
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -154,7 +160,8 @@ var Extension = function Extension(props) {
|
|
|
154
160
|
isTopLevel: path.length < 1,
|
|
155
161
|
handleRef: handleRef,
|
|
156
162
|
shadowClassNames: shadowClassNames,
|
|
157
|
-
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined
|
|
163
|
+
tabIndex: fg('platform_editor_dec_a11y_fixes') ? props.tabIndex : undefined,
|
|
164
|
+
rendererAppearance: props.rendererAppearance
|
|
158
165
|
}, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
|
|
159
166
|
});
|
|
160
167
|
};
|
|
@@ -41,17 +41,22 @@ var MultiBodiedExtensionWrapperLegacy = function MultiBodiedExtensionWrapperLega
|
|
|
41
41
|
var width = _ref3.width,
|
|
42
42
|
path = _ref3.path,
|
|
43
43
|
layout = _ref3.layout,
|
|
44
|
+
rendererAppearance = _ref3.rendererAppearance,
|
|
44
45
|
children = _ref3.children;
|
|
45
46
|
var isTopLevel = path.length < 1;
|
|
46
|
-
|
|
47
|
+
// we should only use custom layout for full-page appearance
|
|
48
|
+
var canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
49
|
+
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
50
|
+
var centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
47
51
|
|
|
48
52
|
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
49
53
|
return jsx("div", {
|
|
50
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
51
55
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
52
56
|
style: {
|
|
57
|
+
width: (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
53
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
54
|
-
|
|
59
|
+
calcBreakoutWidth(layout, width) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%'
|
|
55
60
|
},
|
|
56
61
|
"data-layout": layout,
|
|
57
62
|
"data-testid": "multiBodiedExtension--wrapper-renderer"
|
|
@@ -63,18 +68,22 @@ var MultiBodiedExtensionWrapperLegacy = function MultiBodiedExtensionWrapperLega
|
|
|
63
68
|
var MultiBodiedExtensionWrapperNext = function MultiBodiedExtensionWrapperNext(_ref4) {
|
|
64
69
|
var path = _ref4.path,
|
|
65
70
|
layout = _ref4.layout,
|
|
71
|
+
rendererAppearance = _ref4.rendererAppearance,
|
|
66
72
|
children = _ref4.children;
|
|
67
73
|
var isTopLevel = path.length < 1;
|
|
68
|
-
|
|
74
|
+
// we should only use custom layout for full-page appearance
|
|
75
|
+
var canUseCustomLayout = expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererAppearance === 'full-page' : true;
|
|
76
|
+
var isCustomLayout = isTopLevel && ['wide', 'full-width'].includes(layout) && canUseCustomLayout;
|
|
77
|
+
var centerAlignClass = isCustomLayout ? RendererCssClassName.EXTENSION_CENTER_ALIGN : '';
|
|
69
78
|
|
|
70
79
|
// This hierarchy is copied from regular extension (see extension.tsx)
|
|
71
80
|
return jsx("div", {
|
|
72
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
82
|
className: "".concat(RendererCssClassName.EXTENSION, " ").concat(centerAlignClass),
|
|
74
83
|
style: {
|
|
75
|
-
width: isTopLevel ?
|
|
84
|
+
width: (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? isCustomLayout : isTopLevel) ?
|
|
76
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
77
|
-
calcBreakoutWidthCss(layout) : '100%'
|
|
86
|
+
calcBreakoutWidthCss(layout) : expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? undefined : '100%'
|
|
78
87
|
},
|
|
79
88
|
"data-layout": layout,
|
|
80
89
|
"data-testid": "multiBodiedExtension--wrapper-renderer"
|
|
@@ -95,7 +104,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
95
104
|
extensionKey = props.extensionKey,
|
|
96
105
|
content = props.content,
|
|
97
106
|
marks = props.marks,
|
|
98
|
-
localId = props.localId
|
|
107
|
+
localId = props.localId,
|
|
108
|
+
rendererAppearance = props.rendererAppearance;
|
|
99
109
|
var _useState = useState(0),
|
|
100
110
|
_useState2 = _slicedToArray(_useState, 2),
|
|
101
111
|
activeChildIndex = _useState2[0],
|
|
@@ -158,7 +168,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
158
168
|
"data-node-type": "multiBodiedExtension"
|
|
159
169
|
}, jsx(MultiBodiedExtensionWrapperNext, {
|
|
160
170
|
layout: layout,
|
|
161
|
-
path: path
|
|
171
|
+
path: path,
|
|
172
|
+
rendererAppearance: rendererAppearance
|
|
162
173
|
}, renderContent()));
|
|
163
174
|
}
|
|
164
175
|
return jsx("section", {
|
|
@@ -173,7 +184,8 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
173
184
|
return jsx(MultiBodiedExtensionWrapperLegacy, {
|
|
174
185
|
layout: layout,
|
|
175
186
|
width: width,
|
|
176
|
-
path: path
|
|
187
|
+
path: path,
|
|
188
|
+
rendererAppearance: rendererAppearance
|
|
177
189
|
}, renderContent());
|
|
178
190
|
}));
|
|
179
191
|
};
|
|
@@ -268,11 +268,29 @@ var rendererFullPageStylesWithReducedPadding = css(_defineProperty({
|
|
|
268
268
|
}, "@media (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
|
|
269
269
|
'--ak-renderer--full-page-gutter': "".concat(akEditorGutterPaddingReduced, "px")
|
|
270
270
|
}));
|
|
271
|
+
var oldRendererFullWidthStyles = css({
|
|
272
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
273
|
+
maxWidth: "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
274
|
+
margin: "0 auto",
|
|
275
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
276
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
277
|
+
width: '100% !important'
|
|
278
|
+
}
|
|
279
|
+
});
|
|
271
280
|
var rendererFullWidthStyles = css({
|
|
272
281
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
273
282
|
maxWidth: "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
274
283
|
margin: "0 auto",
|
|
275
284
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
285
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"])': {
|
|
286
|
+
width: '100% !important'
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
var oldRendererMaxWidthStyles = css({
|
|
290
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
291
|
+
maxWidth: "".concat(akEditorMaxWidthLayoutWidth, "px"),
|
|
292
|
+
margin: "0 auto",
|
|
293
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
276
294
|
'.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
|
|
277
295
|
width: '100% !important'
|
|
278
296
|
}
|
|
@@ -282,7 +300,7 @@ var rendererMaxWidthStyles = css({
|
|
|
282
300
|
maxWidth: "".concat(akEditorMaxWidthLayoutWidth, "px"),
|
|
283
301
|
margin: "0 auto",
|
|
284
302
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
285
|
-
'.fabric-editor-breakout-mark:not([data-has-width="true"])
|
|
303
|
+
'.fabric-editor-breakout-mark:not([data-has-width="true"])': {
|
|
286
304
|
width: '100% !important'
|
|
287
305
|
}
|
|
288
306
|
});
|
|
@@ -770,7 +788,7 @@ var extensionStyle = css({
|
|
|
770
788
|
fontSize: 'var(--ak-renderer-base-font-size)'
|
|
771
789
|
}
|
|
772
790
|
});
|
|
773
|
-
var
|
|
791
|
+
var oldExtensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
774
792
|
display: 'inline-block'
|
|
775
793
|
}), ".".concat(RendererCssClassName.DOCUMENT, " .").concat(RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
776
794
|
display: 'inline-block',
|
|
@@ -785,6 +803,19 @@ var extensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty
|
|
|
785
803
|
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " div, .").concat(RendererCssClassName.EXTENSION_AS_INLINE, " p"), {
|
|
786
804
|
display: 'inline-block'
|
|
787
805
|
}));
|
|
806
|
+
var extensionAsInlineStyle = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " [data-as-inline=\"on\"]"), {
|
|
807
|
+
display: 'inline-block'
|
|
808
|
+
}), ".".concat(RendererCssClassName.DOCUMENT, " .").concat(RendererCssClassName.EXTENSION_AS_INLINE), {
|
|
809
|
+
display: 'inline-block',
|
|
810
|
+
width: 'auto',
|
|
811
|
+
marginTop: 0
|
|
812
|
+
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " .").concat(RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER), {
|
|
813
|
+
display: 'inline-block',
|
|
814
|
+
overflowX: 'visible',
|
|
815
|
+
containerType: 'normal'
|
|
816
|
+
}), ".".concat(RendererCssClassName.EXTENSION_AS_INLINE, " div, .").concat(RendererCssClassName.EXTENSION_AS_INLINE, " p"), {
|
|
817
|
+
display: 'inline-block'
|
|
818
|
+
}));
|
|
788
819
|
|
|
789
820
|
// Removes the blockNodesVerticalMargin styling for inline extensions, i.e. borderless excerpt-include
|
|
790
821
|
var inlineExtensionRendererMarginFix = css({
|
|
@@ -1894,13 +1925,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1894
1925
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
1895
1926
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
1896
1927
|
},
|
|
1897
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && rendererMaxWidthStyles, rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1928
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles,
|
|
1898
1929
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1899
1930
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1900
1931
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1901
1932
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor,
|
|
1902
1933
|
// this should be placed after baseOtherStyles
|
|
1903
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && extensionAsInlineStyle, expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
1934
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), expValEquals('confluence_insert_excerpt_inline_vertical_align', 'isEnabled', true) && inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle,
|
|
1904
1935
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
1905
1936
|
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined, editorExperiment('platform_synced_block', true) && syncBlockStyles, editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2') && syncBlockPatch2Styles],
|
|
1906
1937
|
"data-testid": testId
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "126.8.
|
|
65
|
+
var packageVersion = "126.8.10";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -5,6 +5,7 @@ import type { Serializer } from '../../serializer';
|
|
|
5
5
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { ExtensionHandlers, ExtensionParams, Parameters } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
8
9
|
interface Props {
|
|
9
10
|
content?: any;
|
|
10
11
|
extensionHandlers?: ExtensionHandlers;
|
|
@@ -18,6 +19,7 @@ interface Props {
|
|
|
18
19
|
parameters?: any;
|
|
19
20
|
path?: PMNode[];
|
|
20
21
|
providers: ProviderFactory;
|
|
22
|
+
rendererAppearance?: RendererAppearance;
|
|
21
23
|
rendererContext: RendererContext;
|
|
22
24
|
serializer: Serializer<any>;
|
|
23
25
|
shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean;
|
|
@@ -9,6 +9,7 @@ import { type ExtensionLayout } from '@atlaskit/adf-schema';
|
|
|
9
9
|
import type { ExtensionHandlers, ExtensionParams, Parameters } from '@atlaskit/editor-common/extensions';
|
|
10
10
|
import { type ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import type { OverflowShadowProps, OverflowShadowState, ShadowObserver } from '@atlaskit/editor-common/ui';
|
|
12
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
12
13
|
interface Props {
|
|
13
14
|
extensionHandlers?: ExtensionHandlers;
|
|
14
15
|
extensionKey: string;
|
|
@@ -22,6 +23,7 @@ interface Props {
|
|
|
22
23
|
parameters?: any;
|
|
23
24
|
path?: PMNode[];
|
|
24
25
|
providers: ProviderFactory;
|
|
26
|
+
rendererAppearance?: RendererAppearance;
|
|
25
27
|
rendererContext: RendererContext;
|
|
26
28
|
shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean;
|
|
27
29
|
text?: string;
|
|
@@ -31,8 +33,9 @@ type AllOrNone<T> = T | {
|
|
|
31
33
|
};
|
|
32
34
|
type RenderExtensionOptions = {
|
|
33
35
|
isTopLevel?: boolean;
|
|
36
|
+
rendererAppearance?: RendererAppearance;
|
|
34
37
|
} & AllOrNone<OverflowShadowProps>;
|
|
35
|
-
export declare const renderExtension: (content: any, layout:
|
|
38
|
+
export declare const renderExtension: (content: any, layout: ExtensionLayout, options?: RenderExtensionOptions, removeOverflow?: boolean, extensionId?: string, extensionViewportSizes?: ExtensionViewportSize[], nodeHeight?: string, localId?: string, shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean, node?: ExtensionParams<Parameters>, isInsideOfInlineExtension?: boolean) => React.JSX.Element;
|
|
36
39
|
declare const _default_1: {
|
|
37
40
|
new (props: Props & OverflowShadowProps): {
|
|
38
41
|
calcOverflowDiff: () => number;
|
|
@@ -11,6 +11,7 @@ import type { Serializer } from '../../serializer';
|
|
|
11
11
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
12
12
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
13
13
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
14
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
14
15
|
type Props = React.PropsWithChildren<{
|
|
15
16
|
content?: any;
|
|
16
17
|
extensionHandlers?: ExtensionHandlers;
|
|
@@ -23,6 +24,7 @@ type Props = React.PropsWithChildren<{
|
|
|
23
24
|
parameters?: any;
|
|
24
25
|
path?: PMNode[];
|
|
25
26
|
providers: ProviderFactory;
|
|
27
|
+
rendererAppearance?: RendererAppearance;
|
|
26
28
|
rendererContext: RendererContext;
|
|
27
29
|
serializer: Serializer<any>;
|
|
28
30
|
}>;
|
|
@@ -5,6 +5,7 @@ import type { Serializer } from '../../serializer';
|
|
|
5
5
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { ExtensionHandlers, ExtensionParams, Parameters } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
8
9
|
interface Props {
|
|
9
10
|
content?: any;
|
|
10
11
|
extensionHandlers?: ExtensionHandlers;
|
|
@@ -18,6 +19,7 @@ interface Props {
|
|
|
18
19
|
parameters?: any;
|
|
19
20
|
path?: PMNode[];
|
|
20
21
|
providers: ProviderFactory;
|
|
22
|
+
rendererAppearance?: RendererAppearance;
|
|
21
23
|
rendererContext: RendererContext;
|
|
22
24
|
serializer: Serializer<any>;
|
|
23
25
|
shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean;
|
|
@@ -9,6 +9,7 @@ import { type ExtensionLayout } from '@atlaskit/adf-schema';
|
|
|
9
9
|
import type { ExtensionHandlers, ExtensionParams, Parameters } from '@atlaskit/editor-common/extensions';
|
|
10
10
|
import { type ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import type { OverflowShadowProps, OverflowShadowState, ShadowObserver } from '@atlaskit/editor-common/ui';
|
|
12
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
12
13
|
interface Props {
|
|
13
14
|
extensionHandlers?: ExtensionHandlers;
|
|
14
15
|
extensionKey: string;
|
|
@@ -22,6 +23,7 @@ interface Props {
|
|
|
22
23
|
parameters?: any;
|
|
23
24
|
path?: PMNode[];
|
|
24
25
|
providers: ProviderFactory;
|
|
26
|
+
rendererAppearance?: RendererAppearance;
|
|
25
27
|
rendererContext: RendererContext;
|
|
26
28
|
shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean;
|
|
27
29
|
text?: string;
|
|
@@ -31,8 +33,9 @@ type AllOrNone<T> = T | {
|
|
|
31
33
|
};
|
|
32
34
|
type RenderExtensionOptions = {
|
|
33
35
|
isTopLevel?: boolean;
|
|
36
|
+
rendererAppearance?: RendererAppearance;
|
|
34
37
|
} & AllOrNone<OverflowShadowProps>;
|
|
35
|
-
export declare const renderExtension: (content: any, layout:
|
|
38
|
+
export declare const renderExtension: (content: any, layout: ExtensionLayout, options?: RenderExtensionOptions, removeOverflow?: boolean, extensionId?: string, extensionViewportSizes?: ExtensionViewportSize[], nodeHeight?: string, localId?: string, shouldDisplayExtensionAsInline?: (extensionParams?: ExtensionParams<Parameters>) => boolean, node?: ExtensionParams<Parameters>, isInsideOfInlineExtension?: boolean) => React.JSX.Element;
|
|
36
39
|
declare const _default_1: {
|
|
37
40
|
new (props: Props & OverflowShadowProps): {
|
|
38
41
|
calcOverflowDiff: () => number;
|
|
@@ -11,6 +11,7 @@ import type { Serializer } from '../../serializer';
|
|
|
11
11
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
12
12
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
13
13
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
14
|
+
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
14
15
|
type Props = React.PropsWithChildren<{
|
|
15
16
|
content?: any;
|
|
16
17
|
extensionHandlers?: ExtensionHandlers;
|
|
@@ -23,6 +24,7 @@ type Props = React.PropsWithChildren<{
|
|
|
23
24
|
parameters?: any;
|
|
24
25
|
path?: PMNode[];
|
|
25
26
|
providers: ProviderFactory;
|
|
27
|
+
rendererAppearance?: RendererAppearance;
|
|
26
28
|
rendererContext: RendererContext;
|
|
27
29
|
serializer: Serializer<any>;
|
|
28
30
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "126.8.
|
|
3
|
+
"version": "126.8.11",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/status": "^3.1.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^25.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^25.4.0",
|
|
61
61
|
"@atlaskit/tokens": "^11.0.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^111.
|
|
74
|
+
"@atlaskit/editor-common": "^111.14.0",
|
|
75
75
|
"@atlaskit/link-provider": "^4.2.0",
|
|
76
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@atlaskit/link-test-helpers": "^9.0.0",
|
|
87
87
|
"@atlaskit/media-core": "^37.0.0",
|
|
88
88
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
89
|
-
"@atlaskit/media-test-helpers": "^
|
|
89
|
+
"@atlaskit/media-test-helpers": "^40.0.0",
|
|
90
90
|
"@atlaskit/mention": "^24.4.0",
|
|
91
91
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
92
92
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
|