@atlaskit/editor-plugin-hyperlink 3.2.31 → 3.2.33

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,21 @@
1
1
  # @atlaskit/editor-plugin-hyperlink
2
2
 
3
+ ## 3.2.33
4
+
5
+ ### Patch Changes
6
+
7
+ - [#105009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105009)
8
+ [`a4039ebf7ed11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a4039ebf7ed11) -
9
+ [ux] Implement variant 2 cohorts experience for platform_editor_contextual_formatting_toolbar_v2
10
+ experiment
11
+ - Updated dependencies
12
+
13
+ ## 3.2.32
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 3.2.31
4
20
 
5
21
  ### Patch Changes
@@ -178,6 +178,8 @@ var hyperlinkPlugin = exports.hyperlinkPlugin = function hyperlinkPlugin(_ref) {
178
178
  var formatMessage = _ref5.formatMessage;
179
179
  if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
180
180
  exposure: true
181
+ }) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
182
+ exposure: true
181
183
  })) {
182
184
  var toolbarButton = function toolbarButton() {
183
185
  var _state$selection = state.selection,
@@ -159,6 +159,8 @@ export const hyperlinkPlugin = ({
159
159
  }) => {
160
160
  if (editorExperiment('contextual_formatting_toolbar', true, {
161
161
  exposure: true
162
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
163
+ exposure: true
162
164
  })) {
163
165
  const toolbarButton = () => {
164
166
  const {
@@ -171,6 +171,8 @@ export var hyperlinkPlugin = function hyperlinkPlugin(_ref) {
171
171
  var formatMessage = _ref5.formatMessage;
172
172
  if (editorExperiment('contextual_formatting_toolbar', true, {
173
173
  exposure: true
174
+ }) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
175
+ exposure: true
174
176
  })) {
175
177
  var toolbarButton = function toolbarButton() {
176
178
  var _state$selection = state.selection,
@@ -4,55 +4,60 @@ 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 { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './editor-commands/commands';
7
+ type HyperlinkPluginCommands = {
8
+ /**
9
+ * EditorCommand to show link toolbar.
10
+ *
11
+ * Example:
12
+ *
13
+ * ```
14
+ * const newTr = pluginInjectionApi?.hyperlink.commands.showLinkToolbar(
15
+ * inputMethod
16
+ * )({ tr })
17
+ * ```
18
+ */
19
+ showLinkToolbar: ShowLinkToolbar;
20
+ /**
21
+ * EditorCommand to edit the current active link.
22
+ *
23
+ * Example:
24
+ *
25
+ * ```
26
+ * api.core.actions.execute(
27
+ * api.hyperlink.commands.updateLink(href, text)
28
+ * )
29
+ * ```
30
+ */
31
+ updateLink: (href: string, text: string) => EditorCommand;
32
+ /**
33
+ * EditorCommand to remove the current active link.
34
+ *
35
+ * Example:
36
+ *
37
+ * ```
38
+ * api.core.actions.execute(
39
+ * api.hyperlink.commands.removeLink()
40
+ * )
41
+ * ```
42
+ */
43
+ removeLink: () => EditorCommand;
44
+ };
45
+ export type HyperlinkPluginDependencies = [
46
+ OptionalPlugin<AnalyticsPlugin>,
47
+ OptionalPlugin<CardPlugin>,
48
+ OptionalPlugin<EditorViewModePlugin>
49
+ ];
50
+ export type HyperlinkPluginActions = {
51
+ hideLinkToolbar: HideLinkToolbar;
52
+ insertLink: InsertLink;
53
+ updateLink: UpdateLink;
54
+ };
55
+ export type HyperlinkPluginSharedState = HyperlinkState | undefined;
7
56
  export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
8
57
  pluginConfiguration: HyperlinkPluginOptions | undefined;
9
- dependencies: [
10
- OptionalPlugin<AnalyticsPlugin>,
11
- OptionalPlugin<CardPlugin>,
12
- OptionalPlugin<EditorViewModePlugin>
13
- ];
14
- actions: {
15
- hideLinkToolbar: HideLinkToolbar;
16
- insertLink: InsertLink;
17
- updateLink: UpdateLink;
18
- };
19
- commands: {
20
- /**
21
- * EditorCommand to show link toolbar.
22
- *
23
- * Example:
24
- *
25
- * ```
26
- * const newTr = pluginInjectionApi?.hyperlink.commands.showLinkToolbar(
27
- * inputMethod
28
- * )({ tr })
29
- * ```
30
- */
31
- showLinkToolbar: ShowLinkToolbar;
32
- /**
33
- * EditorCommand to edit the current active link.
34
- *
35
- * Example:
36
- *
37
- * ```
38
- * api.core.actions.execute(
39
- * api.hyperlink.commands.updateLink(href, text)
40
- * )
41
- * ```
42
- */
43
- updateLink: (href: string, text: string) => EditorCommand;
44
- /**
45
- * EditorCommand to remove the current active link.
46
- *
47
- * Example:
48
- *
49
- * ```
50
- * api.core.actions.execute(
51
- * api.hyperlink.commands.removeLink()
52
- * )
53
- * ```
54
- */
55
- removeLink: () => EditorCommand;
56
- };
57
- sharedState: HyperlinkState | undefined;
58
+ dependencies: HyperlinkPluginDependencies;
59
+ actions: HyperlinkPluginActions;
60
+ commands: HyperlinkPluginCommands;
61
+ sharedState: HyperlinkPluginSharedState;
58
62
  }>;
63
+ export {};
@@ -4,55 +4,60 @@ 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 { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './editor-commands/commands';
7
+ type HyperlinkPluginCommands = {
8
+ /**
9
+ * EditorCommand to show link toolbar.
10
+ *
11
+ * Example:
12
+ *
13
+ * ```
14
+ * const newTr = pluginInjectionApi?.hyperlink.commands.showLinkToolbar(
15
+ * inputMethod
16
+ * )({ tr })
17
+ * ```
18
+ */
19
+ showLinkToolbar: ShowLinkToolbar;
20
+ /**
21
+ * EditorCommand to edit the current active link.
22
+ *
23
+ * Example:
24
+ *
25
+ * ```
26
+ * api.core.actions.execute(
27
+ * api.hyperlink.commands.updateLink(href, text)
28
+ * )
29
+ * ```
30
+ */
31
+ updateLink: (href: string, text: string) => EditorCommand;
32
+ /**
33
+ * EditorCommand to remove the current active link.
34
+ *
35
+ * Example:
36
+ *
37
+ * ```
38
+ * api.core.actions.execute(
39
+ * api.hyperlink.commands.removeLink()
40
+ * )
41
+ * ```
42
+ */
43
+ removeLink: () => EditorCommand;
44
+ };
45
+ export type HyperlinkPluginDependencies = [
46
+ OptionalPlugin<AnalyticsPlugin>,
47
+ OptionalPlugin<CardPlugin>,
48
+ OptionalPlugin<EditorViewModePlugin>
49
+ ];
50
+ export type HyperlinkPluginActions = {
51
+ hideLinkToolbar: HideLinkToolbar;
52
+ insertLink: InsertLink;
53
+ updateLink: UpdateLink;
54
+ };
55
+ export type HyperlinkPluginSharedState = HyperlinkState | undefined;
7
56
  export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
8
57
  pluginConfiguration: HyperlinkPluginOptions | undefined;
9
- dependencies: [
10
- OptionalPlugin<AnalyticsPlugin>,
11
- OptionalPlugin<CardPlugin>,
12
- OptionalPlugin<EditorViewModePlugin>
13
- ];
14
- actions: {
15
- hideLinkToolbar: HideLinkToolbar;
16
- insertLink: InsertLink;
17
- updateLink: UpdateLink;
18
- };
19
- commands: {
20
- /**
21
- * EditorCommand to show link toolbar.
22
- *
23
- * Example:
24
- *
25
- * ```
26
- * const newTr = pluginInjectionApi?.hyperlink.commands.showLinkToolbar(
27
- * inputMethod
28
- * )({ tr })
29
- * ```
30
- */
31
- showLinkToolbar: ShowLinkToolbar;
32
- /**
33
- * EditorCommand to edit the current active link.
34
- *
35
- * Example:
36
- *
37
- * ```
38
- * api.core.actions.execute(
39
- * api.hyperlink.commands.updateLink(href, text)
40
- * )
41
- * ```
42
- */
43
- updateLink: (href: string, text: string) => EditorCommand;
44
- /**
45
- * EditorCommand to remove the current active link.
46
- *
47
- * Example:
48
- *
49
- * ```
50
- * api.core.actions.execute(
51
- * api.hyperlink.commands.removeLink()
52
- * )
53
- * ```
54
- */
55
- removeLink: () => EditorCommand;
56
- };
57
- sharedState: HyperlinkState | undefined;
58
+ dependencies: HyperlinkPluginDependencies;
59
+ actions: HyperlinkPluginActions;
60
+ commands: HyperlinkPluginCommands;
61
+ sharedState: HyperlinkPluginSharedState;
58
62
  }>;
63
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "3.2.31",
3
+ "version": "3.2.33",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,15 +33,15 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
35
  "@atlaskit/analytics-next": "^10.2.0",
36
- "@atlaskit/editor-common": "^99.0.0",
37
- "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
- "@atlaskit/editor-plugin-card": "4.5.14",
36
+ "@atlaskit/editor-common": "^99.5.0",
37
+ "@atlaskit/editor-plugin-analytics": "^1.11.0",
38
+ "@atlaskit/editor-plugin-card": "4.5.16",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
40
40
  "@atlaskit/editor-prosemirror": "6.2.1",
41
- "@atlaskit/icon": "^23.3.0",
41
+ "@atlaskit/icon": "^23.4.0",
42
42
  "@atlaskit/platform-feature-flags": "^0.3.0",
43
43
  "@atlaskit/prosemirror-input-rules": "^3.2.0",
44
- "@atlaskit/tmp-editor-statsig": "^2.33.0",
44
+ "@atlaskit/tmp-editor-statsig": "^2.39.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "uuid": "^3.1.0"
47
47
  },