@atlaskit/editor-plugin-selection-toolbar 2.1.0 → 2.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,23 @@
1
1
  # @atlaskit/editor-plugin-selection-toolbar
2
2
 
3
+ ## 2.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#128803](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128803)
8
+ [`bee199a74385f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bee199a74385f) -
9
+ [ux] Keeps docking options in the overlow menu even when the toolbar is docked to top.
10
+
11
+ ## 2.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#127441](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/127441)
16
+ [`f2f4b5971e0b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2f4b5971e0b2) -
17
+ [ux] Updates Text Formatting toolbar separators, active option style and removes range selection
18
+ when the toolbar is docked to top.
19
+ - Updated dependencies
20
+
3
21
  ## 2.1.0
4
22
 
5
23
  ### Minor Changes
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.toggleToolbar = exports.setToolbarDocking = void 0;
7
+ var _state = require("@atlaskit/editor-prosemirror/state");
7
8
  var _pluginKey = require("./plugin-key");
8
9
  var toggleToolbar = exports.toggleToolbar = function toggleToolbar(_ref) {
9
10
  var hide = _ref.hide;
@@ -25,6 +26,10 @@ var setToolbarDocking = exports.setToolbarDocking = function setToolbarDocking(_
25
26
  tr.setMeta(_pluginKey.selectionToolbarPluginKey, {
26
27
  toolbarDocking: toolbarDocking
27
28
  });
29
+ if (toolbarDocking === 'top') {
30
+ // Remove the selection if the toolbar is docked to the top
31
+ tr.setSelection(_state.TextSelection.create(tr.doc, tr.selection.head));
32
+ }
28
33
  return tr;
29
34
  };
30
35
  };
@@ -194,15 +194,22 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
194
194
  items.push.apply(items, (0, _toConsumableArray2.default)(resolved[i].items));
195
195
  }
196
196
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
197
- var shouldNotAddSeparator = false;
198
197
  if (resolved[i] && resolved[i + 1]) {
199
- var _resolved$i2, _resolved, _resolved$i3, _resolved2;
200
- shouldNotAddSeparator = ((_resolved$i2 = resolved[i]) === null || _resolved$i2 === void 0 ? void 0 : _resolved$i2.pluginName) === 'textColor' && ((_resolved = resolved[i + 1]) === null || _resolved === void 0 ? void 0 : _resolved.pluginName) === 'highlight' || ((_resolved$i3 = resolved[i]) === null || _resolved$i3 === void 0 ? void 0 : _resolved$i3.pluginName) === 'alignment' && ((_resolved2 = resolved[i + 1]) === null || _resolved2 === void 0 ? void 0 : _resolved2.pluginName) === 'toolbarListsIndentation';
201
- }
202
- if (i !== resolved.length - 1 && !shouldNotAddSeparator) {
203
- items.push({
204
- type: 'separator'
205
- });
198
+ var _resolved$i2, _resolved, _resolved$i3, _resolved2, _resolved3;
199
+ var shouldNotAddSeparator = ((_resolved$i2 = resolved[i]) === null || _resolved$i2 === void 0 ? void 0 : _resolved$i2.pluginName) === 'textColor' && ((_resolved = resolved[i + 1]) === null || _resolved === void 0 ? void 0 : _resolved.pluginName) === 'highlight' || ((_resolved$i3 = resolved[i]) === null || _resolved$i3 === void 0 ? void 0 : _resolved$i3.pluginName) === 'alignment' && ((_resolved2 = resolved[i + 1]) === null || _resolved2 === void 0 ? void 0 : _resolved2.pluginName) === 'toolbarListsIndentation';
200
+ if (((_resolved3 = resolved[i + 1]) === null || _resolved3 === void 0 ? void 0 : _resolved3.pluginName) === 'annotation') {
201
+ items.push({
202
+ type: 'separator',
203
+ fullHeight: true
204
+ });
205
+ } else {
206
+ if (i !== resolved.length - 1 && !shouldNotAddSeparator) {
207
+ items.push({
208
+ type: 'separator',
209
+ fullHeight: false
210
+ });
211
+ }
212
+ }
206
213
  }
207
214
  } else {
208
215
  if (i !== resolved.length - 1) {
@@ -46,36 +46,40 @@ var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig
46
46
  label: ""
47
47
  })
48
48
  }];
49
- if (toolbarDocking === 'none') {
50
- dropdownOptions.push({
51
- type: 'overflow-dropdown-heading',
52
- title: 'Toolbar appears'
53
- }, {
54
- title: 'In-line with text',
55
- onClick: function onClick() {
56
- var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
57
- return (_api$selectionToolbar = api === null || api === void 0 || (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 || (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
58
- },
59
- icon: (0, _react.jsx)(_ContextualToolbarIcon.ContextualToolbarIcon, {
60
- label: "Contextual toolbar"
61
- }),
62
- selected: true,
63
- elemAfter: (0, _react.jsx)(_checkMark.default, {
64
- label: ""
65
- })
66
- }, {
67
- title: 'Fixed at top',
68
- onClick: function onClick() {
69
- var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
70
- return (_api$selectionToolbar4 = api === null || api === void 0 || (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 || (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
71
- },
72
- icon: (0, _react.jsx)(_FixedToolbarIcon.FixedToolbarIcon, {
73
- label: "Fixed toolbar"
74
- })
75
- });
76
- }
49
+ var isDockedToTop = toolbarDocking === 'top';
50
+ dropdownOptions.push({
51
+ type: 'overflow-dropdown-heading',
52
+ title: 'Toolbar appears'
53
+ }, {
54
+ title: 'In-line with text',
55
+ onClick: function onClick() {
56
+ var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
57
+ return (_api$selectionToolbar = api === null || api === void 0 || (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 || (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
58
+ },
59
+ icon: (0, _react.jsx)(_ContextualToolbarIcon.ContextualToolbarIcon, {
60
+ label: "Contextual toolbar"
61
+ }),
62
+ selected: !isDockedToTop,
63
+ elemAfter: !isDockedToTop ? (0, _react.jsx)(_checkMark.default, {
64
+ label: ""
65
+ }) : undefined
66
+ }, {
67
+ title: 'Fixed at top',
68
+ onClick: function onClick() {
69
+ var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
70
+ return (_api$selectionToolbar4 = api === null || api === void 0 || (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 || (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
71
+ },
72
+ icon: (0, _react.jsx)(_FixedToolbarIcon.FixedToolbarIcon, {
73
+ label: "Fixed toolbar"
74
+ }),
75
+ selected: isDockedToTop,
76
+ elemAfter: isDockedToTop ? (0, _react.jsx)(_checkMark.default, {
77
+ label: ""
78
+ }) : undefined
79
+ });
77
80
  return [{
78
- type: 'separator'
81
+ type: 'separator',
82
+ fullHeight: true
79
83
  }, {
80
84
  type: 'overflow-dropdown',
81
85
  dropdownWidth: 240,
@@ -1,3 +1,4 @@
1
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
1
2
  import { selectionToolbarPluginKey } from './plugin-key';
2
3
  export const toggleToolbar = ({
3
4
  hide
@@ -20,5 +21,9 @@ export const setToolbarDocking = ({
20
21
  tr.setMeta(selectionToolbarPluginKey, {
21
22
  toolbarDocking
22
23
  });
24
+ if (toolbarDocking === 'top') {
25
+ // Remove the selection if the toolbar is docked to the top
26
+ tr.setSelection(TextSelection.create(tr.doc, tr.selection.head));
27
+ }
23
28
  return tr;
24
29
  };
@@ -185,15 +185,22 @@ export const selectionToolbarPlugin = ({
185
185
  items.push(...resolved[i].items);
186
186
  }
187
187
  if (editorExperiment('platform_editor_controls', 'variant1')) {
188
- let shouldNotAddSeparator = false;
189
188
  if (resolved[i] && resolved[i + 1]) {
190
- var _resolved$i2, _resolved, _resolved$i3, _resolved2;
191
- shouldNotAddSeparator = ((_resolved$i2 = resolved[i]) === null || _resolved$i2 === void 0 ? void 0 : _resolved$i2.pluginName) === 'textColor' && ((_resolved = resolved[i + 1]) === null || _resolved === void 0 ? void 0 : _resolved.pluginName) === 'highlight' || ((_resolved$i3 = resolved[i]) === null || _resolved$i3 === void 0 ? void 0 : _resolved$i3.pluginName) === 'alignment' && ((_resolved2 = resolved[i + 1]) === null || _resolved2 === void 0 ? void 0 : _resolved2.pluginName) === 'toolbarListsIndentation';
192
- }
193
- if (i !== resolved.length - 1 && !shouldNotAddSeparator) {
194
- items.push({
195
- type: 'separator'
196
- });
189
+ var _resolved$i2, _resolved, _resolved$i3, _resolved2, _resolved3;
190
+ const shouldNotAddSeparator = ((_resolved$i2 = resolved[i]) === null || _resolved$i2 === void 0 ? void 0 : _resolved$i2.pluginName) === 'textColor' && ((_resolved = resolved[i + 1]) === null || _resolved === void 0 ? void 0 : _resolved.pluginName) === 'highlight' || ((_resolved$i3 = resolved[i]) === null || _resolved$i3 === void 0 ? void 0 : _resolved$i3.pluginName) === 'alignment' && ((_resolved2 = resolved[i + 1]) === null || _resolved2 === void 0 ? void 0 : _resolved2.pluginName) === 'toolbarListsIndentation';
191
+ if (((_resolved3 = resolved[i + 1]) === null || _resolved3 === void 0 ? void 0 : _resolved3.pluginName) === 'annotation') {
192
+ items.push({
193
+ type: 'separator',
194
+ fullHeight: true
195
+ });
196
+ } else {
197
+ if (i !== resolved.length - 1 && !shouldNotAddSeparator) {
198
+ items.push({
199
+ type: 'separator',
200
+ fullHeight: false
201
+ });
202
+ }
203
+ }
197
204
  }
198
205
  } else {
199
206
  if (i !== resolved.length - 1) {
@@ -39,36 +39,40 @@ export const getOverflowFloatingToolbarConfig = ({
39
39
  label: ""
40
40
  })
41
41
  }];
42
- if (toolbarDocking === 'none') {
43
- dropdownOptions.push({
44
- type: 'overflow-dropdown-heading',
45
- title: 'Toolbar appears'
46
- }, {
47
- title: 'In-line with text',
48
- onClick: () => {
49
- var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
50
- return (_api$selectionToolbar = api === null || api === void 0 ? void 0 : (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
51
- },
52
- icon: jsx(ContextualToolbarIcon, {
53
- label: "Contextual toolbar"
54
- }),
55
- selected: true,
56
- elemAfter: jsx(CheckMarkIcon, {
57
- label: ""
58
- })
59
- }, {
60
- title: 'Fixed at top',
61
- onClick: () => {
62
- var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
63
- return (_api$selectionToolbar4 = api === null || api === void 0 ? void 0 : (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 ? void 0 : (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
64
- },
65
- icon: jsx(FixedToolbarIcon, {
66
- label: "Fixed toolbar"
67
- })
68
- });
69
- }
42
+ const isDockedToTop = toolbarDocking === 'top';
43
+ dropdownOptions.push({
44
+ type: 'overflow-dropdown-heading',
45
+ title: 'Toolbar appears'
46
+ }, {
47
+ title: 'In-line with text',
48
+ onClick: () => {
49
+ var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
50
+ return (_api$selectionToolbar = api === null || api === void 0 ? void 0 : (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
51
+ },
52
+ icon: jsx(ContextualToolbarIcon, {
53
+ label: "Contextual toolbar"
54
+ }),
55
+ selected: !isDockedToTop,
56
+ elemAfter: !isDockedToTop ? jsx(CheckMarkIcon, {
57
+ label: ""
58
+ }) : undefined
59
+ }, {
60
+ title: 'Fixed at top',
61
+ onClick: () => {
62
+ var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
63
+ return (_api$selectionToolbar4 = api === null || api === void 0 ? void 0 : (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 ? void 0 : (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
64
+ },
65
+ icon: jsx(FixedToolbarIcon, {
66
+ label: "Fixed toolbar"
67
+ }),
68
+ selected: isDockedToTop,
69
+ elemAfter: isDockedToTop ? jsx(CheckMarkIcon, {
70
+ label: ""
71
+ }) : undefined
72
+ });
70
73
  return [{
71
- type: 'separator'
74
+ type: 'separator',
75
+ fullHeight: true
72
76
  }, {
73
77
  type: 'overflow-dropdown',
74
78
  dropdownWidth: 240,
@@ -1,3 +1,4 @@
1
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
1
2
  import { selectionToolbarPluginKey } from './plugin-key';
2
3
  export var toggleToolbar = function toggleToolbar(_ref) {
3
4
  var hide = _ref.hide;
@@ -19,6 +20,10 @@ export var setToolbarDocking = function setToolbarDocking(_ref3) {
19
20
  tr.setMeta(selectionToolbarPluginKey, {
20
21
  toolbarDocking: toolbarDocking
21
22
  });
23
+ if (toolbarDocking === 'top') {
24
+ // Remove the selection if the toolbar is docked to the top
25
+ tr.setSelection(TextSelection.create(tr.doc, tr.selection.head));
26
+ }
22
27
  return tr;
23
28
  };
24
29
  };
@@ -187,15 +187,22 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
187
187
  items.push.apply(items, _toConsumableArray(resolved[i].items));
188
188
  }
189
189
  if (editorExperiment('platform_editor_controls', 'variant1')) {
190
- var shouldNotAddSeparator = false;
191
190
  if (resolved[i] && resolved[i + 1]) {
192
- var _resolved$i2, _resolved, _resolved$i3, _resolved2;
193
- shouldNotAddSeparator = ((_resolved$i2 = resolved[i]) === null || _resolved$i2 === void 0 ? void 0 : _resolved$i2.pluginName) === 'textColor' && ((_resolved = resolved[i + 1]) === null || _resolved === void 0 ? void 0 : _resolved.pluginName) === 'highlight' || ((_resolved$i3 = resolved[i]) === null || _resolved$i3 === void 0 ? void 0 : _resolved$i3.pluginName) === 'alignment' && ((_resolved2 = resolved[i + 1]) === null || _resolved2 === void 0 ? void 0 : _resolved2.pluginName) === 'toolbarListsIndentation';
194
- }
195
- if (i !== resolved.length - 1 && !shouldNotAddSeparator) {
196
- items.push({
197
- type: 'separator'
198
- });
191
+ var _resolved$i2, _resolved, _resolved$i3, _resolved2, _resolved3;
192
+ var shouldNotAddSeparator = ((_resolved$i2 = resolved[i]) === null || _resolved$i2 === void 0 ? void 0 : _resolved$i2.pluginName) === 'textColor' && ((_resolved = resolved[i + 1]) === null || _resolved === void 0 ? void 0 : _resolved.pluginName) === 'highlight' || ((_resolved$i3 = resolved[i]) === null || _resolved$i3 === void 0 ? void 0 : _resolved$i3.pluginName) === 'alignment' && ((_resolved2 = resolved[i + 1]) === null || _resolved2 === void 0 ? void 0 : _resolved2.pluginName) === 'toolbarListsIndentation';
193
+ if (((_resolved3 = resolved[i + 1]) === null || _resolved3 === void 0 ? void 0 : _resolved3.pluginName) === 'annotation') {
194
+ items.push({
195
+ type: 'separator',
196
+ fullHeight: true
197
+ });
198
+ } else {
199
+ if (i !== resolved.length - 1 && !shouldNotAddSeparator) {
200
+ items.push({
201
+ type: 'separator',
202
+ fullHeight: false
203
+ });
204
+ }
205
+ }
199
206
  }
200
207
  } else {
201
208
  if (i !== resolved.length - 1) {
@@ -38,36 +38,40 @@ export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolba
38
38
  label: ""
39
39
  })
40
40
  }];
41
- if (toolbarDocking === 'none') {
42
- dropdownOptions.push({
43
- type: 'overflow-dropdown-heading',
44
- title: 'Toolbar appears'
45
- }, {
46
- title: 'In-line with text',
47
- onClick: function onClick() {
48
- var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
49
- return (_api$selectionToolbar = api === null || api === void 0 || (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 || (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
50
- },
51
- icon: jsx(ContextualToolbarIcon, {
52
- label: "Contextual toolbar"
53
- }),
54
- selected: true,
55
- elemAfter: jsx(CheckMarkIcon, {
56
- label: ""
57
- })
58
- }, {
59
- title: 'Fixed at top',
60
- onClick: function onClick() {
61
- var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
62
- return (_api$selectionToolbar4 = api === null || api === void 0 || (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 || (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
63
- },
64
- icon: jsx(FixedToolbarIcon, {
65
- label: "Fixed toolbar"
66
- })
67
- });
68
- }
41
+ var isDockedToTop = toolbarDocking === 'top';
42
+ dropdownOptions.push({
43
+ type: 'overflow-dropdown-heading',
44
+ title: 'Toolbar appears'
45
+ }, {
46
+ title: 'In-line with text',
47
+ onClick: function onClick() {
48
+ var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
49
+ return (_api$selectionToolbar = api === null || api === void 0 || (_api$selectionToolbar2 = api.selectionToolbar.actions) === null || _api$selectionToolbar2 === void 0 || (_api$selectionToolbar3 = _api$selectionToolbar2.setToolbarDocking) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.call(_api$selectionToolbar2, 'none')) !== null && _api$selectionToolbar !== void 0 ? _api$selectionToolbar : false;
50
+ },
51
+ icon: jsx(ContextualToolbarIcon, {
52
+ label: "Contextual toolbar"
53
+ }),
54
+ selected: !isDockedToTop,
55
+ elemAfter: !isDockedToTop ? jsx(CheckMarkIcon, {
56
+ label: ""
57
+ }) : undefined
58
+ }, {
59
+ title: 'Fixed at top',
60
+ onClick: function onClick() {
61
+ var _api$selectionToolbar4, _api$selectionToolbar5, _api$selectionToolbar6;
62
+ return (_api$selectionToolbar4 = api === null || api === void 0 || (_api$selectionToolbar5 = api.selectionToolbar.actions) === null || _api$selectionToolbar5 === void 0 || (_api$selectionToolbar6 = _api$selectionToolbar5.setToolbarDocking) === null || _api$selectionToolbar6 === void 0 ? void 0 : _api$selectionToolbar6.call(_api$selectionToolbar5, 'top')) !== null && _api$selectionToolbar4 !== void 0 ? _api$selectionToolbar4 : false;
63
+ },
64
+ icon: jsx(FixedToolbarIcon, {
65
+ label: "Fixed toolbar"
66
+ }),
67
+ selected: isDockedToTop,
68
+ elemAfter: isDockedToTop ? jsx(CheckMarkIcon, {
69
+ label: ""
70
+ }) : undefined
71
+ });
69
72
  return [{
70
- type: 'separator'
73
+ type: 'separator',
74
+ fullHeight: true
71
75
  }, {
72
76
  type: 'overflow-dropdown',
73
77
  dropdownWidth: 240,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",