@atlaskit/editor-plugin-extension 0.2.5 → 0.3.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 +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +7 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +7 -0
- package/package.json +1 -1
- package/report.api.md +18 -0
- package/tmp/api-report-tmp.d.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#43042](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43042) [`fd547efa4e5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd547efa4e5) - Remove `macro` editor plugin and migrate functionality into extension plugin.
|
|
8
|
+
|
|
3
9
|
## 0.2.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { CreateExtensionAPI, ExtensionPlugin, ExtensionPluginOptions, } from './types';
|
|
1
|
+
export type { CreateExtensionAPI, ExtensionPlugin, ExtensionPluginOptions, RunMacroAutoConvert, } from './types';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { ExtensionAPI, ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
4
|
import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
6
|
import type { ApplyChangeHandler, ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
6
7
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
8
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
9
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
11
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
12
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
13
|
interface CreateExtensionAPIOptions {
|
|
11
14
|
editorView: EditorView;
|
|
@@ -20,6 +23,8 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
20
23
|
extensionHandlers?: ExtensionHandlers;
|
|
21
24
|
appearance?: EditorAppearance;
|
|
22
25
|
}
|
|
26
|
+
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
27
|
+
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
23
28
|
export type ExtensionPlugin = NextEditorPlugin<'extension', {
|
|
24
29
|
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
25
30
|
dependencies: [
|
|
@@ -31,6 +36,8 @@ export type ExtensionPlugin = NextEditorPlugin<'extension', {
|
|
|
31
36
|
];
|
|
32
37
|
actions: {
|
|
33
38
|
api: () => ExtensionAPI;
|
|
39
|
+
insertMacroFromMacroBrowser: InsertMacroFromMacroBrowser;
|
|
40
|
+
runMacroAutoConvert: RunMacroAutoConvert;
|
|
34
41
|
};
|
|
35
42
|
}>;
|
|
36
43
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { CreateExtensionAPI, ExtensionPlugin, ExtensionPluginOptions, } from './types';
|
|
1
|
+
export type { CreateExtensionAPI, ExtensionPlugin, ExtensionPluginOptions, RunMacroAutoConvert, } from './types';
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { ExtensionAPI, ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
4
|
import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
6
|
import type { ApplyChangeHandler, ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
6
7
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
8
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
9
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
11
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
12
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
13
|
interface CreateExtensionAPIOptions {
|
|
11
14
|
editorView: EditorView;
|
|
@@ -20,6 +23,8 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
20
23
|
extensionHandlers?: ExtensionHandlers;
|
|
21
24
|
appearance?: EditorAppearance;
|
|
22
25
|
}
|
|
26
|
+
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
27
|
+
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
23
28
|
export type ExtensionPlugin = NextEditorPlugin<'extension', {
|
|
24
29
|
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
25
30
|
dependencies: [
|
|
@@ -31,6 +36,8 @@ export type ExtensionPlugin = NextEditorPlugin<'extension', {
|
|
|
31
36
|
];
|
|
32
37
|
actions: {
|
|
33
38
|
api: () => ExtensionAPI;
|
|
39
|
+
insertMacroFromMacroBrowser: InsertMacroFromMacroBrowser;
|
|
40
|
+
runMacroAutoConvert: RunMacroAutoConvert;
|
|
34
41
|
};
|
|
35
42
|
}>;
|
|
36
43
|
export {};
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -21,12 +21,15 @@ import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
|
21
21
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
22
22
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
23
23
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
24
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
24
25
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
25
26
|
import type { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
26
27
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
27
28
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
28
29
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
30
|
+
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
29
31
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
32
|
+
import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
30
33
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
31
34
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
32
35
|
|
|
@@ -61,6 +64,8 @@ export type ExtensionPlugin = NextEditorPlugin<
|
|
|
61
64
|
];
|
|
62
65
|
actions: {
|
|
63
66
|
api: () => ExtensionAPI;
|
|
67
|
+
insertMacroFromMacroBrowser: InsertMacroFromMacroBrowser;
|
|
68
|
+
runMacroAutoConvert: RunMacroAutoConvert;
|
|
64
69
|
};
|
|
65
70
|
}
|
|
66
71
|
>;
|
|
@@ -78,6 +83,19 @@ export interface ExtensionPluginOptions
|
|
|
78
83
|
extensionHandlers?: ExtensionHandlers;
|
|
79
84
|
}
|
|
80
85
|
|
|
86
|
+
// @public (undocumented)
|
|
87
|
+
type InsertMacroFromMacroBrowser = (
|
|
88
|
+
macroProvider: MacroProvider,
|
|
89
|
+
macroNode?: Node_2,
|
|
90
|
+
isEditing?: boolean,
|
|
91
|
+
) => (view: EditorView) => Promise<boolean>;
|
|
92
|
+
|
|
93
|
+
// @public (undocumented)
|
|
94
|
+
export type RunMacroAutoConvert = (
|
|
95
|
+
state: EditorState,
|
|
96
|
+
text: string,
|
|
97
|
+
) => Node_2 | null;
|
|
98
|
+
|
|
81
99
|
// (No @packageDocumentation comment for this package)
|
|
82
100
|
```
|
|
83
101
|
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -10,12 +10,15 @@ import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
|
10
10
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
13
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
13
14
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
15
|
import type { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
15
16
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
16
17
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
17
18
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
19
|
+
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
18
20
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
21
|
+
import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
19
22
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
20
23
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
21
24
|
|
|
@@ -46,6 +49,8 @@ export type ExtensionPlugin = NextEditorPlugin<'extension', {
|
|
|
46
49
|
];
|
|
47
50
|
actions: {
|
|
48
51
|
api: () => ExtensionAPI;
|
|
52
|
+
insertMacroFromMacroBrowser: InsertMacroFromMacroBrowser;
|
|
53
|
+
runMacroAutoConvert: RunMacroAutoConvert;
|
|
49
54
|
};
|
|
50
55
|
}>;
|
|
51
56
|
|
|
@@ -61,6 +66,12 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
61
66
|
extensionHandlers?: ExtensionHandlers;
|
|
62
67
|
}
|
|
63
68
|
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: Node_2, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
71
|
+
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export type RunMacroAutoConvert = (state: EditorState, text: string) => Node_2 | null;
|
|
74
|
+
|
|
64
75
|
// (No @packageDocumentation comment for this package)
|
|
65
76
|
|
|
66
77
|
```
|