@atlaskit/editor-core 203.17.3 → 203.18.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,28 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 203.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#116013](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116013)
8
+ [`18e022766bfd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/18e022766bfd3) -
9
+ [ux] ED-26464 Hiding primary toolbar and docking contextual toolbar items to top
10
+
11
+ ### Patch Changes
12
+
13
+ - [#115715](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115715)
14
+ [`cdfc0912cc98c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cdfc0912cc98c) -
15
+ ED-26650 LCM: Add feature flag hard coded into the legacy content macro so that it can be passed
16
+ down as a prop when the editor is created and prevent it from enabling render tracking. The LCM
17
+ was firing too many re-render events. We're aware it's an issue, but for now we want to stop the
18
+ event spam.
19
+
20
+ ## 203.17.4
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 203.17.3
4
27
 
5
28
  ### Patch Changes
@@ -54,7 +54,8 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
54
54
  var featureFlags = (0, _featureFlagsFromProps.createFeatureFlagsFromProps)(props.featureFlags);
55
55
 
56
56
  // Render tracking is firing too many events in Jira so we are disabling them for now. See - https://product-fabric.atlassian.net/browse/ED-25616
57
- var renderTrackingEnabled = !(0, _platformFeatureFlags.fg)('platform_editor_disable_rerender_tracking_jira');
57
+ // Also firing too many events for the legacy content macro, so disabling for now. See - https://product-fabric.atlassian.net/browse/ED-26650
58
+ var renderTrackingEnabled = (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') ? !(0, _platformFeatureFlags.fg)('platform_editor_disable_rerender_tracking_jira') && !featureFlags.lcmPreventRenderTracking : !(0, _platformFeatureFlags.fg)('platform_editor_disable_rerender_tracking_jira');
58
59
  var useShallow = false;
59
60
  var _usePortalProvider = (0, _portal.usePortalProvider)(),
60
61
  _usePortalProvider2 = (0, _slicedToArray2.default)(_usePortalProvider, 2),
@@ -566,13 +566,22 @@ function ReactEditorView(props) {
566
566
  // We should follow-up
567
567
  // eslint-disable-next-line react-hooks/exhaustive-deps
568
568
  [props.editorProps.assistiveLabel, props.editorProps.assistiveDescribedBy]);
569
+
570
+ // Render tracking firing too many events for the legacy content macro. We're aware of the re-render issue, but disabling this for now. See - https://product-fabric.atlassian.net/browse/ED-26650
571
+ var renderTrackingEnabled = !featureFlags.lcmPreventRenderTracking;
569
572
  return /*#__PURE__*/_react.default.createElement(_uiReact.ReactEditorViewContext.Provider, {
570
573
  value: {
571
574
  editorRef: editorRef,
572
575
  editorView: viewRef.current,
573
576
  popupsMountPoint: props.editorProps.popupsMountPoint
574
577
  }
575
- }, /*#__PURE__*/_react.default.createElement(_RenderTracking.RenderTracking, {
578
+ }, (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') ? renderTrackingEnabled && /*#__PURE__*/_react.default.createElement(_RenderTracking.RenderTracking, {
579
+ componentProps: props,
580
+ action: _analytics.ACTION.RE_RENDERED,
581
+ actionSubject: _analytics.ACTION_SUBJECT.REACT_EDITOR_VIEW,
582
+ handleAnalyticsEvent: handleAnalyticsEvent,
583
+ useShallow: true
584
+ }) : /*#__PURE__*/_react.default.createElement(_RenderTracking.RenderTracking, {
576
585
  componentProps: props,
577
586
  action: _analytics.ACTION.RE_RENDERED,
578
587
  actionSubject: _analytics.ACTION_SUBJECT.REACT_EDITOR_VIEW,
@@ -12,6 +12,7 @@ var _react2 = require("@emotion/react");
12
12
  var _browser = require("@atlaskit/editor-common/browser");
13
13
  var _hooks = require("@atlaskit/editor-common/hooks");
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
+ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
15
16
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
17
  var _FullPageContentArea = require("./FullPageContentArea");
17
18
  var _FullPageToolbar = require("./FullPageToolbar");
@@ -54,6 +55,15 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
54
55
  }, [contentAreaRef]);
55
56
  return showKeyline;
56
57
  };
58
+ var hasCustomComponents = function hasCustomComponents(components) {
59
+ if (!components) {
60
+ return false;
61
+ }
62
+ if ('before' in components) {
63
+ return Array.isArray(components.before) && components.before.length > 0 || !!components.before || Array.isArray(components.after) && components.after.length > 0 || !!components.after;
64
+ }
65
+ return true;
66
+ };
57
67
  var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
58
68
  var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
59
69
  var wrapperElementRef = (0, _react.useMemo)(function () {
@@ -65,6 +75,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
65
75
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['editorViewMode', 'primaryToolbar']),
66
76
  editorViewModeState = _useSharedPluginState.editorViewModeState,
67
77
  primaryToolbarState = _useSharedPluginState.primaryToolbarState;
78
+ var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
68
79
  var primaryToolbarComponents = props.primaryToolbarComponents;
69
80
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
70
81
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
@@ -87,6 +98,15 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
87
98
  }
88
99
  }
89
100
  }
101
+ var customPrimaryToolbarComponents = props.customPrimaryToolbarComponents;
102
+ if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
103
+ exposure: true
104
+ })) {
105
+ primaryToolbarComponents = [];
106
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
107
+ isEditorToolbarHidden = true;
108
+ }
109
+ }
90
110
  var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
91
111
  return (0, _react2.jsx)(_ui.ContextPanelWidthProvider, null, (0, _react2.jsx)("div", {
92
112
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "203.17.3";
8
+ var version = exports.version = "203.18.0";
@@ -48,7 +48,8 @@ export const EditorInternal = /*#__PURE__*/memo(({
48
48
  const featureFlags = createFeatureFlagsFromProps(props.featureFlags);
49
49
 
50
50
  // Render tracking is firing too many events in Jira so we are disabling them for now. See - https://product-fabric.atlassian.net/browse/ED-25616
51
- const renderTrackingEnabled = !fg('platform_editor_disable_rerender_tracking_jira');
51
+ // Also firing too many events for the legacy content macro, so disabling for now. See - https://product-fabric.atlassian.net/browse/ED-26650
52
+ const renderTrackingEnabled = fg('platform_editor_legacy_content_macro') ? !fg('platform_editor_disable_rerender_tracking_jira') && !featureFlags.lcmPreventRenderTracking : !fg('platform_editor_disable_rerender_tracking_jira');
52
53
  const useShallow = false;
53
54
  const [portalProviderAPI, PortalRenderer] = usePortalProvider();
54
55
  const [nodeViewPortalProviderAPI, NodeViewPortalRenderer] = usePortalProvider();
@@ -534,13 +534,22 @@ export function ReactEditorView(props) {
534
534
  // We should follow-up
535
535
  // eslint-disable-next-line react-hooks/exhaustive-deps
536
536
  [props.editorProps.assistiveLabel, props.editorProps.assistiveDescribedBy]);
537
+
538
+ // Render tracking firing too many events for the legacy content macro. We're aware of the re-render issue, but disabling this for now. See - https://product-fabric.atlassian.net/browse/ED-26650
539
+ const renderTrackingEnabled = !featureFlags.lcmPreventRenderTracking;
537
540
  return /*#__PURE__*/React.createElement(ReactEditorViewContext.Provider, {
538
541
  value: {
539
542
  editorRef: editorRef,
540
543
  editorView: viewRef.current,
541
544
  popupsMountPoint: props.editorProps.popupsMountPoint
542
545
  }
543
- }, /*#__PURE__*/React.createElement(RenderTracking, {
546
+ }, fg('platform_editor_legacy_content_macro') ? renderTrackingEnabled && /*#__PURE__*/React.createElement(RenderTracking, {
547
+ componentProps: props,
548
+ action: ACTION.RE_RENDERED,
549
+ actionSubject: ACTION_SUBJECT.REACT_EDITOR_VIEW,
550
+ handleAnalyticsEvent: handleAnalyticsEvent,
551
+ useShallow: true
552
+ }) : /*#__PURE__*/React.createElement(RenderTracking, {
544
553
  componentProps: props,
545
554
  action: ACTION.RE_RENDERED,
546
555
  actionSubject: ACTION_SUBJECT.REACT_EDITOR_VIEW,
@@ -5,10 +5,11 @@
5
5
  import React, { useEffect, useMemo, useRef, useState } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx, css } from '@emotion/react';
8
+ import { css, jsx } from '@emotion/react';
9
9
  import { browser } from '@atlaskit/editor-common/browser';
10
10
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
11
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
12
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
12
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import { FullPageContentArea } from './FullPageContentArea';
14
15
  import { FullPageToolbar } from './FullPageToolbar';
@@ -37,6 +38,15 @@ const useShowKeyline = contentAreaRef => {
37
38
  }, [contentAreaRef]);
38
39
  return showKeyline;
39
40
  };
41
+ const hasCustomComponents = components => {
42
+ if (!components) {
43
+ return false;
44
+ }
45
+ if ('before' in components) {
46
+ return Array.isArray(components.before) && components.before.length > 0 || !!components.before || Array.isArray(components.after) && components.after.length > 0 || !!components.after;
47
+ }
48
+ return true;
49
+ };
40
50
  export const FullPageEditor = props => {
41
51
  var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
42
52
  const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
@@ -47,6 +57,7 @@ export const FullPageEditor = props => {
47
57
  editorViewModeState,
48
58
  primaryToolbarState
49
59
  } = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']);
60
+ const toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
50
61
  let primaryToolbarComponents = props.primaryToolbarComponents;
51
62
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
52
63
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
@@ -69,6 +80,17 @@ export const FullPageEditor = props => {
69
80
  }
70
81
  }
71
82
  }
83
+ const {
84
+ customPrimaryToolbarComponents
85
+ } = props;
86
+ if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
87
+ exposure: true
88
+ })) {
89
+ primaryToolbarComponents = [];
90
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
91
+ isEditorToolbarHidden = true;
92
+ }
93
+ }
72
94
  const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
73
95
  return jsx(ContextPanelWidthProvider, null, jsx("div", {
74
96
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "203.17.3";
2
+ export const version = "203.18.0";
@@ -50,7 +50,8 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
50
50
  var featureFlags = createFeatureFlagsFromProps(props.featureFlags);
51
51
 
52
52
  // Render tracking is firing too many events in Jira so we are disabling them for now. See - https://product-fabric.atlassian.net/browse/ED-25616
53
- var renderTrackingEnabled = !fg('platform_editor_disable_rerender_tracking_jira');
53
+ // Also firing too many events for the legacy content macro, so disabling for now. See - https://product-fabric.atlassian.net/browse/ED-26650
54
+ var renderTrackingEnabled = fg('platform_editor_legacy_content_macro') ? !fg('platform_editor_disable_rerender_tracking_jira') && !featureFlags.lcmPreventRenderTracking : !fg('platform_editor_disable_rerender_tracking_jira');
54
55
  var useShallow = false;
55
56
  var _usePortalProvider = usePortalProvider(),
56
57
  _usePortalProvider2 = _slicedToArray(_usePortalProvider, 2),
@@ -555,13 +555,22 @@ export function ReactEditorView(props) {
555
555
  // We should follow-up
556
556
  // eslint-disable-next-line react-hooks/exhaustive-deps
557
557
  [props.editorProps.assistiveLabel, props.editorProps.assistiveDescribedBy]);
558
+
559
+ // Render tracking firing too many events for the legacy content macro. We're aware of the re-render issue, but disabling this for now. See - https://product-fabric.atlassian.net/browse/ED-26650
560
+ var renderTrackingEnabled = !featureFlags.lcmPreventRenderTracking;
558
561
  return /*#__PURE__*/React.createElement(ReactEditorViewContext.Provider, {
559
562
  value: {
560
563
  editorRef: editorRef,
561
564
  editorView: viewRef.current,
562
565
  popupsMountPoint: props.editorProps.popupsMountPoint
563
566
  }
564
- }, /*#__PURE__*/React.createElement(RenderTracking, {
567
+ }, fg('platform_editor_legacy_content_macro') ? renderTrackingEnabled && /*#__PURE__*/React.createElement(RenderTracking, {
568
+ componentProps: props,
569
+ action: ACTION.RE_RENDERED,
570
+ actionSubject: ACTION_SUBJECT.REACT_EDITOR_VIEW,
571
+ handleAnalyticsEvent: handleAnalyticsEvent,
572
+ useShallow: true
573
+ }) : /*#__PURE__*/React.createElement(RenderTracking, {
565
574
  componentProps: props,
566
575
  action: ACTION.RE_RENDERED,
567
576
  actionSubject: ACTION_SUBJECT.REACT_EDITOR_VIEW,
@@ -6,10 +6,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
6
  import React, { useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx, css } from '@emotion/react';
9
+ import { css, jsx } from '@emotion/react';
10
10
  import { browser } from '@atlaskit/editor-common/browser';
11
11
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
12
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
13
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
13
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
15
  import { FullPageContentArea } from './FullPageContentArea';
15
16
  import { FullPageToolbar } from './FullPageToolbar';
@@ -43,6 +44,15 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
43
44
  }, [contentAreaRef]);
44
45
  return showKeyline;
45
46
  };
47
+ var hasCustomComponents = function hasCustomComponents(components) {
48
+ if (!components) {
49
+ return false;
50
+ }
51
+ if ('before' in components) {
52
+ return Array.isArray(components.before) && components.before.length > 0 || !!components.before || Array.isArray(components.after) && components.after.length > 0 || !!components.after;
53
+ }
54
+ return true;
55
+ };
46
56
  export var FullPageEditor = function FullPageEditor(props) {
47
57
  var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
48
58
  var wrapperElementRef = useMemo(function () {
@@ -54,6 +64,7 @@ export var FullPageEditor = function FullPageEditor(props) {
54
64
  var _useSharedPluginState = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']),
55
65
  editorViewModeState = _useSharedPluginState.editorViewModeState,
56
66
  primaryToolbarState = _useSharedPluginState.primaryToolbarState;
67
+ var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
57
68
  var primaryToolbarComponents = props.primaryToolbarComponents;
58
69
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
59
70
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
@@ -76,6 +87,15 @@ export var FullPageEditor = function FullPageEditor(props) {
76
87
  }
77
88
  }
78
89
  }
90
+ var customPrimaryToolbarComponents = props.customPrimaryToolbarComponents;
91
+ if (toolbarDocking === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
92
+ exposure: true
93
+ })) {
94
+ primaryToolbarComponents = [];
95
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
96
+ isEditorToolbarHidden = true;
97
+ }
98
+ }
79
99
  var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
80
100
  return jsx(ContextPanelWidthProvider, null, jsx("div", {
81
101
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "203.17.3";
2
+ export var version = "203.18.0";
@@ -623,6 +623,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
623
623
  };
624
624
  sharedState: import("packages/editor/editor-plugin-hyperlink/dist/types/hyperlinkPluginType").HyperlinkPluginSharedState;
625
625
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
626
+ sharedState: {
627
+ toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking;
628
+ };
626
629
  pluginConfiguration: {
627
630
  preferenceToolbarAboveSelection?: boolean | undefined;
628
631
  };
@@ -638,6 +641,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
638
641
  actions?: {
639
642
  suppressToolbar?: (() => boolean) | undefined;
640
643
  unsuppressToolbar?: (() => boolean) | undefined;
644
+ setToolbarDocking?: ((toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking) => boolean) | undefined;
641
645
  } | undefined;
642
646
  }, {
643
647
  preferenceToolbarAboveSelection?: boolean | undefined;
@@ -675,6 +675,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
675
675
  };
676
676
  sharedState: import("packages/editor/editor-plugin-hyperlink/dist/types/hyperlinkPluginType").HyperlinkPluginSharedState;
677
677
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
678
+ sharedState: {
679
+ toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking;
680
+ };
678
681
  pluginConfiguration: {
679
682
  preferenceToolbarAboveSelection?: boolean | undefined;
680
683
  };
@@ -690,6 +693,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
690
693
  actions?: {
691
694
  suppressToolbar?: (() => boolean) | undefined;
692
695
  unsuppressToolbar?: (() => boolean) | undefined;
696
+ setToolbarDocking?: ((toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking) => boolean) | undefined;
693
697
  } | undefined;
694
698
  }, {
695
699
  preferenceToolbarAboveSelection?: boolean | undefined;
@@ -623,6 +623,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
623
623
  };
624
624
  sharedState: import("packages/editor/editor-plugin-hyperlink/dist/types/hyperlinkPluginType").HyperlinkPluginSharedState;
625
625
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
626
+ sharedState: {
627
+ toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking;
628
+ };
626
629
  pluginConfiguration: {
627
630
  preferenceToolbarAboveSelection?: boolean | undefined;
628
631
  };
@@ -638,6 +641,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
638
641
  actions?: {
639
642
  suppressToolbar?: (() => boolean) | undefined;
640
643
  unsuppressToolbar?: (() => boolean) | undefined;
644
+ setToolbarDocking?: ((toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking) => boolean) | undefined;
641
645
  } | undefined;
642
646
  }, {
643
647
  preferenceToolbarAboveSelection?: boolean | undefined;
@@ -2,11 +2,13 @@ import { jsx } from '@emotion/react';
2
2
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
4
4
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
5
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
5
6
  import type { EditorAppearanceComponentProps } from '../../../types';
6
7
  import type { ToolbarEditorPlugins } from './FullPageToolbar';
7
8
  type ComponentProps = EditorAppearanceComponentProps<[
8
9
  OptionalPlugin<EditorViewModePlugin>,
9
10
  OptionalPlugin<PrimaryToolbarPlugin>,
11
+ OptionalPlugin<SelectionToolbarPlugin>,
10
12
  ...ToolbarEditorPlugins
11
13
  ]>;
12
14
  export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
@@ -813,6 +813,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
813
813
  sharedState: import("packages/editor/editor-plugin-hyperlink/dist/types/hyperlinkPluginType").HyperlinkPluginSharedState;
814
814
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
815
815
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
816
+ sharedState: {
817
+ toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking;
818
+ };
816
819
  pluginConfiguration: {
817
820
  preferenceToolbarAboveSelection?: boolean | undefined;
818
821
  };
@@ -831,6 +834,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
831
834
  actions?: {
832
835
  suppressToolbar?: (() => boolean) | undefined;
833
836
  unsuppressToolbar?: (() => boolean) | undefined;
837
+ setToolbarDocking?: ((toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking) => boolean) | undefined;
834
838
  } | undefined;
835
839
  }, {
836
840
  preferenceToolbarAboveSelection?: boolean | undefined;
@@ -865,6 +865,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
865
865
  sharedState: import("packages/editor/editor-plugin-hyperlink/dist/types/hyperlinkPluginType").HyperlinkPluginSharedState;
866
866
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
867
867
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
868
+ sharedState: {
869
+ toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking;
870
+ };
868
871
  pluginConfiguration: {
869
872
  preferenceToolbarAboveSelection?: boolean | undefined;
870
873
  };
@@ -883,6 +886,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
883
886
  actions?: {
884
887
  suppressToolbar?: (() => boolean) | undefined;
885
888
  unsuppressToolbar?: (() => boolean) | undefined;
889
+ setToolbarDocking?: ((toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking) => boolean) | undefined;
886
890
  } | undefined;
887
891
  }, {
888
892
  preferenceToolbarAboveSelection?: boolean | undefined;
@@ -813,6 +813,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
813
813
  sharedState: import("packages/editor/editor-plugin-hyperlink/dist/types/hyperlinkPluginType").HyperlinkPluginSharedState;
814
814
  }, import("@atlaskit/editor-common/types").HyperlinkPluginOptions | undefined>,
815
815
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selectionToolbar", {
816
+ sharedState: {
817
+ toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking;
818
+ };
816
819
  pluginConfiguration: {
817
820
  preferenceToolbarAboveSelection?: boolean | undefined;
818
821
  };
@@ -831,6 +834,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
831
834
  actions?: {
832
835
  suppressToolbar?: (() => boolean) | undefined;
833
836
  unsuppressToolbar?: (() => boolean) | undefined;
837
+ setToolbarDocking?: ((toolbarDocking: import("packages/editor/editor-plugin-selection-toolbar/dist/types/types").ToolbarDocking) => boolean) | undefined;
834
838
  } | undefined;
835
839
  }, {
836
840
  preferenceToolbarAboveSelection?: boolean | undefined;
@@ -2,11 +2,13 @@ import { jsx } from '@emotion/react';
2
2
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
4
4
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
5
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
5
6
  import type { EditorAppearanceComponentProps } from '../../../types';
6
7
  import type { ToolbarEditorPlugins } from './FullPageToolbar';
7
8
  type ComponentProps = EditorAppearanceComponentProps<[
8
9
  OptionalPlugin<EditorViewModePlugin>,
9
10
  OptionalPlugin<PrimaryToolbarPlugin>,
11
+ OptionalPlugin<SelectionToolbarPlugin>,
10
12
  ...ToolbarEditorPlugins
11
13
  ]>;
12
14
  export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "203.17.3",
3
+ "version": "203.18.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,15 +43,15 @@
43
43
  "@atlaskit/analytics-next": "^10.3.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.5.0",
46
- "@atlaskit/editor-common": "^99.17.0",
46
+ "@atlaskit/editor-common": "^99.18.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.23.0",
48
- "@atlaskit/editor-performance-metrics": "1.4.0",
48
+ "@atlaskit/editor-performance-metrics": "1.5.0",
49
49
  "@atlaskit/editor-plugin-quick-insert": "1.10.2",
50
50
  "@atlaskit/editor-plugins": "^7.2.0",
51
51
  "@atlaskit/editor-prosemirror": "7.0.0",
52
52
  "@atlaskit/editor-shared-styles": "^3.3.0",
53
53
  "@atlaskit/emoji": "^67.14.0",
54
- "@atlaskit/icon": "^23.9.0",
54
+ "@atlaskit/icon": "^23.10.0",
55
55
  "@atlaskit/media-card": "^78.19.0",
56
56
  "@atlaskit/mention": "^23.11.0",
57
57
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/task-decision": "^17.12.0",
60
60
  "@atlaskit/tmp-editor-statsig": "^2.47.0",
61
61
  "@atlaskit/tokens": "^3.3.0",
62
- "@atlaskit/tooltip": "^19.1.0",
62
+ "@atlaskit/tooltip": "^19.2.0",
63
63
  "@atlaskit/width-detector": "^4.4.0",
64
64
  "@babel/runtime": "^7.0.0",
65
65
  "@emotion/react": "^11.7.1",
@@ -85,27 +85,27 @@
85
85
  "@af/visual-regression": "*",
86
86
  "@atlaskit/adf-utils": "^19.18.0",
87
87
  "@atlaskit/analytics-listeners": "^8.15.0",
88
- "@atlaskit/collab-provider": "10.7.0",
88
+ "@atlaskit/collab-provider": "10.7.1",
89
89
  "@atlaskit/editor-plugin-annotation": "1.28.1",
90
90
  "@atlaskit/editor-plugin-card": "^4.6.0",
91
91
  "@atlaskit/editor-plugin-list": "^3.10.0",
92
92
  "@atlaskit/editor-plugin-paste": "^2.3.0",
93
93
  "@atlaskit/link-provider": "^1.19.0",
94
- "@atlaskit/logo": "^15.3.0",
94
+ "@atlaskit/logo": "^15.4.0",
95
95
  "@atlaskit/media-core": "^34.5.0",
96
96
  "@atlaskit/media-integration-test-helpers": "^3.1.0",
97
97
  "@atlaskit/media-test-helpers": "^34.8.0",
98
98
  "@atlaskit/modal-dialog": "^12.20.0",
99
- "@atlaskit/primitives": "^13.5.0",
99
+ "@atlaskit/primitives": "^13.6.0",
100
100
  "@atlaskit/renderer": "^112.14.0",
101
- "@atlaskit/smart-card": "^34.10.0",
101
+ "@atlaskit/smart-card": "^34.11.0",
102
102
  "@atlaskit/synchrony-test-helpers": "^3.1.0",
103
- "@atlaskit/toggle": "^14.1.0",
103
+ "@atlaskit/toggle": "^14.2.0",
104
104
  "@atlaskit/util-data-test": "^18.0.0",
105
105
  "@atlaskit/visual-regression": "*",
106
106
  "@atlassian/adf-schema-json": "^1.27.0",
107
107
  "@atlassian/feature-flags-test-utils": "*",
108
- "@atlassian/search-provider": "3.0.35",
108
+ "@atlassian/search-provider": "3.0.36",
109
109
  "@emotion/jest": "^11.8.0",
110
110
  "@storybook/addon-knobs": "^6.4.0",
111
111
  "@testing-library/react": "^13.4.0",
@@ -464,6 +464,10 @@
464
464
  "platform_editor_nested_tables_view_mode_sort": {
465
465
  "type": "boolean",
466
466
  "referenceOnly": true
467
+ },
468
+ "platform_editor_legacy_content_macro": {
469
+ "type": "boolean",
470
+ "referenceOnly": true
467
471
  }
468
472
  },
469
473
  "stricter": {