@atlaskit/editor-plugin-show-diff 4.0.14 → 4.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.
@@ -7,6 +7,11 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
7
7
  import { type DiffParams } from '../showDiffPluginType';
8
8
  export declare const showDiffPluginKey: PluginKey<ShowDiffPluginState>;
9
9
  export type ShowDiffPluginState = {
10
+ activeIndex?: number;
11
+ activeIndexPos?: {
12
+ from: number;
13
+ to: number;
14
+ };
10
15
  decorations: DecorationSet;
11
16
  isDisplayingChanges: boolean;
12
17
  originalDoc: PMNode | undefined;
@@ -23,18 +23,28 @@ export type PMDiffParams = {
23
23
  */
24
24
  steps: Step[];
25
25
  };
26
- export type ACTION = 'SHOW_DIFF' | 'HIDE_DIFF';
26
+ export type ACTION = 'SHOW_DIFF' | 'HIDE_DIFF' | 'SCROLL_TO_NEXT' | 'SCROLL_TO_PREVIOUS';
27
27
  export type ShowDiffPlugin = NextEditorPlugin<'showDiff', {
28
28
  commands: {
29
29
  hideDiff: EditorCommand;
30
+ scrollToNext: EditorCommand;
31
+ scrollToPrevious: EditorCommand;
30
32
  showDiff: (config: PMDiffParams) => EditorCommand;
31
33
  };
32
34
  pluginConfiguration: DiffParams | undefined;
33
35
  sharedState: {
36
+ /**
37
+ * The index of the current diff being viewed.
38
+ */
39
+ activeIndex?: number;
34
40
  /**
35
41
  * Whether the show diff feature is currently displaying changes.
36
42
  * Defaults to false.
37
43
  */
38
44
  isDisplayingChanges: boolean;
45
+ /**
46
+ * The number of changes being displayed
47
+ */
48
+ numberOfChanges?: number;
39
49
  };
40
50
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-show-diff",
3
- "version": "4.0.14",
3
+ "version": "4.1.0",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/editor-prosemirror": "^7.3.0",
33
33
  "@atlaskit/editor-tables": "^2.9.0",
34
34
  "@atlaskit/platform-feature-flags": "^1.1.0",
35
- "@atlaskit/tmp-editor-statsig": "^29.0.0",
35
+ "@atlaskit/tmp-editor-statsig": "^31.0.0",
36
36
  "@atlaskit/tokens": "^11.0.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "lodash": "^4.17.21",
@@ -40,7 +40,7 @@
40
40
  "prosemirror-changeset": "^2.3.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "@atlaskit/editor-common": "^111.16.0",
43
+ "@atlaskit/editor-common": "^111.20.0",
44
44
  "react": "^18.2.0"
45
45
  },
46
46
  "techstack": {
@@ -83,6 +83,9 @@
83
83
  "platform_editor_ai_aifc_patch_ga": {
84
84
  "type": "boolean"
85
85
  },
86
+ "platform_editor_show_diff_scroll_navigation": {
87
+ "type": "boolean"
88
+ },
86
89
  "platform_editor_ai_aifc_patch_ga_blockers": {
87
90
  "type": "boolean"
88
91
  }