@atlaskit/renderer 126.8.9 → 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 +16 -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/Expand.js +23 -20
- 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/Expand.js +20 -17
- 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/Expand.js +20 -19
- 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
|
@@ -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
|
};
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
-
var _excluded = ["expanded"];
|
|
5
2
|
/**
|
|
6
3
|
* @jsxRuntime classic
|
|
7
4
|
* @jsx jsx
|
|
@@ -142,32 +139,36 @@ var LazyChildren = /*#__PURE__*/lazy(function () {
|
|
|
142
139
|
});
|
|
143
140
|
});
|
|
144
141
|
var Container = function Container(props) {
|
|
145
|
-
return jsx("div",
|
|
146
|
-
css: [containerStyles, props['data-node-type'] === 'expand' && containerStylesDataNodeTypeExpand, props.expanded && containerStylesExpanded, props.focused && containerStylesFocused]
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
return jsx("div", {
|
|
143
|
+
css: [containerStyles, props['data-node-type'] === 'expand' && containerStylesDataNodeTypeExpand, props.expanded && containerStylesExpanded, props.focused && containerStylesFocused],
|
|
144
|
+
"data-testid": props['data-testid'],
|
|
145
|
+
"data-node-type": props['data-node-type'],
|
|
146
|
+
"data-title": props['data-title'],
|
|
147
|
+
"data-expanded": props['data-expanded'],
|
|
148
|
+
"data-local-id": props['data-local-id']
|
|
149
|
+
}, props.children);
|
|
150
150
|
};
|
|
151
151
|
var TitleContainer = function TitleContainer(props) {
|
|
152
|
-
var expanded = props.expanded
|
|
153
|
-
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
152
|
+
var expanded = props.expanded;
|
|
154
153
|
return (
|
|
155
154
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
156
|
-
jsx("button",
|
|
155
|
+
jsx("button", {
|
|
157
156
|
type: "button",
|
|
158
|
-
css: [titleContainerStyles, expanded && titleContainerStylesExpanded]
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
css: [titleContainerStyles, expanded && titleContainerStylesExpanded],
|
|
158
|
+
onClick: props.onClick,
|
|
159
|
+
onFocus: props.onFocus,
|
|
160
|
+
onBlur: props.onBlur,
|
|
161
|
+
"aria-labelledby": props['aria-labelledby'],
|
|
162
|
+
"aria-expanded": props['aria-expanded'],
|
|
163
|
+
contentEditable: props.contentEditable
|
|
164
|
+
}, props.children)
|
|
162
165
|
);
|
|
163
166
|
};
|
|
164
167
|
TitleContainer.displayName = 'TitleContainerButton';
|
|
165
168
|
var ContentContainer = function ContentContainer(props) {
|
|
166
|
-
return jsx("div",
|
|
169
|
+
return jsx("div", {
|
|
167
170
|
css: [contentContainerStyles, props.expanded && contentContainerStylesExpanded, !props.expanded && contentContainerStylesNotExpanded]
|
|
168
|
-
|
|
169
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
170
|
-
}, props), props.children);
|
|
171
|
+
}, props.children);
|
|
171
172
|
};
|
|
172
173
|
function fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent) {
|
|
173
174
|
if (!fireAnalyticsEvent) {
|
|
@@ -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",
|