@atlaskit/editor-plugin-toolbar 5.1.0 → 5.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 5.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b6830be30e686`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b6830be30e686) -
8
+ Removed experiment-gated calculateToolbarPosition prop and simplified selection toolbar position
9
+ calculation
10
+ - Updated dependencies
11
+
12
+ ## 5.1.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [`11f2dadbd0b51`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/11f2dadbd0b51) -
17
+ Adjust z-index of selection toolbar, making it inline with menus and other high priority elements.
18
+ - Updated dependencies
19
+
3
20
  ## 5.1.0
4
21
 
5
22
  ### Minor Changes
@@ -42,6 +42,9 @@
42
42
  {
43
43
  "path": "../../editor-prosemirror/afm-cc/tsconfig.json"
44
44
  },
45
+ {
46
+ "path": "../../editor-shared-styles/afm-cc/tsconfig.json"
47
+ },
45
48
  {
46
49
  "path": "../../editor-toolbar/afm-cc/tsconfig.json"
47
50
  },
@@ -42,6 +42,9 @@
42
42
  {
43
43
  "path": "../../editor-prosemirror/afm-jira/tsconfig.json"
44
44
  },
45
+ {
46
+ "path": "../../editor-shared-styles/afm-jira/tsconfig.json"
47
+ },
45
48
  {
46
49
  "path": "../../editor-toolbar/afm-jira/tsconfig.json"
47
50
  },
@@ -42,6 +42,9 @@
42
42
  {
43
43
  "path": "../../editor-prosemirror/afm-products/tsconfig.json"
44
44
  },
45
+ {
46
+ "path": "../../editor-shared-styles/afm-products/tsconfig.json"
47
+ },
45
48
  {
46
49
  "path": "../../editor-toolbar/afm-products/tsconfig.json"
47
50
  },
@@ -10,9 +10,8 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _bindEventListener = require("bind-event-listener");
12
12
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
13
- var _utils = require("@atlaskit/editor-common/utils");
14
13
  var _state = require("@atlaskit/editor-prosemirror/state");
15
- var _utils2 = require("@atlaskit/editor-prosemirror/utils");
14
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
16
15
  var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
17
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
17
  var _selectionToolbarOpenExperience = require("./pm-plugins/experiences/selection-toolbar-open-experience");
@@ -36,7 +35,7 @@ function getSelectedNode(editorState) {
36
35
  };
37
36
  }
38
37
  var nodes = editorState.schema.nodes;
39
- var selectedNode = (0, _utils2.findSelectedNodeOfType)([nodes.paragraph, nodes.heading, nodes.blockquote, nodes.panel, nodes.codeBlock])(selection);
38
+ var selectedNode = (0, _utils.findSelectedNodeOfType)([nodes.paragraph, nodes.heading, nodes.blockquote, nodes.panel, nodes.codeBlock])(selection);
40
39
  if (selectedNode) {
41
40
  return {
42
41
  node: selectedNode.node,
@@ -47,7 +46,7 @@ function getSelectedNode(editorState) {
47
46
  })
48
47
  };
49
48
  }
50
- var parentNode = (0, _utils2.findParentNodeOfType)([nodes.paragraph, nodes.heading, nodes.blockquote, nodes.panel, nodes.listItem, nodes.taskItem])(selection);
49
+ var parentNode = (0, _utils.findParentNodeOfType)([nodes.paragraph, nodes.heading, nodes.blockquote, nodes.panel, nodes.listItem, nodes.taskItem])(selection);
51
50
  if (parentNode) {
52
51
  return {
53
52
  node: parentNode.node,
@@ -83,7 +82,6 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
83
82
  breakpointPreset = config.breakpointPreset;
84
83
  var registry = (0, _editorToolbarModel.createComponentRegistry)();
85
84
  registry.register((0, _toolbarComponents.getToolbarComponents)(contextualFormattingEnabled, api, breakpointPreset));
86
- var cachedCalculateToolbarPosition = (0, _expValEquals.expValEquals)('platform_editor_sel_toolbar_fix', 'isEnabled', true) ? (0, _utils.calculateToolbarPositionTrackHead)(_consts.SELECTION_TOOLBAR_LABEL) : undefined;
87
85
  return {
88
86
  name: 'toolbar',
89
87
  actions: {
@@ -212,8 +210,7 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
212
210
  api: api,
213
211
  editorView: editorView,
214
212
  mountPoint: popupsMountPoint,
215
- disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned !== null && disableSelectionToolbarWhenPinned !== void 0 ? disableSelectionToolbarWhenPinned : false,
216
- calculateToolbarPosition: cachedCalculateToolbarPosition
213
+ disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned !== null && disableSelectionToolbarWhenPinned !== void 0 ? disableSelectionToolbarWhenPinned : false
217
214
  });
218
215
  } : undefined
219
216
  };
@@ -17,8 +17,10 @@ var _ui = require("@atlaskit/editor-common/ui");
17
17
  var _utils = require("@atlaskit/editor-common/utils");
18
18
  var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
19
19
  var _state = require("@atlaskit/editor-prosemirror/state");
20
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
21
  var _editorToolbar = require("@atlaskit/editor-toolbar");
21
22
  var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
23
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
24
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
25
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
24
26
  var _consts = require("../consts");
@@ -42,7 +44,7 @@ var usePluginState = function usePluginState(api) {
42
44
  };
43
45
  });
44
46
  };
45
- var useOnPositionCalculated = function useOnPositionCalculated(editorView, cachedCalculateToolbarPosition) {
47
+ var useOnPositionCalculated = function useOnPositionCalculated(editorView) {
46
48
  var onPositionCalculated = (0, _react.useCallback)(function (position) {
47
49
  try {
48
50
  // Show special position on cell selection only when editor controls experiment is enabled
@@ -51,14 +53,14 @@ var useOnPositionCalculated = function useOnPositionCalculated(editorView, cache
51
53
  if (isCellSelection && isEditorControlsEnabled) {
52
54
  return (0, _utils.calculateToolbarPositionOnCellSelection)(_consts.SELECTION_TOOLBAR_LABEL)(editorView, position);
53
55
  }
54
- return cachedCalculateToolbarPosition ? cachedCalculateToolbarPosition(editorView, position) : (0, _utils.calculateToolbarPositionTrackHead)(_consts.SELECTION_TOOLBAR_LABEL)(editorView, position);
56
+ return (0, _utils.calculateToolbarPositionTrackHead)(_consts.SELECTION_TOOLBAR_LABEL)(editorView, position);
55
57
  } catch (error) {
56
58
  (0, _monitoring.logException)(error, {
57
59
  location: 'editor-plugin-toolbar/selectionToolbar'
58
60
  });
59
61
  return position;
60
62
  }
61
- }, [editorView, cachedCalculateToolbarPosition]);
63
+ }, [editorView]);
62
64
  return onPositionCalculated;
63
65
  };
64
66
  var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref) {
@@ -102,7 +104,8 @@ var SelectionToolbar = exports.SelectionToolbar = function SelectionToolbar(_ref
102
104
  offset: [0, 10],
103
105
  target: (0, _utils2.getDomRefFromSelection)(editorView),
104
106
  onPositionCalculated: onPositionCalculated,
105
- mountTo: mountPoint
107
+ mountTo: mountPoint,
108
+ zIndex: (0, _platformFeatureFlags.fg)('platform_editor_sel_toolbar_stacking_fix') ? _editorSharedStyles.akEditorFloatingDialogZIndex : undefined
106
109
  }, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarProvider, {
107
110
  editorView: editorView,
108
111
  editorToolbarDockingPreference: editorToolbarDockingPreference,
@@ -131,8 +134,7 @@ var SelectionToolbarWithErrorBoundary = exports.SelectionToolbarWithErrorBoundar
131
134
  var api = _ref2.api,
132
135
  editorView = _ref2.editorView,
133
136
  mountPoint = _ref2.mountPoint,
134
- disableSelectionToolbarWhenPinned = _ref2.disableSelectionToolbarWhenPinned,
135
- calculateToolbarPosition = _ref2.calculateToolbarPosition;
137
+ disableSelectionToolbarWhenPinned = _ref2.disableSelectionToolbarWhenPinned;
136
138
  return /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
137
139
  component: _analytics.ACTION_SUBJECT.TOOLBAR,
138
140
  componentId: _analytics.ACTION_SUBJECT_ID.SELECTION_TOOLBAR,
@@ -142,7 +144,6 @@ var SelectionToolbarWithErrorBoundary = exports.SelectionToolbarWithErrorBoundar
142
144
  api: api,
143
145
  editorView: editorView,
144
146
  mountPoint: mountPoint,
145
- disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned,
146
- calculateToolbarPosition: calculateToolbarPosition
147
+ disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned
147
148
  }));
148
149
  };
@@ -1,14 +1,13 @@
1
1
  import React from 'react';
2
2
  import { bind } from 'bind-event-listener';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
- import { calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
5
4
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
6
5
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
6
  import { createComponentRegistry } from '@atlaskit/editor-toolbar-model';
8
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
  import { getSelectionToolbarOpenExperiencePlugin } from './pm-plugins/experiences/selection-toolbar-open-experience';
10
9
  import { editorToolbarPluginKey } from './pm-plugins/plugin-key';
11
- import { DEFAULT_POPUP_SELECTORS, SELECTION_TOOLBAR_LABEL } from './ui/consts';
10
+ import { DEFAULT_POPUP_SELECTORS } from './ui/consts';
12
11
  import { SelectionToolbarWithErrorBoundary } from './ui/SelectionToolbar';
13
12
  import { getToolbarComponents } from './ui/toolbar-components';
14
13
  import { isEventInContainer } from './ui/utils/toolbar';
@@ -69,7 +68,6 @@ export const toolbarPlugin = ({
69
68
  } = config;
70
69
  const registry = createComponentRegistry();
71
70
  registry.register(getToolbarComponents(contextualFormattingEnabled, api, breakpointPreset));
72
- const cachedCalculateToolbarPosition = expValEquals('platform_editor_sel_toolbar_fix', 'isEnabled', true) ? calculateToolbarPositionTrackHead(SELECTION_TOOLBAR_LABEL) : undefined;
73
71
  return {
74
72
  name: 'toolbar',
75
73
  actions: {
@@ -201,8 +199,7 @@ export const toolbarPlugin = ({
201
199
  api: api,
202
200
  editorView: editorView,
203
201
  mountPoint: popupsMountPoint,
204
- disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned !== null && disableSelectionToolbarWhenPinned !== void 0 ? disableSelectionToolbarWhenPinned : false,
205
- calculateToolbarPosition: cachedCalculateToolbarPosition
202
+ disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned !== null && disableSelectionToolbarWhenPinned !== void 0 ? disableSelectionToolbarWhenPinned : false
206
203
  });
207
204
  } : undefined
208
205
  };
@@ -10,8 +10,10 @@ import { Popup } from '@atlaskit/editor-common/ui';
10
10
  import { calculateToolbarPositionTrackHead, calculateToolbarPositionOnCellSelection } from '@atlaskit/editor-common/utils';
11
11
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
12
12
  import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
+ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
13
14
  import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
14
15
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
15
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
18
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
19
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
@@ -34,7 +36,7 @@ const usePluginState = api => {
34
36
  };
35
37
  });
36
38
  };
37
- const useOnPositionCalculated = (editorView, cachedCalculateToolbarPosition) => {
39
+ const useOnPositionCalculated = editorView => {
38
40
  const onPositionCalculated = useCallback(position => {
39
41
  try {
40
42
  // Show special position on cell selection only when editor controls experiment is enabled
@@ -43,14 +45,14 @@ const useOnPositionCalculated = (editorView, cachedCalculateToolbarPosition) =>
43
45
  if (isCellSelection && isEditorControlsEnabled) {
44
46
  return calculateToolbarPositionOnCellSelection(SELECTION_TOOLBAR_LABEL)(editorView, position);
45
47
  }
46
- return cachedCalculateToolbarPosition ? cachedCalculateToolbarPosition(editorView, position) : calculateToolbarPositionTrackHead(SELECTION_TOOLBAR_LABEL)(editorView, position);
48
+ return calculateToolbarPositionTrackHead(SELECTION_TOOLBAR_LABEL)(editorView, position);
47
49
  } catch (error) {
48
50
  logException(error, {
49
51
  location: 'editor-plugin-toolbar/selectionToolbar'
50
52
  });
51
53
  return position;
52
54
  }
53
- }, [editorView, cachedCalculateToolbarPosition]);
55
+ }, [editorView]);
54
56
  return onPositionCalculated;
55
57
  };
56
58
  export const SelectionToolbar = ({
@@ -95,7 +97,8 @@ export const SelectionToolbar = ({
95
97
  offset: [0, 10],
96
98
  target: getDomRefFromSelection(editorView),
97
99
  onPositionCalculated: onPositionCalculated,
98
- mountTo: mountPoint
100
+ mountTo: mountPoint,
101
+ zIndex: fg('platform_editor_sel_toolbar_stacking_fix') ? akEditorFloatingDialogZIndex : undefined
99
102
  }, /*#__PURE__*/React.createElement(EditorToolbarProvider, {
100
103
  editorView: editorView,
101
104
  editorToolbarDockingPreference: editorToolbarDockingPreference,
@@ -123,8 +126,7 @@ export const SelectionToolbarWithErrorBoundary = ({
123
126
  api,
124
127
  editorView,
125
128
  mountPoint,
126
- disableSelectionToolbarWhenPinned,
127
- calculateToolbarPosition
129
+ disableSelectionToolbarWhenPinned
128
130
  }) => {
129
131
  var _api$analytics2;
130
132
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
@@ -136,7 +138,6 @@ export const SelectionToolbarWithErrorBoundary = ({
136
138
  api: api,
137
139
  editorView: editorView,
138
140
  mountPoint: mountPoint,
139
- disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned,
140
- calculateToolbarPosition: calculateToolbarPosition
141
+ disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned
141
142
  }));
142
143
  };
@@ -5,14 +5,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import React from 'react';
6
6
  import { bind } from 'bind-event-listener';
7
7
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
- import { calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
9
8
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
10
9
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
11
10
  import { createComponentRegistry } from '@atlaskit/editor-toolbar-model';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { getSelectionToolbarOpenExperiencePlugin } from './pm-plugins/experiences/selection-toolbar-open-experience';
14
13
  import { editorToolbarPluginKey } from './pm-plugins/plugin-key';
15
- import { DEFAULT_POPUP_SELECTORS, SELECTION_TOOLBAR_LABEL } from './ui/consts';
14
+ import { DEFAULT_POPUP_SELECTORS } from './ui/consts';
16
15
  import { SelectionToolbarWithErrorBoundary } from './ui/SelectionToolbar';
17
16
  import { getToolbarComponents } from './ui/toolbar-components';
18
17
  import { isEventInContainer } from './ui/utils/toolbar';
@@ -76,7 +75,6 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
76
75
  breakpointPreset = config.breakpointPreset;
77
76
  var registry = createComponentRegistry();
78
77
  registry.register(getToolbarComponents(contextualFormattingEnabled, api, breakpointPreset));
79
- var cachedCalculateToolbarPosition = expValEquals('platform_editor_sel_toolbar_fix', 'isEnabled', true) ? calculateToolbarPositionTrackHead(SELECTION_TOOLBAR_LABEL) : undefined;
80
78
  return {
81
79
  name: 'toolbar',
82
80
  actions: {
@@ -205,8 +203,7 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
205
203
  api: api,
206
204
  editorView: editorView,
207
205
  mountPoint: popupsMountPoint,
208
- disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned !== null && disableSelectionToolbarWhenPinned !== void 0 ? disableSelectionToolbarWhenPinned : false,
209
- calculateToolbarPosition: cachedCalculateToolbarPosition
206
+ disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned !== null && disableSelectionToolbarWhenPinned !== void 0 ? disableSelectionToolbarWhenPinned : false
210
207
  });
211
208
  } : undefined
212
209
  };
@@ -10,8 +10,10 @@ import { Popup } from '@atlaskit/editor-common/ui';
10
10
  import { calculateToolbarPositionTrackHead, calculateToolbarPositionOnCellSelection } from '@atlaskit/editor-common/utils';
11
11
  import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
12
12
  import { AllSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
+ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
13
14
  import { ToolbarSection, ToolbarButtonGroup, ToolbarDropdownItemSection, useToolbarUI } from '@atlaskit/editor-toolbar';
14
15
  import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
15
17
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
18
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
19
  import { SELECTION_TOOLBAR_LABEL } from '../consts';
@@ -34,7 +36,7 @@ var usePluginState = function usePluginState(api) {
34
36
  };
35
37
  });
36
38
  };
37
- var useOnPositionCalculated = function useOnPositionCalculated(editorView, cachedCalculateToolbarPosition) {
39
+ var useOnPositionCalculated = function useOnPositionCalculated(editorView) {
38
40
  var onPositionCalculated = useCallback(function (position) {
39
41
  try {
40
42
  // Show special position on cell selection only when editor controls experiment is enabled
@@ -43,14 +45,14 @@ var useOnPositionCalculated = function useOnPositionCalculated(editorView, cache
43
45
  if (isCellSelection && isEditorControlsEnabled) {
44
46
  return calculateToolbarPositionOnCellSelection(SELECTION_TOOLBAR_LABEL)(editorView, position);
45
47
  }
46
- return cachedCalculateToolbarPosition ? cachedCalculateToolbarPosition(editorView, position) : calculateToolbarPositionTrackHead(SELECTION_TOOLBAR_LABEL)(editorView, position);
48
+ return calculateToolbarPositionTrackHead(SELECTION_TOOLBAR_LABEL)(editorView, position);
47
49
  } catch (error) {
48
50
  logException(error, {
49
51
  location: 'editor-plugin-toolbar/selectionToolbar'
50
52
  });
51
53
  return position;
52
54
  }
53
- }, [editorView, cachedCalculateToolbarPosition]);
55
+ }, [editorView]);
54
56
  return onPositionCalculated;
55
57
  };
56
58
  export var SelectionToolbar = function SelectionToolbar(_ref) {
@@ -94,7 +96,8 @@ export var SelectionToolbar = function SelectionToolbar(_ref) {
94
96
  offset: [0, 10],
95
97
  target: getDomRefFromSelection(editorView),
96
98
  onPositionCalculated: onPositionCalculated,
97
- mountTo: mountPoint
99
+ mountTo: mountPoint,
100
+ zIndex: fg('platform_editor_sel_toolbar_stacking_fix') ? akEditorFloatingDialogZIndex : undefined
98
101
  }, /*#__PURE__*/React.createElement(EditorToolbarProvider, {
99
102
  editorView: editorView,
100
103
  editorToolbarDockingPreference: editorToolbarDockingPreference,
@@ -123,8 +126,7 @@ export var SelectionToolbarWithErrorBoundary = function SelectionToolbarWithErro
123
126
  var api = _ref2.api,
124
127
  editorView = _ref2.editorView,
125
128
  mountPoint = _ref2.mountPoint,
126
- disableSelectionToolbarWhenPinned = _ref2.disableSelectionToolbarWhenPinned,
127
- calculateToolbarPosition = _ref2.calculateToolbarPosition;
129
+ disableSelectionToolbarWhenPinned = _ref2.disableSelectionToolbarWhenPinned;
128
130
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
129
131
  component: ACTION_SUBJECT.TOOLBAR,
130
132
  componentId: ACTION_SUBJECT_ID.SELECTION_TOOLBAR,
@@ -134,7 +136,6 @@ export var SelectionToolbarWithErrorBoundary = function SelectionToolbarWithErro
134
136
  api: api,
135
137
  editorView: editorView,
136
138
  mountPoint: mountPoint,
137
- disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned,
138
- calculateToolbarPosition: calculateToolbarPosition
139
+ disableSelectionToolbarWhenPinned: disableSelectionToolbarWhenPinned
139
140
  }));
140
141
  };
@@ -2,14 +2,12 @@ import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { ToolbarPlugin } from '../../toolbarPluginType';
5
- import type { CalculateToolbarPosition } from './types';
6
5
  type SelectionToolbarProps = {
7
6
  api?: ExtractInjectionAPI<ToolbarPlugin>;
8
- calculateToolbarPosition?: CalculateToolbarPosition;
9
7
  disableSelectionToolbarWhenPinned: boolean;
10
8
  editorView: EditorView;
11
9
  mountPoint: HTMLElement | undefined;
12
10
  };
13
11
  export declare const SelectionToolbar: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, }: SelectionToolbarProps) => React.JSX.Element | null;
14
- export declare const SelectionToolbarWithErrorBoundary: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, calculateToolbarPosition, }: SelectionToolbarProps) => React.JSX.Element;
12
+ export declare const SelectionToolbarWithErrorBoundary: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, }: SelectionToolbarProps) => React.JSX.Element;
15
13
  export {};
@@ -2,14 +2,12 @@ import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import { type EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { ToolbarPlugin } from '../../toolbarPluginType';
5
- import type { CalculateToolbarPosition } from './types';
6
5
  type SelectionToolbarProps = {
7
6
  api?: ExtractInjectionAPI<ToolbarPlugin>;
8
- calculateToolbarPosition?: CalculateToolbarPosition;
9
7
  disableSelectionToolbarWhenPinned: boolean;
10
8
  editorView: EditorView;
11
9
  mountPoint: HTMLElement | undefined;
12
10
  };
13
11
  export declare const SelectionToolbar: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, }: SelectionToolbarProps) => React.JSX.Element | null;
14
- export declare const SelectionToolbarWithErrorBoundary: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, calculateToolbarPosition, }: SelectionToolbarProps) => React.JSX.Element;
12
+ export declare const SelectionToolbarWithErrorBoundary: ({ api, editorView, mountPoint, disableSelectionToolbarWhenPinned, }: SelectionToolbarProps) => React.JSX.Element;
15
13
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,10 +36,11 @@
36
36
  "@atlaskit/editor-plugin-user-intent": "^6.0.0",
37
37
  "@atlaskit/editor-plugin-user-preferences": "^6.0.0",
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
+ "@atlaskit/editor-shared-styles": "^3.10.0",
39
40
  "@atlaskit/editor-toolbar": "^0.20.0",
40
41
  "@atlaskit/editor-toolbar-model": "^0.4.0",
41
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^40.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^40.3.0",
43
44
  "@babel/runtime": "^7.0.0",
44
45
  "bind-event-listener": "^3.0.0",
45
46
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -54,6 +55,9 @@
54
55
  },
55
56
  "platform_editor_toolbar_open_experience_fix": {
56
57
  "type": "boolean"
58
+ },
59
+ "platform_editor_sel_toolbar_stacking_fix": {
60
+ "type": "boolean"
57
61
  }
58
62
  },
59
63
  "techstack": {