@atlaskit/editor-plugin-highlight 1.21.0 → 2.0.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,35 @@
1
1
  # @atlaskit/editor-plugin-highlight
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
8
+ [`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
9
+ This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
10
+ status of only supporting React 18 going forward. No explicit breaking change to React support has
11
+ been made in this release, but this is to signify going forward, breaking changes for React 16 or
12
+ React 17 may come via non-major semver releases.
13
+
14
+ Please refer this community post for more details:
15
+ https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
21
+ ## 1.22.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [#116949](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116949)
26
+ [`9154f7b89e3d2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9154f7b89e3d2) -
27
+ [ux] ED-26674 Hiding contextual toolbar menu items when the menu is docked to top
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+
3
33
  ## 1.21.0
4
34
 
5
35
  ### Minor Changes
@@ -84,6 +84,12 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
84
84
  },
85
85
  pluginsOptions: {
86
86
  selectionToolbar: function selectionToolbar() {
87
+ var _api$selectionToolbar;
88
+ 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', {
89
+ exposure: true
90
+ })) {
91
+ return undefined;
92
+ }
87
93
  if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false, {
88
94
  exposure: true
89
95
  }) && (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'control', {
@@ -73,6 +73,12 @@ export const highlightPlugin = ({
73
73
  },
74
74
  pluginsOptions: {
75
75
  selectionToolbar() {
76
+ var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
77
+ 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', {
78
+ exposure: true
79
+ })) {
80
+ return undefined;
81
+ }
76
82
  if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && editorExperiment('contextual_formatting_toolbar', false, {
77
83
  exposure: true
78
84
  }) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control', {
@@ -77,6 +77,12 @@ export var highlightPlugin = function highlightPlugin(_ref) {
77
77
  },
78
78
  pluginsOptions: {
79
79
  selectionToolbar: function selectionToolbar() {
80
+ var _api$selectionToolbar;
81
+ 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', {
82
+ exposure: true
83
+ })) {
84
+ return undefined;
85
+ }
80
86
  if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && editorExperiment('contextual_formatting_toolbar', false, {
81
87
  exposure: true
82
88
  }) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control', {
@@ -2,6 +2,7 @@ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
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 { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
6
7
  import type { HighlightPluginState } from './pm-plugins/main';
7
8
  export type HighlightPluginOptions = {
@@ -12,7 +13,8 @@ export type HighlightPlugin = NextEditorPlugin<'highlight', {
12
13
  dependencies: [
13
14
  OptionalPlugin<AnalyticsPlugin>,
14
15
  OptionalPlugin<TextFormattingPlugin>,
15
- OptionalPlugin<PrimaryToolbarPlugin>
16
+ OptionalPlugin<PrimaryToolbarPlugin>,
17
+ OptionalPlugin<SelectionToolbarPlugin>
16
18
  ];
17
19
  sharedState: HighlightPluginState | undefined;
18
20
  commands: {
@@ -2,6 +2,7 @@ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
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 { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
6
7
  import type { HighlightPluginState } from './pm-plugins/main';
7
8
  export type HighlightPluginOptions = {
@@ -12,7 +13,8 @@ export type HighlightPlugin = NextEditorPlugin<'highlight', {
12
13
  dependencies: [
13
14
  OptionalPlugin<AnalyticsPlugin>,
14
15
  OptionalPlugin<TextFormattingPlugin>,
15
- OptionalPlugin<PrimaryToolbarPlugin>
16
+ OptionalPlugin<PrimaryToolbarPlugin>,
17
+ OptionalPlugin<SelectionToolbarPlugin>
16
18
  ];
17
19
  sharedState: HighlightPluginState | undefined;
18
20
  commands: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-highlight",
3
- "version": "1.21.0",
3
+ "version": "2.0.0",
4
4
  "description": "Highlight plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,24 +37,25 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@atlaskit/adf-schema": "^47.2.1",
40
- "@atlaskit/editor-common": "^99.18.0",
41
- "@atlaskit/editor-palette": "1.7.0",
42
- "@atlaskit/editor-plugin-analytics": "^1.12.0",
43
- "@atlaskit/editor-plugin-primary-toolbar": "^2.3.0",
44
- "@atlaskit/editor-plugin-text-formatting": "^1.19.0",
40
+ "@atlaskit/editor-common": "^100.0.0",
41
+ "@atlaskit/editor-palette": "2.0.0",
42
+ "@atlaskit/editor-plugin-analytics": "^2.0.0",
43
+ "@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
44
+ "@atlaskit/editor-plugin-selection-toolbar": "^2.0.0",
45
+ "@atlaskit/editor-plugin-text-formatting": "^2.0.0",
45
46
  "@atlaskit/editor-prosemirror": "7.0.0",
46
47
  "@atlaskit/editor-shared-styles": "^3.3.0",
47
48
  "@atlaskit/editor-tables": "^2.9.0",
48
- "@atlaskit/icon": "^23.10.0",
49
+ "@atlaskit/icon": "^24.0.0",
49
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
- "@atlaskit/primitives": "^13.6.0",
51
- "@atlaskit/tmp-editor-statsig": "^2.47.0",
52
- "@atlaskit/tokens": "^3.3.0",
51
+ "@atlaskit/primitives": "^14.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^3.0.0",
53
+ "@atlaskit/tokens": "^4.0.0",
53
54
  "@babel/runtime": "^7.0.0",
54
55
  "@emotion/react": "^11.7.1"
55
56
  },
56
57
  "peerDependencies": {
57
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
58
+ "react": "^18.2.0",
58
59
  "react-intl-next": "npm:react-intl@^5.18.1"
59
60
  },
60
61
  "devDependencies": {