@atlaskit/editor-plugin-show-diff 0.1.4 → 0.1.5
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 +7 -0
- package/dist/types/pm-plugins/NodeViewSerializer.d.ts +2 -2
- package/dist/types/pm-plugins/decorations.d.ts +2 -2
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/showDiffPluginType.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/NodeViewSerializer.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/decorations.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/showDiffPluginType.d.ts +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.5
|
|
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
|
+
|
|
3
10
|
## 0.1.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -39,10 +39,10 @@ export declare class NodeViewSerializer {
|
|
|
39
39
|
private nodeViews;
|
|
40
40
|
private nodeViewBlocklist;
|
|
41
41
|
constructor(params: {
|
|
42
|
-
|
|
42
|
+
blocklist?: string[];
|
|
43
43
|
editorView?: EditorView;
|
|
44
44
|
nodeViews?: Record<string, NodeViewConstructor>;
|
|
45
|
-
|
|
45
|
+
schema: Schema;
|
|
46
46
|
});
|
|
47
47
|
/**
|
|
48
48
|
* Attempts to create a node view for the given node.
|
|
@@ -17,9 +17,9 @@ export declare const createInlineChangedDecoration: (change: {
|
|
|
17
17
|
interface DeletedContentDecorationProps {
|
|
18
18
|
change: Change;
|
|
19
19
|
doc: PMNode;
|
|
20
|
-
tr: Transaction;
|
|
21
|
-
nodeViews: Record<string, NodeViewConstructor>;
|
|
22
20
|
editorView?: EditorView;
|
|
21
|
+
nodeViews: Record<string, NodeViewConstructor>;
|
|
22
|
+
tr: Transaction;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Creates a widget to represent the deleted content in the editor
|
|
@@ -6,10 +6,10 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
6
6
|
import { type DiffParams } from '../showDiffPluginType';
|
|
7
7
|
export declare const showDiffPluginKey: PluginKey<ShowDiffPluginState>;
|
|
8
8
|
type ShowDiffPluginState = {
|
|
9
|
-
steps: ProseMirrorStep[];
|
|
10
|
-
originalDoc: PMNode | undefined;
|
|
11
9
|
decorations: DecorationSet;
|
|
12
10
|
isDisplayingChanges: boolean;
|
|
11
|
+
originalDoc: PMNode | undefined;
|
|
12
|
+
steps: ProseMirrorStep[];
|
|
13
13
|
};
|
|
14
14
|
export declare const createPlugin: (config: DiffParams | undefined) => SafePlugin<ShowDiffPluginState>;
|
|
15
15
|
export {};
|
|
@@ -4,26 +4,26 @@ import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
|
4
4
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
export type DiffParams = {
|
|
7
|
+
originalDoc: JSONDocNode;
|
|
7
8
|
/**
|
|
8
9
|
* Prosemirror steps. This is used to calculate and show the diff in the editor
|
|
9
10
|
*/
|
|
10
11
|
steps: StepJson[];
|
|
11
|
-
originalDoc: JSONDocNode;
|
|
12
12
|
};
|
|
13
13
|
export type PMDiffParams = {
|
|
14
|
+
originalDoc: Node;
|
|
14
15
|
/**
|
|
15
16
|
* Prosemirror steps. This is used to calculate and show the diff in the editor
|
|
16
17
|
*/
|
|
17
18
|
steps: Step[];
|
|
18
|
-
originalDoc: Node;
|
|
19
19
|
};
|
|
20
20
|
export type ACTION = 'SHOW_DIFF' | 'HIDE_DIFF';
|
|
21
21
|
export type ShowDiffPlugin = NextEditorPlugin<'showDiff', {
|
|
22
|
-
pluginConfiguration: DiffParams | undefined;
|
|
23
22
|
commands: {
|
|
24
|
-
showDiff: (config: PMDiffParams) => EditorCommand;
|
|
25
23
|
hideDiff: EditorCommand;
|
|
24
|
+
showDiff: (config: PMDiffParams) => EditorCommand;
|
|
26
25
|
};
|
|
26
|
+
pluginConfiguration: DiffParams | undefined;
|
|
27
27
|
sharedState: {
|
|
28
28
|
/**
|
|
29
29
|
* Whether the show diff feature is currently displaying changes.
|
|
@@ -39,10 +39,10 @@ export declare class NodeViewSerializer {
|
|
|
39
39
|
private nodeViews;
|
|
40
40
|
private nodeViewBlocklist;
|
|
41
41
|
constructor(params: {
|
|
42
|
-
|
|
42
|
+
blocklist?: string[];
|
|
43
43
|
editorView?: EditorView;
|
|
44
44
|
nodeViews?: Record<string, NodeViewConstructor>;
|
|
45
|
-
|
|
45
|
+
schema: Schema;
|
|
46
46
|
});
|
|
47
47
|
/**
|
|
48
48
|
* Attempts to create a node view for the given node.
|
|
@@ -17,9 +17,9 @@ export declare const createInlineChangedDecoration: (change: {
|
|
|
17
17
|
interface DeletedContentDecorationProps {
|
|
18
18
|
change: Change;
|
|
19
19
|
doc: PMNode;
|
|
20
|
-
tr: Transaction;
|
|
21
|
-
nodeViews: Record<string, NodeViewConstructor>;
|
|
22
20
|
editorView?: EditorView;
|
|
21
|
+
nodeViews: Record<string, NodeViewConstructor>;
|
|
22
|
+
tr: Transaction;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Creates a widget to represent the deleted content in the editor
|
|
@@ -6,10 +6,10 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
6
6
|
import { type DiffParams } from '../showDiffPluginType';
|
|
7
7
|
export declare const showDiffPluginKey: PluginKey<ShowDiffPluginState>;
|
|
8
8
|
type ShowDiffPluginState = {
|
|
9
|
-
steps: ProseMirrorStep[];
|
|
10
|
-
originalDoc: PMNode | undefined;
|
|
11
9
|
decorations: DecorationSet;
|
|
12
10
|
isDisplayingChanges: boolean;
|
|
11
|
+
originalDoc: PMNode | undefined;
|
|
12
|
+
steps: ProseMirrorStep[];
|
|
13
13
|
};
|
|
14
14
|
export declare const createPlugin: (config: DiffParams | undefined) => SafePlugin<ShowDiffPluginState>;
|
|
15
15
|
export {};
|
|
@@ -4,26 +4,26 @@ import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
|
4
4
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
export type DiffParams = {
|
|
7
|
+
originalDoc: JSONDocNode;
|
|
7
8
|
/**
|
|
8
9
|
* Prosemirror steps. This is used to calculate and show the diff in the editor
|
|
9
10
|
*/
|
|
10
11
|
steps: StepJson[];
|
|
11
|
-
originalDoc: JSONDocNode;
|
|
12
12
|
};
|
|
13
13
|
export type PMDiffParams = {
|
|
14
|
+
originalDoc: Node;
|
|
14
15
|
/**
|
|
15
16
|
* Prosemirror steps. This is used to calculate and show the diff in the editor
|
|
16
17
|
*/
|
|
17
18
|
steps: Step[];
|
|
18
|
-
originalDoc: Node;
|
|
19
19
|
};
|
|
20
20
|
export type ACTION = 'SHOW_DIFF' | 'HIDE_DIFF';
|
|
21
21
|
export type ShowDiffPlugin = NextEditorPlugin<'showDiff', {
|
|
22
|
-
pluginConfiguration: DiffParams | undefined;
|
|
23
22
|
commands: {
|
|
24
|
-
showDiff: (config: PMDiffParams) => EditorCommand;
|
|
25
23
|
hideDiff: EditorCommand;
|
|
24
|
+
showDiff: (config: PMDiffParams) => EditorCommand;
|
|
26
25
|
};
|
|
26
|
+
pluginConfiguration: DiffParams | undefined;
|
|
27
27
|
sharedState: {
|
|
28
28
|
/**
|
|
29
29
|
* Whether the show diff feature is currently displaying changes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prosemirror-changeset": "^2.2.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@atlaskit/editor-common": "^107.
|
|
40
|
+
"@atlaskit/editor-common": "^107.28.0",
|
|
41
41
|
"react": "^18.2.0"
|
|
42
42
|
},
|
|
43
43
|
"techstack": {
|