@atlaskit/editor-plugin-selection-toolbar 4.3.7 → 4.3.9

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,21 @@
1
1
  # @atlaskit/editor-plugin-selection-toolbar
2
2
 
3
+ ## 4.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b27824f2875be`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b27824f2875be) -
8
+ [ux] [ED-28821] Add pin button to full page primary toolbar
9
+ - Updated dependencies
10
+
11
+ ## 4.3.8
12
+
13
+ ### Patch Changes
14
+
15
+ - [`1dc35286ebb8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1dc35286ebb8a) -
16
+ [ux] [EDITOR-1064] Added rovo menu on current selection toolbar
17
+ - Updated dependencies
18
+
3
19
  ## 4.3.7
4
20
 
5
21
  ### Patch Changes
@@ -47,7 +47,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
47
47
  contextualFormattingEnabled = config.contextualFormattingEnabled;
48
48
  if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)) {
49
49
  var _api$toolbar;
50
- api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
50
+ api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api, contextualFormattingEnabled));
51
51
  } else {
52
52
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
53
53
  exposure: true
@@ -173,7 +173,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
173
173
  view: function view(_view) {
174
174
  var unbind = (0, _bindEventListener.bind)(_view.root, {
175
175
  type: 'mouseup',
176
- listener: function listener() {
176
+ listener: function listener(event) {
177
177
  var _api$editorViewMode;
178
178
  // We only want to set selectionStable to true if the editor has focus
179
179
  // to prevent the toolbar from showing when the editor is blurred
@@ -181,6 +181,14 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
181
181
 
182
182
  var editorViewModePlugin = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
183
183
  var isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
184
+ if ((0, _experiments.editorExperiment)('platform_editor_ai_aifc', true)) {
185
+ var target = event.target;
186
+ var isRovoChangeToneButton = (target === null || target === void 0 ? void 0 : target.tagName) === 'BUTTON' && _hasNestedSpanWithText(target, 'Change tone') || target.getAttribute('aria-label') === 'Change tone' || target.innerHTML === 'Change tone';
187
+ var isRovoTranslateButton = (target === null || target === void 0 ? void 0 : target.tagName) === 'BUTTON' && _hasNestedSpanWithText(target, 'Translate options') || target.getAttribute('aria-label') === 'Translate options' || target.innerHTML === 'Translate options';
188
+ if (isRovoChangeToneButton || isRovoTranslateButton) {
189
+ return null;
190
+ }
191
+ }
184
192
  _view.dispatch(_view.state.tr.setMeta(_pluginKey.selectionToolbarPluginKey, {
185
193
  selectionStable: !isViewModeEnabled ? _view.hasFocus() : true
186
194
  }));
@@ -367,4 +375,16 @@ function getSelectionNodeTypes(state) {
367
375
  }
368
376
  });
369
377
  return selectionNodeTypes;
370
- }
378
+ }
379
+ var _hasNestedSpanWithText = function hasNestedSpanWithText(element, text) {
380
+ if (element.tagName === 'SPAN' && element.innerHTML === text) {
381
+ return true;
382
+ }
383
+ for (var _i = 0, _Array$from = Array.from(element.children); _i < _Array$from.length; _i++) {
384
+ var child = _Array$from[_i];
385
+ if (_hasNestedSpanWithText(child, text)) {
386
+ return true;
387
+ }
388
+ }
389
+ return false;
390
+ };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.PinButton = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactIntlNext = require("react-intl-next");
10
+ var _messages = require("@atlaskit/editor-common/messages");
11
+ var _editorToolbar = require("@atlaskit/editor-toolbar");
12
+ var PinButton = exports.PinButton = function PinButton(_ref) {
13
+ var api = _ref.api;
14
+ var intl = (0, _reactIntlNext.useIntl)();
15
+ var message = intl.formatMessage(_messages.selectionToolbarMessages.toolbarPositionPinedAtTop);
16
+ var onClick = function onClick() {
17
+ var _api$selectionToolbar, _api$selectionToolbar2;
18
+ if (!api) {
19
+ return;
20
+ }
21
+ (_api$selectionToolbar = api.selectionToolbar.actions) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar2 = _api$selectionToolbar.setToolbarDocking) === null || _api$selectionToolbar2 === void 0 || _api$selectionToolbar2.call(_api$selectionToolbar, 'none');
22
+ };
23
+ return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
24
+ content: message
25
+ }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
26
+ iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.PinnedIcon, {
27
+ size: "small",
28
+ label: ""
29
+ }),
30
+ label: message,
31
+ onClick: onClick
32
+ }));
33
+ };
@@ -7,9 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getToolbarComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _toolbar = require("@atlaskit/editor-common/toolbar");
10
+ var _PinButton = require("./PinButton");
10
11
  var _PinMenuItem = require("./PinMenuItem");
11
- var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api) {
12
- return [{
12
+ var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api, contextualFormattingEnabled) {
13
+ var components = [{
13
14
  type: _toolbar.PIN_MENU_SECTION.type,
14
15
  key: _toolbar.PIN_MENU_SECTION.key,
15
16
  parents: [{
@@ -31,4 +32,32 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
31
32
  });
32
33
  }
33
34
  }];
35
+
36
+ // Add pin button to primary toolbar when contextual formatting is enabled
37
+ if (contextualFormattingEnabled) {
38
+ var pinButtonComponents = [{
39
+ type: _toolbar.PIN_GROUP.type,
40
+ key: _toolbar.PIN_GROUP.key,
41
+ parents: [{
42
+ type: _toolbar.PIN_SECTION.type,
43
+ key: _toolbar.PIN_SECTION.key,
44
+ rank: _toolbar.PIN_SECTION_RANK[_toolbar.PIN_GROUP.key]
45
+ }]
46
+ }, {
47
+ type: _toolbar.PIN_BUTTON.type,
48
+ key: _toolbar.PIN_BUTTON.key,
49
+ parents: [{
50
+ type: _toolbar.PIN_GROUP.type,
51
+ key: _toolbar.PIN_GROUP.key,
52
+ rank: _toolbar.PIN_GROUP_RANK[_toolbar.PIN_BUTTON.key]
53
+ }],
54
+ component: function component() {
55
+ return /*#__PURE__*/_react.default.createElement(_PinButton.PinButton, {
56
+ api: api
57
+ });
58
+ }
59
+ }];
60
+ components.push.apply(components, pinButtonComponents);
61
+ }
62
+ return components;
34
63
  };
@@ -39,7 +39,7 @@ export const selectionToolbarPlugin = ({
39
39
  } = config;
40
40
  if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
41
41
  var _api$toolbar;
42
- api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api));
42
+ api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api, contextualFormattingEnabled));
43
43
  } else {
44
44
  if (editorExperiment('platform_editor_controls', 'variant1', {
45
45
  exposure: true
@@ -171,7 +171,7 @@ export const selectionToolbarPlugin = ({
171
171
  view(view) {
172
172
  const unbind = bind(view.root, {
173
173
  type: 'mouseup',
174
- listener: () => {
174
+ listener: event => {
175
175
  var _api$editorViewMode;
176
176
  // We only want to set selectionStable to true if the editor has focus
177
177
  // to prevent the toolbar from showing when the editor is blurred
@@ -179,6 +179,14 @@ export const selectionToolbarPlugin = ({
179
179
 
180
180
  const editorViewModePlugin = api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
181
181
  const isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
182
+ if (editorExperiment('platform_editor_ai_aifc', true)) {
183
+ const target = event.target;
184
+ const isRovoChangeToneButton = (target === null || target === void 0 ? void 0 : target.tagName) === 'BUTTON' && hasNestedSpanWithText(target, 'Change tone') || target.getAttribute('aria-label') === 'Change tone' || target.innerHTML === 'Change tone';
185
+ const isRovoTranslateButton = (target === null || target === void 0 ? void 0 : target.tagName) === 'BUTTON' && hasNestedSpanWithText(target, 'Translate options') || target.getAttribute('aria-label') === 'Translate options' || target.innerHTML === 'Translate options';
186
+ if (isRovoChangeToneButton || isRovoTranslateButton) {
187
+ return null;
188
+ }
189
+ }
182
190
  view.dispatch(view.state.tr.setMeta(selectionToolbarPluginKey, {
183
191
  selectionStable: !isViewModeEnabled ? view.hasFocus() : true
184
192
  }));
@@ -360,4 +368,15 @@ function getSelectionNodeTypes(state) {
360
368
  }
361
369
  });
362
370
  return selectionNodeTypes;
363
- }
371
+ }
372
+ const hasNestedSpanWithText = (element, text) => {
373
+ if (element.tagName === 'SPAN' && element.innerHTML === text) {
374
+ return true;
375
+ }
376
+ for (const child of Array.from(element.children)) {
377
+ if (hasNestedSpanWithText(child, text)) {
378
+ return true;
379
+ }
380
+ }
381
+ return false;
382
+ };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { useIntl } from 'react-intl-next';
3
+ import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
4
+ import { PinnedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
5
+ export const PinButton = ({
6
+ api
7
+ }) => {
8
+ const intl = useIntl();
9
+ const message = intl.formatMessage(selectionToolbarMessages.toolbarPositionPinedAtTop);
10
+ const onClick = () => {
11
+ var _api$selectionToolbar, _api$selectionToolbar2;
12
+ if (!api) {
13
+ return;
14
+ }
15
+ (_api$selectionToolbar = api.selectionToolbar.actions) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.setToolbarDocking) === null || _api$selectionToolbar2 === void 0 ? void 0 : _api$selectionToolbar2.call(_api$selectionToolbar, 'none');
16
+ };
17
+ return /*#__PURE__*/React.createElement(ToolbarTooltip, {
18
+ content: message
19
+ }, /*#__PURE__*/React.createElement(ToolbarButton, {
20
+ iconBefore: /*#__PURE__*/React.createElement(PinnedIcon, {
21
+ size: "small",
22
+ label: ""
23
+ }),
24
+ label: message,
25
+ onClick: onClick
26
+ }));
27
+ };
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { OVERFLOW_MENU, OVERFLOW_MENU_RANK, PIN_MENU_ITEM, PIN_MENU_SECTION, PIN_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
2
+ import { OVERFLOW_MENU, OVERFLOW_MENU_RANK, PIN_BUTTON, PIN_GROUP, PIN_MENU_ITEM, PIN_MENU_SECTION, PIN_MENU_SECTION_RANK, PIN_GROUP_RANK, PIN_SECTION, PIN_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
3
+ import { PinButton } from './PinButton';
3
4
  import { PinMenuItem } from './PinMenuItem';
4
- export const getToolbarComponents = api => {
5
- return [{
5
+ export const getToolbarComponents = (api, contextualFormattingEnabled) => {
6
+ const components = [{
6
7
  type: PIN_MENU_SECTION.type,
7
8
  key: PIN_MENU_SECTION.key,
8
9
  parents: [{
@@ -24,4 +25,32 @@ export const getToolbarComponents = api => {
24
25
  });
25
26
  }
26
27
  }];
28
+
29
+ // Add pin button to primary toolbar when contextual formatting is enabled
30
+ if (contextualFormattingEnabled) {
31
+ const pinButtonComponents = [{
32
+ type: PIN_GROUP.type,
33
+ key: PIN_GROUP.key,
34
+ parents: [{
35
+ type: PIN_SECTION.type,
36
+ key: PIN_SECTION.key,
37
+ rank: PIN_SECTION_RANK[PIN_GROUP.key]
38
+ }]
39
+ }, {
40
+ type: PIN_BUTTON.type,
41
+ key: PIN_BUTTON.key,
42
+ parents: [{
43
+ type: PIN_GROUP.type,
44
+ key: PIN_GROUP.key,
45
+ rank: PIN_GROUP_RANK[PIN_BUTTON.key]
46
+ }],
47
+ component: () => {
48
+ return /*#__PURE__*/React.createElement(PinButton, {
49
+ api: api
50
+ });
51
+ }
52
+ }];
53
+ components.push(...pinButtonComponents);
54
+ }
55
+ return components;
27
56
  };
@@ -40,7 +40,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
40
40
  contextualFormattingEnabled = config.contextualFormattingEnabled;
41
41
  if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
42
42
  var _api$toolbar;
43
- api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api));
43
+ api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api, contextualFormattingEnabled));
44
44
  } else {
45
45
  if (editorExperiment('platform_editor_controls', 'variant1', {
46
46
  exposure: true
@@ -166,7 +166,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
166
166
  view: function view(_view) {
167
167
  var unbind = bind(_view.root, {
168
168
  type: 'mouseup',
169
- listener: function listener() {
169
+ listener: function listener(event) {
170
170
  var _api$editorViewMode;
171
171
  // We only want to set selectionStable to true if the editor has focus
172
172
  // to prevent the toolbar from showing when the editor is blurred
@@ -174,6 +174,14 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
174
174
 
175
175
  var editorViewModePlugin = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
176
176
  var isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
177
+ if (editorExperiment('platform_editor_ai_aifc', true)) {
178
+ var target = event.target;
179
+ var isRovoChangeToneButton = (target === null || target === void 0 ? void 0 : target.tagName) === 'BUTTON' && _hasNestedSpanWithText(target, 'Change tone') || target.getAttribute('aria-label') === 'Change tone' || target.innerHTML === 'Change tone';
180
+ var isRovoTranslateButton = (target === null || target === void 0 ? void 0 : target.tagName) === 'BUTTON' && _hasNestedSpanWithText(target, 'Translate options') || target.getAttribute('aria-label') === 'Translate options' || target.innerHTML === 'Translate options';
181
+ if (isRovoChangeToneButton || isRovoTranslateButton) {
182
+ return null;
183
+ }
184
+ }
177
185
  _view.dispatch(_view.state.tr.setMeta(selectionToolbarPluginKey, {
178
186
  selectionStable: !isViewModeEnabled ? _view.hasFocus() : true
179
187
  }));
@@ -360,4 +368,16 @@ function getSelectionNodeTypes(state) {
360
368
  }
361
369
  });
362
370
  return selectionNodeTypes;
363
- }
371
+ }
372
+ var _hasNestedSpanWithText = function hasNestedSpanWithText(element, text) {
373
+ if (element.tagName === 'SPAN' && element.innerHTML === text) {
374
+ return true;
375
+ }
376
+ for (var _i = 0, _Array$from = Array.from(element.children); _i < _Array$from.length; _i++) {
377
+ var child = _Array$from[_i];
378
+ if (_hasNestedSpanWithText(child, text)) {
379
+ return true;
380
+ }
381
+ }
382
+ return false;
383
+ };
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { useIntl } from 'react-intl-next';
3
+ import { selectionToolbarMessages } from '@atlaskit/editor-common/messages';
4
+ import { PinnedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
5
+ export var PinButton = function PinButton(_ref) {
6
+ var api = _ref.api;
7
+ var intl = useIntl();
8
+ var message = intl.formatMessage(selectionToolbarMessages.toolbarPositionPinedAtTop);
9
+ var onClick = function onClick() {
10
+ var _api$selectionToolbar, _api$selectionToolbar2;
11
+ if (!api) {
12
+ return;
13
+ }
14
+ (_api$selectionToolbar = api.selectionToolbar.actions) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar2 = _api$selectionToolbar.setToolbarDocking) === null || _api$selectionToolbar2 === void 0 || _api$selectionToolbar2.call(_api$selectionToolbar, 'none');
15
+ };
16
+ return /*#__PURE__*/React.createElement(ToolbarTooltip, {
17
+ content: message
18
+ }, /*#__PURE__*/React.createElement(ToolbarButton, {
19
+ iconBefore: /*#__PURE__*/React.createElement(PinnedIcon, {
20
+ size: "small",
21
+ label: ""
22
+ }),
23
+ label: message,
24
+ onClick: onClick
25
+ }));
26
+ };
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { OVERFLOW_MENU, OVERFLOW_MENU_RANK, PIN_MENU_ITEM, PIN_MENU_SECTION, PIN_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
2
+ import { OVERFLOW_MENU, OVERFLOW_MENU_RANK, PIN_BUTTON, PIN_GROUP, PIN_MENU_ITEM, PIN_MENU_SECTION, PIN_MENU_SECTION_RANK, PIN_GROUP_RANK, PIN_SECTION, PIN_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
3
+ import { PinButton } from './PinButton';
3
4
  import { PinMenuItem } from './PinMenuItem';
4
- export var getToolbarComponents = function getToolbarComponents(api) {
5
- return [{
5
+ export var getToolbarComponents = function getToolbarComponents(api, contextualFormattingEnabled) {
6
+ var components = [{
6
7
  type: PIN_MENU_SECTION.type,
7
8
  key: PIN_MENU_SECTION.key,
8
9
  parents: [{
@@ -24,4 +25,32 @@ export var getToolbarComponents = function getToolbarComponents(api) {
24
25
  });
25
26
  }
26
27
  }];
28
+
29
+ // Add pin button to primary toolbar when contextual formatting is enabled
30
+ if (contextualFormattingEnabled) {
31
+ var pinButtonComponents = [{
32
+ type: PIN_GROUP.type,
33
+ key: PIN_GROUP.key,
34
+ parents: [{
35
+ type: PIN_SECTION.type,
36
+ key: PIN_SECTION.key,
37
+ rank: PIN_SECTION_RANK[PIN_GROUP.key]
38
+ }]
39
+ }, {
40
+ type: PIN_BUTTON.type,
41
+ key: PIN_BUTTON.key,
42
+ parents: [{
43
+ type: PIN_GROUP.type,
44
+ key: PIN_GROUP.key,
45
+ rank: PIN_GROUP_RANK[PIN_BUTTON.key]
46
+ }],
47
+ component: function component() {
48
+ return /*#__PURE__*/React.createElement(PinButton, {
49
+ api: api
50
+ });
51
+ }
52
+ }];
53
+ components.push.apply(components, pinButtonComponents);
54
+ }
55
+ return components;
27
56
  };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
+ export declare const PinButton: ({ api }: {
5
+ api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
6
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
3
  import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
- export declare const getToolbarComponents: (api?: ExtractInjectionAPI<SelectionToolbarPlugin>) => RegisterComponent[];
4
+ export declare const getToolbarComponents: (api?: ExtractInjectionAPI<SelectionToolbarPlugin>, contextualFormattingEnabled?: boolean) => RegisterComponent[];
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
+ export declare const PinButton: ({ api }: {
5
+ api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
6
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
3
  import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
- export declare const getToolbarComponents: (api?: ExtractInjectionAPI<SelectionToolbarPlugin>) => RegisterComponent[];
4
+ export declare const getToolbarComponents: (api?: ExtractInjectionAPI<SelectionToolbarPlugin>, contextualFormattingEnabled?: boolean) => RegisterComponent[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "4.3.7",
3
+ "version": "4.3.9",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/editor-plugin-connectivity": "^3.1.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
40
40
  "@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
41
- "@atlaskit/editor-plugin-toolbar": "^0.3.0",
41
+ "@atlaskit/editor-plugin-toolbar": "^0.4.0",
42
42
  "@atlaskit/editor-plugin-user-intent": "^1.1.0",
43
43
  "@atlaskit/editor-plugin-user-preferences": "^1.2.0",
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -48,13 +48,13 @@
48
48
  "@atlaskit/icon-lab": "^5.6.0",
49
49
  "@atlaskit/menu": "^8.3.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
51
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
52
52
  "@atlaskit/tokens": "^6.0.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "bind-event-listener": "^3.0.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atlaskit/editor-common": "^107.26.0",
57
+ "@atlaskit/editor-common": "^107.28.0",
58
58
  "react": "^18.2.0",
59
59
  "react-dom": "^18.2.0",
60
60
  "react-intl-next": "npm:react-intl@^5.18.1"