@atlaskit/editor-plugin-hyperlink 3.5.0 → 4.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-hyperlink
2
2
 
3
+ ## 4.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
+ ## 3.6.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
  ## 3.5.0
4
34
 
5
35
  ### Minor Changes
@@ -191,7 +191,13 @@ var hyperlinkPlugin = exports.hyperlinkPlugin = function hyperlinkPlugin(_ref) {
191
191
  },
192
192
  floatingToolbar: (0, _Toolbar.getToolbarConfig)(options, api),
193
193
  selectionToolbar: function selectionToolbar(state, _ref5) {
194
+ var _api$selectionToolbar;
194
195
  var formatMessage = _ref5.formatMessage;
196
+ 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', {
197
+ exposure: true
198
+ })) {
199
+ return undefined;
200
+ }
195
201
  if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
196
202
  exposure: true
197
203
  }) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
@@ -173,6 +173,12 @@ export const hyperlinkPlugin = ({
173
173
  selectionToolbar: (state, {
174
174
  formatMessage
175
175
  }) => {
176
+ var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
177
+ 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', {
178
+ exposure: true
179
+ })) {
180
+ return undefined;
181
+ }
176
182
  if (editorExperiment('contextual_formatting_toolbar', true, {
177
183
  exposure: true
178
184
  }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
@@ -184,7 +184,13 @@ export var hyperlinkPlugin = function hyperlinkPlugin(_ref) {
184
184
  },
185
185
  floatingToolbar: getToolbarConfig(options, api),
186
186
  selectionToolbar: function selectionToolbar(state, _ref5) {
187
+ var _api$selectionToolbar;
187
188
  var formatMessage = _ref5.formatMessage;
189
+ 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', {
190
+ exposure: true
191
+ })) {
192
+ return undefined;
193
+ }
188
194
  if (editorExperiment('contextual_formatting_toolbar', true, {
189
195
  exposure: true
190
196
  }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
@@ -4,6 +4,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { CardPlugin } from '@atlaskit/editor-plugin-card';
5
5
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
6
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
7
8
  import type { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './editor-commands/commands';
8
9
  type HyperlinkPluginCommands = {
9
10
  /**
@@ -47,7 +48,8 @@ export type HyperlinkPluginDependencies = [
47
48
  OptionalPlugin<AnalyticsPlugin>,
48
49
  OptionalPlugin<CardPlugin>,
49
50
  OptionalPlugin<EditorViewModePlugin>,
50
- OptionalPlugin<PrimaryToolbarPlugin>
51
+ OptionalPlugin<PrimaryToolbarPlugin>,
52
+ OptionalPlugin<SelectionToolbarPlugin>
51
53
  ];
52
54
  export type HyperlinkPluginActions = {
53
55
  hideLinkToolbar: HideLinkToolbar;
@@ -4,6 +4,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { CardPlugin } from '@atlaskit/editor-plugin-card';
5
5
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
6
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
+ import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
7
8
  import type { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './editor-commands/commands';
8
9
  type HyperlinkPluginCommands = {
9
10
  /**
@@ -47,7 +48,8 @@ export type HyperlinkPluginDependencies = [
47
48
  OptionalPlugin<AnalyticsPlugin>,
48
49
  OptionalPlugin<CardPlugin>,
49
50
  OptionalPlugin<EditorViewModePlugin>,
50
- OptionalPlugin<PrimaryToolbarPlugin>
51
+ OptionalPlugin<PrimaryToolbarPlugin>,
52
+ OptionalPlugin<SelectionToolbarPlugin>
51
53
  ];
52
54
  export type HyperlinkPluginActions = {
53
55
  hideLinkToolbar: HideLinkToolbar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "3.5.0",
3
+ "version": "4.0.0",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,29 +32,30 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^47.2.1",
35
- "@atlaskit/analytics-next": "^10.3.0",
36
- "@atlaskit/editor-common": "^99.18.0",
37
- "@atlaskit/editor-plugin-analytics": "^1.12.0",
38
- "@atlaskit/editor-plugin-card": "4.6.5",
39
- "@atlaskit/editor-plugin-editor-viewmode": "^2.2.0",
40
- "@atlaskit/editor-plugin-primary-toolbar": "^2.3.0",
35
+ "@atlaskit/analytics-next": "^11.0.0",
36
+ "@atlaskit/editor-common": "^100.0.0",
37
+ "@atlaskit/editor-plugin-analytics": "^2.0.0",
38
+ "@atlaskit/editor-plugin-card": "5.0.0",
39
+ "@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
40
+ "@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
41
+ "@atlaskit/editor-plugin-selection-toolbar": "^2.0.0",
41
42
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/icon": "^23.10.0",
43
+ "@atlaskit/icon": "^24.0.0",
43
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
45
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
45
- "@atlaskit/tmp-editor-statsig": "^2.47.0",
46
+ "@atlaskit/tmp-editor-statsig": "^3.0.0",
46
47
  "@babel/runtime": "^7.0.0",
47
48
  "uuid": "^3.1.0"
48
49
  },
49
50
  "peerDependencies": {
50
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
51
- "react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
51
+ "react": "^18.2.0",
52
+ "react-dom": "^18.2.0",
52
53
  "react-intl-next": "npm:react-intl@^5.18.1"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@atlaskit/activity-provider": "^2.5.0",
56
- "@atlaskit/link-test-helpers": "^7.6.0",
57
- "@atlaskit/media-test-helpers": "^34.8.0",
57
+ "@atlaskit/link-test-helpers": "^8.0.0",
58
+ "@atlaskit/media-test-helpers": "^35.0.0",
58
59
  "@atlaskit/ssr": "*",
59
60
  "@atlaskit/util-data-test": "^18.0.0",
60
61
  "@atlaskit/visual-regression": "*",