@atlaskit/editor-plugin-alignment 1.14.8 → 1.14.10

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-alignment
2
2
 
3
+ ## 1.14.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#107473](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107473)
8
+ [`962b3297548df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b3297548df) -
9
+ [ux] Implement variation 2 for editor contextual toolbar formatting experiment
10
+
11
+ ## 1.14.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [#105009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105009)
16
+ [`a4039ebf7ed11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a4039ebf7ed11) -
17
+ [ux] Implement variant 2 cohorts experience for platform_editor_contextual_formatting_toolbar_v2
18
+ experiment
19
+ - Updated dependencies
20
+
3
21
  ## 1.14.8
4
22
 
5
23
  ### Patch Changes
@@ -75,6 +75,10 @@ var alignmentPlugin = exports.alignmentPlugin = function alignmentPlugin(_ref) {
75
75
  selectionToolbar: function selectionToolbar() {
76
76
  if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
77
77
  exposure: true
78
+ }) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
79
+ exposure: true
80
+ }) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
81
+ exposure: true
78
82
  })) {
79
83
  var toolbarCustom = {
80
84
  type: 'custom',
@@ -28,8 +28,6 @@ function createPlugin(dispatch, pluginConfig) {
28
28
  init: function init(_, editorState) {
29
29
  return createInitialPluginState(editorState, pluginConfig);
30
30
  },
31
- // Ignored via go/ees005
32
- // eslint-disable-next-line @typescript-eslint/max-params
33
31
  apply: function apply(_tr, state, _prevState, nextState) {
34
32
  // Ignored via go/ees005
35
33
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -97,7 +97,11 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
97
97
  api = _this$props.api;
98
98
  var alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
99
99
  var title = intl.formatMessage(_messages.alignmentMessages.alignment);
100
- var reducedSpacing = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 'compact' : 'none';
100
+ var reducedSpacing = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
101
+ exposure: true
102
+ }) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
103
+ exposure: true
104
+ }) ? 'compact' : 'none';
101
105
  return (
102
106
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
103
107
  (0, _react2.jsx)("span", {
@@ -67,6 +67,10 @@ export const alignmentPlugin = ({
67
67
  selectionToolbar: () => {
68
68
  if (editorExperiment('contextual_formatting_toolbar', true, {
69
69
  exposure: true
70
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
71
+ exposure: true
72
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
73
+ exposure: true
70
74
  })) {
71
75
  const toolbarCustom = {
72
76
  type: 'custom',
@@ -16,8 +16,6 @@ export function createPlugin(dispatch, pluginConfig) {
16
16
  init(_, editorState) {
17
17
  return createInitialPluginState(editorState, pluginConfig);
18
18
  },
19
- // Ignored via go/ees005
20
- // eslint-disable-next-line @typescript-eslint/max-params
21
19
  apply(_tr, state, _prevState, nextState) {
22
20
  // Ignored via go/ees005
23
21
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -79,7 +79,11 @@ export class AlignmentToolbar extends React.Component {
79
79
  } = this.props;
80
80
  const alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
81
81
  const title = intl.formatMessage(messages.alignment);
82
- const reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) ? 'compact' : 'none';
82
+ const reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
83
+ exposure: true
84
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
85
+ exposure: true
86
+ }) ? 'compact' : 'none';
83
87
  return (
84
88
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
85
89
  jsx("span", {
@@ -68,6 +68,10 @@ export var alignmentPlugin = function alignmentPlugin(_ref) {
68
68
  selectionToolbar: function selectionToolbar() {
69
69
  if (editorExperiment('contextual_formatting_toolbar', true, {
70
70
  exposure: true
71
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
72
+ exposure: true
73
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
74
+ exposure: true
71
75
  })) {
72
76
  var toolbarCustom = {
73
77
  type: 'custom',
@@ -19,8 +19,6 @@ export function createPlugin(dispatch, pluginConfig) {
19
19
  init: function init(_, editorState) {
20
20
  return createInitialPluginState(editorState, pluginConfig);
21
21
  },
22
- // Ignored via go/ees005
23
- // eslint-disable-next-line @typescript-eslint/max-params
24
22
  apply: function apply(_tr, state, _prevState, nextState) {
25
23
  // Ignored via go/ees005
26
24
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -93,7 +93,11 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
93
93
  api = _this$props.api;
94
94
  var alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
95
95
  var title = intl.formatMessage(messages.alignment);
96
- var reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) ? 'compact' : 'none';
96
+ var reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
97
+ exposure: true
98
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
99
+ exposure: true
100
+ }) ? 'compact' : 'none';
97
101
  return (
98
102
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
99
103
  jsx("span", {
@@ -1,7 +1,8 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
3
3
  import type { AlignmentPluginState } from './pm-plugins/types';
4
+ export type AlignmentPluginDependencies = [OptionalPlugin<PrimaryToolbarPlugin>];
4
5
  export type AlignmentPlugin = NextEditorPlugin<'alignment', {
5
6
  sharedState: AlignmentPluginState | undefined;
6
- dependencies: [OptionalPlugin<PrimaryToolbarPlugin>];
7
+ dependencies: AlignmentPluginDependencies;
7
8
  }>;
@@ -1,9 +1,10 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
3
3
  import type { AlignmentPluginState } from './pm-plugins/types';
4
+ export type AlignmentPluginDependencies = [
5
+ OptionalPlugin<PrimaryToolbarPlugin>
6
+ ];
4
7
  export type AlignmentPlugin = NextEditorPlugin<'alignment', {
5
8
  sharedState: AlignmentPluginState | undefined;
6
- dependencies: [
7
- OptionalPlugin<PrimaryToolbarPlugin>
8
- ];
9
+ dependencies: AlignmentPluginDependencies;
9
10
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-alignment",
3
- "version": "1.14.8",
3
+ "version": "1.14.10",
4
4
  "description": "Alignment plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@atlaskit/adf-schema": "^46.1.0",
24
- "@atlaskit/editor-common": "^99.0.0",
24
+ "@atlaskit/editor-common": "^99.5.0",
25
25
  "@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
26
26
  "@atlaskit/editor-prosemirror": "6.2.1",
27
27
  "@atlaskit/editor-tables": "^2.8.0",
28
- "@atlaskit/icon": "^23.3.0",
28
+ "@atlaskit/icon": "^23.4.0",
29
29
  "@atlaskit/platform-feature-flags": "0.3.0",
30
- "@atlaskit/tmp-editor-statsig": "^2.33.0",
31
- "@atlaskit/tokens": "^3.0.0",
30
+ "@atlaskit/tmp-editor-statsig": "^2.41.0",
31
+ "@atlaskit/tokens": "^3.2.0",
32
32
  "@babel/runtime": "^7.0.0",
33
33
  "@emotion/react": "^11.7.1"
34
34
  },