@atlaskit/editor-plugin-selection-toolbar 5.0.2 → 5.0.4

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
+ ## 5.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`555ac8f256674`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/555ac8f256674) -
8
+ Update menu item icon size to small, tweak paddings and font styles
9
+ - Updated dependencies
10
+
11
+ ## 5.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
16
+ replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
17
+ - Updated dependencies
18
+
3
19
  ## 5.0.2
4
20
 
5
21
  ### Patch Changes
@@ -14,7 +14,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
16
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
17
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
19
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
19
  var _commands = require("./pm-plugins/commands");
@@ -43,9 +42,12 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
43
42
  config = _ref.config;
44
43
  var __selectionToolbarHandlers = [];
45
44
  var primaryToolbarComponent;
45
+ var isToolbarAIFCEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
46
+ exposure: true
47
+ });
46
48
  var userPreferencesProvider = config.userPreferencesProvider,
47
49
  contextualFormattingEnabled = config.contextualFormattingEnabled;
48
- if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)) {
50
+ if (isToolbarAIFCEnabled) {
49
51
  var _api$toolbar;
50
52
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api, contextualFormattingEnabled));
51
53
  } else {
@@ -248,7 +250,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
248
250
  }
249
251
  }];
250
252
  },
251
- pluginsOptions: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true) ? {} : {
253
+ pluginsOptions: isToolbarAIFCEnabled ? {} : {
252
254
  floatingToolbar: function floatingToolbar(state, intl, providerFactory) {
253
255
  var _ref3 = _pluginKey.selectionToolbarPluginKey.getState(state),
254
256
  selectionStable = _ref3.selectionStable,
@@ -41,8 +41,10 @@ var PinMenuItem = exports.PinMenuItem = function PinMenuItem(_ref) {
41
41
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
42
42
  onClick: onClick,
43
43
  elemBefore: isToolbarDocked ? /*#__PURE__*/_react.default.createElement(_editorToolbar.PinnedIcon, {
44
+ size: "small",
44
45
  label: ""
45
46
  }) : /*#__PURE__*/_react.default.createElement(_editorToolbar.PinIcon, {
47
+ size: "small",
46
48
  label: ""
47
49
  })
48
50
  }, message);
@@ -5,7 +5,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
6
6
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
10
  import { setToolbarDocking, toggleToolbar, updateToolbarDocking, forceToolbarDockingWithoutAnalytics } from './pm-plugins/commands';
@@ -33,11 +32,14 @@ export const selectionToolbarPlugin = ({
33
32
  }) => {
34
33
  const __selectionToolbarHandlers = [];
35
34
  let primaryToolbarComponent;
35
+ const isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
36
+ exposure: true
37
+ });
36
38
  const {
37
39
  userPreferencesProvider,
38
40
  contextualFormattingEnabled
39
41
  } = config;
40
- if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
42
+ if (isToolbarAIFCEnabled) {
41
43
  var _api$toolbar;
42
44
  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
45
  } else {
@@ -246,7 +248,7 @@ export const selectionToolbarPlugin = ({
246
248
  }
247
249
  }];
248
250
  },
249
- pluginsOptions: expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) ? {} : {
251
+ pluginsOptions: isToolbarAIFCEnabled ? {} : {
250
252
  floatingToolbar(state, intl, providerFactory) {
251
253
  const {
252
254
  selectionStable,
@@ -35,8 +35,10 @@ export const PinMenuItem = ({
35
35
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
36
36
  onClick: onClick,
37
37
  elemBefore: isToolbarDocked ? /*#__PURE__*/React.createElement(PinnedIcon, {
38
+ size: "small",
38
39
  label: ""
39
40
  }) : /*#__PURE__*/React.createElement(PinIcon, {
41
+ size: "small",
40
42
  label: ""
41
43
  })
42
44
  }, message);
@@ -9,7 +9,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
9
  import { calculateToolbarPositionAboveSelection, calculateToolbarPositionOnCellSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
10
10
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
14
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
14
  import { setToolbarDocking as _setToolbarDocking, toggleToolbar, updateToolbarDocking, forceToolbarDockingWithoutAnalytics as _forceToolbarDockingWithoutAnalytics } from './pm-plugins/commands';
@@ -36,9 +35,12 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
36
35
  config = _ref.config;
37
36
  var __selectionToolbarHandlers = [];
38
37
  var primaryToolbarComponent;
38
+ var isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
39
+ exposure: true
40
+ });
39
41
  var userPreferencesProvider = config.userPreferencesProvider,
40
42
  contextualFormattingEnabled = config.contextualFormattingEnabled;
41
- if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
43
+ if (isToolbarAIFCEnabled) {
42
44
  var _api$toolbar;
43
45
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api, contextualFormattingEnabled));
44
46
  } else {
@@ -241,7 +243,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
241
243
  }
242
244
  }];
243
245
  },
244
- pluginsOptions: expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) ? {} : {
246
+ pluginsOptions: isToolbarAIFCEnabled ? {} : {
245
247
  floatingToolbar: function floatingToolbar(state, intl, providerFactory) {
246
248
  var _ref3 = selectionToolbarPluginKey.getState(state),
247
249
  selectionStable = _ref3.selectionStable,
@@ -34,8 +34,10 @@ export var PinMenuItem = function PinMenuItem(_ref) {
34
34
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
35
35
  onClick: onClick,
36
36
  elemBefore: isToolbarDocked ? /*#__PURE__*/React.createElement(PinnedIcon, {
37
+ size: "small",
37
38
  label: ""
38
39
  }) : /*#__PURE__*/React.createElement(PinIcon, {
40
+ size: "small",
39
41
  label: ""
40
42
  })
41
43
  }, message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,13 +45,13 @@
45
45
  "@atlaskit/icon-lab": "^5.7.0",
46
46
  "@atlaskit/menu": "^8.4.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^12.4.0",
48
+ "@atlaskit/tmp-editor-statsig": "^12.5.0",
49
49
  "@atlaskit/tokens": "^6.2.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "bind-event-listener": "^3.0.0"
52
52
  },
53
53
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^108.2.0",
54
+ "@atlaskit/editor-common": "^108.5.0",
55
55
  "react": "^18.2.0",
56
56
  "react-dom": "^18.2.0",
57
57
  "react-intl-next": "npm:react-intl@^5.18.1"