@atlaskit/editor-plugin-track-changes 10.0.19 → 11.0.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 +32 -0
- package/package.json +11 -19
- package/track-changes-plugin/package.json +1 -8
- package/track-changes-plugin-type/package.json +1 -8
- package/dist/types-ts4.5/entry-points/track-changes-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/track-changes-plugin.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/filterSteps.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/invertableStep.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/keymaps.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -16
- package/dist/types-ts4.5/pm-plugins/maxSteps.d.ts +0 -1
- package/dist/types-ts4.5/pm-plugins/types.d.ts +0 -4
- package/dist/types-ts4.5/trackChangesPlugin.d.ts +0 -2
- package/dist/types-ts4.5/trackChangesPluginType.d.ts +0 -59
- package/dist/types-ts4.5/ui/TrackChangesToolbarButton.d.ts +0 -11
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-track-changes
|
|
2
2
|
|
|
3
|
+
## 11.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 10.0.20
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 10.0.19
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-track-changes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,30 +17,22 @@
|
|
|
17
17
|
"module": "dist/esm/index.js",
|
|
18
18
|
"module:es2019": "dist/es2019/index.js",
|
|
19
19
|
"types": "dist/types/index.d.ts",
|
|
20
|
-
"typesVersions": {
|
|
21
|
-
">=4.5 <4.9": {
|
|
22
|
-
"*": [
|
|
23
|
-
"dist/types-ts4.5/*",
|
|
24
|
-
"dist/types-ts4.5/index.d.ts"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
20
|
"sideEffects": false,
|
|
29
21
|
"atlaskit:src": "src/index.ts",
|
|
30
22
|
"dependencies": {
|
|
31
|
-
"@atlaskit/button": "^
|
|
32
|
-
"@atlaskit/editor-plugin-history": "
|
|
33
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
34
|
-
"@atlaskit/editor-plugin-show-diff": "
|
|
35
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
36
|
-
"@atlaskit/editor-prosemirror": "^
|
|
37
|
-
"@atlaskit/editor-toolbar": "^
|
|
38
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
39
|
-
"@atlaskit/platform-feature-flags": "^
|
|
23
|
+
"@atlaskit/button": "^24.0.0",
|
|
24
|
+
"@atlaskit/editor-plugin-history": "12.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^13.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-show-diff": "10.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
28
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
29
|
+
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
30
|
+
"@atlaskit/editor-toolbar-model": "^1.0.0",
|
|
31
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
40
32
|
"@babel/runtime": "^7.0.0"
|
|
41
33
|
},
|
|
42
34
|
"peerDependencies": {
|
|
43
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
44
36
|
"react": "^18.2.0",
|
|
45
37
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
46
38
|
},
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/track-changes-plugin.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/track-changes-plugin.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/track-changes-plugin.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/track-changes-plugin.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/track-changes-plugin.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/track-changes-plugin-type.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/track-changes-plugin-type.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/track-changes-plugin-type.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/track-changes-plugin-type.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/track-changes-plugin-type.d.ts"
|
|
15
8
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { TrackChangesPlugin, TrackChangesPluginOptions } from '../trackChangesPluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { trackChangesPlugin } from '../trackChangesPlugin';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { InvertableStep } from './invertableStep';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the filtered steps to ensure we don't track an entire document worth of changes
|
|
4
|
-
*/
|
|
5
|
-
export declare function filterSteps(steps: InvertableStep[], allocations: Set<number>): {
|
|
6
|
-
allocations: Set<number>;
|
|
7
|
-
steps: InvertableStep[];
|
|
8
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { TrackChangesPlugin } from '../trackChangesPluginType';
|
|
4
|
-
export declare function keymapPlugin(api?: ExtractInjectionAPI<TrackChangesPlugin>): SafePlugin;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { TrackChangesPlugin } from '../trackChangesPluginType';
|
|
6
|
-
import { InvertableStep } from './invertableStep';
|
|
7
|
-
export declare const trackChangesPluginKey: PluginKey<TrackChangesPluginState>;
|
|
8
|
-
type TrackChangesPluginState = {
|
|
9
|
-
allocations: Set<number>;
|
|
10
|
-
isShowDiffAvailable: boolean;
|
|
11
|
-
shouldChangesBeDisplayed: boolean;
|
|
12
|
-
steps: InvertableStep[];
|
|
13
|
-
};
|
|
14
|
-
export declare const getBaselineFromSteps: (doc: PMNode, steps: InvertableStep[]) => PMNode | undefined;
|
|
15
|
-
export declare const createTrackChangesPlugin: (api: ExtractInjectionAPI<TrackChangesPlugin> | undefined) => SafePlugin<TrackChangesPluginState>;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MAX_STEPS_FROM_BASELINE = 10;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { HistoryPlugin } from '@atlaskit/editor-plugin-history';
|
|
3
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
4
|
-
import type { ShowDiffPlugin } from '@atlaskit/editor-plugin-show-diff';
|
|
5
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
6
|
-
export interface TrackChangesPluginOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Custom wrapper component for the track changes button.
|
|
9
|
-
*/
|
|
10
|
-
ButtonWrapper?: React.ComponentType<{
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}>;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the track changes button should be shown on the toolbar.
|
|
15
|
-
* Defaults to false.
|
|
16
|
-
*/
|
|
17
|
-
showOnToolbar?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export type TrackChangesPlugin = NextEditorPlugin<'trackChanges', {
|
|
20
|
-
commands: {
|
|
21
|
-
/**
|
|
22
|
-
* Resets the baseline used for tracking changes in the editor.
|
|
23
|
-
*/
|
|
24
|
-
resetBaseline: EditorCommand;
|
|
25
|
-
/**
|
|
26
|
-
* Toggles the displaying of changes in the editor.
|
|
27
|
-
*/
|
|
28
|
-
toggleChanges: EditorCommand;
|
|
29
|
-
};
|
|
30
|
-
dependencies: [
|
|
31
|
-
/**
|
|
32
|
-
* Primary toolbar plugin for registering the track changes button.
|
|
33
|
-
*/
|
|
34
|
-
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
35
|
-
/**
|
|
36
|
-
* For ensuring the tracked changes align with the history
|
|
37
|
-
*/
|
|
38
|
-
OptionalPlugin<HistoryPlugin>,
|
|
39
|
-
/**
|
|
40
|
-
* Show diff plugin for showing the changes in a diff view.
|
|
41
|
-
*/
|
|
42
|
-
ShowDiffPlugin,
|
|
43
|
-
OptionalPlugin<ToolbarPlugin>
|
|
44
|
-
];
|
|
45
|
-
pluginConfiguration?: TrackChangesPluginOptions | undefined;
|
|
46
|
-
sharedState: {
|
|
47
|
-
/**
|
|
48
|
-
* Whether the track changes feature is currently displaying changes.
|
|
49
|
-
* Defaults to false.
|
|
50
|
-
*/
|
|
51
|
-
isDisplayingChanges: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If there are changes in the document that determine if track changes button
|
|
54
|
-
* should be enabled.
|
|
55
|
-
* This will only be false initially before any changes in the session.
|
|
56
|
-
*/
|
|
57
|
-
isShowDiffAvailable: boolean;
|
|
58
|
-
};
|
|
59
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { TrackChangesPlugin } from '../trackChangesPluginType';
|
|
4
|
-
type TrackChangesToolbarButtonProps = {
|
|
5
|
-
api: ExtractInjectionAPI<TrackChangesPlugin> | undefined;
|
|
6
|
-
wrapper?: React.ComponentType<{
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}>;
|
|
9
|
-
};
|
|
10
|
-
export declare const TrackChangesToolbarButton: ({ api, wrapper: Wrapper, }: TrackChangesToolbarButtonProps) => React.JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
|
-
import type { TrackChangesPlugin, TrackChangesPluginOptions } from '../trackChangesPluginType';
|
|
4
|
-
export declare const getToolbarComponents: (api?: ExtractInjectionAPI<TrackChangesPlugin>, options?: TrackChangesPluginOptions) => RegisterComponent[];
|