@atlaskit/renderer 140.2.7 → 141.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 141.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3b3e57040d2d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b3e57040d2d0) -
8
+ Remove retired flexible-list feature controls and schema styles while preserving shipped list
9
+ normalization, hidden-marker rendering for wrapper list items, task paste and task-list tab
10
+ behavior, and toolbar indentation behavior.
11
+
12
+ Remove unused legacy list utilities after the flexible-list rollout: `flattenList`,
13
+ `normalizeListItemsSelection`, `hasValidListIndentationLevel`,
14
+ `processNestedTaskListsInSameLevel`, and `wrapTaskListIntoListAbove`. The
15
+ `@atlaskit/editor-common/lists/indentation` entrypoint is also removed.
16
+
17
+ Consumers of the removed runtime helpers should use the editor list plugin's indent/outdent
18
+ commands. The shared `FlattenedItem`, `FlattenListOptions`, and `FlattenListResult` types remain
19
+ available for the active list implementations.
20
+
21
+ - Updated dependencies
22
+
23
+ ## 140.2.8
24
+
25
+ ### Patch Changes
26
+
27
+ - [`edc1eb0f84ed8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edc1eb0f84ed8) -
28
+ Clean up experiment `platform_editor_comment_on_bodied_extensions`
29
+ - Updated dependencies
30
+
3
31
  ## 140.2.7
4
32
 
5
33
  ### Patch Changes
@@ -14,7 +14,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
  var _model = require("@atlaskit/editor-prosemirror/model");
16
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
18
17
  var _expandBody = require("../ui/utils/expand-body");
19
18
  var _nodes = require("./nodes");
20
19
  var _textWrapper = _interopRequireDefault(require("./nodes/text-wrapper"));
@@ -184,13 +183,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
184
183
  });
185
184
  return props;
186
185
  });
187
- if ((0, _editorExperiment.editorExperiment)('comment_on_bodied_extensions', true)) {
188
- this.initStartPos = init.startPos || 1;
189
- this.startPos = init.startPos || 1;
190
- } else {
191
- this.initStartPos = 1;
192
- this.startPos = 1;
193
- }
186
+ this.initStartPos = init.startPos || 1;
187
+ this.startPos = init.startPos || 1;
194
188
  this.providers = init.providers;
195
189
  this.eventHandlers = init.eventHandlers;
196
190
  this.extensionHandlers = init.extensionHandlers;
@@ -711,7 +711,6 @@ var listsSharedStylesForGekko = (0, _react.css)({
711
711
  /**
712
712
  * Hides list markers for "wrapper items" - list items that only contain nested lists with no other content.
713
713
  * These wrapper items have no meaningful content themselves, only nested lists below.
714
- * Applied when platform_editor_flexible_list_schema experiment is enabled.
715
714
  */
716
715
  var listItemHiddenMarkerStyles = (0, _react.css)({
717
716
  // Hide markers and remove spacing for wrapper list items (items containing only nested lists)
@@ -2289,7 +2288,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
2289
2288
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
2290
2289
  '--ak-renderer-editor-font-small-text': _ugcTokens.editorUGCTokensRefreshed['editor.font.body.small']
2291
2290
  },
2292
- 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, _table.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, (0, _expValEquals.expValEquals)('platform_editor_flexible_list_schema', 'isEnabled', true) && 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,
2291
+ 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, _table.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,
2293
2292
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2294
2293
  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),
2295
2294
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -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 = "140.2.6";
76
+ var packageVersion = "140.2.8";
77
77
  var setAsQueryContainerStyles = (0, _react2.css)({
78
78
  containerName: 'ak-renderer-wrapper',
79
79
  containerType: 'inline-size'
@@ -828,16 +828,10 @@ function RendererActionsInternalUpdater(_ref2) {
828
828
  // It is set to the root renderer's doc as otherwise the resulting document will
829
829
  // be incorrect (nested renderers use a fake document which represents a subset
830
830
  // of the actual document).
831
- var _doc;
832
- if ((0, _editorExperiment.editorExperiment)('comment_on_bodied_extensions', true) && rootRendererContextValue) {
833
- // If rootRendererContextValue is set -- we are inside a nested renderer
834
- // and should always use the doc from the root renderer
835
- _doc = rootRendererContextValue.doc;
836
- } else {
837
- // If rootRendererContextValue is not set -- we are in the root renderer
838
- // and set the doc to the current doc.
839
- _doc = doc;
840
- }
831
+ // If rootRendererContextValue is set -- we are inside a nested renderer
832
+ // and should always use the doc from the root renderer.
833
+ // Otherwise we are in the root renderer and set the doc to the current doc.
834
+ var _doc = rootRendererContextValue ? rootRendererContextValue.doc : doc;
841
835
  (0, _react.useLayoutEffect)(function () {
842
836
  if (_doc) {
843
837
  actions._privateRegisterRenderer(rendererRef, _doc, schema, onAnalyticsEvent);
@@ -848,17 +842,17 @@ function RendererActionsInternalUpdater(_ref2) {
848
842
  return actions._privateUnregisterRenderer();
849
843
  };
850
844
  }, [actions, schema, _doc, onAnalyticsEvent]);
851
- if ((0, _editorExperiment.editorExperiment)('comment_on_bodied_extensions', true)) {
852
- return (
853
- // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
854
- (0, _react2.jsx)(RootRendererContext.Provider, {
855
- value: {
856
- doc: _doc
857
- }
858
- }, children)
859
- );
860
- }
861
- return children;
845
+
846
+ // Memoised so nested renderers don't re-render on every root renderer render
847
+ // when the doc itself is unchanged.
848
+ var rootRendererValue = (0, _react.useMemo)(function () {
849
+ return {
850
+ doc: _doc
851
+ };
852
+ }, [_doc]);
853
+ return (0, _react2.jsx)(RootRendererContext.Provider, {
854
+ value: rootRendererValue
855
+ }, children);
862
856
  }
863
857
 
864
858
  // Usage notes:
@@ -3,7 +3,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
4
  import { MarkType } from '@atlaskit/editor-prosemirror/model';
5
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
7
6
  import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
8
7
  import { Doc, DocWithSelectAllTrap, isTextNode, isTextWrapper, mergeTextNodes, toReact } from './nodes';
9
8
  import TextWrapperComponent from './nodes/text-wrapper';
@@ -171,13 +170,8 @@ export default class ReactSerializer {
171
170
  };
172
171
  return props;
173
172
  });
174
- if (editorExperiment('comment_on_bodied_extensions', true)) {
175
- this.initStartPos = init.startPos || 1;
176
- this.startPos = init.startPos || 1;
177
- } else {
178
- this.initStartPos = 1;
179
- this.startPos = 1;
180
- }
173
+ this.initStartPos = init.startPos || 1;
174
+ this.startPos = init.startPos || 1;
181
175
  this.providers = init.providers;
182
176
  this.eventHandlers = init.eventHandlers;
183
177
  this.extensionHandlers = init.extensionHandlers;
@@ -837,7 +837,6 @@ const listsSharedStylesForGekko = css({
837
837
  /**
838
838
  * Hides list markers for "wrapper items" - list items that only contain nested lists with no other content.
839
839
  * These wrapper items have no meaningful content themselves, only nested lists below.
840
- * Applied when platform_editor_flexible_list_schema experiment is enabled.
841
840
  */
842
841
  const listItemHiddenMarkerStyles = css({
843
842
  // Hide markers and remove spacing for wrapper list items (items containing only nested lists)
@@ -2921,7 +2920,7 @@ export const RendererStyleContainer = props => {
2921
2920
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
2922
2921
  '--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
2923
2922
  },
2924
- 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, expValEquals('platform_editor_flexible_list_schema', 'isEnabled', true) && 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,
2923
+ 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,
2925
2924
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2926
2925
  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),
2927
2926
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  const TABLE_INFO_TIMEOUT = 10000;
60
60
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
61
61
  const packageName = "@atlaskit/renderer";
62
- const packageVersion = "140.2.6";
62
+ const packageVersion = "140.2.8";
63
63
  const setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
@@ -821,16 +821,10 @@ function RendererActionsInternalUpdater({
821
821
  // It is set to the root renderer's doc as otherwise the resulting document will
822
822
  // be incorrect (nested renderers use a fake document which represents a subset
823
823
  // of the actual document).
824
- let _doc;
825
- if (editorExperiment('comment_on_bodied_extensions', true) && rootRendererContextValue) {
826
- // If rootRendererContextValue is set -- we are inside a nested renderer
827
- // and should always use the doc from the root renderer
828
- _doc = rootRendererContextValue.doc;
829
- } else {
830
- // If rootRendererContextValue is not set -- we are in the root renderer
831
- // and set the doc to the current doc.
832
- _doc = doc;
833
- }
824
+ // If rootRendererContextValue is set -- we are inside a nested renderer
825
+ // and should always use the doc from the root renderer.
826
+ // Otherwise we are in the root renderer and set the doc to the current doc.
827
+ const _doc = rootRendererContextValue ? rootRendererContextValue.doc : doc;
834
828
  useLayoutEffect(() => {
835
829
  if (_doc) {
836
830
  actions._privateRegisterRenderer(rendererRef, _doc, schema, onAnalyticsEvent);
@@ -839,17 +833,15 @@ function RendererActionsInternalUpdater({
839
833
  }
840
834
  return () => actions._privateUnregisterRenderer();
841
835
  }, [actions, schema, _doc, onAnalyticsEvent]);
842
- if (editorExperiment('comment_on_bodied_extensions', true)) {
843
- return (
844
- // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
845
- jsx(RootRendererContext.Provider, {
846
- value: {
847
- doc: _doc
848
- }
849
- }, children)
850
- );
851
- }
852
- return children;
836
+
837
+ // Memoised so nested renderers don't re-render on every root renderer render
838
+ // when the doc itself is unchanged.
839
+ const rootRendererValue = useMemo(() => ({
840
+ doc: _doc
841
+ }), [_doc]);
842
+ return jsx(RootRendererContext.Provider, {
843
+ value: rootRendererValue
844
+ }, children);
853
845
  }
854
846
 
855
847
  // Usage notes:
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  import React from 'react';
11
11
  import { MarkType } from '@atlaskit/editor-prosemirror/model';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
14
13
  import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
15
14
  import { Doc, DocWithSelectAllTrap, isTextNode, isTextWrapper, mergeTextNodes, toReact } from './nodes';
16
15
  import TextWrapperComponent from './nodes/text-wrapper';
@@ -177,13 +176,8 @@ var ReactSerializer = /*#__PURE__*/function () {
177
176
  });
178
177
  return props;
179
178
  });
180
- if (editorExperiment('comment_on_bodied_extensions', true)) {
181
- this.initStartPos = init.startPos || 1;
182
- this.startPos = init.startPos || 1;
183
- } else {
184
- this.initStartPos = 1;
185
- this.startPos = 1;
186
- }
179
+ this.initStartPos = init.startPos || 1;
180
+ this.startPos = init.startPos || 1;
187
181
  this.providers = init.providers;
188
182
  this.eventHandlers = init.eventHandlers;
189
183
  this.extensionHandlers = init.extensionHandlers;
@@ -704,7 +704,6 @@ var listsSharedStylesForGekko = css({
704
704
  /**
705
705
  * Hides list markers for "wrapper items" - list items that only contain nested lists with no other content.
706
706
  * These wrapper items have no meaningful content themselves, only nested lists below.
707
- * Applied when platform_editor_flexible_list_schema experiment is enabled.
708
707
  */
709
708
  var listItemHiddenMarkerStyles = css({
710
709
  // Hide markers and remove spacing for wrapper list items (items containing only nested lists)
@@ -2282,7 +2281,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
2282
2281
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
2283
2282
  '--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
2284
2283
  },
2285
- 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, expValEquals('platform_editor_flexible_list_schema', 'isEnabled', true) && 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,
2284
+ 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,
2286
2285
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2287
2286
  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),
2288
2287
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var TABLE_INFO_TIMEOUT = 10000;
65
65
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
66
66
  var packageName = "@atlaskit/renderer";
67
- var packageVersion = "140.2.6";
67
+ var packageVersion = "140.2.8";
68
68
  var setAsQueryContainerStyles = css({
69
69
  containerName: 'ak-renderer-wrapper',
70
70
  containerType: 'inline-size'
@@ -819,16 +819,10 @@ function RendererActionsInternalUpdater(_ref2) {
819
819
  // It is set to the root renderer's doc as otherwise the resulting document will
820
820
  // be incorrect (nested renderers use a fake document which represents a subset
821
821
  // of the actual document).
822
- var _doc;
823
- if (editorExperiment('comment_on_bodied_extensions', true) && rootRendererContextValue) {
824
- // If rootRendererContextValue is set -- we are inside a nested renderer
825
- // and should always use the doc from the root renderer
826
- _doc = rootRendererContextValue.doc;
827
- } else {
828
- // If rootRendererContextValue is not set -- we are in the root renderer
829
- // and set the doc to the current doc.
830
- _doc = doc;
831
- }
822
+ // If rootRendererContextValue is set -- we are inside a nested renderer
823
+ // and should always use the doc from the root renderer.
824
+ // Otherwise we are in the root renderer and set the doc to the current doc.
825
+ var _doc = rootRendererContextValue ? rootRendererContextValue.doc : doc;
832
826
  useLayoutEffect(function () {
833
827
  if (_doc) {
834
828
  actions._privateRegisterRenderer(rendererRef, _doc, schema, onAnalyticsEvent);
@@ -839,17 +833,17 @@ function RendererActionsInternalUpdater(_ref2) {
839
833
  return actions._privateUnregisterRenderer();
840
834
  };
841
835
  }, [actions, schema, _doc, onAnalyticsEvent]);
842
- if (editorExperiment('comment_on_bodied_extensions', true)) {
843
- return (
844
- // eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
845
- jsx(RootRendererContext.Provider, {
846
- value: {
847
- doc: _doc
848
- }
849
- }, children)
850
- );
851
- }
852
- return children;
836
+
837
+ // Memoised so nested renderers don't re-render on every root renderer render
838
+ // when the doc itself is unchanged.
839
+ var rootRendererValue = useMemo(function () {
840
+ return {
841
+ doc: _doc
842
+ };
843
+ }, [_doc]);
844
+ return jsx(RootRendererContext.Provider, {
845
+ value: rootRendererValue
846
+ }, children);
853
847
  }
854
848
 
855
849
  // Usage notes:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "140.2.7",
3
+ "version": "141.0.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,6 +26,9 @@
26
26
  },
27
27
  "team": "Editor",
28
28
  "website": {
29
+ "tags": [
30
+ "platform-labs"
31
+ ],
29
32
  "name": "Renderer"
30
33
  }
31
34
  },
@@ -43,7 +46,7 @@
43
46
  "@atlaskit/editor-card-provider": "^7.3.0",
44
47
  "@atlaskit/editor-json-transformer": "^9.8.0",
45
48
  "@atlaskit/editor-palette": "^3.5.0",
46
- "@atlaskit/editor-prosemirror": "^8.0.0",
49
+ "@atlaskit/editor-prosemirror": "^9.0.0",
47
50
  "@atlaskit/editor-shared-styles": "^4.3.0",
48
51
  "@atlaskit/editor-smart-link-draggable": "^1.2.0",
49
52
  "@atlaskit/emoji": "^72.4.0",
@@ -65,13 +68,13 @@
65
68
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
66
69
  "@atlaskit/pragmatic-drag-and-drop": "^3.1.0",
67
70
  "@atlaskit/react-compiler-gating": "^0.2.0",
68
- "@atlaskit/react-ufo": "^7.11.0",
71
+ "@atlaskit/react-ufo": "^7.12.0",
69
72
  "@atlaskit/smart-card": "^45.24.0",
70
- "@atlaskit/status": "^5.11.0",
73
+ "@atlaskit/status": "^5.12.0",
71
74
  "@atlaskit/task-decision": "^21.10.0",
72
75
  "@atlaskit/theme": "^28.2.0",
73
- "@atlaskit/tmp-editor-statsig": "^198.0.0",
74
- "@atlaskit/tokens": "^17.0.0",
76
+ "@atlaskit/tmp-editor-statsig": "^199.0.0",
77
+ "@atlaskit/tokens": "^18.2.0",
75
78
  "@atlaskit/tooltip": "^24.3.0",
76
79
  "@atlaskit/visually-hidden": "^4.4.0",
77
80
  "@babel/runtime": "^7.0.0",
@@ -85,7 +88,7 @@
85
88
  "uuid": "^11.1.1"
86
89
  },
87
90
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^122.10.0",
91
+ "@atlaskit/editor-common": "^123.0.0",
89
92
  "@atlaskit/link-provider": "^5.7.0",
90
93
  "@atlaskit/media-core": "^38.2.0",
91
94
  "react": "^18.2.0 || ^19.2.0",
@@ -97,7 +100,7 @@
97
100
  "@af/visual-regression": "workspace:^",
98
101
  "@atlaskit/analytics-gas-types": "^6.2.0",
99
102
  "@atlaskit/checkbox": "^19.2.0",
100
- "@atlaskit/editor-plugin-media": "^20.1.0",
103
+ "@atlaskit/editor-plugin-media": "^21.0.0",
101
104
  "@atlaskit/editor-test-helpers": "workspace:^",
102
105
  "@atlaskit/inline-edit": "^16.4.0",
103
106
  "@atlaskit/json-ld-types": "^2.0.0",
@@ -109,13 +112,13 @@
109
112
  "@atlaskit/media-test-helpers": "^42.4.0",
110
113
  "@atlaskit/mention": "^29.2.0",
111
114
  "@atlaskit/modal-dialog": "^16.6.0",
112
- "@atlaskit/navigation-system": "^10.16.0",
115
+ "@atlaskit/navigation-system": "^10.17.0",
113
116
  "@atlaskit/primitives": "^22.5.0",
114
117
  "@atlaskit/profilecard": "^26.24.0",
115
118
  "@atlaskit/radio": "^10.2.0",
116
119
  "@atlaskit/range": "^12.2.0",
117
120
  "@atlaskit/section-message": "^10.2.0",
118
- "@atlaskit/side-nav-items": "^2.4.0",
121
+ "@atlaskit/side-nav-items": "^2.5.0",
119
122
  "@atlaskit/textfield": "^10.2.0",
120
123
  "@atlaskit/toggle": "^17.3.0",
121
124
  "@atlaskit/util-data-test": "^19.1.0",