@atlaskit/renderer 152.2.3 → 152.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/react/nodes/rule.js +25 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +82 -6
- package/dist/cjs/ui/Renderer/index.js +2 -2
- package/dist/es2019/react/nodes/rule.js +26 -2
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +81 -2
- package/dist/es2019/ui/Renderer/index.js +2 -2
- package/dist/esm/react/nodes/rule.js +25 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +82 -6
- package/dist/esm/ui/Renderer/index.js +2 -2
- package/dist/types/react/nodes/rule.d.ts +2 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 152.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6108d3efed54f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6108d3efed54f) -
|
|
8
|
+
[EDITOR-9812] align spacing for breakout-wrapped dividers between the editor and renderer when
|
|
9
|
+
`platform_editor_breakout_spacing_in_renderer` is enabled.
|
|
10
|
+
|
|
11
|
+
## 152.2.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`67557f74cffc4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/67557f74cffc4) -
|
|
16
|
+
[EDITOR-9048] preserve divider color, style and weight attributes in the renderer behind
|
|
17
|
+
platform_editor_lovability_dividers_attributes.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 152.2.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -6,8 +6,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = Rule;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _text = require("@atlaskit/editor-palette/text");
|
|
10
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
9
11
|
function Rule() {
|
|
12
|
+
var _hexToEditorTextPalet;
|
|
13
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
14
|
+
color = _ref.color,
|
|
15
|
+
localId = _ref.localId,
|
|
16
|
+
style = _ref.style,
|
|
17
|
+
weight = _ref.weight;
|
|
18
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_dividers_attributes')) {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("hr", {
|
|
20
|
+
role: "presentation"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
var paletteColor = color && ((_hexToEditorTextPalet = (0, _text.hexToEditorTextPaletteColor)(color)) !== null && _hexToEditorTextPalet !== void 0 ? _hexToEditorTextPalet : color);
|
|
24
|
+
var paletteStyle = paletteColor ? {
|
|
25
|
+
'--custom-palette-color': paletteColor
|
|
26
|
+
} : undefined;
|
|
10
27
|
return /*#__PURE__*/_react.default.createElement("hr", {
|
|
11
|
-
role: "presentation"
|
|
28
|
+
role: "presentation",
|
|
29
|
+
"data-color": color || undefined,
|
|
30
|
+
"data-local-id": localId || undefined,
|
|
31
|
+
"data-style": style || undefined,
|
|
32
|
+
"data-weight": weight !== null && weight !== void 0 ? weight : undefined
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
34
|
+
,
|
|
35
|
+
style: paletteStyle
|
|
12
36
|
});
|
|
13
37
|
}
|
|
@@ -39,7 +39,7 @@ var _table2 = require("../../react/nodes/table");
|
|
|
39
39
|
var _collapsibleHeadingsDom = require("../collapsible-headings-dom");
|
|
40
40
|
var _getBaseFontSize = require("./get-base-font-size");
|
|
41
41
|
var _style = require("./style");
|
|
42
|
-
var
|
|
42
|
+
var _css1, _$concat3, _$concat5;
|
|
43
43
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
44
44
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
45
45
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -645,6 +645,82 @@ var ruleSharedStyles = (0, _react.css)({
|
|
|
645
645
|
borderRadius: "var(--ds-radius-full, 9999px)"
|
|
646
646
|
}
|
|
647
647
|
});
|
|
648
|
+
var ruleBreakoutStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_consts2.RendererCssClassName.DOCUMENT, " .").concat(_consts2.RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER, ":has(> .").concat(_consts2.RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " > hr)"), {
|
|
649
|
+
marginTop: 0,
|
|
650
|
+
marginBottom: 0
|
|
651
|
+
}), ".".concat(_consts2.RendererCssClassName.DOCUMENT, " .").concat(_consts2.RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER, " > .").concat(_consts2.RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " > hr"), {
|
|
652
|
+
// preserve unwrapped divider spacing, including first and last dividers.
|
|
653
|
+
marginTop: "".concat(_constants.akEditorLineHeight, "em"),
|
|
654
|
+
marginBottom: "".concat(_constants.akEditorLineHeight, "em")
|
|
655
|
+
}));
|
|
656
|
+
|
|
657
|
+
// these masks need to be aligned with editor-core/styles/ruleWithAttrs.ts
|
|
658
|
+
|
|
659
|
+
var dashedStrokeMask = 'linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 10px)';
|
|
660
|
+
var fadeStrokeMask = 'linear-gradient(to right, transparent 0%, black 27.4%, black 74%, transparent 100%)';
|
|
661
|
+
|
|
662
|
+
// dotted strokes
|
|
663
|
+
var dottedStrokeMaskSmall = 'radial-gradient(circle at center, black 0.5px, transparent 0.6px)';
|
|
664
|
+
var dottedStrokeMaskMedium = 'radial-gradient(circle at center, black 1px, transparent 1.1px)';
|
|
665
|
+
var dottedStrokeMaskLarge = 'radial-gradient(circle at center, black 1.5px, transparent 1.6px)';
|
|
666
|
+
|
|
667
|
+
// sketch strokes
|
|
668
|
+
var sketchStrokePath = 'M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107';
|
|
669
|
+
var sketchStrokeMaskSmall = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
|
|
670
|
+
var sketchStrokeMaskMedium = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
|
|
671
|
+
var sketchStrokeMaskLarge = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
|
|
672
|
+
var ruleWithAttrsStyles = (0, _react.css)({
|
|
673
|
+
'& hr[data-color]': {
|
|
674
|
+
backgroundColor: 'var(--custom-palette-color)'
|
|
675
|
+
},
|
|
676
|
+
'& hr[data-style="dashed"]': {
|
|
677
|
+
maskImage: dashedStrokeMask,
|
|
678
|
+
maskRepeat: 'repeat-x',
|
|
679
|
+
maskSize: '10px 100%'
|
|
680
|
+
},
|
|
681
|
+
'& hr[data-style="dotted"]': {
|
|
682
|
+
maskImage: dottedStrokeMaskMedium,
|
|
683
|
+
maskPosition: 'center',
|
|
684
|
+
maskRepeat: 'repeat-x',
|
|
685
|
+
maskSize: '6px 2px'
|
|
686
|
+
},
|
|
687
|
+
'& hr[data-style="sketch"]': {
|
|
688
|
+
height: "calc(2px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
|
|
689
|
+
maskImage: sketchStrokeMaskMedium,
|
|
690
|
+
maskPosition: 'center',
|
|
691
|
+
maskRepeat: 'repeat-x',
|
|
692
|
+
maskSize: '233px 7px'
|
|
693
|
+
},
|
|
694
|
+
'& hr[data-style="fade"]': {
|
|
695
|
+
maskImage: fadeStrokeMask,
|
|
696
|
+
maskRepeat: 'no-repeat',
|
|
697
|
+
maskSize: '100% 100%'
|
|
698
|
+
},
|
|
699
|
+
'& hr[data-weight="1"]': {
|
|
700
|
+
height: '1px'
|
|
701
|
+
},
|
|
702
|
+
'& hr[data-weight="3"]': {
|
|
703
|
+
height: '3px'
|
|
704
|
+
},
|
|
705
|
+
'& hr[data-style="dotted"][data-weight="1"]': {
|
|
706
|
+
maskImage: dottedStrokeMaskSmall,
|
|
707
|
+
maskSize: '6px 1px'
|
|
708
|
+
},
|
|
709
|
+
'& hr[data-style="dotted"][data-weight="3"]': {
|
|
710
|
+
maskImage: dottedStrokeMaskLarge,
|
|
711
|
+
maskSize: '6px 3px'
|
|
712
|
+
},
|
|
713
|
+
// Sketch needs a mask per weight because CSS cannot change the SVG stroke width.
|
|
714
|
+
'& hr[data-style="sketch"][data-weight="1"]': {
|
|
715
|
+
height: "calc(1px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
|
|
716
|
+
maskImage: sketchStrokeMaskSmall
|
|
717
|
+
},
|
|
718
|
+
'& hr[data-style="sketch"][data-weight="3"]': {
|
|
719
|
+
height: "calc(3px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
|
|
720
|
+
maskImage: sketchStrokeMaskLarge,
|
|
721
|
+
maskSize: '233px 8px'
|
|
722
|
+
}
|
|
723
|
+
});
|
|
648
724
|
|
|
649
725
|
// When cleaning up `platform_editor_content_mode_button_mvp` simplify the name/ use the other paragraph style name
|
|
650
726
|
var paragraphSharedStylesWithEditorUGC = (0, _react.css)({
|
|
@@ -663,14 +739,14 @@ var paragraphStylesUGCScaledMargin = (0, _react.css)({
|
|
|
663
739
|
marginBottom: 0
|
|
664
740
|
}
|
|
665
741
|
});
|
|
666
|
-
var listsSharedStyles = (0, _react.css)((
|
|
742
|
+
var listsSharedStyles = (0, _react.css)((_css1 = {
|
|
667
743
|
/* =============== INDENTATION SPACING ========= */
|
|
668
744
|
// Skips top-layer surfaces. See top-layer/notes/decisions/top-layer-unsafe-selectors.md
|
|
669
745
|
'& ul:not(:where([popover], dialog, & :is([popover], dialog) *)), & ol:not(:where([popover], dialog, & :is([popover], dialog) *))': {
|
|
670
746
|
boxSizing: 'border-box',
|
|
671
747
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(_lists.listItemCounterPadding, "px)")
|
|
672
748
|
}
|
|
673
|
-
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
749
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css1, "".concat(_orderedList.orderedListSelector, ", ").concat(_bulletList.bulletListSelector), {
|
|
674
750
|
/*
|
|
675
751
|
Ensures list item content adheres to the list's margin instead
|
|
676
752
|
of filling the entire block row. This is important to allow
|
|
@@ -702,7 +778,7 @@ var listsSharedStyles = (0, _react.css)((_css0 = {
|
|
|
702
778
|
listStyleType: 'lower-alpha'
|
|
703
779
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
704
780
|
listStyleType: 'lower-roman'
|
|
705
|
-
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
781
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css1, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
706
782
|
listStyleType: 'disc'
|
|
707
783
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
708
784
|
listStyleType: 'circle'
|
|
@@ -2308,13 +2384,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2308
2384
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2309
2385
|
'--ak-renderer-editor-font-small-text': _editorUgcTokenNames.editorUGCTokensRefreshed['editor.font.body.small']
|
|
2310
2386
|
},
|
|
2311
|
-
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !(0, _table2.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2387
|
+
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !(0, _table2.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_dividers_attributes') && ruleWithAttrsStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2312
2388
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2313
2389
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _fg.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2314
2390
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2315
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,
|
|
2316
2392
|
// this should be placed after baseOtherStyles
|
|
2317
|
-
(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? 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, 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, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2393
|
+
(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_important_in_render_ext') ? 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, 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],
|
|
2318
2394
|
"data-testid": testId
|
|
2319
2395
|
}, children);
|
|
2320
2396
|
};
|
|
@@ -48,8 +48,8 @@ var _activeHeaderIdProvider = require("../active-header-id-provider");
|
|
|
48
48
|
var _annotations = require("../annotations");
|
|
49
49
|
var _collapsibleHeadings = require("../collapsible-headings");
|
|
50
50
|
var _useScrollToBlock = require("../hooks/useScrollToBlock");
|
|
51
|
-
var _includeLegacyContentAnnotationsContext = require("../RendererActionsContext/include-legacy-content-annotations-context");
|
|
52
51
|
var _RendererActionsContext = require("../RendererActionsContext");
|
|
52
|
+
var _includeLegacyContentAnnotationsContext = require("../RendererActionsContext/include-legacy-content-annotations-context");
|
|
53
53
|
var _SmartCardStorage = require("../SmartCardStorage");
|
|
54
54
|
var _analyticsUtils = require("./analytics-utils");
|
|
55
55
|
var _breakoutSsr = require("./breakout-ssr");
|
|
@@ -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.4";
|
|
84
84
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
85
85
|
containerName: 'ak-renderer-wrapper',
|
|
86
86
|
containerType: 'inline-size'
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
|
+
export default function Rule({
|
|
5
|
+
color,
|
|
6
|
+
localId,
|
|
7
|
+
style,
|
|
8
|
+
weight
|
|
9
|
+
} = {}) {
|
|
10
|
+
var _hexToEditorTextPalet;
|
|
11
|
+
if (!isExperimentEnabled('platform_editor_lovability_dividers_attributes')) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("hr", {
|
|
13
|
+
role: "presentation"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const paletteColor = color && ((_hexToEditorTextPalet = hexToEditorTextPaletteColor(color)) !== null && _hexToEditorTextPalet !== void 0 ? _hexToEditorTextPalet : color);
|
|
17
|
+
const paletteStyle = paletteColor ? {
|
|
18
|
+
'--custom-palette-color': paletteColor
|
|
19
|
+
} : undefined;
|
|
3
20
|
return /*#__PURE__*/React.createElement("hr", {
|
|
4
|
-
role: "presentation"
|
|
21
|
+
role: "presentation",
|
|
22
|
+
"data-color": color || undefined,
|
|
23
|
+
"data-local-id": localId || undefined,
|
|
24
|
+
"data-style": style || undefined,
|
|
25
|
+
"data-weight": weight !== null && weight !== void 0 ? weight : undefined
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
27
|
+
,
|
|
28
|
+
style: paletteStyle
|
|
5
29
|
});
|
|
6
30
|
}
|
|
@@ -753,6 +753,85 @@ const ruleSharedStyles = css({
|
|
|
753
753
|
borderRadius: "var(--ds-radius-full, 9999px)"
|
|
754
754
|
}
|
|
755
755
|
});
|
|
756
|
+
const ruleBreakoutStyles = css({
|
|
757
|
+
[`.${RendererCssClassName.DOCUMENT} .${RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER}:has(> .${RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER} > hr)`]: {
|
|
758
|
+
marginTop: 0,
|
|
759
|
+
marginBottom: 0
|
|
760
|
+
},
|
|
761
|
+
[`.${RendererCssClassName.DOCUMENT} .${RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER} > .${RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER} > hr`]: {
|
|
762
|
+
// preserve unwrapped divider spacing, including first and last dividers.
|
|
763
|
+
marginTop: `${akEditorLineHeight}em`,
|
|
764
|
+
marginBottom: `${akEditorLineHeight}em`
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
// these masks need to be aligned with editor-core/styles/ruleWithAttrs.ts
|
|
769
|
+
|
|
770
|
+
const dashedStrokeMask = 'linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 10px)';
|
|
771
|
+
const fadeStrokeMask = 'linear-gradient(to right, transparent 0%, black 27.4%, black 74%, transparent 100%)';
|
|
772
|
+
|
|
773
|
+
// dotted strokes
|
|
774
|
+
const dottedStrokeMaskSmall = 'radial-gradient(circle at center, black 0.5px, transparent 0.6px)';
|
|
775
|
+
const dottedStrokeMaskMedium = 'radial-gradient(circle at center, black 1px, transparent 1.1px)';
|
|
776
|
+
const dottedStrokeMaskLarge = 'radial-gradient(circle at center, black 1.5px, transparent 1.6px)';
|
|
777
|
+
|
|
778
|
+
// sketch strokes
|
|
779
|
+
const sketchStrokePath = 'M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107';
|
|
780
|
+
const sketchStrokeMaskSmall = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='${sketchStrokePath}'/%3E%3C/svg%3E")`;
|
|
781
|
+
const sketchStrokeMaskMedium = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='${sketchStrokePath}'/%3E%3C/svg%3E")`;
|
|
782
|
+
const sketchStrokeMaskLarge = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='${sketchStrokePath}'/%3E%3C/svg%3E")`;
|
|
783
|
+
const ruleWithAttrsStyles = css({
|
|
784
|
+
'& hr[data-color]': {
|
|
785
|
+
backgroundColor: 'var(--custom-palette-color)'
|
|
786
|
+
},
|
|
787
|
+
'& hr[data-style="dashed"]': {
|
|
788
|
+
maskImage: dashedStrokeMask,
|
|
789
|
+
maskRepeat: 'repeat-x',
|
|
790
|
+
maskSize: '10px 100%'
|
|
791
|
+
},
|
|
792
|
+
'& hr[data-style="dotted"]': {
|
|
793
|
+
maskImage: dottedStrokeMaskMedium,
|
|
794
|
+
maskPosition: 'center',
|
|
795
|
+
maskRepeat: 'repeat-x',
|
|
796
|
+
maskSize: '6px 2px'
|
|
797
|
+
},
|
|
798
|
+
'& hr[data-style="sketch"]': {
|
|
799
|
+
height: `calc(2px + ${"var(--ds-space-050, 4px)"} + ${"var(--ds-space-050, 4px)"})`,
|
|
800
|
+
maskImage: sketchStrokeMaskMedium,
|
|
801
|
+
maskPosition: 'center',
|
|
802
|
+
maskRepeat: 'repeat-x',
|
|
803
|
+
maskSize: '233px 7px'
|
|
804
|
+
},
|
|
805
|
+
'& hr[data-style="fade"]': {
|
|
806
|
+
maskImage: fadeStrokeMask,
|
|
807
|
+
maskRepeat: 'no-repeat',
|
|
808
|
+
maskSize: '100% 100%'
|
|
809
|
+
},
|
|
810
|
+
'& hr[data-weight="1"]': {
|
|
811
|
+
height: '1px'
|
|
812
|
+
},
|
|
813
|
+
'& hr[data-weight="3"]': {
|
|
814
|
+
height: '3px'
|
|
815
|
+
},
|
|
816
|
+
'& hr[data-style="dotted"][data-weight="1"]': {
|
|
817
|
+
maskImage: dottedStrokeMaskSmall,
|
|
818
|
+
maskSize: '6px 1px'
|
|
819
|
+
},
|
|
820
|
+
'& hr[data-style="dotted"][data-weight="3"]': {
|
|
821
|
+
maskImage: dottedStrokeMaskLarge,
|
|
822
|
+
maskSize: '6px 3px'
|
|
823
|
+
},
|
|
824
|
+
// Sketch needs a mask per weight because CSS cannot change the SVG stroke width.
|
|
825
|
+
'& hr[data-style="sketch"][data-weight="1"]': {
|
|
826
|
+
height: `calc(1px + ${"var(--ds-space-050, 4px)"} + ${"var(--ds-space-050, 4px)"})`,
|
|
827
|
+
maskImage: sketchStrokeMaskSmall
|
|
828
|
+
},
|
|
829
|
+
'& hr[data-style="sketch"][data-weight="3"]': {
|
|
830
|
+
height: `calc(3px + ${"var(--ds-space-050, 4px)"} + ${"var(--ds-space-050, 4px)"})`,
|
|
831
|
+
maskImage: sketchStrokeMaskLarge,
|
|
832
|
+
maskSize: '233px 8px'
|
|
833
|
+
}
|
|
834
|
+
});
|
|
756
835
|
|
|
757
836
|
// When cleaning up `platform_editor_content_mode_button_mvp` simplify the name/ use the other paragraph style name
|
|
758
837
|
const paragraphSharedStylesWithEditorUGC = css({
|
|
@@ -2930,13 +3009,13 @@ export const RendererStyleContainer = props => {
|
|
|
2930
3009
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2931
3010
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2932
3011
|
},
|
|
2933
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, isExperimentEnabled('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
3012
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, isExperimentEnabled('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, isExperimentEnabled('platform_editor_lovability_dividers_attributes') && ruleWithAttrsStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2934
3013
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2935
3014
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2936
3015
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2937
3016
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2938
3017
|
// this should be placed after baseOtherStyles
|
|
2939
|
-
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? 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, 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, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
3018
|
+
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? 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, 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],
|
|
2940
3019
|
"data-testid": testId
|
|
2941
3020
|
}, children);
|
|
2942
3021
|
};
|
|
@@ -42,8 +42,8 @@ import { ActiveHeaderIdProvider } from '../active-header-id-provider';
|
|
|
42
42
|
import { AnnotationsPositionContext, AnnotationsWrapper } from '../annotations';
|
|
43
43
|
import { CollapsibleHeadingsProvider } from '../collapsible-headings';
|
|
44
44
|
import { useScrollToBlock } from '../hooks/useScrollToBlock';
|
|
45
|
-
import { IncludeLegacyContentAnnotationsContext } from '../RendererActionsContext/include-legacy-content-annotations-context';
|
|
46
45
|
import { RendererContext as ActionsContext, RendererActionsContext } from '../RendererActionsContext';
|
|
46
|
+
import { IncludeLegacyContentAnnotationsContext } from '../RendererActionsContext/include-legacy-content-annotations-context';
|
|
47
47
|
import { Provider as SmartCardStorageProvider } from '../SmartCardStorage';
|
|
48
48
|
import { getHeightInfoPayload, getWidthInfoPayload } from './analytics-utils';
|
|
49
49
|
import { BreakoutSSRInlineScript } from './breakout-ssr';
|
|
@@ -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.4";
|
|
69
69
|
const setAsQueryContainerStyles = css({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size'
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
4
|
export default function Rule() {
|
|
5
|
+
var _hexToEditorTextPalet;
|
|
6
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
7
|
+
color = _ref.color,
|
|
8
|
+
localId = _ref.localId,
|
|
9
|
+
style = _ref.style,
|
|
10
|
+
weight = _ref.weight;
|
|
11
|
+
if (!isExperimentEnabled('platform_editor_lovability_dividers_attributes')) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("hr", {
|
|
13
|
+
role: "presentation"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
var paletteColor = color && ((_hexToEditorTextPalet = hexToEditorTextPaletteColor(color)) !== null && _hexToEditorTextPalet !== void 0 ? _hexToEditorTextPalet : color);
|
|
17
|
+
var paletteStyle = paletteColor ? {
|
|
18
|
+
'--custom-palette-color': paletteColor
|
|
19
|
+
} : undefined;
|
|
3
20
|
return /*#__PURE__*/React.createElement("hr", {
|
|
4
|
-
role: "presentation"
|
|
21
|
+
role: "presentation",
|
|
22
|
+
"data-color": color || undefined,
|
|
23
|
+
"data-local-id": localId || undefined,
|
|
24
|
+
"data-style": style || undefined,
|
|
25
|
+
"data-weight": weight !== null && weight !== void 0 ? weight : undefined
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
27
|
+
,
|
|
28
|
+
style: paletteStyle
|
|
5
29
|
});
|
|
6
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var
|
|
2
|
+
var _css1, _$concat3, _$concat5;
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
4
4
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
5
5
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -638,6 +638,82 @@ var ruleSharedStyles = css({
|
|
|
638
638
|
borderRadius: "var(--ds-radius-full, 9999px)"
|
|
639
639
|
}
|
|
640
640
|
});
|
|
641
|
+
var ruleBreakoutStyles = css(_defineProperty(_defineProperty({}, ".".concat(RendererCssClassName.DOCUMENT, " .").concat(RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER, ":has(> .").concat(RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " > hr)"), {
|
|
642
|
+
marginTop: 0,
|
|
643
|
+
marginBottom: 0
|
|
644
|
+
}), ".".concat(RendererCssClassName.DOCUMENT, " .").concat(RendererCssClassName.STICKY_SAFE_BREAKOUT_WRAPPER, " > .").concat(RendererCssClassName.STICKY_SAFE_BREAKOUT_INNER, " > hr"), {
|
|
645
|
+
// preserve unwrapped divider spacing, including first and last dividers.
|
|
646
|
+
marginTop: "".concat(akEditorLineHeight, "em"),
|
|
647
|
+
marginBottom: "".concat(akEditorLineHeight, "em")
|
|
648
|
+
}));
|
|
649
|
+
|
|
650
|
+
// these masks need to be aligned with editor-core/styles/ruleWithAttrs.ts
|
|
651
|
+
|
|
652
|
+
var dashedStrokeMask = 'linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 10px)';
|
|
653
|
+
var fadeStrokeMask = 'linear-gradient(to right, transparent 0%, black 27.4%, black 74%, transparent 100%)';
|
|
654
|
+
|
|
655
|
+
// dotted strokes
|
|
656
|
+
var dottedStrokeMaskSmall = 'radial-gradient(circle at center, black 0.5px, transparent 0.6px)';
|
|
657
|
+
var dottedStrokeMaskMedium = 'radial-gradient(circle at center, black 1px, transparent 1.1px)';
|
|
658
|
+
var dottedStrokeMaskLarge = 'radial-gradient(circle at center, black 1.5px, transparent 1.6px)';
|
|
659
|
+
|
|
660
|
+
// sketch strokes
|
|
661
|
+
var sketchStrokePath = 'M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107';
|
|
662
|
+
var sketchStrokeMaskSmall = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
|
|
663
|
+
var sketchStrokeMaskMedium = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
|
|
664
|
+
var sketchStrokeMaskLarge = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
|
|
665
|
+
var ruleWithAttrsStyles = css({
|
|
666
|
+
'& hr[data-color]': {
|
|
667
|
+
backgroundColor: 'var(--custom-palette-color)'
|
|
668
|
+
},
|
|
669
|
+
'& hr[data-style="dashed"]': {
|
|
670
|
+
maskImage: dashedStrokeMask,
|
|
671
|
+
maskRepeat: 'repeat-x',
|
|
672
|
+
maskSize: '10px 100%'
|
|
673
|
+
},
|
|
674
|
+
'& hr[data-style="dotted"]': {
|
|
675
|
+
maskImage: dottedStrokeMaskMedium,
|
|
676
|
+
maskPosition: 'center',
|
|
677
|
+
maskRepeat: 'repeat-x',
|
|
678
|
+
maskSize: '6px 2px'
|
|
679
|
+
},
|
|
680
|
+
'& hr[data-style="sketch"]': {
|
|
681
|
+
height: "calc(2px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
|
|
682
|
+
maskImage: sketchStrokeMaskMedium,
|
|
683
|
+
maskPosition: 'center',
|
|
684
|
+
maskRepeat: 'repeat-x',
|
|
685
|
+
maskSize: '233px 7px'
|
|
686
|
+
},
|
|
687
|
+
'& hr[data-style="fade"]': {
|
|
688
|
+
maskImage: fadeStrokeMask,
|
|
689
|
+
maskRepeat: 'no-repeat',
|
|
690
|
+
maskSize: '100% 100%'
|
|
691
|
+
},
|
|
692
|
+
'& hr[data-weight="1"]': {
|
|
693
|
+
height: '1px'
|
|
694
|
+
},
|
|
695
|
+
'& hr[data-weight="3"]': {
|
|
696
|
+
height: '3px'
|
|
697
|
+
},
|
|
698
|
+
'& hr[data-style="dotted"][data-weight="1"]': {
|
|
699
|
+
maskImage: dottedStrokeMaskSmall,
|
|
700
|
+
maskSize: '6px 1px'
|
|
701
|
+
},
|
|
702
|
+
'& hr[data-style="dotted"][data-weight="3"]': {
|
|
703
|
+
maskImage: dottedStrokeMaskLarge,
|
|
704
|
+
maskSize: '6px 3px'
|
|
705
|
+
},
|
|
706
|
+
// Sketch needs a mask per weight because CSS cannot change the SVG stroke width.
|
|
707
|
+
'& hr[data-style="sketch"][data-weight="1"]': {
|
|
708
|
+
height: "calc(1px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
|
|
709
|
+
maskImage: sketchStrokeMaskSmall
|
|
710
|
+
},
|
|
711
|
+
'& hr[data-style="sketch"][data-weight="3"]': {
|
|
712
|
+
height: "calc(3px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
|
|
713
|
+
maskImage: sketchStrokeMaskLarge,
|
|
714
|
+
maskSize: '233px 8px'
|
|
715
|
+
}
|
|
716
|
+
});
|
|
641
717
|
|
|
642
718
|
// When cleaning up `platform_editor_content_mode_button_mvp` simplify the name/ use the other paragraph style name
|
|
643
719
|
var paragraphSharedStylesWithEditorUGC = css({
|
|
@@ -656,14 +732,14 @@ var paragraphStylesUGCScaledMargin = css({
|
|
|
656
732
|
marginBottom: 0
|
|
657
733
|
}
|
|
658
734
|
});
|
|
659
|
-
var listsSharedStyles = css((
|
|
735
|
+
var listsSharedStyles = css((_css1 = {
|
|
660
736
|
/* =============== INDENTATION SPACING ========= */
|
|
661
737
|
// Skips top-layer surfaces. See top-layer/notes/decisions/top-layer-unsafe-selectors.md
|
|
662
738
|
'& ul:not(:where([popover], dialog, & :is([popover], dialog) *)), & ol:not(:where([popover], dialog, & :is([popover], dialog) *))': {
|
|
663
739
|
boxSizing: 'border-box',
|
|
664
740
|
paddingLeft: "var(--ed--list--item-counter--padding, ".concat(listItemCounterPadding, "px)")
|
|
665
741
|
}
|
|
666
|
-
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
742
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css1, "".concat(orderedListSelector, ", ").concat(bulletListSelector), {
|
|
667
743
|
/*
|
|
668
744
|
Ensures list item content adheres to the list's margin instead
|
|
669
745
|
of filling the entire block row. This is important to allow
|
|
@@ -695,7 +771,7 @@ var listsSharedStyles = css((_css0 = {
|
|
|
695
771
|
listStyleType: 'lower-alpha'
|
|
696
772
|
}), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
|
|
697
773
|
listStyleType: 'lower-roman'
|
|
698
|
-
}), _defineProperty(_defineProperty(_defineProperty(
|
|
774
|
+
}), _defineProperty(_defineProperty(_defineProperty(_css1, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
|
|
699
775
|
listStyleType: 'disc'
|
|
700
776
|
}), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
|
|
701
777
|
listStyleType: 'circle'
|
|
@@ -2301,13 +2377,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2301
2377
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2302
2378
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2303
2379
|
},
|
|
2304
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, isExperimentEnabled('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2380
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, 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' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, isExperimentEnabled('platform_editor_heading_link_target_size') && headingAnchorWrapperTargetSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, isExperimentEnabled('platform_editor_lovability_dividers_attributes') && ruleWithAttrsStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2305
2381
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2306
2382
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2307
2383
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2308
2384
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2309
2385
|
// this should be placed after baseOtherStyles
|
|
2310
|
-
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? 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, 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, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, hideExtensionStyles],
|
|
2386
|
+
isExperimentEnabled('platform_editor_remove_important_in_render_ext') ? 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, 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],
|
|
2311
2387
|
"data-testid": testId
|
|
2312
2388
|
}, children);
|
|
2313
2389
|
};
|
|
@@ -47,8 +47,8 @@ import { ActiveHeaderIdProvider } from '../active-header-id-provider';
|
|
|
47
47
|
import { AnnotationsPositionContext, AnnotationsWrapper } from '../annotations';
|
|
48
48
|
import { CollapsibleHeadingsProvider } from '../collapsible-headings';
|
|
49
49
|
import { useScrollToBlock } from '../hooks/useScrollToBlock';
|
|
50
|
-
import { IncludeLegacyContentAnnotationsContext } from '../RendererActionsContext/include-legacy-content-annotations-context';
|
|
51
50
|
import { RendererContext as ActionsContext, RendererActionsContext } from '../RendererActionsContext';
|
|
51
|
+
import { IncludeLegacyContentAnnotationsContext } from '../RendererActionsContext/include-legacy-content-annotations-context';
|
|
52
52
|
import { Provider as SmartCardStorageProvider } from '../SmartCardStorage';
|
|
53
53
|
import { getHeightInfoPayload, getWidthInfoPayload } from './analytics-utils';
|
|
54
54
|
import { BreakoutSSRInlineScript } from './breakout-ssr';
|
|
@@ -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.4";
|
|
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.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
54
54
|
"@atlaskit/icon": "^38.0.0",
|
|
55
55
|
"@atlaskit/link": "^5.1.0",
|
|
56
|
-
"@atlaskit/link-datasource": "^7.
|
|
56
|
+
"@atlaskit/link-datasource": "^7.7.0",
|
|
57
57
|
"@atlaskit/link-extractors": "^5.0.0",
|
|
58
58
|
"@atlaskit/linking-common": "^13.0.0",
|
|
59
59
|
"@atlaskit/media-card": "^82.1.0",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
69
69
|
"@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
|
|
70
70
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
71
|
-
"@atlaskit/react-ufo": "^8.
|
|
72
|
-
"@atlaskit/smart-card": "^46.
|
|
71
|
+
"@atlaskit/react-ufo": "^8.3.0",
|
|
72
|
+
"@atlaskit/smart-card": "^46.9.0",
|
|
73
73
|
"@atlaskit/status": "^5.14.0",
|
|
74
74
|
"@atlaskit/task-decision": "^21.13.0",
|
|
75
75
|
"@atlaskit/theme": "^28.2.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^246.
|
|
77
|
-
"@atlaskit/tokens": "^20.
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^246.1.0",
|
|
77
|
+
"@atlaskit/tokens": "^20.8.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.4.0",
|
|
79
79
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
80
80
|
"@babel/runtime": "^7.0.0",
|