@atlaskit/editor-core 221.16.0 → 221.16.2

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 (24) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
  3. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -3
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -0
  5. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -1
  6. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +4 -1
  7. package/dist/cjs/ui/EditorContentContainer/styles/blockTypeStyles.js +10 -1
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
  10. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -3
  11. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -0
  12. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -1
  13. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +5 -2
  14. package/dist/es2019/ui/EditorContentContainer/styles/blockTypeStyles.js +9 -0
  15. package/dist/es2019/version-wrapper.js +1 -1
  16. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
  17. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -3
  18. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -0
  19. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -1
  20. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +5 -2
  21. package/dist/esm/ui/EditorContentContainer/styles/blockTypeStyles.js +9 -0
  22. package/dist/esm/version-wrapper.js +1 -1
  23. package/dist/types/ui/EditorContentContainer/styles/blockTypeStyles.d.ts +1 -0
  24. package/package.json +7 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 221.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c1bfdbcc75ef2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c1bfdbcc75ef2) -
8
+ Add a floating table of contents experiment that provides a 24px scroll offset for headings in the
9
+ editor and renderer.
10
+ - Updated dependencies
11
+
12
+ ## 221.16.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [`2bf1a4ceaf0a4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2bf1a4ceaf0a4) -
17
+ Clean up stale feature gates platform_editor_fix_md_empty_list_roundtrip,
18
+ platform_editor_md-mode-use-content-reconciler, platform_editor_toolbar_mode_override,
19
+ platform_editor_markdown_mode_hide_source_toolbar
20
+ - Updated dependencies
21
+
3
22
  ## 221.16.0
4
23
 
5
24
  ### Minor Changes
@@ -91,7 +91,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
91
91
  // (no PM selection to anchor a floating toolbar to). The user's docking
92
92
  // pref alone is not enough to decide whether to mount the primary toolbar
93
93
  // in that case — the override has to short-circuit the hide gate below.
94
- var forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned' && (0, _platformFeatureFlags.fg)('platform_editor_toolbar_mode_override');
94
+ var forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned';
95
95
  var interactionState = state.interactionState;
96
96
  var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, state.primaryToolbarComponents);
97
97
  var hasHadInteraction = interactionState !== 'hasNotHadInteraction';
@@ -64,7 +64,7 @@ var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, cu
64
64
  return !!toolbar || !!customPrimaryToolbarComponents;
65
65
  };
66
66
  var getToolbarComponentsForMarkdownView = function getToolbarComponentsForMarkdownView(components, markdownModeView, isConvertedMarkdownPreview) {
67
- if ((markdownModeView === 'syntax' || markdownModeView === 'preview') && (0, _platformFeatureFlags.fg)('platform_editor_markdown_mode_hide_source_toolbar')) {
67
+ if (markdownModeView === 'syntax' || markdownModeView === 'preview') {
68
68
  // Converted markdown live pages in preview should show full toolbar content
69
69
  // so preference-based docking can work consistently.
70
70
  if (isConvertedMarkdownPreview) {
@@ -92,8 +92,7 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
92
92
  var _states$toolbarState;
93
93
  return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
94
94
  });
95
- var effectiveRuntimeOverride = runtimeOverride !== undefined && (0, _platformFeatureFlags.fg)('platform_editor_toolbar_mode_override') ? runtimeOverride : undefined;
96
- var contextualFormattingEnabled = effectiveRuntimeOverride !== null && effectiveRuntimeOverride !== void 0 ? effectiveRuntimeOverride : editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
95
+ var contextualFormattingEnabled = runtimeOverride !== null && runtimeOverride !== void 0 ? runtimeOverride : editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
97
96
  var markdownModeState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['markdownMode'], function (states) {
98
97
  return states.markdownModeState;
99
98
  });
@@ -13,6 +13,7 @@
13
13
  .cc-1w88a35 .ProseMirror blockquote.danger{background-color:var(--ds-background-danger,#ffeceb);border-left-color:var(--ds-border-danger,#e2483d)}
14
14
  .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node{background:var(--ds-background-accent-blue-subtler,#cfe1fd);border-left-color:var(--ds-border-selected,#1868db);-webkit-user-select:text}.cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node ::selection, .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node::selection{background-color:transparent}.cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node ::-moz-selection, .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node::-moz-selection{background-color:transparent}
15
15
  .cc-2psl3e .ProseMirror blockquote{box-sizing:border-box;color:inherit;width:100%;display:inline-block;padding-top:0;padding-bottom:0;padding-left:var(--ds-space-200,1pc);border-left-width:var(--ds-border-width-selected,2px);border-left-style:solid;border-left-color:var(--ds-border,#0b120e24);margin-top:.75rem;margin-bottom:0;margin-left:0;margin-right:0}.cc-2psl3e .ProseMirror blockquote:first-child{margin-top:0}.cc-2psl3e .ProseMirror blockquote:before{content:""}.cc-2psl3e .ProseMirror blockquote:after{content:none}.cc-2psl3e .ProseMirror blockquote p{display:block}.cc-2psl3e .ProseMirror blockquote table, .cc-2psl3e .ProseMirror blockquote table:last-child{display:inline-table}.cc-2psl3e .ProseMirror blockquote>.code-block:last-child, .cc-2psl3e .ProseMirror blockquote>.mediaGroupView-content-wrap:last-child, .cc-2psl3e .ProseMirror blockquote>.mediaSingleView-content-wrap:last-child{display:block}.cc-2psl3e .ProseMirror blockquote>.extensionView-content-wrap:last-child{display:block}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h1:first-child{margin-top:1.667em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h2:first-child{margin-top:1.8em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h3:first-child{margin-top:2em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h4:first-child{margin-top:1.357em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h5:first-child{margin-top:1.667em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h6:first-child{margin-top:1.455em}.cc-2psl3e .ProseMirror .ProseMirror-gapcursor:first-child+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child, .cc-2psl3e .ProseMirror .ProseMirror-widget:first-child+.ProseMirror-widget:nth-child(2)+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child, .cc-2psl3e .ProseMirror .ProseMirror-widget:first-child+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child{margin-top:0}
16
+ .cc-g0pvon .ProseMirror :is(h1,h2,h3,h4,h5,h6){scroll-margin-top:var(--ds-space-300,24px)}
16
17
  [dir=rtl] .cc-1aoan5v .ProseMirror blockquote{padding-left:0;padding-right:var(--ds-space-200,1pc)}
17
18
  .cc-n5pexl .ak-editor-content-area.appearance-full-page .ProseMirror blockquote{padding-left:var(--ds-space-250,20px)}.cc-n5pexl .ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote{padding-left:var(--ds-space-200,1pc)}
18
19
  .cc-1na1fzg .ProseMirror h1{font:var(--editor-font-ugc-token-heading-h1);margin-bottom:0;margin-top:1.45833em}.cc-1na1fzg .ProseMirror h1 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h2{font:var(--editor-font-ugc-token-heading-h2);margin-bottom:0;margin-top:1.4em}.cc-1na1fzg .ProseMirror h2 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h3{font:var(--editor-font-ugc-token-heading-h3);margin-bottom:0;margin-top:1.31249em}.cc-1na1fzg .ProseMirror h3 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h4{font:var(--editor-font-ugc-token-heading-h4);margin-top:1.25em}.cc-1na1fzg .ProseMirror h4 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h5{font:var(--editor-font-ugc-token-heading-h5);margin-top:1.45833em;text-transform:none}.cc-1na1fzg .ProseMirror h5 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h6{font:var(--editor-font-ugc-token-heading-h6);margin-top:1.59091em;text-transform:none}.cc-1na1fzg .ProseMirror h6 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}
@@ -174,6 +174,7 @@ var editorContentStyles = {
174
174
  blockquoteDangerStyles: "cc-1w88a35",
175
175
  blockquoteSelectedNodeStyles: "cc-pt15wg",
176
176
  blocktypeStyles: "cc-2psl3e",
177
+ headingScrollMarginStyles: "cc-g0pvon",
177
178
  blocktypeStylesRtlBlockquote: "cc-1aoan5v",
178
179
  blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes: "cc-n5pexl",
179
180
  blocktypeStyles_fg_platform_editor_typography_ugc: "cc-1na1fzg",
@@ -408,11 +409,12 @@ var EditorContentContainerCompiled = exports.EditorContentContainerCompiled = /*
408
409
 
409
410
  // Evaluate the block-spacing experiment once per render.
410
411
  var isBlockSpacingEnabled = (0, _expValEquals.expValEquals)('platform_editor_extension_block_spacing', 'isEnabled', true);
412
+ var isFloatingTocEnabled = (0, _expValEquals.expValEquals)('platform_editor_floating_toc', 'isEnabled', true);
411
413
  return /*#__PURE__*/_react.default.createElement("div", {
412
414
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
413
415
  className: (0, _runtime.ax)([editorContentStyles.baseStyles, editorContentStyles.maxModeReizeFixStyles, editorContentStyles.baseStylesMaxContainerWidthFixes, (0, _platformFeatureFlags.fg)('platform_editor_controls_increase_full_page_gutter') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? editorContentStyles.editorLargeGutterPuddingBaseStylesEditorControls : editorContentStyles.editorLargeGutterPuddingBaseStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
414
416
  exposure: true
415
- }) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') && editorContentStyles.placeholderWrapStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
417
+ }) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') && editorContentStyles.placeholderWrapStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, isFloatingTocEnabled && editorContentStyles.headingScrollMarginStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
416
418
  exposure: true
417
419
  }) && editorContentStyles.blockquoteSelectedNodeStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
418
420
  exposure: true
@@ -152,6 +152,7 @@ var EditorContentContainerEmotion = exports.EditorContentContainerEmotion = /*#_
152
152
 
153
153
  // Evaluate the block-spacing experiment once per render.
154
154
  var isBlockSpacingEnabled = (0, _expValEquals.expValEquals)('platform_editor_extension_block_spacing', 'isEnabled', true);
155
+ var isFloatingTocEnabled = (0, _expValEquals.expValEquals)('platform_editor_floating_toc', 'isEnabled', true);
155
156
  return (0, _react2.jsx)("div", {
156
157
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
157
158
  className: className || undefined,
@@ -210,7 +211,9 @@ var EditorContentContainerEmotion = exports.EditorContentContainerEmotion = /*#_
210
211
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
211
212
  (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && _editorUGCTokenStyles.editorUGCSmallText,
212
213
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
213
- _blockTypeStyles.blocktypeStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
214
+ _blockTypeStyles.blocktypeStyles, isFloatingTocEnabled &&
215
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
216
+ _blockTypeStyles.headingScrollMarginStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
214
217
  exposure: true
215
218
  }) &&
216
219
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.textSelectedNodeStyles = exports.textDangerStyles = exports.listSelectedNodeStyles = exports.listDangerStyles = exports.blocktypeStyles_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes = exports.blocktypeStyles = exports.blockquoteSelectedNodeStyles = exports.blockquoteDangerStyles = void 0;
7
+ exports.textSelectedNodeStyles = exports.textDangerStyles = exports.listSelectedNodeStyles = exports.listDangerStyles = exports.headingScrollMarginStyles = exports.blocktypeStyles_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes = exports.blocktypeStyles = exports.blockquoteSelectedNodeStyles = exports.blockquoteDangerStyles = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
@@ -117,6 +117,15 @@ var blocktypeStyles = exports.blocktypeStyles = (0, _react.css)({
117
117
  }
118
118
  }
119
119
  });
120
+ var headingScrollMarginStyles = exports.headingScrollMarginStyles = (0, _react.css)({
121
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
122
+ '.ProseMirror': {
123
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
124
+ '& h1, & h2, & h3, & h4, & h5, & h6': {
125
+ scrollMarginTop: "var(--ds-space-300, 24px)"
126
+ }
127
+ }
128
+ });
120
129
  /**
121
130
  * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
122
131
  * If you need to make changes here, also update the corresponding style in
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
8
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
9
- var version = exports.version = "221.15.1";
9
+ var version = exports.version = "221.16.1";
@@ -72,7 +72,7 @@ export const FullPageEditor = props => {
72
72
  // (no PM selection to anchor a floating toolbar to). The user's docking
73
73
  // pref alone is not enough to decide whether to mount the primary toolbar
74
74
  // in that case — the override has to short-circuit the hide gate below.
75
- const forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned' && fg('platform_editor_toolbar_mode_override');
75
+ const forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned';
76
76
  const interactionState = state.interactionState;
77
77
  const primaryToolbarState = getPrimaryToolbarComponents(editorAPI, state.primaryToolbarComponents);
78
78
  const hasHadInteraction = interactionState !== 'hasNotHadInteraction';
@@ -58,7 +58,7 @@ const shouldShowToolbarContainer = (toolbar, customPrimaryToolbarComponents) =>
58
58
  return !!toolbar || !!customPrimaryToolbarComponents;
59
59
  };
60
60
  const getToolbarComponentsForMarkdownView = (components, markdownModeView, isConvertedMarkdownPreview) => {
61
- if ((markdownModeView === 'syntax' || markdownModeView === 'preview') && fg('platform_editor_markdown_mode_hide_source_toolbar')) {
61
+ if (markdownModeView === 'syntax' || markdownModeView === 'preview') {
62
62
  // Converted markdown live pages in preview should show full toolbar content
63
63
  // so preference-based docking can work consistently.
64
64
  if (isConvertedMarkdownPreview) {
@@ -85,8 +85,7 @@ export const FullPageToolbarNext = ({
85
85
  var _states$toolbarState;
86
86
  return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
87
87
  });
88
- const effectiveRuntimeOverride = runtimeOverride !== undefined && fg('platform_editor_toolbar_mode_override') ? runtimeOverride : undefined;
89
- const contextualFormattingEnabled = effectiveRuntimeOverride !== null && effectiveRuntimeOverride !== void 0 ? effectiveRuntimeOverride : editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
88
+ const contextualFormattingEnabled = runtimeOverride !== null && runtimeOverride !== void 0 ? runtimeOverride : editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
90
89
  const markdownModeState = useSharedPluginStateWithSelector(editorAPI, ['markdownMode'], states => states.markdownModeState);
91
90
  const isLivePage = markdownModeState === null || markdownModeState === void 0 ? void 0 : markdownModeState.isLivePage;
92
91
  const isMarkdownMode = markdownModeState === null || markdownModeState === void 0 ? void 0 : markdownModeState.isMarkdownMode;
@@ -13,6 +13,7 @@
13
13
  .cc-1w88a35 .ProseMirror blockquote.danger{background-color:var(--ds-background-danger,#ffeceb);border-left-color:var(--ds-border-danger,#e2483d)}
14
14
  .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node{background:var(--ds-background-accent-blue-subtler,#cfe1fd);border-left-color:var(--ds-border-selected,#1868db);-webkit-user-select:text}.cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node ::selection, .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node::selection{background-color:transparent}.cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node ::-moz-selection, .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node::-moz-selection{background-color:transparent}
15
15
  .cc-2psl3e .ProseMirror blockquote{box-sizing:border-box;color:inherit;width:100%;display:inline-block;padding-top:0;padding-bottom:0;padding-left:var(--ds-space-200,1pc);border-left-width:var(--ds-border-width-selected,2px);border-left-style:solid;border-left-color:var(--ds-border,#0b120e24);margin-top:.75rem;margin-bottom:0;margin-left:0;margin-right:0}.cc-2psl3e .ProseMirror blockquote:first-child{margin-top:0}.cc-2psl3e .ProseMirror blockquote:before{content:""}.cc-2psl3e .ProseMirror blockquote:after{content:none}.cc-2psl3e .ProseMirror blockquote p{display:block}.cc-2psl3e .ProseMirror blockquote table, .cc-2psl3e .ProseMirror blockquote table:last-child{display:inline-table}.cc-2psl3e .ProseMirror blockquote>.code-block:last-child, .cc-2psl3e .ProseMirror blockquote>.mediaGroupView-content-wrap:last-child, .cc-2psl3e .ProseMirror blockquote>.mediaSingleView-content-wrap:last-child{display:block}.cc-2psl3e .ProseMirror blockquote>.extensionView-content-wrap:last-child{display:block}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h1:first-child{margin-top:1.667em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h2:first-child{margin-top:1.8em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h3:first-child{margin-top:2em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h4:first-child{margin-top:1.357em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h5:first-child{margin-top:1.667em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h6:first-child{margin-top:1.455em}.cc-2psl3e .ProseMirror .ProseMirror-gapcursor:first-child+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child, .cc-2psl3e .ProseMirror .ProseMirror-widget:first-child+.ProseMirror-widget:nth-child(2)+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child, .cc-2psl3e .ProseMirror .ProseMirror-widget:first-child+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child{margin-top:0}
16
+ .cc-g0pvon .ProseMirror :is(h1,h2,h3,h4,h5,h6){scroll-margin-top:var(--ds-space-300,24px)}
16
17
  [dir=rtl] .cc-1aoan5v .ProseMirror blockquote{padding-left:0;padding-right:var(--ds-space-200,1pc)}
17
18
  .cc-n5pexl .ak-editor-content-area.appearance-full-page .ProseMirror blockquote{padding-left:var(--ds-space-250,20px)}.cc-n5pexl .ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote{padding-left:var(--ds-space-200,1pc)}
18
19
  .cc-1na1fzg .ProseMirror h1{font:var(--editor-font-ugc-token-heading-h1);margin-bottom:0;margin-top:1.45833em}.cc-1na1fzg .ProseMirror h1 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h2{font:var(--editor-font-ugc-token-heading-h2);margin-bottom:0;margin-top:1.4em}.cc-1na1fzg .ProseMirror h2 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h3{font:var(--editor-font-ugc-token-heading-h3);margin-bottom:0;margin-top:1.31249em}.cc-1na1fzg .ProseMirror h3 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h4{font:var(--editor-font-ugc-token-heading-h4);margin-top:1.25em}.cc-1na1fzg .ProseMirror h4 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h5{font:var(--editor-font-ugc-token-heading-h5);margin-top:1.45833em;text-transform:none}.cc-1na1fzg .ProseMirror h5 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h6{font:var(--editor-font-ugc-token-heading-h6);margin-top:1.59091em;text-transform:none}.cc-1na1fzg .ProseMirror h6 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}
@@ -225,6 +225,7 @@ const editorContentStyles = {
225
225
  blockquoteDangerStyles: "cc-1w88a35",
226
226
  blockquoteSelectedNodeStyles: "cc-pt15wg",
227
227
  blocktypeStyles: "cc-2psl3e",
228
+ headingScrollMarginStyles: "cc-g0pvon",
228
229
  blocktypeStylesRtlBlockquote: "cc-1aoan5v",
229
230
  blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes: "cc-n5pexl",
230
231
  blocktypeStyles_fg_platform_editor_typography_ugc: "cc-1na1fzg",
@@ -465,11 +466,12 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
465
466
 
466
467
  // Evaluate the block-spacing experiment once per render.
467
468
  const isBlockSpacingEnabled = expValEquals('platform_editor_extension_block_spacing', 'isEnabled', true);
469
+ const isFloatingTocEnabled = expValEquals('platform_editor_floating_toc', 'isEnabled', true);
468
470
  return /*#__PURE__*/React.createElement("div", {
469
471
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
470
472
  className: ax([editorContentStyles.baseStyles, editorContentStyles.maxModeReizeFixStyles, editorContentStyles.baseStylesMaxContainerWidthFixes, fg('platform_editor_controls_increase_full_page_gutter') && editorExperiment('platform_editor_controls', 'variant1') ? editorContentStyles.editorLargeGutterPuddingBaseStylesEditorControls : editorContentStyles.editorLargeGutterPuddingBaseStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true, {
471
473
  exposure: true
472
- }) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') && editorContentStyles.placeholderWrapStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, editorExperiment('platform_editor_block_menu', true, {
474
+ }) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') && editorContentStyles.placeholderWrapStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, isFloatingTocEnabled && editorContentStyles.headingScrollMarginStyles, editorExperiment('platform_editor_block_menu', true, {
473
475
  exposure: true
474
476
  }) && editorContentStyles.blockquoteSelectedNodeStyles, editorExperiment('platform_editor_block_menu', true, {
475
477
  exposure: true
@@ -23,7 +23,7 @@ import { backgroundColorStyles, highlightLinksUnsetStyles, textHighlightPaddingS
23
23
  import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles, maxModeReizeFixStyles } from './styles/baseStyles';
24
24
  import { blockMarksStyles } from './styles/blockMarksStyles';
25
25
  import { blockSpacingVarScaledStyles, blockSpacingVarStyles } from './styles/blockSpacingStyles';
26
- import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
26
+ import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, headingScrollMarginStyles, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
27
27
  import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
28
28
  import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
29
29
  import { commentEditorStyles } from './styles/commentEditorStyles';
@@ -156,6 +156,7 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
156
156
 
157
157
  // Evaluate the block-spacing experiment once per render.
158
158
  const isBlockSpacingEnabled = expValEquals('platform_editor_extension_block_spacing', 'isEnabled', true);
159
+ const isFloatingTocEnabled = expValEquals('platform_editor_floating_toc', 'isEnabled', true);
159
160
  return jsx("div", {
160
161
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
161
162
  className: className || undefined,
@@ -214,7 +215,9 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
214
215
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
215
216
  expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorUGCSmallText,
216
217
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
217
- blocktypeStyles, editorExperiment('platform_editor_block_menu', true, {
218
+ blocktypeStyles, isFloatingTocEnabled &&
219
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
220
+ headingScrollMarginStyles, editorExperiment('platform_editor_block_menu', true, {
218
221
  exposure: true
219
222
  }) &&
220
223
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -108,6 +108,15 @@ export const blocktypeStyles = css({
108
108
  }
109
109
  }
110
110
  });
111
+ export const headingScrollMarginStyles = css({
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
113
+ '.ProseMirror': {
114
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
115
+ '& h1, & h2, & h3, & h4, & h5, & h6': {
116
+ scrollMarginTop: "var(--ds-space-300, 24px)"
117
+ }
118
+ }
119
+ });
111
120
  /**
112
121
  * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
113
122
  * If you need to make changes here, also update the corresponding style in
@@ -1,3 +1,3 @@
1
1
  export const name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export const version = "221.15.1";
3
+ export const version = "221.16.1";
@@ -82,7 +82,7 @@ export var FullPageEditor = function FullPageEditor(props) {
82
82
  // (no PM selection to anchor a floating toolbar to). The user's docking
83
83
  // pref alone is not enough to decide whether to mount the primary toolbar
84
84
  // in that case — the override has to short-circuit the hide gate below.
85
- var forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned' && fg('platform_editor_toolbar_mode_override');
85
+ var forcePrimaryToolbarPinned = state.contextualFormattingModeOverride === 'always-pinned';
86
86
  var interactionState = state.interactionState;
87
87
  var primaryToolbarState = getPrimaryToolbarComponents(editorAPI, state.primaryToolbarComponents);
88
88
  var hasHadInteraction = interactionState !== 'hasNotHadInteraction';
@@ -55,7 +55,7 @@ var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, cu
55
55
  return !!toolbar || !!customPrimaryToolbarComponents;
56
56
  };
57
57
  var getToolbarComponentsForMarkdownView = function getToolbarComponentsForMarkdownView(components, markdownModeView, isConvertedMarkdownPreview) {
58
- if ((markdownModeView === 'syntax' || markdownModeView === 'preview') && fg('platform_editor_markdown_mode_hide_source_toolbar')) {
58
+ if (markdownModeView === 'syntax' || markdownModeView === 'preview') {
59
59
  // Converted markdown live pages in preview should show full toolbar content
60
60
  // so preference-based docking can work consistently.
61
61
  if (isConvertedMarkdownPreview) {
@@ -83,8 +83,7 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
83
83
  var _states$toolbarState;
84
84
  return (_states$toolbarState = states.toolbarState) === null || _states$toolbarState === void 0 ? void 0 : _states$toolbarState.contextualFormattingModeOverride;
85
85
  });
86
- var effectiveRuntimeOverride = runtimeOverride !== undefined && fg('platform_editor_toolbar_mode_override') ? runtimeOverride : undefined;
87
- var contextualFormattingEnabled = effectiveRuntimeOverride !== null && effectiveRuntimeOverride !== void 0 ? effectiveRuntimeOverride : editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
86
+ var contextualFormattingEnabled = runtimeOverride !== null && runtimeOverride !== void 0 ? runtimeOverride : editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar2 = editorAPI.toolbar) === null || _editorAPI$toolbar2 === void 0 ? void 0 : _editorAPI$toolbar2.actions.contextualFormattingMode();
88
87
  var markdownModeState = useSharedPluginStateWithSelector(editorAPI, ['markdownMode'], function (states) {
89
88
  return states.markdownModeState;
90
89
  });
@@ -13,6 +13,7 @@
13
13
  .cc-1w88a35 .ProseMirror blockquote.danger{background-color:var(--ds-background-danger,#ffeceb);border-left-color:var(--ds-border-danger,#e2483d)}
14
14
  .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node{background:var(--ds-background-accent-blue-subtler,#cfe1fd);border-left-color:var(--ds-border-selected,#1868db);-webkit-user-select:text}.cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node ::selection, .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node::selection{background-color:transparent}.cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node ::-moz-selection, .cc-pt15wg .ProseMirror blockquote.ak-editor-selected-node::-moz-selection{background-color:transparent}
15
15
  .cc-2psl3e .ProseMirror blockquote{box-sizing:border-box;color:inherit;width:100%;display:inline-block;padding-top:0;padding-bottom:0;padding-left:var(--ds-space-200,1pc);border-left-width:var(--ds-border-width-selected,2px);border-left-style:solid;border-left-color:var(--ds-border,#0b120e24);margin-top:.75rem;margin-bottom:0;margin-left:0;margin-right:0}.cc-2psl3e .ProseMirror blockquote:first-child{margin-top:0}.cc-2psl3e .ProseMirror blockquote:before{content:""}.cc-2psl3e .ProseMirror blockquote:after{content:none}.cc-2psl3e .ProseMirror blockquote p{display:block}.cc-2psl3e .ProseMirror blockquote table, .cc-2psl3e .ProseMirror blockquote table:last-child{display:inline-table}.cc-2psl3e .ProseMirror blockquote>.code-block:last-child, .cc-2psl3e .ProseMirror blockquote>.mediaGroupView-content-wrap:last-child, .cc-2psl3e .ProseMirror blockquote>.mediaSingleView-content-wrap:last-child{display:block}.cc-2psl3e .ProseMirror blockquote>.extensionView-content-wrap:last-child{display:block}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h1:first-child{margin-top:1.667em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h2:first-child{margin-top:1.8em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h3:first-child{margin-top:2em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h4:first-child{margin-top:1.357em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h5:first-child{margin-top:1.667em}.cc-2psl3e .ProseMirror .fabric-editor-block-mark.fabric-editor-alignment:not(:first-child)>h6:first-child{margin-top:1.455em}.cc-2psl3e .ProseMirror .ProseMirror-gapcursor:first-child+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child, .cc-2psl3e .ProseMirror .ProseMirror-widget:first-child+.ProseMirror-widget:nth-child(2)+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child, .cc-2psl3e .ProseMirror .ProseMirror-widget:first-child+.fabric-editor-block-mark.fabric-editor-alignment>:is(h1,h2,h3,h4,h5,h6):first-child{margin-top:0}
16
+ .cc-g0pvon .ProseMirror :is(h1,h2,h3,h4,h5,h6){scroll-margin-top:var(--ds-space-300,24px)}
16
17
  [dir=rtl] .cc-1aoan5v .ProseMirror blockquote{padding-left:0;padding-right:var(--ds-space-200,1pc)}
17
18
  .cc-n5pexl .ak-editor-content-area.appearance-full-page .ProseMirror blockquote{padding-left:var(--ds-space-250,20px)}.cc-n5pexl .ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote{padding-left:var(--ds-space-200,1pc)}
18
19
  .cc-1na1fzg .ProseMirror h1{font:var(--editor-font-ugc-token-heading-h1);margin-bottom:0;margin-top:1.45833em}.cc-1na1fzg .ProseMirror h1 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h2{font:var(--editor-font-ugc-token-heading-h2);margin-bottom:0;margin-top:1.4em}.cc-1na1fzg .ProseMirror h2 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h3{font:var(--editor-font-ugc-token-heading-h3);margin-bottom:0;margin-top:1.31249em}.cc-1na1fzg .ProseMirror h3 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h4{font:var(--editor-font-ugc-token-heading-h4);margin-top:1.25em}.cc-1na1fzg .ProseMirror h4 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h5{font:var(--editor-font-ugc-token-heading-h5);margin-top:1.45833em;text-transform:none}.cc-1na1fzg .ProseMirror h5 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}.cc-1na1fzg .ProseMirror h6{font:var(--editor-font-ugc-token-heading-h6);margin-top:1.59091em;text-transform:none}.cc-1na1fzg .ProseMirror h6 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}
@@ -173,6 +173,7 @@ var editorContentStyles = {
173
173
  blockquoteDangerStyles: "cc-1w88a35",
174
174
  blockquoteSelectedNodeStyles: "cc-pt15wg",
175
175
  blocktypeStyles: "cc-2psl3e",
176
+ headingScrollMarginStyles: "cc-g0pvon",
176
177
  blocktypeStylesRtlBlockquote: "cc-1aoan5v",
177
178
  blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes: "cc-n5pexl",
178
179
  blocktypeStyles_fg_platform_editor_typography_ugc: "cc-1na1fzg",
@@ -407,11 +408,12 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
407
408
 
408
409
  // Evaluate the block-spacing experiment once per render.
409
410
  var isBlockSpacingEnabled = expValEquals('platform_editor_extension_block_spacing', 'isEnabled', true);
411
+ var isFloatingTocEnabled = expValEquals('platform_editor_floating_toc', 'isEnabled', true);
410
412
  return /*#__PURE__*/React.createElement("div", {
411
413
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
412
414
  className: ax([editorContentStyles.baseStyles, editorContentStyles.maxModeReizeFixStyles, editorContentStyles.baseStylesMaxContainerWidthFixes, fg('platform_editor_controls_increase_full_page_gutter') && editorExperiment('platform_editor_controls', 'variant1') ? editorContentStyles.editorLargeGutterPuddingBaseStylesEditorControls : editorContentStyles.editorLargeGutterPuddingBaseStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true, {
413
415
  exposure: true
414
- }) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') && editorContentStyles.placeholderWrapStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, editorExperiment('platform_editor_block_menu', true, {
416
+ }) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') && editorContentStyles.placeholderWrapStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, isFloatingTocEnabled && editorContentStyles.headingScrollMarginStyles, editorExperiment('platform_editor_block_menu', true, {
415
417
  exposure: true
416
418
  }) && editorContentStyles.blockquoteSelectedNodeStyles, editorExperiment('platform_editor_block_menu', true, {
417
419
  exposure: true
@@ -26,7 +26,7 @@ import { backgroundColorStyles, highlightLinksUnsetStyles, textHighlightPaddingS
26
26
  import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles, maxModeReizeFixStyles } from './styles/baseStyles';
27
27
  import { blockMarksStyles } from './styles/blockMarksStyles';
28
28
  import { blockSpacingVarScaledStyles, blockSpacingVarStyles } from './styles/blockSpacingStyles';
29
- import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
29
+ import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, headingScrollMarginStyles, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
30
30
  import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
31
31
  import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
32
32
  import { commentEditorStyles } from './styles/commentEditorStyles';
@@ -149,6 +149,7 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
149
149
 
150
150
  // Evaluate the block-spacing experiment once per render.
151
151
  var isBlockSpacingEnabled = expValEquals('platform_editor_extension_block_spacing', 'isEnabled', true);
152
+ var isFloatingTocEnabled = expValEquals('platform_editor_floating_toc', 'isEnabled', true);
152
153
  return jsx("div", {
153
154
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
154
155
  className: className || undefined,
@@ -207,7 +208,9 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
207
208
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
208
209
  expValEquals('platform_editor_small_font_size', 'isEnabled', true) && editorUGCSmallText,
209
210
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
210
- blocktypeStyles, editorExperiment('platform_editor_block_menu', true, {
211
+ blocktypeStyles, isFloatingTocEnabled &&
212
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
213
+ headingScrollMarginStyles, editorExperiment('platform_editor_block_menu', true, {
211
214
  exposure: true
212
215
  }) &&
213
216
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -109,6 +109,15 @@ export var blocktypeStyles = css({
109
109
  }
110
110
  }
111
111
  });
112
+ export var headingScrollMarginStyles = css({
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
114
+ '.ProseMirror': {
115
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
116
+ '& h1, & h2, & h3, & h4, & h5, & h6': {
117
+ scrollMarginTop: "var(--ds-space-300, 24px)"
118
+ }
119
+ }
120
+ });
112
121
  /**
113
122
  * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
114
123
  * If you need to make changes here, also update the corresponding style in
@@ -1,3 +1,3 @@
1
1
  export var name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export var version = "221.15.1";
3
+ export var version = "221.16.1";
@@ -6,6 +6,7 @@ import type { SerializedStyles } from '@emotion/react';
6
6
  * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
7
7
  */
8
8
  export declare const blocktypeStyles: SerializedStyles;
9
+ export declare const headingScrollMarginStyles: SerializedStyles;
9
10
  /**
10
11
  * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
11
12
  * If you need to make changes here, also update the corresponding style in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "221.16.0",
3
+ "version": "221.16.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,13 +61,13 @@
61
61
  "@atlaskit/icon": "^37.2.0",
62
62
  "@atlaskit/link": "^4.3.0",
63
63
  "@atlaskit/media-card": "^81.4.0",
64
- "@atlaskit/mention": "^27.11.0",
64
+ "@atlaskit/mention": "^27.12.0",
65
65
  "@atlaskit/platform-feature-flags": "^2.1.0",
66
66
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
67
67
  "@atlaskit/react-compiler-gating": "^0.2.0",
68
68
  "@atlaskit/react-ufo": "^7.3.0",
69
69
  "@atlaskit/task-decision": "^21.8.0",
70
- "@atlaskit/tmp-editor-statsig": "^135.2.0",
70
+ "@atlaskit/tmp-editor-statsig": "^135.6.0",
71
71
  "@atlaskit/tokens": "^16.3.0",
72
72
  "@atlaskit/tooltip": "^23.2.0",
73
73
  "@atlaskit/width-detector": "^6.2.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^3.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^116.43.0",
88
+ "@atlaskit/editor-common": "^116.44.0",
89
89
  "@atlaskit/link-provider": "^5.2.0",
90
90
  "@atlaskit/media-core": "^38.0.0",
91
91
  "react": "^18.2.0",
@@ -122,12 +122,12 @@
122
122
  "@atlassian/a11y-jest-testing": "^0.13.0",
123
123
  "@atlassian/a11y-playwright-testing": "^0.10.0",
124
124
  "@atlassian/adf-schema-json": "^1.33.0",
125
- "@atlassian/editor-rovo-bridge": "^10.14.0",
125
+ "@atlassian/editor-rovo-bridge": "^10.15.0",
126
126
  "@atlassian/feature-flags-test-utils": "^1.2.0",
127
- "@atlassian/search-client": "^2.6.0",
127
+ "@atlassian/search-client": "^2.8.0",
128
128
  "@atlassian/search-provider": "^13.1.0",
129
129
  "@atlassian/structured-docs-types": "workspace:^",
130
- "@atlassian/user-profile-card": "^1.25.0",
130
+ "@atlassian/user-profile-card": "^1.26.0",
131
131
  "@emotion/jest": "^11.8.0",
132
132
  "@testing-library/react": "^16.3.0",
133
133
  "@types/diff": "^5.0.2",
@@ -191,12 +191,6 @@
191
191
  "platform_editor_table_nested_renderer_fix": {
192
192
  "type": "boolean"
193
193
  },
194
- "platform_editor_toolbar_mode_override": {
195
- "type": "boolean"
196
- },
197
- "platform_editor_markdown_mode_hide_source_toolbar": {
198
- "type": "boolean"
199
- },
200
194
  "platform_editor_markdown_patch_m3": {
201
195
  "type": "boolean"
202
196
  },