@atlaskit/editor-plugin-extension 10.1.5 → 10.1.7

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.
@@ -1,6 +1,7 @@
1
1
  import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
2
2
  import { type JSONDocNode } from '@atlaskit/editor-json-transformer';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
4
5
  import type { Mark, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
5
6
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
7
  import type { DomAtPos, NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
@@ -19,10 +20,12 @@ export interface Position {
19
20
  /**
20
21
  * copying ADF from the unsupported content extension as text to clipboard
21
22
  */
22
- export declare const copyUnsupportedContentToClipboard: ({ schema, unsupportedContent, }: {
23
+ export declare const copyUnsupportedContentToClipboard: ({ locale, schema, unsupportedContent, api, }: {
24
+ api?: PublicPluginAPI<[MentionsPlugin]>;
25
+ locale?: string;
23
26
  schema: Schema;
24
27
  unsupportedContent?: JSONDocNode;
25
- }) => Error | undefined;
28
+ }) => Promise<void>;
26
29
  export declare const onCopyFailed: ({ error, extensionApi, state, }: {
27
30
  error: Error;
28
31
  extensionApi?: PublicPluginAPI<[AnalyticsPlugin]>;
@@ -9,8 +9,10 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
9
  import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
10
10
  import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
11
11
  import type { ApplyChangeHandler, ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
12
+ import type { CopyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
12
13
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
13
14
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
15
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
14
16
  import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
15
17
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
16
18
  import type { Fragment, Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -81,7 +83,9 @@ export type ExtensionPluginDependencies = [
81
83
  OptionalPlugin<ContextPanelPlugin>,
82
84
  OptionalPlugin<ContextIdentifierPlugin>,
83
85
  OptionalPlugin<ConnectivityPlugin>,
84
- OptionalPlugin<ToolbarPlugin>
86
+ OptionalPlugin<ToolbarPlugin>,
87
+ OptionalPlugin<MentionsPlugin>,
88
+ OptionalPlugin<CopyButtonPlugin>
85
89
  ];
86
90
  export type ExtensionPluginActions = {
87
91
  api: () => ExtensionAPI;
@@ -1,19 +1,24 @@
1
+ import type { IntlShape } from 'react-intl-next';
1
2
  import { type ExtensionProvider } from '@atlaskit/editor-common/extensions';
2
3
  import type { Command, FloatingToolbarHandler, PublicPluginAPI } from '@atlaskit/editor-common/types';
3
4
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
5
  import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
5
6
  import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
7
+ import type { CopyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
6
8
  import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
9
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
7
10
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
8
11
  import type { ExtensionPluginOptions } from '../extensionPluginType';
9
12
  /**
10
13
  * Creates a function that copies the text content of the unsupported content extension to the clipboard
11
14
  * if the current selected extension is an unsupported content extension.
12
15
  */
13
- export declare const createOnClickCopyButton: ({ extensionApi, extensionProvider, getUnsupportedContent, state, }: {
16
+ export declare const createOnClickCopyButton: ({ formatMessage, extensionApi, extensionProvider, getUnsupportedContent, state, locale, }: {
14
17
  extensionApi: GetToolbarConfigProps["extensionApi"];
15
18
  extensionProvider?: ExtensionProvider;
19
+ formatMessage: IntlShape["formatMessage"];
16
20
  getUnsupportedContent?: ExtensionPluginOptions["getUnsupportedContent"];
21
+ locale: string;
17
22
  state: EditorState;
18
23
  }) => Command | undefined;
19
24
  interface GetToolbarConfigProps {
@@ -22,7 +27,9 @@ interface GetToolbarConfigProps {
22
27
  ContextPanelPlugin,
23
28
  AnalyticsPlugin,
24
29
  DecorationsPlugin,
25
- ConnectivityPlugin
30
+ ConnectivityPlugin,
31
+ MentionsPlugin,
32
+ CopyButtonPlugin
26
33
  ]> | undefined;
27
34
  getUnsupportedContent?: ExtensionPluginOptions['getUnsupportedContent'];
28
35
  }
@@ -1,6 +1,7 @@
1
1
  import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
2
2
  import { type JSONDocNode } from '@atlaskit/editor-json-transformer';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
4
5
  import type { Mark, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
5
6
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
6
7
  import type { DomAtPos, NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
@@ -19,10 +20,14 @@ export interface Position {
19
20
  /**
20
21
  * copying ADF from the unsupported content extension as text to clipboard
21
22
  */
22
- export declare const copyUnsupportedContentToClipboard: ({ schema, unsupportedContent, }: {
23
+ export declare const copyUnsupportedContentToClipboard: ({ locale, schema, unsupportedContent, api, }: {
24
+ api?: PublicPluginAPI<[
25
+ MentionsPlugin
26
+ ]>;
27
+ locale?: string;
23
28
  schema: Schema;
24
29
  unsupportedContent?: JSONDocNode;
25
- }) => Error | undefined;
30
+ }) => Promise<void>;
26
31
  export declare const onCopyFailed: ({ error, extensionApi, state, }: {
27
32
  error: Error;
28
33
  extensionApi?: PublicPluginAPI<[
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "10.1.5",
3
+ "version": "10.1.7",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,6 +25,7 @@
25
25
  "@atlaskit/adf-utils": "^19.27.0",
26
26
  "@atlaskit/analytics-next": "^11.1.0",
27
27
  "@atlaskit/avatar": "^25.8.0",
28
+ "@atlaskit/browser-apis": "^0.0.1",
28
29
  "@atlaskit/button": "^23.9.0",
29
30
  "@atlaskit/checkbox": "^17.3.0",
30
31
  "@atlaskit/datetime-picker": "^17.5.0",
@@ -45,6 +46,7 @@
45
46
  "@atlaskit/heading": "^5.3.0",
46
47
  "@atlaskit/icon": "^31.0.0",
47
48
  "@atlaskit/link": "^3.3.0",
49
+ "@atlaskit/mention": "^24.5.0",
48
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
51
  "@atlaskit/primitives": "^18.0.0",
50
52
  "@atlaskit/radio": "^8.4.0",
@@ -56,7 +58,7 @@
56
58
  "@atlaskit/textarea": "^8.2.0",
57
59
  "@atlaskit/textfield": "^8.2.0",
58
60
  "@atlaskit/theme": "^21.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^29.0.0",
61
+ "@atlaskit/tmp-editor-statsig": "^29.3.0",
60
62
  "@atlaskit/toggle": "^15.2.0",
61
63
  "@atlaskit/tokens": "^11.0.0",
62
64
  "@atlaskit/tooltip": "^20.14.0",
@@ -70,7 +72,7 @@
70
72
  "uuid": "^3.1.0"
71
73
  },
72
74
  "peerDependencies": {
73
- "@atlaskit/editor-common": "^111.16.0",
75
+ "@atlaskit/editor-common": "^111.18.0",
74
76
  "react": "^18.2.0",
75
77
  "react-intl-next": "npm:react-intl@^5.18.1"
76
78
  },