@atlaskit/renderer 152.2.5 → 152.2.6
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/react/nodes/extension.js +4 -9
- package/dist/cjs/react/utils/markBlockAsInline.js +1 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/extension.js +4 -9
- package/dist/es2019/react/utils/markBlockAsInline.js +1 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/extension.js +4 -9
- package/dist/esm/react/utils/markBlockAsInline.js +1 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 152.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b3d3cec87b96b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b3d3cec87b96b) -
|
|
8
|
+
Remove the `platform_forge_inline_bodied_macro` feature gate and keep its enabled behavior. The
|
|
9
|
+
separate inline-bodied layout switch continues to control layout support.
|
|
10
|
+
|
|
3
11
|
## 152.2.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -126,14 +126,9 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
126
126
|
* same shape — so keying on it would change how existing content renders. The renderer only
|
|
127
127
|
* ever sees the stored node, never the manifest, so a parameter this code writes is the only
|
|
128
128
|
* available signal.
|
|
129
|
-
*
|
|
130
|
-
* Evaluated once and shared with `isNativeForgeInline` below, so the gate is read a single time
|
|
131
|
-
* per render, and the cheap checks stay in front of it so anything ineligible short-circuits
|
|
132
|
-
* without firing an exposure it can never act on.
|
|
133
129
|
*/
|
|
134
130
|
var hasForgeInlineBodiedMarker = Boolean((node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.content) && (node === null || node === void 0 || (_node$parameters = node.parameters) === null || _node$parameters === void 0 || (_node$parameters = _node$parameters.guestParams) === null || _node$parameters === void 0 ? void 0 : _node$parameters[FORGE_INLINE_BODIED_PARAM]) === 'true');
|
|
135
|
-
var
|
|
136
|
-
var isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 || (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && (0, _fg.fg)('platform_forge_inline_bodied_layout_switch') && (0, _fg.fg)('platform_forge_inline_bodied_macro');
|
|
131
|
+
var isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 || (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && (0, _fg.fg)('platform_forge_inline_bodied_layout_switch');
|
|
137
132
|
/**
|
|
138
133
|
* The pass that marks the sibling textblocks around an inline extension resolves their
|
|
139
134
|
* positions without a depth term, so it only ever matches at the top level. Inlining a nested
|
|
@@ -141,7 +136,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
141
136
|
* which is worse than leaving it a block — so keep nested inline-bodied Forge macros as
|
|
142
137
|
* blocks until the sibling marking works at depth.
|
|
143
138
|
*/
|
|
144
|
-
var isNestedForgeInlineBodied = !isTopLevel && (
|
|
139
|
+
var isNestedForgeInlineBodied = !isTopLevel && (hasForgeInlineBodiedMarker || isInlineBodiedLayoutEnabled);
|
|
145
140
|
var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && !isNestedForgeInlineBodied;
|
|
146
141
|
var inlineClassName = isInline ? _consts.RendererCssClassName.EXTENSION_AS_INLINE : '';
|
|
147
142
|
/**
|
|
@@ -150,14 +145,14 @@ var renderExtension = exports.renderExtension = function renderExtension(content
|
|
|
150
145
|
* The inline styling above stops at the outer wrapper, so mark these nodes to let the
|
|
151
146
|
* nested document's block spacing be collapsed too.
|
|
152
147
|
*/
|
|
153
|
-
var isNativeForgeInline = Boolean(isInline &&
|
|
148
|
+
var isNativeForgeInline = Boolean(isInline && hasForgeInlineBodiedMarker);
|
|
154
149
|
/**
|
|
155
150
|
* Migrated inline-bodied macros intentionally do not receive the native Forge marker. Mark the
|
|
156
151
|
* rendered wrapper instead so the stylesheet can fix only the surrounding text flow without
|
|
157
152
|
* applying the native nested-renderer, overflow or sizing rules to migrated content.
|
|
158
153
|
* Custom UI also uses this outer text-flow treatment, without styling inside its iframe.
|
|
159
154
|
*/
|
|
160
|
-
var isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker
|
|
155
|
+
var isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker);
|
|
161
156
|
var asInlineAnalytics = isInline && fireAnalyticsEvent && node ? (0, _react2.jsx)(FireExtensionAsInlineAnalytics, {
|
|
162
157
|
fireAnalyticsEvent: fireAnalyticsEvent,
|
|
163
158
|
node: node
|
|
@@ -22,7 +22,7 @@ function markBlockAsInline(_ref) {
|
|
|
22
22
|
}
|
|
23
23
|
function isInlineBodiedExtension(node) {
|
|
24
24
|
var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4, _node$attrs5, _node$attrs6;
|
|
25
|
-
if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.layout) === 'inline-bodied' && (0, _fg.fg)('platform_forge_inline_bodied_layout_switch')
|
|
25
|
+
if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.layout) === 'inline-bodied' && (0, _fg.fg)('platform_forge_inline_bodied_layout_switch')) {
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
28
|
return Boolean((node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && shouldDisplayExtensionAsInline({
|
|
@@ -2390,7 +2390,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2390
2390
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2391
2391
|
(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,
|
|
2392
2392
|
// this should be placed after baseOtherStyles
|
|
2393
|
-
(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? extensionAsInlineStyle : oldExtensionAsInlineStyle,
|
|
2393
|
+
(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? extensionAsInlineStyle : oldExtensionAsInlineStyle, [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, 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, syncBlockStyles, centerWrapperStyles, (0, _fg.fg)('platform_editor_breakout_spacing_in_renderer') && ruleBreakoutStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2394
2394
|
"data-testid": testId
|
|
2395
2395
|
}, children);
|
|
2396
2396
|
};
|
|
@@ -80,7 +80,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
80
80
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
81
81
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
82
82
|
var packageName = "@atlaskit/renderer";
|
|
83
|
-
var packageVersion = "152.2.
|
|
83
|
+
var packageVersion = "152.2.5";
|
|
84
84
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
85
85
|
containerName: 'ak-renderer-wrapper',
|
|
86
86
|
containerType: 'inline-size'
|
|
@@ -103,14 +103,9 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
103
103
|
* same shape — so keying on it would change how existing content renders. The renderer only
|
|
104
104
|
* ever sees the stored node, never the manifest, so a parameter this code writes is the only
|
|
105
105
|
* available signal.
|
|
106
|
-
*
|
|
107
|
-
* Evaluated once and shared with `isNativeForgeInline` below, so the gate is read a single time
|
|
108
|
-
* per render, and the cheap checks stay in front of it so anything ineligible short-circuits
|
|
109
|
-
* without firing an exposure it can never act on.
|
|
110
106
|
*/
|
|
111
107
|
const hasForgeInlineBodiedMarker = Boolean((node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.content) && (node === null || node === void 0 ? void 0 : (_node$parameters = node.parameters) === null || _node$parameters === void 0 ? void 0 : (_node$parameters$gues = _node$parameters.guestParams) === null || _node$parameters$gues === void 0 ? void 0 : _node$parameters$gues[FORGE_INLINE_BODIED_PARAM]) === 'true');
|
|
112
|
-
const
|
|
113
|
-
const isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 ? void 0 : (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch') && fg('platform_forge_inline_bodied_macro');
|
|
108
|
+
const isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 ? void 0 : (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch');
|
|
114
109
|
/**
|
|
115
110
|
* The pass that marks the sibling textblocks around an inline extension resolves their
|
|
116
111
|
* positions without a depth term, so it only ever matches at the top level. Inlining a nested
|
|
@@ -118,7 +113,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
118
113
|
* which is worse than leaving it a block — so keep nested inline-bodied Forge macros as
|
|
119
114
|
* blocks until the sibling marking works at depth.
|
|
120
115
|
*/
|
|
121
|
-
const isNestedForgeInlineBodied = !isTopLevel && (
|
|
116
|
+
const isNestedForgeInlineBodied = !isTopLevel && (hasForgeInlineBodiedMarker || isInlineBodiedLayoutEnabled);
|
|
122
117
|
const isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && !isNestedForgeInlineBodied;
|
|
123
118
|
const inlineClassName = isInline ? RendererCssClassName.EXTENSION_AS_INLINE : '';
|
|
124
119
|
/**
|
|
@@ -127,14 +122,14 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
|
|
|
127
122
|
* The inline styling above stops at the outer wrapper, so mark these nodes to let the
|
|
128
123
|
* nested document's block spacing be collapsed too.
|
|
129
124
|
*/
|
|
130
|
-
const isNativeForgeInline = Boolean(isInline &&
|
|
125
|
+
const isNativeForgeInline = Boolean(isInline && hasForgeInlineBodiedMarker);
|
|
131
126
|
/**
|
|
132
127
|
* Migrated inline-bodied macros intentionally do not receive the native Forge marker. Mark the
|
|
133
128
|
* rendered wrapper instead so the stylesheet can fix only the surrounding text flow without
|
|
134
129
|
* applying the native nested-renderer, overflow or sizing rules to migrated content.
|
|
135
130
|
* Custom UI also uses this outer text-flow treatment, without styling inside its iframe.
|
|
136
131
|
*/
|
|
137
|
-
const isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker
|
|
132
|
+
const isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker);
|
|
138
133
|
const asInlineAnalytics = isInline && fireAnalyticsEvent && node ? jsx(FireExtensionAsInlineAnalytics, {
|
|
139
134
|
fireAnalyticsEvent: fireAnalyticsEvent,
|
|
140
135
|
node: node
|
|
@@ -11,7 +11,7 @@ export function markBlockAsInline({
|
|
|
11
11
|
}
|
|
12
12
|
function isInlineBodiedExtension(node) {
|
|
13
13
|
var _node$attrs, _node$attrs2, _node$attrs2$paramete, _node$attrs3, _node$attrs4, _node$attrs5, _node$attrs6;
|
|
14
|
-
if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : (_node$attrs2$paramete = _node$attrs2.parameters) === null || _node$attrs2$paramete === void 0 ? void 0 : _node$attrs2$paramete.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch')
|
|
14
|
+
if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : (_node$attrs2$paramete = _node$attrs2.parameters) === null || _node$attrs2$paramete === void 0 ? void 0 : _node$attrs2$paramete.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch')) {
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
return Boolean((node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && shouldDisplayExtensionAsInline({
|
|
@@ -3015,7 +3015,7 @@ export const RendererStyleContainer = props => {
|
|
|
3015
3015
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
3016
3016
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
3017
3017
|
// this should be placed after baseOtherStyles
|
|
3018
|
-
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? extensionAsInlineStyle : oldExtensionAsInlineStyle,
|
|
3018
|
+
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? extensionAsInlineStyle : oldExtensionAsInlineStyle, [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, 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, syncBlockStyles, centerWrapperStyles, fg('platform_editor_breakout_spacing_in_renderer') && ruleBreakoutStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
3019
3019
|
"data-testid": testId
|
|
3020
3020
|
}, children);
|
|
3021
3021
|
};
|
|
@@ -65,7 +65,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
65
65
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
66
66
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
67
67
|
const packageName = "@atlaskit/renderer";
|
|
68
|
-
const packageVersion = "152.2.
|
|
68
|
+
const packageVersion = "152.2.5";
|
|
69
69
|
const setAsQueryContainerStyles = css({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size'
|
|
@@ -119,14 +119,9 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
119
119
|
* same shape — so keying on it would change how existing content renders. The renderer only
|
|
120
120
|
* ever sees the stored node, never the manifest, so a parameter this code writes is the only
|
|
121
121
|
* available signal.
|
|
122
|
-
*
|
|
123
|
-
* Evaluated once and shared with `isNativeForgeInline` below, so the gate is read a single time
|
|
124
|
-
* per render, and the cheap checks stay in front of it so anything ineligible short-circuits
|
|
125
|
-
* without firing an exposure it can never act on.
|
|
126
122
|
*/
|
|
127
123
|
var hasForgeInlineBodiedMarker = Boolean((node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.content) && (node === null || node === void 0 || (_node$parameters = node.parameters) === null || _node$parameters === void 0 || (_node$parameters = _node$parameters.guestParams) === null || _node$parameters === void 0 ? void 0 : _node$parameters[FORGE_INLINE_BODIED_PARAM]) === 'true');
|
|
128
|
-
var
|
|
129
|
-
var isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 || (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch') && fg('platform_forge_inline_bodied_macro');
|
|
124
|
+
var isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 || (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch');
|
|
130
125
|
/**
|
|
131
126
|
* The pass that marks the sibling textblocks around an inline extension resolves their
|
|
132
127
|
* positions without a depth term, so it only ever matches at the top level. Inlining a nested
|
|
@@ -134,7 +129,7 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
134
129
|
* which is worse than leaving it a block — so keep nested inline-bodied Forge macros as
|
|
135
130
|
* blocks until the sibling marking works at depth.
|
|
136
131
|
*/
|
|
137
|
-
var isNestedForgeInlineBodied = !isTopLevel && (
|
|
132
|
+
var isNestedForgeInlineBodied = !isTopLevel && (hasForgeInlineBodiedMarker || isInlineBodiedLayoutEnabled);
|
|
138
133
|
var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && !isNestedForgeInlineBodied;
|
|
139
134
|
var inlineClassName = isInline ? RendererCssClassName.EXTENSION_AS_INLINE : '';
|
|
140
135
|
/**
|
|
@@ -143,14 +138,14 @@ export var renderExtension = function renderExtension(content, layout) {
|
|
|
143
138
|
* The inline styling above stops at the outer wrapper, so mark these nodes to let the
|
|
144
139
|
* nested document's block spacing be collapsed too.
|
|
145
140
|
*/
|
|
146
|
-
var isNativeForgeInline = Boolean(isInline &&
|
|
141
|
+
var isNativeForgeInline = Boolean(isInline && hasForgeInlineBodiedMarker);
|
|
147
142
|
/**
|
|
148
143
|
* Migrated inline-bodied macros intentionally do not receive the native Forge marker. Mark the
|
|
149
144
|
* rendered wrapper instead so the stylesheet can fix only the surrounding text flow without
|
|
150
145
|
* applying the native nested-renderer, overflow or sizing rules to migrated content.
|
|
151
146
|
* Custom UI also uses this outer text-flow treatment, without styling inside its iframe.
|
|
152
147
|
*/
|
|
153
|
-
var isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker
|
|
148
|
+
var isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker);
|
|
154
149
|
var asInlineAnalytics = isInline && fireAnalyticsEvent && node ? jsx(FireExtensionAsInlineAnalytics, {
|
|
155
150
|
fireAnalyticsEvent: fireAnalyticsEvent,
|
|
156
151
|
node: node
|
|
@@ -15,7 +15,7 @@ export function markBlockAsInline(_ref) {
|
|
|
15
15
|
}
|
|
16
16
|
function isInlineBodiedExtension(node) {
|
|
17
17
|
var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4, _node$attrs5, _node$attrs6;
|
|
18
|
-
if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch')
|
|
18
|
+
if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch')) {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
return Boolean((node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && shouldDisplayExtensionAsInline({
|
|
@@ -2383,7 +2383,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2383
2383
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2384
2384
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2385
2385
|
// this should be placed after baseOtherStyles
|
|
2386
|
-
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? extensionAsInlineStyle : oldExtensionAsInlineStyle,
|
|
2386
|
+
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? extensionAsInlineStyle : oldExtensionAsInlineStyle, [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, 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, syncBlockStyles, centerWrapperStyles, fg('platform_editor_breakout_spacing_in_renderer') && ruleBreakoutStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2387
2387
|
"data-testid": testId
|
|
2388
2388
|
}, children);
|
|
2389
2389
|
};
|
|
@@ -70,7 +70,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
72
72
|
var packageName = "@atlaskit/renderer";
|
|
73
|
-
var packageVersion = "152.2.
|
|
73
|
+
var packageVersion = "152.2.5";
|
|
74
74
|
var setAsQueryContainerStyles = css({
|
|
75
75
|
containerName: 'ak-renderer-wrapper',
|
|
76
76
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "152.2.
|
|
3
|
+
"version": "152.2.6",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"@atlaskit/link-extractors": "^5.0.0",
|
|
58
58
|
"@atlaskit/linking-common": "^13.0.0",
|
|
59
59
|
"@atlaskit/media-card": "^82.1.0",
|
|
60
|
-
"@atlaskit/media-client": "^39.
|
|
60
|
+
"@atlaskit/media-client": "^39.3.0",
|
|
61
61
|
"@atlaskit/media-client-react": "^7.0.0",
|
|
62
62
|
"@atlaskit/media-common": "^14.7.0",
|
|
63
63
|
"@atlaskit/media-filmstrip": "^53.0.0",
|
|
64
64
|
"@atlaskit/media-ui": "^31.5.0",
|
|
65
|
-
"@atlaskit/media-viewer": "^54.
|
|
65
|
+
"@atlaskit/media-viewer": "^54.12.0",
|
|
66
66
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
68
68
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
@@ -213,10 +213,6 @@
|
|
|
213
213
|
"platform_nested_table_style_override_2": {
|
|
214
214
|
"type": "boolean"
|
|
215
215
|
},
|
|
216
|
-
"platform_forge_inline_bodied_macro": {
|
|
217
|
-
"type": "boolean",
|
|
218
|
-
"referenceOnly": true
|
|
219
|
-
},
|
|
220
216
|
"platform_forge_inline_bodied_layout_switch": {
|
|
221
217
|
"type": "boolean",
|
|
222
218
|
"referenceOnly": true
|