@atlaskit/renderer 141.0.3 → 141.0.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/cjs/actions/matches-utils.js +5 -10
  3. package/dist/cjs/react/nodes/heading-anchor.js +0 -37
  4. package/dist/cjs/react/nodes/layoutColumn-compiled.js +2 -0
  5. package/dist/cjs/react/nodes/layoutColumn-emotion.js +2 -0
  6. package/dist/cjs/ui/Renderer/RendererStyleContainer.js +32 -17
  7. package/dist/cjs/ui/Renderer/index.js +2 -6
  8. package/dist/es2019/actions/matches-utils.js +5 -10
  9. package/dist/es2019/react/nodes/heading-anchor.js +0 -37
  10. package/dist/es2019/react/nodes/layoutColumn-compiled.js +2 -0
  11. package/dist/es2019/react/nodes/layoutColumn-emotion.js +2 -0
  12. package/dist/es2019/ui/Renderer/RendererStyleContainer.js +31 -14
  13. package/dist/es2019/ui/Renderer/index.js +2 -6
  14. package/dist/esm/actions/matches-utils.js +5 -10
  15. package/dist/esm/react/nodes/heading-anchor.js +0 -37
  16. package/dist/esm/react/nodes/layoutColumn-compiled.js +2 -0
  17. package/dist/esm/react/nodes/layoutColumn-emotion.js +2 -0
  18. package/dist/esm/ui/Renderer/RendererStyleContainer.js +32 -17
  19. package/dist/esm/ui/Renderer/index.js +2 -6
  20. package/package.json +5 -5
  21. package/dist/cjs/react/nodes/heading-anchor-button.compiled.css +0 -16
  22. package/dist/cjs/react/nodes/heading-anchor-button.js +0 -24
  23. package/dist/es2019/react/nodes/heading-anchor-button.compiled.css +0 -16
  24. package/dist/es2019/react/nodes/heading-anchor-button.js +0 -15
  25. package/dist/esm/react/nodes/heading-anchor-button.compiled.css +0 -16
  26. package/dist/esm/react/nodes/heading-anchor-button.js +0 -15
  27. package/dist/types/react/nodes/heading-anchor-button.d.ts +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 141.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d8989347c0524`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d8989347c0524) -
8
+ Clean up experiment `platform_renderer_on_complete_after_commit`
9
+ - [`8e4fd6774f6ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e4fd6774f6ec) -
10
+ Add Stage-0 ADF schema support for the `annotation` mark on `extension` nodes (ADF Change 111).
11
+ Adds the `with_annotation` and `root_only_with_annotation` Stage-0 variants and wires them into
12
+ the approved root and nested placements (doc root, panel, blockquote, expand, nestedExpand,
13
+ listItem, blockTaskItem, table cells), registers the matching validator specs, and adds
14
+ valid/invalid reference fixtures, with regenerated PM/JSON/validator artifacts. Scoped to
15
+ `extension` only (not `bodiedExtension`/`multiBodiedExtension`); the full schema is unchanged.
16
+ Editor/renderer acceptance of the mark is gated by `cc_maui_annotations_on_extensions`.
17
+
18
+ Allowing the `annotation` mark on `extension` requires its container nodes (panel, table cells,
19
+ list items, etc.) to permit the mark too, so they can hold an annotated extension child. This made
20
+ the renderer's `getIndexMatch` double-count text inside those containers, corrupting inline
21
+ text-comment anchoring. Fixed by skipping block containers during serialisation (they are still
22
+ walked through so their inner text is counted once); leaf nodes and media are unaffected.
23
+
24
+ - Updated dependencies
25
+
26
+ ## 141.0.4
27
+
28
+ ### Patch Changes
29
+
30
+ - [`16d6aded8d25a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/16d6aded8d25a) -
31
+ Prevent code block and media group top margins from changing when streaming SSR style elements
32
+ move to the document head during hydration, behind platform_renderer_ssr_block_margin_fix.
33
+ Preserve spacing after content and the top-level lightweight code block override.
34
+
35
+ Keep the fully rolled-out Expand SSR margin fix enabled unconditionally.
36
+
37
+ - Updated dependencies
38
+
3
39
  ## 141.0.3
4
40
 
5
41
  ### Patch Changes
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.countMatches = countMatches;
7
7
  exports.getIndexMatch = getIndexMatch;
8
- // getIndexMatch finds the position of a given string within a given document, in accordance to the Confluence Annotation backend
9
- // The document is serialised into one large string, excluding any nodes that can not have annotations (eg: emojis, media).
10
- // Finds where the given query string is relative to the serialised partial document
8
+ // Finds a string position using the Confluence annotation backend's serialisation rules.
11
9
  function getIndexMatch(doc, schema, selectedText, startIndex) {
12
10
  var textContent = '';
13
11
  var matchIndex = 0;
@@ -16,19 +14,16 @@ function getIndexMatch(doc, schema, selectedText, startIndex) {
16
14
  doc.descendants(function (node, pos) {
17
15
  var nodeType = node.type;
18
16
  var media = schema.nodes.media;
17
+ var isBlockContainer = nodeType.isBlock && !nodeType.isLeaf && !nodeType.inlineContent;
19
18
 
20
- // Mirrors Confluence backend and doesn't construct textContent if it doesn't allow annotations
21
- // Don't skip media node so that block node can be defined its startIndex in within [nodeStart, nodeEnd]
22
- if ((node.isText || !nodeType.allowsMarkType(schema.marks.annotation)) && nodeType !== media) {
23
- // Note: `return true` as a parent disallowing annotations does not mean a child disallows annotations.
24
- // Eg: panel (invalid) > p (valid)
19
+ // Containers may allow annotations for their children; skip their own text to avoid double-counting.
20
+ if ((node.isText || !nodeType.allowsMarkType(schema.marks.annotation) || isBlockContainer) && nodeType !== media) {
25
21
  return true;
26
22
  }
27
23
  var nodeStart = pos;
28
24
  var nodeEnd = nodeStart + node.nodeSize;
29
25
  if (startIndex >= nodeStart && startIndex <= nodeEnd) {
30
- // if it's a node block, set position to pos to indicate to the backend
31
- // that it's an annotation on a block node
26
+ // MAUI-1255 will add eligible extensions as block annotation targets.
32
27
  if (nodeType === media) {
33
28
  blockNodePos = pos;
34
29
  }
@@ -23,7 +23,6 @@ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-ex
23
23
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
24
24
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
25
25
  var _messages = require("../../messages");
26
- var _headingAnchorButton = _interopRequireDefault(require("./heading-anchor-button"));
27
26
  var _excluded = ["children"];
28
27
  /**
29
28
  * @jsxRuntime classic
@@ -33,22 +32,12 @@ var _excluded = ["children"];
33
32
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
34
33
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
34
  var HeadingAnchorWrapperClassName = exports.HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
36
- var headingAnchorWrapperTargetSizeStyles = (0, _react2.css)({
37
- display: 'inline-flex',
38
- boxSizing: 'border-box',
39
- alignItems: 'center',
40
- justifyContent: 'center',
41
- width: '24px',
42
- height: '24px',
43
- verticalAlign: 'middle'
44
- });
45
35
  var CopyAnchorWrapperWithRef = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
46
36
  var children = props.children,
47
37
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
48
38
  return (0, _react2.jsx)("span", (0, _extends2.default)({}, rest, {
49
39
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
50
40
  className: HeadingAnchorWrapperClassName,
51
- css: (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size') ? headingAnchorWrapperTargetSizeStyles : undefined,
52
41
  ref: ref
53
42
  }), children);
54
43
  });
@@ -61,11 +50,6 @@ var copyAnchorButtonStyles = (0, _react2.css)({
61
50
  cursor: 'pointer',
62
51
  right: 0
63
52
  });
64
- var scaledLinkIconStyles = (0, _react2.css)({
65
- display: 'inline-flex',
66
- transform: 'scale(1.5)',
67
- transformOrigin: 'center'
68
- });
69
53
  // Ignored via go/ees005
70
54
  // eslint-disable-next-line @repo/internal/react/no-class-components
71
55
  var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
@@ -144,27 +128,6 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
144
128
  heading: headingId
145
129
  }) : headingId;
146
130
  var tabIndex = (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? 0 : hideFromScreenReader ? undefined : -1;
147
- if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_heading_link_target_size')) {
148
- return (0, _react2.jsx)(_headingAnchorButton.default, {
149
- "data-testid": "anchor-button",
150
- id: _this.copyLinkId,
151
- onMouseLeave: _this.resetMessage,
152
- onBlur: _this.resetMessage,
153
- onClick: _this.copyToClipboard,
154
- "aria-hidden": hideFromScreenReader,
155
- tabIndex: tabIndex,
156
- "aria-label": hideFromScreenReader ? undefined : _this.state.tooltipMessage,
157
- "aria-labelledby": hideFromScreenReader ? undefined : labelledBy,
158
- type: "button"
159
- }, (0, _react2.jsx)("span", {
160
- css: scaledLinkIconStyles,
161
- "data-testid": "scaled-link-icon"
162
- }, (0, _react2.jsx)(_link.default, {
163
- label: _this.getCopyAriaLabel(),
164
- size: "medium",
165
- color: _this.state.isClicked ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon-subtle, #505258)"
166
- })));
167
- }
168
131
  return (0, _react2.jsx)("button", {
169
132
  "data-testid": "anchor-button",
170
133
  id: _this.copyLinkId,
@@ -16,6 +16,7 @@ require("./layoutColumn-compiled.compiled.css");
16
16
  var _runtime = require("@compiled/react/runtime");
17
17
  var _react = _interopRequireDefault(require("react"));
18
18
  var _ui = require("@atlaskit/editor-common/ui");
19
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
19
20
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
21
  // localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
21
22
  var clearNextSiblingMarginTopStyle = null;
@@ -39,6 +40,7 @@ var LayoutSectionCompiled = exports.LayoutSectionCompiled = function LayoutSecti
39
40
  },
40
41
  className: (0, _runtime.ax)([(isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'middle' && "_1e0c1txw _2lx21bp4 _1bah1h6o", (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'bottom' && "_1e0c1txw _2lx21bp4 _1bahesu3", "_1tihidpf _12kpidpf"])
41
42
  }, /*#__PURE__*/_react.default.createElement(_ui.WidthProvider, null, /*#__PURE__*/_react.default.createElement("div", {
43
+ "data-layout-column-start": (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
42
44
  className: (0, _runtime.ax)(["_1skbgrf3", "_19segrf3 _1ki1grf3 _bmdegrf3 _166hgrf3 _7g1ogrf3 _sk2jgrf3 _hgeogrf3"])
43
45
  }), props.children));
44
46
  };
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _ui = require("@atlaskit/editor-common/ui");
12
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
12
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
14
  /**
14
15
  * @jsxRuntime classic
@@ -71,6 +72,7 @@ var LayoutSectionEmotion = exports.LayoutSectionEmotion = function LayoutSection
71
72
  // Keep separate: Compiled crashes on ternary/object lookup here.
72
73
  (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'middle' && verticalAlignMiddleStyles, (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'bottom' && verticalAlignBottomStyles, multipleWrappedImagesStyle]
73
74
  }, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
75
+ "data-layout-column-start": (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
74
76
  css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
75
77
  }), props.children));
76
78
  };
@@ -30,7 +30,7 @@ var _table2 = require("../../react/nodes/table");
30
30
  var _collapsibleHeadingsDom = require("../collapsible-headings-dom");
31
31
  var _getBaseFontSize = require("./get-base-font-size");
32
32
  var _style = require("./style");
33
- var _css0, _$concat3, _$concat5;
33
+ var _css9, _$concat3, _$concat5;
34
34
  /* eslint-disable @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors */
35
35
  /* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
36
36
  /* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values */
@@ -554,16 +554,6 @@ var headingWrapperInlineFlowStyles = (0, _react.css)((0, _defineProperty2.defaul
554
554
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
555
555
  marginTop: '1.59091em'
556
556
  }));
557
- var headingAnchorWrapperTargetSizeStyles = (0, _react.css)((0, _defineProperty2.default)({
558
- '& .renderer-heading-wrapper > h1, & .renderer-heading-wrapper > h2, & .renderer-heading-wrapper > h3, & .renderer-heading-wrapper > h4, & .renderer-heading-wrapper > h5, & .renderer-heading-wrapper > h6': {
559
- verticalAlign: 'middle'
560
- }
561
- }, "& .renderer-heading-wrapper > .".concat(_headingAnchor.HeadingAnchorWrapperClassName), {
562
- display: 'inline-flex',
563
- alignItems: 'center',
564
- justifyContent: 'center',
565
- verticalAlign: 'middle'
566
- }));
567
557
  var headingWithAlignmentStylesDuplicateAnchor = (0, _react.css)({
568
558
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
569
559
  '.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
@@ -654,13 +644,13 @@ var paragraphStylesUGCScaledMargin = (0, _react.css)({
654
644
  marginBottom: 0
655
645
  }
656
646
  });
657
- var listsSharedStyles = (0, _react.css)((_css0 = {
647
+ var listsSharedStyles = (0, _react.css)((_css9 = {
658
648
  /* =============== INDENTATION SPACING ========= */
659
649
  'ul, ol': {
660
650
  boxSizing: 'border-box',
661
651
  paddingLeft: "var(--ed--list--item-counter--padding, ".concat(_styles.listItemCounterPadding, "px)")
662
652
  }
663
- }, (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)(_css0, "".concat(_orderedList.orderedListSelector, ", ").concat(_bulletList.bulletListSelector), {
653
+ }, (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)(_css9, "".concat(_orderedList.orderedListSelector, ", ").concat(_bulletList.bulletListSelector), {
664
654
  /*
665
655
  Ensures list item content adheres to the list's margin instead
666
656
  of filling the entire block row. This is important to allow
@@ -692,7 +682,7 @@ var listsSharedStyles = (0, _react.css)((_css0 = {
692
682
  listStyleType: 'lower-alpha'
693
683
  }), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
694
684
  listStyleType: 'lower-roman'
695
- }), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css0, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
685
+ }), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css9, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
696
686
  listStyleType: 'disc'
697
687
  }), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
698
688
  listStyleType: 'circle'
@@ -1936,6 +1926,31 @@ var codeBlockAndLayoutStyles = (0, _react.css)((0, _defineProperty2.default)((0,
1936
1926
  marginBottom: _editorSharedStyles.blockNodesVerticalMargin
1937
1927
  }
1938
1928
  }));
1929
+
1930
+ // Match the first content sibling throughout streaming SSR and hydration. Emotion moves
1931
+ // style elements to the head, which must not change code block or media group spacing.
1932
+ // Keep these selectors less specific than the top-level lightweight code block override.
1933
+ var blockSsrMarginStyles = (0, _react.css)({
1934
+ '& .MediaGroup:not(:not(style, script) ~ *), & .code-block:not(:not(style, script) ~ *)': {
1935
+ marginTop: 0
1936
+ },
1937
+ '& [data-layout-section] .MediaGroup:not(:not(style, script) ~ *), & [data-layout-section] .code-block:not(:not(style, script) ~ *), & li > .code-block:not(:not(style, script) ~ *)': {
1938
+ marginTop: 0
1939
+ }
1940
+ });
1941
+
1942
+ // Layout columns start with an empty margin-reset element. Ignore only streamed siblings
1943
+ // between that element and the first code block/media group, preserving later block spacing.
1944
+ var layoutBlockSsrMarginStyles = (0, _react.css)({
1945
+ '& [data-layout-column-start] ~ .code-block:not([data-layout-column-start] ~ :not(style, script) ~ *), & [data-layout-column-start] ~ .MediaGroup:not([data-layout-column-start] ~ :not(style, script) ~ *)': {
1946
+ marginTop: 0
1947
+ }
1948
+ });
1949
+ var codeBlockInListSsrMarginSafariFixStyles = (0, _react.css)((0, _defineProperty2.default)({}, "&:not([data-node-type='decisionList']) > li,\n\t\t&:not(.".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, ") > li"), {
1950
+ '> .code-block:not(:not(style, script) ~ *)': {
1951
+ marginTop: "-".concat(_editorSharedStyles.akEditorLineHeight, "em !important")
1952
+ }
1953
+ }));
1939
1954
  var layoutSectionForAdvancedLayoutsStyles = (0, _react.css)({
1940
1955
  '& [data-layout-section]': {
1941
1956
  '& > div + div': {
@@ -2298,13 +2313,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
2298
2313
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
2299
2314
  '--ak-renderer-editor-font-small-text': _ugcTokens.editorUGCTokensRefreshed['editor.font.body.small']
2300
2315
  },
2301
- 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, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table2.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _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,
2316
+ 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, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table2.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && 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,
2302
2317
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2303
2318
  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),
2304
2319
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2305
- (0, _fg.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, (0, _fg.fg)('platform_renderer_expand_ssr_margin_fix') && expandSsrMarginStyles,
2320
+ (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,
2306
2321
  // this should be placed after baseOtherStyles
2307
- (0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_2') && 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, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, (0, _expValEquals.expValEquals)('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2322
+ (0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, (0, _expValEquals.expValEquals)('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2308
2323
  "data-testid": testId
2309
2324
  }, children);
2310
2325
  };
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
73
73
  var TABLE_INFO_TIMEOUT = 10000;
74
74
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
75
75
  var packageName = "@atlaskit/renderer";
76
- var packageVersion = "141.0.2";
76
+ var packageVersion = "141.0.4";
77
77
  var setAsQueryContainerStyles = (0, _react2.css)({
78
78
  containerName: 'ak-renderer-wrapper',
79
79
  containerType: 'inline-size'
@@ -505,11 +505,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
505
505
  stat = _renderDocument.stat,
506
506
  pmDoc = _renderDocument.pmDoc;
507
507
  if (props.onComplete) {
508
- if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_renderer_on_complete_after_commit')) {
509
- pendingOnCompleteStatRef.current = stat;
510
- } else {
511
- props.onComplete(stat);
512
- }
508
+ pendingOnCompleteStatRef.current = stat;
513
509
  }
514
510
  var rendererOutput = (0, _react2.jsx)(_rendererContext.RendererContextProvider, {
515
511
  value: rendererContext
@@ -1,6 +1,4 @@
1
- // getIndexMatch finds the position of a given string within a given document, in accordance to the Confluence Annotation backend
2
- // The document is serialised into one large string, excluding any nodes that can not have annotations (eg: emojis, media).
3
- // Finds where the given query string is relative to the serialised partial document
1
+ // Finds a string position using the Confluence annotation backend's serialisation rules.
4
2
  export function getIndexMatch(doc, schema, selectedText, startIndex) {
5
3
  let textContent = '';
6
4
  let matchIndex = 0;
@@ -11,19 +9,16 @@ export function getIndexMatch(doc, schema, selectedText, startIndex) {
11
9
  const {
12
10
  media
13
11
  } = schema.nodes;
12
+ const isBlockContainer = nodeType.isBlock && !nodeType.isLeaf && !nodeType.inlineContent;
14
13
 
15
- // Mirrors Confluence backend and doesn't construct textContent if it doesn't allow annotations
16
- // Don't skip media node so that block node can be defined its startIndex in within [nodeStart, nodeEnd]
17
- if ((node.isText || !nodeType.allowsMarkType(schema.marks.annotation)) && nodeType !== media) {
18
- // Note: `return true` as a parent disallowing annotations does not mean a child disallows annotations.
19
- // Eg: panel (invalid) > p (valid)
14
+ // Containers may allow annotations for their children; skip their own text to avoid double-counting.
15
+ if ((node.isText || !nodeType.allowsMarkType(schema.marks.annotation) || isBlockContainer) && nodeType !== media) {
20
16
  return true;
21
17
  }
22
18
  const nodeStart = pos;
23
19
  const nodeEnd = nodeStart + node.nodeSize;
24
20
  if (startIndex >= nodeStart && startIndex <= nodeEnd) {
25
- // if it's a node block, set position to pos to indicate to the backend
26
- // that it's an annotation on a block node
21
+ // MAUI-1255 will add eligible extensions as block annotation targets.
27
22
  if (nodeType === media) {
28
23
  blockNodePos = pos;
29
24
  }
@@ -15,17 +15,7 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
15
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
16
  import Tooltip from '@atlaskit/tooltip/Tooltip';
17
17
  import { headingAnchorLinkMessages } from '../../messages';
18
- import HeadingAnchorButton from './heading-anchor-button';
19
18
  export const HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
20
- const headingAnchorWrapperTargetSizeStyles = css({
21
- display: 'inline-flex',
22
- boxSizing: 'border-box',
23
- alignItems: 'center',
24
- justifyContent: 'center',
25
- width: '24px',
26
- height: '24px',
27
- verticalAlign: 'middle'
28
- });
29
19
  const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
30
20
  const {
31
21
  children,
@@ -34,7 +24,6 @@ const CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
34
24
  return jsx("span", _extends({}, rest, {
35
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
36
26
  className: HeadingAnchorWrapperClassName,
37
- css: isExperimentEnabled('platform_editor_heading_link_target_size') ? headingAnchorWrapperTargetSizeStyles : undefined,
38
27
  ref: ref
39
28
  }), children);
40
29
  });
@@ -47,11 +36,6 @@ const copyAnchorButtonStyles = css({
47
36
  cursor: 'pointer',
48
37
  right: 0
49
38
  });
50
- const scaledLinkIconStyles = css({
51
- display: 'inline-flex',
52
- transform: 'scale(1.5)',
53
- transformOrigin: 'center'
54
- });
55
39
  // Ignored via go/ees005
56
40
  // eslint-disable-next-line @repo/internal/react/no-class-components
57
41
  class HeadingAnchor extends React.PureComponent {
@@ -114,27 +98,6 @@ class HeadingAnchor extends React.PureComponent {
114
98
  heading: headingId
115
99
  }) : headingId;
116
100
  const tabIndex = expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? 0 : hideFromScreenReader ? undefined : -1;
117
- if (isExperimentEnabled('platform_editor_heading_link_target_size')) {
118
- return jsx(HeadingAnchorButton, {
119
- "data-testid": "anchor-button",
120
- id: this.copyLinkId,
121
- onMouseLeave: this.resetMessage,
122
- onBlur: this.resetMessage,
123
- onClick: this.copyToClipboard,
124
- "aria-hidden": hideFromScreenReader,
125
- tabIndex: tabIndex,
126
- "aria-label": hideFromScreenReader ? undefined : this.state.tooltipMessage,
127
- "aria-labelledby": hideFromScreenReader ? undefined : labelledBy,
128
- type: "button"
129
- }, jsx("span", {
130
- css: scaledLinkIconStyles,
131
- "data-testid": "scaled-link-icon"
132
- }, jsx(LinkIcon, {
133
- label: this.getCopyAriaLabel(),
134
- size: "medium",
135
- color: this.state.isClicked ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon-subtle, #505258)"
136
- })));
137
- }
138
101
  return jsx("button", {
139
102
  "data-testid": "anchor-button",
140
103
  id: this.copyLinkId,
@@ -9,6 +9,7 @@ import "./layoutColumn-compiled.compiled.css";
9
9
  import { ax, ix } from "@compiled/react/runtime";
10
10
  import React from 'react';
11
11
  import { WidthProvider } from '@atlaskit/editor-common/ui';
12
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
12
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
14
 
14
15
  // localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
@@ -33,6 +34,7 @@ export const LayoutSectionCompiled = props => {
33
34
  },
34
35
  className: ax([(isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'middle' && "_1e0c1txw _2lx21bp4 _1bah1h6o", (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'bottom' && "_1e0c1txw _2lx21bp4 _1bahesu3", "_1tihidpf _12kpidpf"])
35
36
  }, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
37
+ "data-layout-column-start": fg('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
36
38
  className: ax(["_1skbgrf3", "_19segrf3 _1ki1grf3 _bmdegrf3 _166hgrf3 _7g1ogrf3 _sk2jgrf3 _hgeogrf3"])
37
39
  }), props.children));
38
40
  };
@@ -13,6 +13,7 @@ import React from 'react';
13
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
14
14
  import { css, jsx } from '@emotion/react';
15
15
  import { WidthProvider } from '@atlaskit/editor-common/ui';
16
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
16
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
18
 
18
19
  // localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
@@ -73,6 +74,7 @@ export const LayoutSectionEmotion = props => {
73
74
  // Keep separate: Compiled crashes on ternary/object lookup here.
74
75
  (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'middle' && verticalAlignMiddleStyles, (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'bottom' && verticalAlignBottomStyles, multipleWrappedImagesStyle]
75
76
  }, jsx(WidthProvider, null, jsx("div", {
77
+ "data-layout-column-start": fg('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
76
78
  css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
77
79
  }), props.children));
78
80
  };
@@ -661,17 +661,6 @@ const headingWrapperInlineFlowStyles = css({
661
661
  marginTop: '1.59091em'
662
662
  }
663
663
  });
664
- const headingAnchorWrapperTargetSizeStyles = css({
665
- '& .renderer-heading-wrapper > h1, & .renderer-heading-wrapper > h2, & .renderer-heading-wrapper > h3, & .renderer-heading-wrapper > h4, & .renderer-heading-wrapper > h5, & .renderer-heading-wrapper > h6': {
666
- verticalAlign: 'middle'
667
- },
668
- [`& .renderer-heading-wrapper > .${HeadingAnchorWrapperClassName}`]: {
669
- display: 'inline-flex',
670
- alignItems: 'center',
671
- justifyContent: 'center',
672
- verticalAlign: 'middle'
673
- }
674
- });
675
664
  const headingWithAlignmentStylesDuplicateAnchor = css({
676
665
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
677
666
  '.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
@@ -2485,6 +2474,34 @@ const codeBlockAndLayoutStyles = css({
2485
2474
  }
2486
2475
  }
2487
2476
  });
2477
+
2478
+ // Match the first content sibling throughout streaming SSR and hydration. Emotion moves
2479
+ // style elements to the head, which must not change code block or media group spacing.
2480
+ // Keep these selectors less specific than the top-level lightweight code block override.
2481
+ const blockSsrMarginStyles = css({
2482
+ '& .MediaGroup:not(:not(style, script) ~ *), & .code-block:not(:not(style, script) ~ *)': {
2483
+ marginTop: 0
2484
+ },
2485
+ '& [data-layout-section] .MediaGroup:not(:not(style, script) ~ *), & [data-layout-section] .code-block:not(:not(style, script) ~ *), & li > .code-block:not(:not(style, script) ~ *)': {
2486
+ marginTop: 0
2487
+ }
2488
+ });
2489
+
2490
+ // Layout columns start with an empty margin-reset element. Ignore only streamed siblings
2491
+ // between that element and the first code block/media group, preserving later block spacing.
2492
+ const layoutBlockSsrMarginStyles = css({
2493
+ '& [data-layout-column-start] ~ .code-block:not([data-layout-column-start] ~ :not(style, script) ~ *), & [data-layout-column-start] ~ .MediaGroup:not([data-layout-column-start] ~ :not(style, script) ~ *)': {
2494
+ marginTop: 0
2495
+ }
2496
+ });
2497
+ const codeBlockInListSsrMarginSafariFixStyles = css({
2498
+ [`&:not([data-node-type='decisionList']) > li,
2499
+ &:not(.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}) > li`]: {
2500
+ '> .code-block:not(:not(style, script) ~ *)': {
2501
+ marginTop: `-${akEditorLineHeight}em !important`
2502
+ }
2503
+ }
2504
+ });
2488
2505
  const layoutSectionForAdvancedLayoutsStyles = css({
2489
2506
  '& [data-layout-section]': {
2490
2507
  '& > div + div': {
@@ -2931,13 +2948,13 @@ export const RendererStyleContainer = props => {
2931
2948
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
2932
2949
  '--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
2933
2950
  },
2934
- 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' && (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, 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,
2951
+ 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' && (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' && 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,
2935
2952
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2936
2953
  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),
2937
2954
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2938
- fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, fg('platform_renderer_expand_ssr_margin_fix') && expandSsrMarginStyles,
2955
+ fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
2939
2956
  // this should be placed after baseOtherStyles
2940
- expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && 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, 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) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2957
+ expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (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) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2941
2958
  "data-testid": testId
2942
2959
  }, children);
2943
2960
  };
@@ -58,7 +58,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
58
58
  const TABLE_INFO_TIMEOUT = 10000;
59
59
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
60
60
  const packageName = "@atlaskit/renderer";
61
- const packageVersion = "141.0.2";
61
+ const packageVersion = "141.0.4";
62
62
  const setAsQueryContainerStyles = css({
63
63
  containerName: 'ak-renderer-wrapper',
64
64
  containerType: 'inline-size'
@@ -498,11 +498,7 @@ export const RendererFunctionalComponent = props => {
498
498
  pmDoc
499
499
  } = renderDocument(props.shouldRemoveEmptySpaceAroundContent ? removeEmptySpaceAroundContent(props.document) : props.document, serializer, schema, props.adfStage, props.useSpecBasedValidator, id, fireAnalyticsEvent, props.unsupportedContentLevelsTracking, props.appearance, props.includeNodesCountInStats, props.skipValidation, validationOverrides);
500
500
  if (props.onComplete) {
501
- if (isExperimentEnabled('platform_renderer_on_complete_after_commit')) {
502
- pendingOnCompleteStatRef.current = stat;
503
- } else {
504
- props.onComplete(stat);
505
- }
501
+ pendingOnCompleteStatRef.current = stat;
506
502
  }
507
503
  const rendererOutput = jsx(RendererContextProvider, {
508
504
  value: rendererContext
@@ -1,6 +1,4 @@
1
- // getIndexMatch finds the position of a given string within a given document, in accordance to the Confluence Annotation backend
2
- // The document is serialised into one large string, excluding any nodes that can not have annotations (eg: emojis, media).
3
- // Finds where the given query string is relative to the serialised partial document
1
+ // Finds a string position using the Confluence annotation backend's serialisation rules.
4
2
  export function getIndexMatch(doc, schema, selectedText, startIndex) {
5
3
  var textContent = '';
6
4
  var matchIndex = 0;
@@ -9,19 +7,16 @@ export function getIndexMatch(doc, schema, selectedText, startIndex) {
9
7
  doc.descendants(function (node, pos) {
10
8
  var nodeType = node.type;
11
9
  var media = schema.nodes.media;
10
+ var isBlockContainer = nodeType.isBlock && !nodeType.isLeaf && !nodeType.inlineContent;
12
11
 
13
- // Mirrors Confluence backend and doesn't construct textContent if it doesn't allow annotations
14
- // Don't skip media node so that block node can be defined its startIndex in within [nodeStart, nodeEnd]
15
- if ((node.isText || !nodeType.allowsMarkType(schema.marks.annotation)) && nodeType !== media) {
16
- // Note: `return true` as a parent disallowing annotations does not mean a child disallows annotations.
17
- // Eg: panel (invalid) > p (valid)
12
+ // Containers may allow annotations for their children; skip their own text to avoid double-counting.
13
+ if ((node.isText || !nodeType.allowsMarkType(schema.marks.annotation) || isBlockContainer) && nodeType !== media) {
18
14
  return true;
19
15
  }
20
16
  var nodeStart = pos;
21
17
  var nodeEnd = nodeStart + node.nodeSize;
22
18
  if (startIndex >= nodeStart && startIndex <= nodeEnd) {
23
- // if it's a node block, set position to pos to indicate to the backend
24
- // that it's an annotation on a block node
19
+ // MAUI-1255 will add eligible extensions as block annotation targets.
25
20
  if (nodeType === media) {
26
21
  blockNodePos = pos;
27
22
  }
@@ -26,24 +26,13 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
26
26
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
27
27
  import Tooltip from '@atlaskit/tooltip/Tooltip';
28
28
  import { headingAnchorLinkMessages } from '../../messages';
29
- import HeadingAnchorButton from './heading-anchor-button';
30
29
  export var HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
31
- var headingAnchorWrapperTargetSizeStyles = css({
32
- display: 'inline-flex',
33
- boxSizing: 'border-box',
34
- alignItems: 'center',
35
- justifyContent: 'center',
36
- width: '24px',
37
- height: '24px',
38
- verticalAlign: 'middle'
39
- });
40
30
  var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
41
31
  var children = props.children,
42
32
  rest = _objectWithoutProperties(props, _excluded);
43
33
  return jsx("span", _extends({}, rest, {
44
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
45
35
  className: HeadingAnchorWrapperClassName,
46
- css: isExperimentEnabled('platform_editor_heading_link_target_size') ? headingAnchorWrapperTargetSizeStyles : undefined,
47
36
  ref: ref
48
37
  }), children);
49
38
  });
@@ -56,11 +45,6 @@ var copyAnchorButtonStyles = css({
56
45
  cursor: 'pointer',
57
46
  right: 0
58
47
  });
59
- var scaledLinkIconStyles = css({
60
- display: 'inline-flex',
61
- transform: 'scale(1.5)',
62
- transformOrigin: 'center'
63
- });
64
48
  // Ignored via go/ees005
65
49
  // eslint-disable-next-line @repo/internal/react/no-class-components
66
50
  var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
@@ -139,27 +123,6 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
139
123
  heading: headingId
140
124
  }) : headingId;
141
125
  var tabIndex = expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? 0 : hideFromScreenReader ? undefined : -1;
142
- if (isExperimentEnabled('platform_editor_heading_link_target_size')) {
143
- return jsx(HeadingAnchorButton, {
144
- "data-testid": "anchor-button",
145
- id: _this.copyLinkId,
146
- onMouseLeave: _this.resetMessage,
147
- onBlur: _this.resetMessage,
148
- onClick: _this.copyToClipboard,
149
- "aria-hidden": hideFromScreenReader,
150
- tabIndex: tabIndex,
151
- "aria-label": hideFromScreenReader ? undefined : _this.state.tooltipMessage,
152
- "aria-labelledby": hideFromScreenReader ? undefined : labelledBy,
153
- type: "button"
154
- }, jsx("span", {
155
- css: scaledLinkIconStyles,
156
- "data-testid": "scaled-link-icon"
157
- }, jsx(LinkIcon, {
158
- label: _this.getCopyAriaLabel(),
159
- size: "medium",
160
- color: _this.state.isClicked ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon-subtle, #505258)"
161
- })));
162
- }
163
126
  return jsx("button", {
164
127
  "data-testid": "anchor-button",
165
128
  id: _this.copyLinkId,
@@ -9,6 +9,7 @@ import "./layoutColumn-compiled.compiled.css";
9
9
  import { ax, ix } from "@compiled/react/runtime";
10
10
  import React from 'react';
11
11
  import { WidthProvider } from '@atlaskit/editor-common/ui';
12
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
12
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
14
 
14
15
  // localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
@@ -33,6 +34,7 @@ export var LayoutSectionCompiled = function LayoutSectionCompiled(props) {
33
34
  },
34
35
  className: ax([(isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'middle' && "_1e0c1txw _2lx21bp4 _1bah1h6o", (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'bottom' && "_1e0c1txw _2lx21bp4 _1bahesu3", "_1tihidpf _12kpidpf"])
35
36
  }, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
37
+ "data-layout-column-start": fg('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
36
38
  className: ax(["_1skbgrf3", "_19segrf3 _1ki1grf3 _bmdegrf3 _166hgrf3 _7g1ogrf3 _sk2jgrf3 _hgeogrf3"])
37
39
  }), props.children));
38
40
  };
@@ -14,6 +14,7 @@ import React from 'react';
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
15
15
  import { css, jsx } from '@emotion/react';
16
16
  import { WidthProvider } from '@atlaskit/editor-common/ui';
17
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
17
18
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
19
 
19
20
  // localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
@@ -64,6 +65,7 @@ export var LayoutSectionEmotion = function LayoutSectionEmotion(props) {
64
65
  // Keep separate: Compiled crashes on ternary/object lookup here.
65
66
  (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'middle' && verticalAlignMiddleStyles, (isLayoutColumnValignRenderingEnabled || isLayoutColumnMenuEnabled) && props.valign === 'bottom' && verticalAlignBottomStyles, multipleWrappedImagesStyle]
66
67
  }, jsx(WidthProvider, null, jsx("div", {
68
+ "data-layout-column-start": fg('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
67
69
  css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
68
70
  }), props.children));
69
71
  };
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- var _css0, _$concat3, _$concat5;
2
+ var _css9, _$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 */
@@ -547,16 +547,6 @@ var headingWrapperInlineFlowStyles = css(_defineProperty(_defineProperty(_define
547
547
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
548
548
  marginTop: '1.59091em'
549
549
  }));
550
- var headingAnchorWrapperTargetSizeStyles = css(_defineProperty({
551
- '& .renderer-heading-wrapper > h1, & .renderer-heading-wrapper > h2, & .renderer-heading-wrapper > h3, & .renderer-heading-wrapper > h4, & .renderer-heading-wrapper > h5, & .renderer-heading-wrapper > h6': {
552
- verticalAlign: 'middle'
553
- }
554
- }, "& .renderer-heading-wrapper > .".concat(HeadingAnchorWrapperClassName), {
555
- display: 'inline-flex',
556
- alignItems: 'center',
557
- justifyContent: 'center',
558
- verticalAlign: 'middle'
559
- }));
560
550
  var headingWithAlignmentStylesDuplicateAnchor = css({
561
551
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
562
552
  '.fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)': {
@@ -647,13 +637,13 @@ var paragraphStylesUGCScaledMargin = css({
647
637
  marginBottom: 0
648
638
  }
649
639
  });
650
- var listsSharedStyles = css((_css0 = {
640
+ var listsSharedStyles = css((_css9 = {
651
641
  /* =============== INDENTATION SPACING ========= */
652
642
  'ul, ol': {
653
643
  boxSizing: 'border-box',
654
644
  paddingLeft: "var(--ed--list--item-counter--padding, ".concat(listItemCounterPadding, "px)")
655
645
  }
656
- }, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css0, "".concat(orderedListSelector, ", ").concat(bulletListSelector), {
646
+ }, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css9, "".concat(orderedListSelector, ", ").concat(bulletListSelector), {
657
647
  /*
658
648
  Ensures list item content adheres to the list's margin instead
659
649
  of filling the entire block row. This is important to allow
@@ -685,7 +675,7 @@ var listsSharedStyles = css((_css0 = {
685
675
  listStyleType: 'lower-alpha'
686
676
  }), 'ol[data-indent-level="3"], ol[data-indent-level="6"]', {
687
677
  listStyleType: 'lower-roman'
688
- }), _defineProperty(_defineProperty(_defineProperty(_css0, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
678
+ }), _defineProperty(_defineProperty(_defineProperty(_css9, 'ul[data-indent-level="1"], ul[data-indent-level="4"]', {
689
679
  listStyleType: 'disc'
690
680
  }), 'ul[data-indent-level="2"], ul[data-indent-level="5"]', {
691
681
  listStyleType: 'circle'
@@ -1929,6 +1919,31 @@ var codeBlockAndLayoutStyles = css(_defineProperty(_defineProperty(_defineProper
1929
1919
  marginBottom: blockNodesVerticalMargin
1930
1920
  }
1931
1921
  }));
1922
+
1923
+ // Match the first content sibling throughout streaming SSR and hydration. Emotion moves
1924
+ // style elements to the head, which must not change code block or media group spacing.
1925
+ // Keep these selectors less specific than the top-level lightweight code block override.
1926
+ var blockSsrMarginStyles = css({
1927
+ '& .MediaGroup:not(:not(style, script) ~ *), & .code-block:not(:not(style, script) ~ *)': {
1928
+ marginTop: 0
1929
+ },
1930
+ '& [data-layout-section] .MediaGroup:not(:not(style, script) ~ *), & [data-layout-section] .code-block:not(:not(style, script) ~ *), & li > .code-block:not(:not(style, script) ~ *)': {
1931
+ marginTop: 0
1932
+ }
1933
+ });
1934
+
1935
+ // Layout columns start with an empty margin-reset element. Ignore only streamed siblings
1936
+ // between that element and the first code block/media group, preserving later block spacing.
1937
+ var layoutBlockSsrMarginStyles = css({
1938
+ '& [data-layout-column-start] ~ .code-block:not([data-layout-column-start] ~ :not(style, script) ~ *), & [data-layout-column-start] ~ .MediaGroup:not([data-layout-column-start] ~ :not(style, script) ~ *)': {
1939
+ marginTop: 0
1940
+ }
1941
+ });
1942
+ var codeBlockInListSsrMarginSafariFixStyles = css(_defineProperty({}, "&:not([data-node-type='decisionList']) > li,\n\t\t&:not(.".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, ") > li"), {
1943
+ '> .code-block:not(:not(style, script) ~ *)': {
1944
+ marginTop: "-".concat(akEditorLineHeight, "em !important")
1945
+ }
1946
+ }));
1932
1947
  var layoutSectionForAdvancedLayoutsStyles = css({
1933
1948
  '& [data-layout-section]': {
1934
1949
  '& > div + div': {
@@ -2291,13 +2306,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
2291
2306
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
2292
2307
  '--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
2293
2308
  },
2294
- 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' && (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, 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,
2309
+ 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' && (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' && 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,
2295
2310
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2296
2311
  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),
2297
2312
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2298
- fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, fg('platform_renderer_expand_ssr_margin_fix') && expandSsrMarginStyles,
2313
+ fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
2299
2314
  // this should be placed after baseOtherStyles
2300
- expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && 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, 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) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2315
+ expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (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) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2301
2316
  "data-testid": testId
2302
2317
  }, children);
2303
2318
  };
@@ -63,7 +63,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
63
63
  var TABLE_INFO_TIMEOUT = 10000;
64
64
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
65
65
  var packageName = "@atlaskit/renderer";
66
- var packageVersion = "141.0.2";
66
+ var packageVersion = "141.0.4";
67
67
  var setAsQueryContainerStyles = css({
68
68
  containerName: 'ak-renderer-wrapper',
69
69
  containerType: 'inline-size'
@@ -495,11 +495,7 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
495
495
  stat = _renderDocument.stat,
496
496
  pmDoc = _renderDocument.pmDoc;
497
497
  if (props.onComplete) {
498
- if (isExperimentEnabled('platform_renderer_on_complete_after_commit')) {
499
- pendingOnCompleteStatRef.current = stat;
500
- } else {
501
- props.onComplete(stat);
502
- }
498
+ pendingOnCompleteStatRef.current = stat;
503
499
  }
504
500
  var rendererOutput = jsx(RendererContextProvider, {
505
501
  value: rendererContext
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "141.0.3",
3
+ "version": "141.0.5",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/adf-schema": "^57.5.0",
36
+ "@atlaskit/adf-schema": "^57.6.0",
37
37
  "@atlaskit/adf-utils": "^20.9.0",
38
38
  "@atlaskit/afm-i18n-platform-editor-renderer": "2.249.0",
39
39
  "@atlaskit/analytics-listeners": "^11.4.0",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/pragmatic-drag-and-drop": "^3.1.0",
70
70
  "@atlaskit/react-compiler-gating": "^0.2.0",
71
71
  "@atlaskit/react-ufo": "^7.13.0",
72
- "@atlaskit/smart-card": "^45.24.0",
72
+ "@atlaskit/smart-card": "^45.25.0",
73
73
  "@atlaskit/status": "^5.12.0",
74
74
  "@atlaskit/task-decision": "^21.10.0",
75
75
  "@atlaskit/theme": "^28.2.0",
@@ -88,7 +88,7 @@
88
88
  "uuid": "^11.1.1"
89
89
  },
90
90
  "peerDependencies": {
91
- "@atlaskit/editor-common": "^123.3.0",
91
+ "@atlaskit/editor-common": "^123.4.0",
92
92
  "@atlaskit/link-provider": "^5.7.0",
93
93
  "@atlaskit/media-core": "^38.2.0",
94
94
  "react": "^18.2.0 || ^19.2.0",
@@ -153,7 +153,7 @@
153
153
  "platform_renderer_table_row_functional": {
154
154
  "type": "boolean"
155
155
  },
156
- "platform_renderer_expand_ssr_margin_fix": {
156
+ "platform_renderer_ssr_block_margin_fix": {
157
157
  "type": "boolean"
158
158
  },
159
159
  "platform_native_embeds_rollout_non_maui_experience": {
@@ -1,16 +0,0 @@
1
- ._1dqoglyw{border-style:none}._12ji1r31{outline-color:currentColor}
2
- ._12y31o36{outline-width:medium}
3
- ._19bvidpf{padding-left:0}
4
- ._1bah1h6o{justify-content:center}
5
- ._1bsb1tcg{width:24px}
6
- ._1e0c116y{display:inline-flex}
7
- ._1qu2glyw{outline-style:none}
8
- ._4cvr1h6o{align-items:center}
9
- ._4t3i1tcg{height:24px}
10
- ._80omtlke{cursor:pointer}
11
- ._bfhk1j28{background-color:transparent}
12
- ._ca0qidpf{padding-top:0}
13
- ._n3tdidpf{padding-bottom:0}
14
- ._s7n4nkob{vertical-align:middle}
15
- ._u5f3idpf{padding-right:0}
16
- ._vchhusvi{box-sizing:border-box}
@@ -1,24 +0,0 @@
1
- /* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- "use strict";
3
-
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.default = HeadingAnchorButton;
10
- require("./heading-anchor-button.compiled.css");
11
- var React = _interopRequireWildcard(require("react"));
12
- var _runtime = require("@compiled/react/runtime");
13
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
- var buttonStyles = null;
16
-
17
- /** Heading link button with a minimum 24px pointer target. */
18
- function HeadingAnchorButton(props) {
19
- // eslint-disable-next-line react/jsx-props-no-spreading -- Forward the existing heading anchor's accessibility and event props.
20
- return /*#__PURE__*/React.createElement("button", (0, _extends2.default)({}, props, {
21
- type: "button",
22
- className: (0, _runtime.ax)(["_12ji1r31 _1qu2glyw _12y31o36 _1dqoglyw _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _s7n4nkob _bfhk1j28 _80omtlke"])
23
- }));
24
- }
@@ -1,16 +0,0 @@
1
- ._1dqoglyw{border-style:none}._12ji1r31{outline-color:currentColor}
2
- ._12y31o36{outline-width:medium}
3
- ._19bvidpf{padding-left:0}
4
- ._1bah1h6o{justify-content:center}
5
- ._1bsb1tcg{width:24px}
6
- ._1e0c116y{display:inline-flex}
7
- ._1qu2glyw{outline-style:none}
8
- ._4cvr1h6o{align-items:center}
9
- ._4t3i1tcg{height:24px}
10
- ._80omtlke{cursor:pointer}
11
- ._bfhk1j28{background-color:transparent}
12
- ._ca0qidpf{padding-top:0}
13
- ._n3tdidpf{padding-bottom:0}
14
- ._s7n4nkob{vertical-align:middle}
15
- ._u5f3idpf{padding-right:0}
16
- ._vchhusvi{box-sizing:border-box}
@@ -1,15 +0,0 @@
1
- /* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import "./heading-anchor-button.compiled.css";
4
- import * as React from 'react';
5
- import { ax, ix } from "@compiled/react/runtime";
6
- const buttonStyles = null;
7
-
8
- /** Heading link button with a minimum 24px pointer target. */
9
- export default function HeadingAnchorButton(props) {
10
- // eslint-disable-next-line react/jsx-props-no-spreading -- Forward the existing heading anchor's accessibility and event props.
11
- return /*#__PURE__*/React.createElement("button", _extends({}, props, {
12
- type: "button",
13
- className: ax(["_12ji1r31 _1qu2glyw _12y31o36 _1dqoglyw _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _s7n4nkob _bfhk1j28 _80omtlke"])
14
- }));
15
- }
@@ -1,16 +0,0 @@
1
- ._1dqoglyw{border-style:none}._12ji1r31{outline-color:currentColor}
2
- ._12y31o36{outline-width:medium}
3
- ._19bvidpf{padding-left:0}
4
- ._1bah1h6o{justify-content:center}
5
- ._1bsb1tcg{width:24px}
6
- ._1e0c116y{display:inline-flex}
7
- ._1qu2glyw{outline-style:none}
8
- ._4cvr1h6o{align-items:center}
9
- ._4t3i1tcg{height:24px}
10
- ._80omtlke{cursor:pointer}
11
- ._bfhk1j28{background-color:transparent}
12
- ._ca0qidpf{padding-top:0}
13
- ._n3tdidpf{padding-bottom:0}
14
- ._s7n4nkob{vertical-align:middle}
15
- ._u5f3idpf{padding-right:0}
16
- ._vchhusvi{box-sizing:border-box}
@@ -1,15 +0,0 @@
1
- /* heading-anchor-button.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import "./heading-anchor-button.compiled.css";
4
- import * as React from 'react';
5
- import { ax, ix } from "@compiled/react/runtime";
6
- var buttonStyles = null;
7
-
8
- /** Heading link button with a minimum 24px pointer target. */
9
- export default function HeadingAnchorButton(props) {
10
- // eslint-disable-next-line react/jsx-props-no-spreading -- Forward the existing heading anchor's accessibility and event props.
11
- return /*#__PURE__*/React.createElement("button", _extends({}, props, {
12
- type: "button",
13
- className: ax(["_12ji1r31 _1qu2glyw _12y31o36 _1dqoglyw _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _s7n4nkob _bfhk1j28 _80omtlke"])
14
- }));
15
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import type { ButtonHTMLAttributes, JSX } from 'react';
6
- /** Heading link button with a minimum 24px pointer target. */
7
- export default function HeadingAnchorButton(props: ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;