@atlaskit/editor-plugin-text-formatting 1.19.0 → 1.20.0

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,17 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 1.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#116949](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116949)
8
+ [`9154f7b89e3d2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9154f7b89e3d2) -
9
+ [ux] ED-26674 Hiding contextual toolbar menu items when the menu is docked to top
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 1.19.0
4
16
 
5
17
  ### Minor Changes
@@ -143,6 +143,12 @@ var textFormattingPlugin = exports.textFormattingPlugin = function textFormattin
143
143
  },
144
144
  pluginsOptions: {
145
145
  selectionToolbar: function selectionToolbar() {
146
+ var _api$selectionToolbar;
147
+ if ((api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking) === 'top' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
148
+ exposure: true
149
+ })) {
150
+ return undefined;
151
+ }
146
152
  if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
147
153
  exposure: true
148
154
  }) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
@@ -137,6 +137,12 @@ export const textFormattingPlugin = ({
137
137
  },
138
138
  pluginsOptions: {
139
139
  selectionToolbar: () => {
140
+ var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
141
+ if ((api === null || api === void 0 ? void 0 : (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.currentState()) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.toolbarDocking) === 'top' && editorExperiment('platform_editor_controls', 'variant1', {
142
+ exposure: true
143
+ })) {
144
+ return undefined;
145
+ }
140
146
  if (editorExperiment('contextual_formatting_toolbar', true, {
141
147
  exposure: true
142
148
  }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
@@ -137,6 +137,12 @@ export var textFormattingPlugin = function textFormattingPlugin(_ref) {
137
137
  },
138
138
  pluginsOptions: {
139
139
  selectionToolbar: function selectionToolbar() {
140
+ var _api$selectionToolbar;
141
+ if ((api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking) === 'top' && editorExperiment('platform_editor_controls', 'variant1', {
142
+ exposure: true
143
+ })) {
144
+ return undefined;
145
+ }
140
146
  if (editorExperiment('contextual_formatting_toolbar', true, {
141
147
  exposure: true
142
148
  }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
@@ -2,13 +2,15 @@ import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions, TextForma
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { BasePlugin } from '@atlaskit/editor-plugin-base';
4
4
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
5
6
  import type { ToggleMarkEditorCommand } from './pm-plugins/commands';
6
7
  export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
7
8
  pluginConfiguration: TextFormattingOptions | undefined;
8
9
  dependencies: [
9
10
  OptionalPlugin<AnalyticsPlugin>,
10
11
  OptionalPlugin<PrimaryToolbarPlugin>,
11
- OptionalPlugin<BasePlugin>
12
+ OptionalPlugin<BasePlugin>,
13
+ OptionalPlugin<SelectionToolbarPlugin>
12
14
  ];
13
15
  commands: {
14
16
  toggleSuperscript: ToggleMarkEditorCommand;
@@ -2,13 +2,15 @@ import type { NextEditorPlugin, OptionalPlugin, TextFormattingOptions, TextForma
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { BasePlugin } from '@atlaskit/editor-plugin-base';
4
4
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
5
6
  import type { ToggleMarkEditorCommand } from './pm-plugins/commands';
6
7
  export type TextFormattingPlugin = NextEditorPlugin<'textFormatting', {
7
8
  pluginConfiguration: TextFormattingOptions | undefined;
8
9
  dependencies: [
9
10
  OptionalPlugin<AnalyticsPlugin>,
10
11
  OptionalPlugin<PrimaryToolbarPlugin>,
11
- OptionalPlugin<BasePlugin>
12
+ OptionalPlugin<BasePlugin>,
13
+ OptionalPlugin<SelectionToolbarPlugin>
12
14
  ];
13
15
  commands: {
14
16
  toggleSuperscript: ToggleMarkEditorCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,10 +36,11 @@
36
36
  "@atlaskit/editor-plugin-analytics": "^1.12.0",
37
37
  "@atlaskit/editor-plugin-base": "^2.2.0",
38
38
  "@atlaskit/editor-plugin-primary-toolbar": "^2.3.0",
39
+ "@atlaskit/editor-plugin-selection-toolbar": "^1.9.0",
39
40
  "@atlaskit/editor-prosemirror": "7.0.0",
40
41
  "@atlaskit/editor-shared-styles": "^3.3.0",
41
42
  "@atlaskit/editor-tables": "^2.9.0",
42
- "@atlaskit/icon": "^23.10.0",
43
+ "@atlaskit/icon": "^23.11.0",
43
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
45
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
45
46
  "@atlaskit/tmp-editor-statsig": "^2.47.0",