@atlaskit/renderer 142.1.0 → 142.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/react/nodes/bodiedExtension.js +0 -5
- package/dist/cjs/react/nodes/extension.js +2 -10
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/bodiedExtension.js +0 -3
- package/dist/es2019/react/nodes/extension.js +2 -7
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/bodiedExtension.js +0 -5
- package/dist/esm/react/nodes/extension.js +2 -10
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/extension.d.ts +0 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 142.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e2f4dbc97cb24`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e2f4dbc97cb24) -
|
|
8
|
+
Clean up experiment `platform_editor_table_fit_to_content_patch_2`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 142.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 142.1.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -38,9 +38,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
38
38
|
.map(function (child) {
|
|
39
39
|
return /*#__PURE__*/_react.default.isValidElement(child) ? child.props.nodeType === 'table' : false;
|
|
40
40
|
}).every(Boolean);
|
|
41
|
-
var isInsideOfTable = path.some(function (node) {
|
|
42
|
-
return node.type.name === 'table';
|
|
43
|
-
});
|
|
44
41
|
var validationContextValue = (0, _react.useMemo)(function () {
|
|
45
42
|
return {
|
|
46
43
|
allowNestedTables: true
|
|
@@ -70,7 +67,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
70
67
|
// Return the content directly if it's a valid JSX.Element
|
|
71
68
|
return (0, _extension.renderExtension)(result, layout, {
|
|
72
69
|
isTopLevel: path.length < 1,
|
|
73
|
-
isInsideOfTable: isInsideOfTable,
|
|
74
70
|
rendererAppearance: props.rendererAppearance,
|
|
75
71
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
76
72
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -83,7 +79,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
83
79
|
// Always return default content if anything goes wrong
|
|
84
80
|
return (0, _extension.renderExtension)(children, layout, {
|
|
85
81
|
isTopLevel: path.length < 1,
|
|
86
|
-
isInsideOfTable: isInsideOfTable,
|
|
87
82
|
rendererAppearance: props.rendererAppearance,
|
|
88
83
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
89
84
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -12,7 +12,6 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
16
15
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
17
|
var _consts = require("../../consts");
|
|
@@ -94,8 +93,6 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
94
93
|
|
|
95
94
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
96
95
|
var _ref2 = options || {},
|
|
97
|
-
_ref2$isInsideOfTable = _ref2.isInsideOfTable,
|
|
98
|
-
isInsideOfTable = _ref2$isInsideOfTable === void 0 ? false : _ref2$isInsideOfTable,
|
|
99
96
|
_ref2$isTopLevel = _ref2.isTopLevel,
|
|
100
97
|
isTopLevel = _ref2$isTopLevel === void 0 ? true : _ref2$isTopLevel,
|
|
101
98
|
rendererAppearance = _ref2.rendererAppearance,
|
|
@@ -181,7 +178,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
181
178
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
182
179
|
,
|
|
183
180
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
184
|
-
css: [
|
|
181
|
+
css: [!isInsideOfInlineExtension && containerStyle]
|
|
185
182
|
}, asInlineAnalytics, content));
|
|
186
183
|
return centerAlignClass ? (0, _react2.jsx)("div", {
|
|
187
184
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -213,7 +210,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
213
210
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
214
211
|
,
|
|
215
212
|
className: "".concat(_consts.RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
216
|
-
css: [
|
|
213
|
+
css: [!isInsideOfInlineExtension && containerStyle]
|
|
217
214
|
}, asInlineAnalytics, content));
|
|
218
215
|
return centerAlignClass ? (0, _react2.jsx)("div", {
|
|
219
216
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -234,9 +231,6 @@ var Extension = function Extension(props) {
|
|
|
234
231
|
nodeHeight = props.nodeHeight,
|
|
235
232
|
localId = props.localId,
|
|
236
233
|
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
237
|
-
var isInsideOfTable = path.some(function (node) {
|
|
238
|
-
return node.type.name === 'table';
|
|
239
|
-
});
|
|
240
234
|
return (0, _react2.jsx)(_ExtensionRenderer.default
|
|
241
235
|
// Ignored via go/ees005
|
|
242
236
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -251,7 +245,6 @@ var Extension = function Extension(props) {
|
|
|
251
245
|
if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
|
|
252
246
|
return renderExtension(result, layout, {
|
|
253
247
|
isTopLevel: path.length < 1,
|
|
254
|
-
isInsideOfTable: isInsideOfTable,
|
|
255
248
|
handleRef: handleRef,
|
|
256
249
|
shadowClassNames: shadowClassNames,
|
|
257
250
|
tabIndex: props.tabIndex,
|
|
@@ -270,7 +263,6 @@ var Extension = function Extension(props) {
|
|
|
270
263
|
// Always return default content if anything goes wrong
|
|
271
264
|
return renderExtension(text || 'extension', layout, {
|
|
272
265
|
isTopLevel: path.length < 1,
|
|
273
|
-
isInsideOfTable: isInsideOfTable,
|
|
274
266
|
handleRef: handleRef,
|
|
275
267
|
shadowClassNames: shadowClassNames,
|
|
276
268
|
tabIndex: props.tabIndex,
|
|
@@ -2329,7 +2329,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2329
2329
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2330
2330
|
(0, _fg.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2331
2331
|
// this should be placed after baseOtherStyles
|
|
2332
|
-
(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, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles,
|
|
2332
|
+
(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, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, 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, (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, (0, _expValEquals.expValEquals)('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2333
2333
|
"data-testid": testId
|
|
2334
2334
|
}, children);
|
|
2335
2335
|
};
|
|
@@ -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.1;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "142.
|
|
74
|
+
var packageVersion = "142.1.1";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -28,7 +28,6 @@ const BodiedExtension = props => {
|
|
|
28
28
|
// Ignored via go/ees005
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
30
|
.map(child => /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false).every(Boolean);
|
|
31
|
-
const isInsideOfTable = path.some(node => node.type.name === 'table');
|
|
32
31
|
const validationContextValue = useMemo(() => ({
|
|
33
32
|
allowNestedTables: true
|
|
34
33
|
}), []);
|
|
@@ -57,7 +56,6 @@ const BodiedExtension = props => {
|
|
|
57
56
|
// Return the content directly if it's a valid JSX.Element
|
|
58
57
|
return renderExtension(result, layout, {
|
|
59
58
|
isTopLevel: path.length < 1,
|
|
60
|
-
isInsideOfTable,
|
|
61
59
|
rendererAppearance: props.rendererAppearance,
|
|
62
60
|
fireAnalyticsEvent
|
|
63
61
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -70,7 +68,6 @@ const BodiedExtension = props => {
|
|
|
70
68
|
// Always return default content if anything goes wrong
|
|
71
69
|
return renderExtension(children, layout, {
|
|
72
70
|
isTopLevel: path.length < 1,
|
|
73
|
-
isInsideOfTable,
|
|
74
71
|
rendererAppearance: props.rendererAppearance,
|
|
75
72
|
fireAnalyticsEvent
|
|
76
73
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -11,7 +11,6 @@ import { jsx, css } from '@emotion/react';
|
|
|
11
11
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -75,7 +74,6 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
75
74
|
|
|
76
75
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
77
76
|
const {
|
|
78
|
-
isInsideOfTable = false,
|
|
79
77
|
isTopLevel = true,
|
|
80
78
|
rendererAppearance,
|
|
81
79
|
fireAnalyticsEvent
|
|
@@ -161,7 +159,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
161
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
162
160
|
,
|
|
163
161
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
164
|
-
css: [
|
|
162
|
+
css: [!isInsideOfInlineExtension && containerStyle]
|
|
165
163
|
}, asInlineAnalytics, content));
|
|
166
164
|
return centerAlignClass ? jsx("div", {
|
|
167
165
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -194,7 +192,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
194
192
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
195
193
|
,
|
|
196
194
|
className: `${RendererCssClassName.EXTENSION_INNER_WRAPPER} ${overflowContainerClass}`,
|
|
197
|
-
css: [
|
|
195
|
+
css: [!isInsideOfInlineExtension && containerStyle]
|
|
198
196
|
}, asInlineAnalytics, content));
|
|
199
197
|
return centerAlignClass ? jsx("div", {
|
|
200
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -215,7 +213,6 @@ const Extension = props => {
|
|
|
215
213
|
localId,
|
|
216
214
|
isInsideOfInlineExtension
|
|
217
215
|
} = props;
|
|
218
|
-
const isInsideOfTable = path.some(node => node.type.name === 'table');
|
|
219
216
|
return jsx(ExtensionRenderer
|
|
220
217
|
// Ignored via go/ees005
|
|
221
218
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -231,7 +228,6 @@ const Extension = props => {
|
|
|
231
228
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
232
229
|
return renderExtension(result, layout, {
|
|
233
230
|
isTopLevel: path.length < 1,
|
|
234
|
-
isInsideOfTable,
|
|
235
231
|
handleRef,
|
|
236
232
|
shadowClassNames,
|
|
237
233
|
tabIndex: props.tabIndex,
|
|
@@ -250,7 +246,6 @@ const Extension = props => {
|
|
|
250
246
|
// Always return default content if anything goes wrong
|
|
251
247
|
return renderExtension(text || 'extension', layout, {
|
|
252
248
|
isTopLevel: path.length < 1,
|
|
253
|
-
isInsideOfTable,
|
|
254
249
|
handleRef,
|
|
255
250
|
shadowClassNames,
|
|
256
251
|
tabIndex: props.tabIndex,
|
|
@@ -2965,7 +2965,7 @@ export const RendererStyleContainer = props => {
|
|
|
2965
2965
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2966
2966
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2967
2967
|
// this should be placed after baseOtherStyles
|
|
2968
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles,
|
|
2968
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, 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, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2969
2969
|
"data-testid": testId
|
|
2970
2970
|
}, children);
|
|
2971
2971
|
};
|
|
@@ -56,7 +56,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
58
58
|
const packageName = "@atlaskit/renderer";
|
|
59
|
-
const packageVersion = "142.
|
|
59
|
+
const packageVersion = "142.1.1";
|
|
60
60
|
const setAsQueryContainerStyles = css({
|
|
61
61
|
containerName: 'ak-renderer-wrapper',
|
|
62
62
|
containerType: 'inline-size'
|
|
@@ -29,9 +29,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
29
29
|
.map(function (child) {
|
|
30
30
|
return /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false;
|
|
31
31
|
}).every(Boolean);
|
|
32
|
-
var isInsideOfTable = path.some(function (node) {
|
|
33
|
-
return node.type.name === 'table';
|
|
34
|
-
});
|
|
35
32
|
var validationContextValue = useMemo(function () {
|
|
36
33
|
return {
|
|
37
34
|
allowNestedTables: true
|
|
@@ -61,7 +58,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
61
58
|
// Return the content directly if it's a valid JSX.Element
|
|
62
59
|
return renderExtension(result, layout, {
|
|
63
60
|
isTopLevel: path.length < 1,
|
|
64
|
-
isInsideOfTable: isInsideOfTable,
|
|
65
61
|
rendererAppearance: props.rendererAppearance,
|
|
66
62
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
67
63
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -74,7 +70,6 @@ var BodiedExtension = function BodiedExtension(props) {
|
|
|
74
70
|
// Always return default content if anything goes wrong
|
|
75
71
|
return renderExtension(children, layout, {
|
|
76
72
|
isTopLevel: path.length < 1,
|
|
77
|
-
isInsideOfTable: isInsideOfTable,
|
|
78
73
|
rendererAppearance: props.rendererAppearance,
|
|
79
74
|
fireAnalyticsEvent: fireAnalyticsEvent
|
|
80
75
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
@@ -11,7 +11,6 @@ import { jsx, css } from '@emotion/react';
|
|
|
11
11
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -85,8 +84,6 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
85
84
|
|
|
86
85
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
87
86
|
var _ref2 = options || {},
|
|
88
|
-
_ref2$isInsideOfTable = _ref2.isInsideOfTable,
|
|
89
|
-
isInsideOfTable = _ref2$isInsideOfTable === void 0 ? false : _ref2$isInsideOfTable,
|
|
90
87
|
_ref2$isTopLevel = _ref2.isTopLevel,
|
|
91
88
|
isTopLevel = _ref2$isTopLevel === void 0 ? true : _ref2$isTopLevel,
|
|
92
89
|
rendererAppearance = _ref2.rendererAppearance,
|
|
@@ -172,7 +169,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
172
169
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
173
170
|
,
|
|
174
171
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
175
|
-
css: [
|
|
172
|
+
css: [!isInsideOfInlineExtension && containerStyle]
|
|
176
173
|
}, asInlineAnalytics, content));
|
|
177
174
|
return centerAlignClass ? jsx("div", {
|
|
178
175
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -204,7 +201,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
204
201
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
205
202
|
,
|
|
206
203
|
className: "".concat(RendererCssClassName.EXTENSION_INNER_WRAPPER, " ").concat(overflowContainerClass),
|
|
207
|
-
css: [
|
|
204
|
+
css: [!isInsideOfInlineExtension && containerStyle]
|
|
208
205
|
}, asInlineAnalytics, content));
|
|
209
206
|
return centerAlignClass ? jsx("div", {
|
|
210
207
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -225,9 +222,6 @@ var Extension = function Extension(props) {
|
|
|
225
222
|
nodeHeight = props.nodeHeight,
|
|
226
223
|
localId = props.localId,
|
|
227
224
|
isInsideOfInlineExtension = props.isInsideOfInlineExtension;
|
|
228
|
-
var isInsideOfTable = path.some(function (node) {
|
|
229
|
-
return node.type.name === 'table';
|
|
230
|
-
});
|
|
231
225
|
return jsx(ExtensionRenderer
|
|
232
226
|
// Ignored via go/ees005
|
|
233
227
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -242,7 +236,6 @@ var Extension = function Extension(props) {
|
|
|
242
236
|
if (result && /*#__PURE__*/React.isValidElement(result)) {
|
|
243
237
|
return renderExtension(result, layout, {
|
|
244
238
|
isTopLevel: path.length < 1,
|
|
245
|
-
isInsideOfTable: isInsideOfTable,
|
|
246
239
|
handleRef: handleRef,
|
|
247
240
|
shadowClassNames: shadowClassNames,
|
|
248
241
|
tabIndex: props.tabIndex,
|
|
@@ -261,7 +254,6 @@ var Extension = function Extension(props) {
|
|
|
261
254
|
// Always return default content if anything goes wrong
|
|
262
255
|
return renderExtension(text || 'extension', layout, {
|
|
263
256
|
isTopLevel: path.length < 1,
|
|
264
|
-
isInsideOfTable: isInsideOfTable,
|
|
265
257
|
handleRef: handleRef,
|
|
266
258
|
shadowClassNames: shadowClassNames,
|
|
267
259
|
tabIndex: props.tabIndex,
|
|
@@ -2322,7 +2322,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2322
2322
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2323
2323
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2324
2324
|
// this should be placed after baseOtherStyles
|
|
2325
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles,
|
|
2325
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, 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, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2326
2326
|
"data-testid": testId
|
|
2327
2327
|
}, children);
|
|
2328
2328
|
};
|
|
@@ -61,7 +61,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
63
63
|
var packageName = "@atlaskit/renderer";
|
|
64
|
-
var packageVersion = "142.
|
|
64
|
+
var packageVersion = "142.1.1";
|
|
65
65
|
var setAsQueryContainerStyles = css({
|
|
66
66
|
containerName: 'ak-renderer-wrapper',
|
|
67
67
|
containerType: 'inline-size'
|
|
@@ -41,7 +41,6 @@ type AllOrNone<T> = T | {
|
|
|
41
41
|
};
|
|
42
42
|
type RenderExtensionOptions = {
|
|
43
43
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
44
|
-
isInsideOfTable?: boolean;
|
|
45
44
|
isTopLevel?: boolean;
|
|
46
45
|
rendererAppearance?: RendererAppearance;
|
|
47
46
|
} & AllOrNone<OverflowShadowProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "142.1.
|
|
3
|
+
"version": "142.1.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@atlaskit/status": "^5.12.0",
|
|
74
74
|
"@atlaskit/task-decision": "^21.10.0",
|
|
75
75
|
"@atlaskit/theme": "^28.2.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
77
|
-
"@atlaskit/tokens": "^
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^203.0.0",
|
|
77
|
+
"@atlaskit/tokens": "^19.0.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.3.0",
|
|
79
79
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
80
80
|
"@babel/runtime": "^7.0.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"uuid": "^11.1.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@atlaskit/editor-common": "^123.
|
|
91
|
+
"@atlaskit/editor-common": "^123.8.0",
|
|
92
92
|
"@atlaskit/link-provider": "^5.7.0",
|
|
93
93
|
"@atlaskit/media-core": "^38.2.0",
|
|
94
94
|
"react": "^18.2.0 || ^19.2.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"@atlaskit/modal-dialog": "^16.6.0",
|
|
115
115
|
"@atlaskit/navigation-system": "^10.17.0",
|
|
116
116
|
"@atlaskit/primitives": "^22.5.0",
|
|
117
|
-
"@atlaskit/profilecard": "^26.
|
|
117
|
+
"@atlaskit/profilecard": "^26.25.0",
|
|
118
118
|
"@atlaskit/radio": "^10.2.0",
|
|
119
119
|
"@atlaskit/range": "^12.2.0",
|
|
120
120
|
"@atlaskit/section-message": "^10.2.0",
|