@atlaskit/editor-plugin-alignment 1.14.0 → 1.14.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,20 @@
1
1
  # @atlaskit/editor-plugin-alignment
2
2
 
3
+ ## 1.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#172933](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/172933)
8
+ [`8323af2381d00`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8323af2381d00) -
9
+ [ux] Arranges items in the Selection toolbar under the Contextual toolbar experiment flag
10
+ - Updated dependencies
11
+
12
+ ## 1.14.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 1.14.0
4
19
 
5
20
  ### Minor Changes
@@ -91,7 +91,9 @@ var alignmentPlugin = exports.alignmentPlugin = function alignmentPlugin(_ref) {
91
91
  };
92
92
  return {
93
93
  isToolbarAbove: true,
94
- items: [toolbarCustom]
94
+ items: [toolbarCustom],
95
+ rank: 4,
96
+ pluginName: 'alignment'
95
97
  };
96
98
  } else {
97
99
  return undefined;
@@ -20,6 +20,7 @@ var _styles = require("@atlaskit/editor-common/styles");
20
20
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
21
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
22
22
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
23
24
  var _types = require("../../pm-plugins/types");
24
25
  var _Alignment = _interopRequireDefault(require("../Alignment"));
25
26
  var _iconMap = require("./icon-map");
@@ -103,6 +104,7 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
103
104
  api = _this$props.api;
104
105
  var alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
105
106
  var title = intl.formatMessage(_messages.alignmentMessages.alignment);
107
+ var reducedSpacing = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 'compact' : 'none';
106
108
  return (
107
109
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
108
110
  (0, _react2.jsx)("span", {
@@ -129,7 +131,7 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
129
131
  fitHeight: 80,
130
132
  closeOnTab: true,
131
133
  trigger: (0, _react2.jsx)(_uiMenu.ToolbarButton, {
132
- spacing: isReducedSpacing ? 'none' : 'default',
134
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
133
135
  disabled: disabled,
134
136
  selected: isOpen,
135
137
  title: title
@@ -83,7 +83,9 @@ export const alignmentPlugin = ({
83
83
  };
84
84
  return {
85
85
  isToolbarAbove: true,
86
- items: [toolbarCustom]
86
+ items: [toolbarCustom],
87
+ rank: 4,
88
+ pluginName: 'alignment'
87
89
  };
88
90
  } else {
89
91
  return undefined;
@@ -13,6 +13,7 @@ import { expandIconContainerStyle, separatorStyles, triggerWrapperStylesWithPadd
13
13
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
14
14
  import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
17
  import { ToolbarType } from '../../pm-plugins/types';
17
18
  import Alignment from '../Alignment';
18
19
  import { IconMap } from './icon-map';
@@ -83,6 +84,7 @@ export class AlignmentToolbar extends React.Component {
83
84
  } = this.props;
84
85
  const alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
85
86
  const title = intl.formatMessage(messages.alignment);
87
+ const reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) ? 'compact' : 'none';
86
88
  return (
87
89
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
88
90
  jsx("span", {
@@ -109,7 +111,7 @@ export class AlignmentToolbar extends React.Component {
109
111
  fitHeight: 80,
110
112
  closeOnTab: true,
111
113
  trigger: jsx(ToolbarButton, {
112
- spacing: isReducedSpacing ? 'none' : 'default',
114
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
113
115
  disabled: disabled,
114
116
  selected: isOpen,
115
117
  title: title
@@ -84,7 +84,9 @@ export var alignmentPlugin = function alignmentPlugin(_ref) {
84
84
  };
85
85
  return {
86
86
  isToolbarAbove: true,
87
- items: [toolbarCustom]
87
+ items: [toolbarCustom],
88
+ rank: 4,
89
+ pluginName: 'alignment'
88
90
  };
89
91
  } else {
90
92
  return undefined;
@@ -21,6 +21,7 @@ import { expandIconContainerStyle, separatorStyles, triggerWrapperStylesWithPadd
21
21
  import { ArrowKeyNavigationType, DropdownContainer as Dropdown, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
22
22
  import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
23
23
  import { fg } from '@atlaskit/platform-feature-flags';
24
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
24
25
  import { ToolbarType } from '../../pm-plugins/types';
25
26
  import Alignment from '../Alignment';
26
27
  import { IconMap } from './icon-map';
@@ -99,6 +100,7 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
99
100
  api = _this$props.api;
100
101
  var alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
101
102
  var title = intl.formatMessage(messages.alignment);
103
+ var reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) ? 'compact' : 'none';
102
104
  return (
103
105
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
104
106
  jsx("span", {
@@ -125,7 +127,7 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
125
127
  fitHeight: 80,
126
128
  closeOnTab: true,
127
129
  trigger: jsx(ToolbarButton, {
128
- spacing: isReducedSpacing ? 'none' : 'default',
130
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
129
131
  disabled: disabled,
130
132
  selected: isOpen,
131
133
  title: title
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-alignment",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "description": "Alignment plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@atlaskit/adf-schema": "^46.1.0",
24
- "@atlaskit/editor-common": "^95.10.0",
24
+ "@atlaskit/editor-common": "^96.1.0",
25
25
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
26
26
  "@atlaskit/editor-prosemirror": "6.2.1",
27
27
  "@atlaskit/editor-tables": "^2.8.0",