@atlaskit/editor-plugin-paste 4.1.6 → 4.1.8
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 +16 -0
- package/dist/types/editor-actions/actions.d.ts +3 -3
- package/dist/types/editor-commands/commands.d.ts +1 -1
- package/dist/types/pastePluginType.d.ts +7 -7
- package/dist/types/pm-plugins/analytics.d.ts +3 -3
- package/dist/types/pm-plugins/move-analytics/actions.d.ts +2 -2
- package/dist/types/pm-plugins/move-analytics/types.d.ts +3 -3
- package/dist/types/pm-plugins/util/edge-cases/handleVSCodeBlock.d.ts +2 -2
- package/dist/types/pm-plugins/util/edge-cases/index.d.ts +4 -4
- package/dist/types/pm-plugins/util/edge-cases/lists.d.ts +5 -5
- package/dist/types/pm-plugins/util/tinyMCE.d.ts +1 -1
- package/dist/types-ts4.5/editor-actions/actions.d.ts +3 -3
- package/dist/types-ts4.5/editor-commands/commands.d.ts +1 -1
- package/dist/types-ts4.5/pastePluginType.d.ts +7 -7
- package/dist/types-ts4.5/pm-plugins/analytics.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/move-analytics/actions.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/move-analytics/types.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/util/edge-cases/handleVSCodeBlock.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/util/edge-cases/index.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/util/edge-cases/lists.d.ts +5 -5
- package/dist/types-ts4.5/pm-plugins/util/tinyMCE.d.ts +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 4.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.1.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`57b19274b9fdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57b19274b9fdd) -
|
|
16
|
+
EDITOR-1373 Bump adf-schema version
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.1.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -5,17 +5,17 @@ export declare enum PastePluginActionTypes {
|
|
|
5
5
|
ON_PASTE = "ON_PASTE"
|
|
6
6
|
}
|
|
7
7
|
export interface StartTrackingPastedMacroPositions {
|
|
8
|
-
type: PastePluginActionTypes.START_TRACKING_PASTED_MACRO_POSITIONS;
|
|
9
8
|
pastedMacroPositions: {
|
|
10
9
|
[key: string]: number;
|
|
11
10
|
};
|
|
11
|
+
type: PastePluginActionTypes.START_TRACKING_PASTED_MACRO_POSITIONS;
|
|
12
12
|
}
|
|
13
13
|
export interface OnPaste {
|
|
14
|
-
type: PastePluginActionTypes.ON_PASTE;
|
|
15
14
|
contentPasted: LastContentPasted;
|
|
15
|
+
type: PastePluginActionTypes.ON_PASTE;
|
|
16
16
|
}
|
|
17
17
|
export interface StopTrackingPastedMacroPositions {
|
|
18
|
-
type: PastePluginActionTypes.STOP_TRACKING_PASTED_MACRO_POSITIONS;
|
|
19
18
|
pastedMacroPositionKeys: string[];
|
|
19
|
+
type: PastePluginActionTypes.STOP_TRACKING_PASTED_MACRO_POSITIONS;
|
|
20
20
|
}
|
|
21
21
|
export type PastePluginAction = StartTrackingPastedMacroPositions | StopTrackingPastedMacroPositions | OnPaste;
|
|
@@ -25,7 +25,7 @@ export declare const splitParagraphs: (slice: Slice, schema: Schema) => Slice;
|
|
|
25
25
|
* Returns the original paragraph node (as a fragment), or a fragment containing multiple nodes.
|
|
26
26
|
*/
|
|
27
27
|
export declare const splitIntoParagraphs: ({ fragment, blockMarks, schema, }: {
|
|
28
|
-
fragment: Fragment;
|
|
29
28
|
blockMarks?: readonly Mark[];
|
|
29
|
+
fragment: Fragment;
|
|
30
30
|
schema: Schema;
|
|
31
31
|
}) => Fragment;
|
|
@@ -12,26 +12,26 @@ import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
|
12
12
|
import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
13
13
|
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
14
14
|
export interface PastePluginState {
|
|
15
|
+
lastContentPasted: LastContentPasted | null;
|
|
15
16
|
/** map of pasted macro link positions that will to be mapped through incoming transactions */
|
|
16
17
|
pastedMacroPositions: {
|
|
17
18
|
[key: string]: number;
|
|
18
19
|
};
|
|
19
|
-
lastContentPasted: LastContentPasted | null;
|
|
20
20
|
}
|
|
21
21
|
export type LastContentPasted = {
|
|
22
22
|
isPlainText: boolean;
|
|
23
|
-
text?: string;
|
|
24
23
|
isShiftPressed: boolean;
|
|
25
|
-
pasteStartPos: number;
|
|
26
|
-
pasteEndPos: number;
|
|
27
|
-
pastedSlice: Slice;
|
|
28
24
|
pastedAt: number;
|
|
25
|
+
pastedSlice: Slice;
|
|
26
|
+
pasteEndPos: number;
|
|
29
27
|
pasteSource: PasteSource;
|
|
28
|
+
pasteStartPos: number;
|
|
29
|
+
text?: string;
|
|
30
30
|
};
|
|
31
31
|
export type PastePluginOptions = {
|
|
32
32
|
cardOptions?: CardOptions;
|
|
33
|
-
sanitizePrivateContent?: boolean;
|
|
34
33
|
isFullPage?: boolean;
|
|
34
|
+
sanitizePrivateContent?: boolean;
|
|
35
35
|
};
|
|
36
36
|
export type PastePluginDependencies = [
|
|
37
37
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
@@ -45,8 +45,8 @@ export type PastePluginDependencies = [
|
|
|
45
45
|
OptionalPlugin<MentionsPlugin>
|
|
46
46
|
];
|
|
47
47
|
export type PastePlugin = NextEditorPlugin<'paste', {
|
|
48
|
-
pluginConfiguration: PastePluginOptions;
|
|
49
48
|
dependencies: PastePluginDependencies;
|
|
49
|
+
pluginConfiguration: PastePluginOptions;
|
|
50
50
|
sharedState: {
|
|
51
51
|
lastContentPasted: LastContentPasted | null;
|
|
52
52
|
};
|
|
@@ -6,12 +6,12 @@ import type { Fragment, Schema, Slice } from '@atlaskit/editor-prosemirror/model
|
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { PastePlugin } from '../index';
|
|
8
8
|
type PasteContext = {
|
|
9
|
-
type: PasteType;
|
|
10
9
|
asPlain?: boolean;
|
|
11
10
|
/** Has the hyperlink been pasted while text is selected, making the text into a link? */
|
|
12
11
|
hyperlinkPasteOnText?: boolean;
|
|
13
12
|
/** Did this paste action split a list in half? */
|
|
14
13
|
pasteSplitList?: boolean;
|
|
14
|
+
type: PasteType;
|
|
15
15
|
};
|
|
16
16
|
type GetContentProps = {
|
|
17
17
|
schema: Schema;
|
|
@@ -36,10 +36,10 @@ export declare const handleNestedTablePasteWithAnalytics: (editorAnalyticsAPI: E
|
|
|
36
36
|
export declare const handleSelectedTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
37
37
|
export declare const handlePasteLinkOnSelectedTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
38
38
|
export declare const createPasteMeasurePayload: ({ view, duration, content, distortedDuration, }: {
|
|
39
|
-
view: EditorView;
|
|
40
|
-
duration: number;
|
|
41
39
|
content: Array<string>;
|
|
42
40
|
distortedDuration: boolean;
|
|
41
|
+
duration: number;
|
|
42
|
+
view: EditorView;
|
|
43
43
|
}) => AnalyticsEventPayload;
|
|
44
44
|
export declare const getContentNodeTypes: (content: Fragment) => string[];
|
|
45
45
|
export {};
|
|
@@ -4,11 +4,11 @@ export declare enum MoveAnalyticPluginTypes {
|
|
|
4
4
|
RemoveMovedAction = 1
|
|
5
5
|
}
|
|
6
6
|
export type UpdateMovedAction = {
|
|
7
|
-
type: MoveAnalyticPluginTypes.UpdateMovedAction;
|
|
8
7
|
data: ContentMoved;
|
|
8
|
+
type: MoveAnalyticPluginTypes.UpdateMovedAction;
|
|
9
9
|
};
|
|
10
10
|
export type RemoveMovedAction = {
|
|
11
|
-
type: MoveAnalyticPluginTypes.RemoveMovedAction;
|
|
12
11
|
data: undefined;
|
|
12
|
+
type: MoveAnalyticPluginTypes.RemoveMovedAction;
|
|
13
13
|
};
|
|
14
14
|
export type MoveAnalyticsPluginAction = UpdateMovedAction | RemoveMovedAction;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export type ActionType = 'contentCut' | 'contentPasted';
|
|
2
2
|
export type NodeName = string;
|
|
3
3
|
export type ContentMoved = {
|
|
4
|
-
nodeName?: NodeName;
|
|
5
|
-
size?: number;
|
|
6
4
|
currentActions: Array<ActionType>;
|
|
5
|
+
hasSelectedMultipleNodes?: boolean;
|
|
7
6
|
nodeDepth?: number;
|
|
7
|
+
nodeName?: NodeName;
|
|
8
8
|
nodeTypes?: string;
|
|
9
|
-
|
|
9
|
+
size?: number;
|
|
10
10
|
};
|
|
11
11
|
export type MoveAnalyticsPluginState = {
|
|
12
12
|
contentMoved: ContentMoved;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
interface VSCodeBlockParams {
|
|
4
|
-
|
|
4
|
+
event: ClipboardEvent;
|
|
5
5
|
slice: Slice;
|
|
6
|
+
state: EditorState;
|
|
6
7
|
text: string;
|
|
7
|
-
event: ClipboardEvent;
|
|
8
8
|
}
|
|
9
9
|
export declare function handleVSCodeBlock({ state, slice, text, event }: VSCodeBlockParams): Slice;
|
|
10
10
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Slice as PMSlice, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
export declare function insertSliceForLists({ tr, slice, schema, }: {
|
|
4
|
-
tr: Transaction;
|
|
5
|
-
slice: PMSlice;
|
|
6
4
|
schema: Schema;
|
|
5
|
+
slice: PMSlice;
|
|
6
|
+
tr: Transaction;
|
|
7
7
|
}): void | Transaction;
|
|
8
8
|
export declare function insertSliceInsideBlockquote({ tr, slice }: {
|
|
9
|
-
tr: Transaction;
|
|
10
9
|
slice: PMSlice;
|
|
10
|
+
tr: Transaction;
|
|
11
11
|
}): void;
|
|
12
12
|
export declare function updateSelectionAfterReplace({ tr }: {
|
|
13
13
|
tr: Transaction;
|
|
14
14
|
}): Transaction | undefined;
|
|
15
15
|
export declare function insertSliceForTaskInsideList({ tr, slice }: {
|
|
16
|
-
tr: Transaction;
|
|
17
16
|
slice: PMSlice;
|
|
17
|
+
tr: Transaction;
|
|
18
18
|
}): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
export declare function insertSliceIntoEmptyNode({ tr, slice }: {
|
|
4
|
-
tr: Transaction;
|
|
5
4
|
slice: Slice;
|
|
5
|
+
tr: Transaction;
|
|
6
6
|
}): void;
|
|
7
7
|
export declare function insertSliceAtNodeEdge({ tr, slice }: {
|
|
8
|
-
tr: Transaction;
|
|
9
8
|
slice: Slice;
|
|
9
|
+
tr: Transaction;
|
|
10
10
|
}): void;
|
|
11
11
|
export declare function insertSliceIntoRangeSelectionInsideList({ tr, slice, }: {
|
|
12
|
-
tr: Transaction;
|
|
13
12
|
slice: Slice;
|
|
13
|
+
tr: Transaction;
|
|
14
14
|
}): Transaction | undefined;
|
|
15
15
|
export declare function insertSliceInsideOfPanelNodeSelected(panelNode: PMNode): ({ tr, slice, schema }: {
|
|
16
|
-
tr: Transaction;
|
|
17
|
-
slice: Slice;
|
|
18
16
|
schema?: Schema;
|
|
17
|
+
slice: Slice;
|
|
18
|
+
tr: Transaction;
|
|
19
19
|
}) => void;
|
|
@@ -5,8 +5,8 @@ export declare const isPastedFromTinyMCEConfluence: (pasteEvent: ClipboardEvent,
|
|
|
5
5
|
* instances.
|
|
6
6
|
*/
|
|
7
7
|
export declare const wrapWithTable: (html: string) => {
|
|
8
|
-
tableWrappedDoc: Document;
|
|
9
8
|
nonTableWrappedDoc: Document;
|
|
9
|
+
tableWrappedDoc: Document;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Given a DOM document, it will try to rebuild table rows by using the
|
|
@@ -5,17 +5,17 @@ export declare enum PastePluginActionTypes {
|
|
|
5
5
|
ON_PASTE = "ON_PASTE"
|
|
6
6
|
}
|
|
7
7
|
export interface StartTrackingPastedMacroPositions {
|
|
8
|
-
type: PastePluginActionTypes.START_TRACKING_PASTED_MACRO_POSITIONS;
|
|
9
8
|
pastedMacroPositions: {
|
|
10
9
|
[key: string]: number;
|
|
11
10
|
};
|
|
11
|
+
type: PastePluginActionTypes.START_TRACKING_PASTED_MACRO_POSITIONS;
|
|
12
12
|
}
|
|
13
13
|
export interface OnPaste {
|
|
14
|
-
type: PastePluginActionTypes.ON_PASTE;
|
|
15
14
|
contentPasted: LastContentPasted;
|
|
15
|
+
type: PastePluginActionTypes.ON_PASTE;
|
|
16
16
|
}
|
|
17
17
|
export interface StopTrackingPastedMacroPositions {
|
|
18
|
-
type: PastePluginActionTypes.STOP_TRACKING_PASTED_MACRO_POSITIONS;
|
|
19
18
|
pastedMacroPositionKeys: string[];
|
|
19
|
+
type: PastePluginActionTypes.STOP_TRACKING_PASTED_MACRO_POSITIONS;
|
|
20
20
|
}
|
|
21
21
|
export type PastePluginAction = StartTrackingPastedMacroPositions | StopTrackingPastedMacroPositions | OnPaste;
|
|
@@ -25,7 +25,7 @@ export declare const splitParagraphs: (slice: Slice, schema: Schema) => Slice;
|
|
|
25
25
|
* Returns the original paragraph node (as a fragment), or a fragment containing multiple nodes.
|
|
26
26
|
*/
|
|
27
27
|
export declare const splitIntoParagraphs: ({ fragment, blockMarks, schema, }: {
|
|
28
|
-
fragment: Fragment;
|
|
29
28
|
blockMarks?: readonly Mark[];
|
|
29
|
+
fragment: Fragment;
|
|
30
30
|
schema: Schema;
|
|
31
31
|
}) => Fragment;
|
|
@@ -12,26 +12,26 @@ import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
|
12
12
|
import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
13
13
|
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
14
14
|
export interface PastePluginState {
|
|
15
|
+
lastContentPasted: LastContentPasted | null;
|
|
15
16
|
/** map of pasted macro link positions that will to be mapped through incoming transactions */
|
|
16
17
|
pastedMacroPositions: {
|
|
17
18
|
[key: string]: number;
|
|
18
19
|
};
|
|
19
|
-
lastContentPasted: LastContentPasted | null;
|
|
20
20
|
}
|
|
21
21
|
export type LastContentPasted = {
|
|
22
22
|
isPlainText: boolean;
|
|
23
|
-
text?: string;
|
|
24
23
|
isShiftPressed: boolean;
|
|
25
|
-
pasteStartPos: number;
|
|
26
|
-
pasteEndPos: number;
|
|
27
|
-
pastedSlice: Slice;
|
|
28
24
|
pastedAt: number;
|
|
25
|
+
pastedSlice: Slice;
|
|
26
|
+
pasteEndPos: number;
|
|
29
27
|
pasteSource: PasteSource;
|
|
28
|
+
pasteStartPos: number;
|
|
29
|
+
text?: string;
|
|
30
30
|
};
|
|
31
31
|
export type PastePluginOptions = {
|
|
32
32
|
cardOptions?: CardOptions;
|
|
33
|
-
sanitizePrivateContent?: boolean;
|
|
34
33
|
isFullPage?: boolean;
|
|
34
|
+
sanitizePrivateContent?: boolean;
|
|
35
35
|
};
|
|
36
36
|
export type PastePluginDependencies = [
|
|
37
37
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
@@ -45,8 +45,8 @@ export type PastePluginDependencies = [
|
|
|
45
45
|
OptionalPlugin<MentionsPlugin>
|
|
46
46
|
];
|
|
47
47
|
export type PastePlugin = NextEditorPlugin<'paste', {
|
|
48
|
-
pluginConfiguration: PastePluginOptions;
|
|
49
48
|
dependencies: PastePluginDependencies;
|
|
49
|
+
pluginConfiguration: PastePluginOptions;
|
|
50
50
|
sharedState: {
|
|
51
51
|
lastContentPasted: LastContentPasted | null;
|
|
52
52
|
};
|
|
@@ -6,12 +6,12 @@ import type { Fragment, Schema, Slice } from '@atlaskit/editor-prosemirror/model
|
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { PastePlugin } from '../index';
|
|
8
8
|
type PasteContext = {
|
|
9
|
-
type: PasteType;
|
|
10
9
|
asPlain?: boolean;
|
|
11
10
|
/** Has the hyperlink been pasted while text is selected, making the text into a link? */
|
|
12
11
|
hyperlinkPasteOnText?: boolean;
|
|
13
12
|
/** Did this paste action split a list in half? */
|
|
14
13
|
pasteSplitList?: boolean;
|
|
14
|
+
type: PasteType;
|
|
15
15
|
};
|
|
16
16
|
type GetContentProps = {
|
|
17
17
|
schema: Schema;
|
|
@@ -36,10 +36,10 @@ export declare const handleNestedTablePasteWithAnalytics: (editorAnalyticsAPI: E
|
|
|
36
36
|
export declare const handleSelectedTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
37
37
|
export declare const handlePasteLinkOnSelectedTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
38
38
|
export declare const createPasteMeasurePayload: ({ view, duration, content, distortedDuration, }: {
|
|
39
|
-
view: EditorView;
|
|
40
|
-
duration: number;
|
|
41
39
|
content: Array<string>;
|
|
42
40
|
distortedDuration: boolean;
|
|
41
|
+
duration: number;
|
|
42
|
+
view: EditorView;
|
|
43
43
|
}) => AnalyticsEventPayload;
|
|
44
44
|
export declare const getContentNodeTypes: (content: Fragment) => string[];
|
|
45
45
|
export {};
|
|
@@ -4,11 +4,11 @@ export declare enum MoveAnalyticPluginTypes {
|
|
|
4
4
|
RemoveMovedAction = 1
|
|
5
5
|
}
|
|
6
6
|
export type UpdateMovedAction = {
|
|
7
|
-
type: MoveAnalyticPluginTypes.UpdateMovedAction;
|
|
8
7
|
data: ContentMoved;
|
|
8
|
+
type: MoveAnalyticPluginTypes.UpdateMovedAction;
|
|
9
9
|
};
|
|
10
10
|
export type RemoveMovedAction = {
|
|
11
|
-
type: MoveAnalyticPluginTypes.RemoveMovedAction;
|
|
12
11
|
data: undefined;
|
|
12
|
+
type: MoveAnalyticPluginTypes.RemoveMovedAction;
|
|
13
13
|
};
|
|
14
14
|
export type MoveAnalyticsPluginAction = UpdateMovedAction | RemoveMovedAction;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export type ActionType = 'contentCut' | 'contentPasted';
|
|
2
2
|
export type NodeName = string;
|
|
3
3
|
export type ContentMoved = {
|
|
4
|
-
nodeName?: NodeName;
|
|
5
|
-
size?: number;
|
|
6
4
|
currentActions: Array<ActionType>;
|
|
5
|
+
hasSelectedMultipleNodes?: boolean;
|
|
7
6
|
nodeDepth?: number;
|
|
7
|
+
nodeName?: NodeName;
|
|
8
8
|
nodeTypes?: string;
|
|
9
|
-
|
|
9
|
+
size?: number;
|
|
10
10
|
};
|
|
11
11
|
export type MoveAnalyticsPluginState = {
|
|
12
12
|
contentMoved: ContentMoved;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
interface VSCodeBlockParams {
|
|
4
|
-
|
|
4
|
+
event: ClipboardEvent;
|
|
5
5
|
slice: Slice;
|
|
6
|
+
state: EditorState;
|
|
6
7
|
text: string;
|
|
7
|
-
event: ClipboardEvent;
|
|
8
8
|
}
|
|
9
9
|
export declare function handleVSCodeBlock({ state, slice, text, event }: VSCodeBlockParams): Slice;
|
|
10
10
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Slice as PMSlice, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
export declare function insertSliceForLists({ tr, slice, schema, }: {
|
|
4
|
-
tr: Transaction;
|
|
5
|
-
slice: PMSlice;
|
|
6
4
|
schema: Schema;
|
|
5
|
+
slice: PMSlice;
|
|
6
|
+
tr: Transaction;
|
|
7
7
|
}): void | Transaction;
|
|
8
8
|
export declare function insertSliceInsideBlockquote({ tr, slice }: {
|
|
9
|
-
tr: Transaction;
|
|
10
9
|
slice: PMSlice;
|
|
10
|
+
tr: Transaction;
|
|
11
11
|
}): void;
|
|
12
12
|
export declare function updateSelectionAfterReplace({ tr }: {
|
|
13
13
|
tr: Transaction;
|
|
14
14
|
}): Transaction | undefined;
|
|
15
15
|
export declare function insertSliceForTaskInsideList({ tr, slice }: {
|
|
16
|
-
tr: Transaction;
|
|
17
16
|
slice: PMSlice;
|
|
17
|
+
tr: Transaction;
|
|
18
18
|
}): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
export declare function insertSliceIntoEmptyNode({ tr, slice }: {
|
|
4
|
-
tr: Transaction;
|
|
5
4
|
slice: Slice;
|
|
5
|
+
tr: Transaction;
|
|
6
6
|
}): void;
|
|
7
7
|
export declare function insertSliceAtNodeEdge({ tr, slice }: {
|
|
8
|
-
tr: Transaction;
|
|
9
8
|
slice: Slice;
|
|
9
|
+
tr: Transaction;
|
|
10
10
|
}): void;
|
|
11
11
|
export declare function insertSliceIntoRangeSelectionInsideList({ tr, slice, }: {
|
|
12
|
-
tr: Transaction;
|
|
13
12
|
slice: Slice;
|
|
13
|
+
tr: Transaction;
|
|
14
14
|
}): Transaction | undefined;
|
|
15
15
|
export declare function insertSliceInsideOfPanelNodeSelected(panelNode: PMNode): ({ tr, slice, schema }: {
|
|
16
|
-
tr: Transaction;
|
|
17
|
-
slice: Slice;
|
|
18
16
|
schema?: Schema;
|
|
17
|
+
slice: Slice;
|
|
18
|
+
tr: Transaction;
|
|
19
19
|
}) => void;
|
|
@@ -5,8 +5,8 @@ export declare const isPastedFromTinyMCEConfluence: (pasteEvent: ClipboardEvent,
|
|
|
5
5
|
* instances.
|
|
6
6
|
*/
|
|
7
7
|
export declare const wrapWithTable: (html: string) => {
|
|
8
|
-
tableWrappedDoc: Document;
|
|
9
8
|
nonTableWrappedDoc: Document;
|
|
9
|
+
tableWrappedDoc: Document;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Given a DOM document, it will try to rebuild table rows by using the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.8",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
".": "./src/index.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
33
|
+
"@atlaskit/adf-schema": "^50.2.1",
|
|
34
34
|
"@atlaskit/code": "^17.2.0",
|
|
35
35
|
"@atlaskit/editor-markdown-transformer": "^5.16.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"@atlaskit/media-client": "^35.3.0",
|
|
47
47
|
"@atlaskit/media-common": "^12.3.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"lodash": "^4.17.21",
|
|
52
52
|
"uuid": "^3.1.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^107.
|
|
55
|
+
"@atlaskit/editor-common": "^107.28.0",
|
|
56
56
|
"react": "^18.2.0",
|
|
57
57
|
"react-dom": "^18.2.0"
|
|
58
58
|
},
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
"@atlaskit/editor-plugin-history": "^3.1.0",
|
|
63
63
|
"@atlaskit/editor-plugin-type-ahead": "^3.1.0",
|
|
64
64
|
"@atlaskit/ssr": "workspace:^",
|
|
65
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
66
65
|
"@testing-library/react": "^13.4.0",
|
|
67
66
|
"wait-for-expect": "^1.2.0"
|
|
68
67
|
},
|