@atlaskit/editor-plugin-paste 0.0.1 → 0.1.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 +16 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +16 -0
- package/package.json +2 -2
- package/report.api.md +19 -0
- package/tmp/api-report-tmp.d.ts +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#41895](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41895) [`96066a06792`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96066a06792) - ED-20524: Adding shared state for paste plugin which will be used by new paste options toolbar plugin
|
|
8
|
+
|
|
3
9
|
## 0.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { PastePlugin, PastePluginOptions, PastePluginState, } from './types';
|
|
1
|
+
export type { PastePlugin, PastePluginOptions, PastePluginState, LastContentPasted, } from './types';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
2
3
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
@@ -6,12 +7,24 @@ import type { CardPlugin } from '@atlaskit/editor-plugin-card';
|
|
|
6
7
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
8
|
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
8
9
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
10
|
+
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
9
11
|
export interface PastePluginState {
|
|
10
12
|
/** map of pasted macro link positions that will to be mapped through incoming transactions */
|
|
11
13
|
pastedMacroPositions: {
|
|
12
14
|
[key: string]: number;
|
|
13
15
|
};
|
|
16
|
+
lastContentPasted: LastContentPasted | null;
|
|
14
17
|
}
|
|
18
|
+
export type LastContentPasted = {
|
|
19
|
+
isPlainText: boolean;
|
|
20
|
+
text?: string;
|
|
21
|
+
isShiftPressed: boolean;
|
|
22
|
+
pasteStartPos: number;
|
|
23
|
+
pasteEndPos: number;
|
|
24
|
+
pastedSlice: Slice;
|
|
25
|
+
pastedAt: number;
|
|
26
|
+
pasteSource: PasteSource;
|
|
27
|
+
};
|
|
15
28
|
export type PastePluginOptions = {
|
|
16
29
|
cardOptions?: CardOptions;
|
|
17
30
|
sanitizePrivateContent?: boolean;
|
|
@@ -26,4 +39,7 @@ export type PastePlugin = NextEditorPlugin<'paste', {
|
|
|
26
39
|
OptionalPlugin<AnalyticsPlugin>,
|
|
27
40
|
OptionalPlugin<MediaPlugin>
|
|
28
41
|
];
|
|
42
|
+
sharedState: {
|
|
43
|
+
lastContentPasted: LastContentPasted | null;
|
|
44
|
+
};
|
|
29
45
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { PastePlugin, PastePluginOptions, PastePluginState, } from './types';
|
|
1
|
+
export type { PastePlugin, PastePluginOptions, PastePluginState, LastContentPasted, } from './types';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
2
3
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
@@ -6,12 +7,24 @@ import type { CardPlugin } from '@atlaskit/editor-plugin-card';
|
|
|
6
7
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
8
|
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
8
9
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
10
|
+
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
9
11
|
export interface PastePluginState {
|
|
10
12
|
/** map of pasted macro link positions that will to be mapped through incoming transactions */
|
|
11
13
|
pastedMacroPositions: {
|
|
12
14
|
[key: string]: number;
|
|
13
15
|
};
|
|
16
|
+
lastContentPasted: LastContentPasted | null;
|
|
14
17
|
}
|
|
18
|
+
export type LastContentPasted = {
|
|
19
|
+
isPlainText: boolean;
|
|
20
|
+
text?: string;
|
|
21
|
+
isShiftPressed: boolean;
|
|
22
|
+
pasteStartPos: number;
|
|
23
|
+
pasteEndPos: number;
|
|
24
|
+
pastedSlice: Slice;
|
|
25
|
+
pastedAt: number;
|
|
26
|
+
pasteSource: PasteSource;
|
|
27
|
+
};
|
|
15
28
|
export type PastePluginOptions = {
|
|
16
29
|
cardOptions?: CardOptions;
|
|
17
30
|
sanitizePrivateContent?: boolean;
|
|
@@ -26,4 +39,7 @@ export type PastePlugin = NextEditorPlugin<'paste', {
|
|
|
26
39
|
OptionalPlugin<AnalyticsPlugin>,
|
|
27
40
|
OptionalPlugin<MediaPlugin>
|
|
28
41
|
];
|
|
42
|
+
sharedState: {
|
|
43
|
+
lastContentPasted: LastContentPasted | null;
|
|
44
|
+
};
|
|
29
45
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^76.
|
|
34
|
+
"@atlaskit/editor-common": "^76.13.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-better-type-history": "^0.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-card": "^0.10.0",
|
package/report.api.md
CHANGED
|
@@ -24,6 +24,20 @@ import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
|
24
24
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
25
25
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
26
26
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
27
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
28
|
+
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
29
|
+
|
|
30
|
+
// @public (undocumented)
|
|
31
|
+
export type LastContentPasted = {
|
|
32
|
+
isPlainText: boolean;
|
|
33
|
+
text?: string;
|
|
34
|
+
isShiftPressed: boolean;
|
|
35
|
+
pasteStartPos: number;
|
|
36
|
+
pasteEndPos: number;
|
|
37
|
+
pastedSlice: Slice;
|
|
38
|
+
pastedAt: number;
|
|
39
|
+
pasteSource: PasteSource;
|
|
40
|
+
};
|
|
27
41
|
|
|
28
42
|
// @public (undocumented)
|
|
29
43
|
export type PastePlugin = NextEditorPlugin<
|
|
@@ -38,6 +52,9 @@ export type PastePlugin = NextEditorPlugin<
|
|
|
38
52
|
OptionalPlugin<AnalyticsPlugin>,
|
|
39
53
|
OptionalPlugin<MediaPlugin>,
|
|
40
54
|
];
|
|
55
|
+
sharedState: {
|
|
56
|
+
lastContentPasted: LastContentPasted | null;
|
|
57
|
+
};
|
|
41
58
|
}
|
|
42
59
|
>;
|
|
43
60
|
|
|
@@ -49,6 +66,8 @@ export type PastePluginOptions = {
|
|
|
49
66
|
|
|
50
67
|
// @public (undocumented)
|
|
51
68
|
export interface PastePluginState {
|
|
69
|
+
// (undocumented)
|
|
70
|
+
lastContentPasted: LastContentPasted | null;
|
|
52
71
|
pastedMacroPositions: {
|
|
53
72
|
[key: string]: number;
|
|
54
73
|
};
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -13,6 +13,20 @@ import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
|
13
13
|
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
14
14
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
15
15
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
16
|
+
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
17
|
+
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export type LastContentPasted = {
|
|
21
|
+
isPlainText: boolean;
|
|
22
|
+
text?: string;
|
|
23
|
+
isShiftPressed: boolean;
|
|
24
|
+
pasteStartPos: number;
|
|
25
|
+
pasteEndPos: number;
|
|
26
|
+
pastedSlice: Slice;
|
|
27
|
+
pastedAt: number;
|
|
28
|
+
pasteSource: PasteSource;
|
|
29
|
+
};
|
|
16
30
|
|
|
17
31
|
// @public (undocumented)
|
|
18
32
|
export type PastePlugin = NextEditorPlugin<'paste', {
|
|
@@ -25,6 +39,9 @@ export type PastePlugin = NextEditorPlugin<'paste', {
|
|
|
25
39
|
OptionalPlugin<AnalyticsPlugin>,
|
|
26
40
|
OptionalPlugin<MediaPlugin>
|
|
27
41
|
];
|
|
42
|
+
sharedState: {
|
|
43
|
+
lastContentPasted: LastContentPasted | null;
|
|
44
|
+
};
|
|
28
45
|
}>;
|
|
29
46
|
|
|
30
47
|
// @public (undocumented)
|
|
@@ -35,6 +52,8 @@ export type PastePluginOptions = {
|
|
|
35
52
|
|
|
36
53
|
// @public (undocumented)
|
|
37
54
|
export interface PastePluginState {
|
|
55
|
+
// (undocumented)
|
|
56
|
+
lastContentPasted: LastContentPasted | null;
|
|
38
57
|
pastedMacroPositions: {
|
|
39
58
|
[key: string]: number;
|
|
40
59
|
};
|