@atlaskit/editor-plugin-track-changes 7.0.29 → 7.0.30

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-track-changes
2
2
 
3
+ ## 7.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9ff7d1c1aa288`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ff7d1c1aa288) -
8
+ Update README.md and 0-intro.tsx
9
+ - Updated dependencies
10
+
3
11
  ## 7.0.29
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -1,9 +1,30 @@
1
- # Editor plugin track changes
1
+ # Editor Plugin Track Changes
2
2
 
3
3
  Track changes plugin for @atlaskit/editor-core
4
4
 
5
+ ## Overview
6
+
7
+ The Track Changes plugin enables tracking and display of document changes in the Atlassian Editor. It integrates with the Show Diff plugin to visualize content modifications and provides commands to toggle the display of changes and reset the baseline for comparison.
8
+
9
+ ## Key features
10
+
11
+ - **Toggle change display** - Show or hide tracked changes in the editor using the `toggleChanges` command
12
+ - **Baseline reset** - Reset the baseline used for tracking changes with the `resetBaseline` command
13
+ - **Toolbar integration** - Optionally display a track changes button in the editor toolbar
14
+ - **Shared state** - Access the state of change display and diff availability through shared plugin state
15
+ - **Show Diff integration** - Works seamlessly with the Show Diff plugin for visual change representation
16
+
17
+ ## Install
18
+
19
+ - **Install** - `yarn add @atlaskit/editor-plugin-track-changes`
20
+ - **npm** - [@atlaskit/editor-plugin-track-changes](https://www.npmjs.com/package/@atlaskit/editor-plugin-track-changes)
21
+ - **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-track-changes)
22
+ - **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-track-changes/dist/)
23
+
5
24
  ## Usage
6
25
 
26
+ ### Import
27
+
7
28
  `import { trackChangesPlugin } from '@atlaskit/editor-plugin-track-changes';`
8
29
 
9
30
  ### Dependencies
@@ -13,6 +34,7 @@ Track changes plugin for @atlaskit/editor-core
13
34
 
14
35
  **Optional:**
15
36
  - `PrimaryToolbarPlugin` - Required if using `showOnToolbar: true`
37
+ - `ToolbarPlugin` - Alternative toolbar plugin for registering the track changes button
16
38
 
17
39
  ### Configuration
18
40
 
@@ -87,3 +109,11 @@ export default Editor;
87
109
  ```
88
110
 
89
111
  Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/editor/editor-plugin-track-changes).
112
+
113
+ ## Support
114
+
115
+ For support, visit the [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) Slack channel or submit an issue via [go/editor-help](https://go/editor-help).
116
+
117
+ ## License
118
+
119
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
package/docs/0-intro.tsx CHANGED
@@ -31,10 +31,26 @@ The \`dependencies\`, \`configuration\`, \`state\`, \`actions\`, and \`commands\
31
31
  below:
32
32
 
33
33
  ${code`
34
+ interface TrackChangesPluginOptions {
35
+ /**
36
+ * Custom wrapper component for the track changes button.
37
+ */
38
+ ButtonWrapper?: React.ComponentType<{ children: React.ReactNode }>;
39
+ /**
40
+ * Whether the track changes button should be shown on the toolbar.
41
+ * Defaults to false.
42
+ */
43
+ showOnToolbar?: boolean;
44
+ }
45
+
34
46
  type TrackChangesPlugin = NextEditorPlugin<
35
47
  'trackChanges',
36
48
  {
37
49
  commands: {
50
+ /**
51
+ * Resets the baseline used for tracking changes in the editor.
52
+ */
53
+ resetBaseline: EditorCommand;
38
54
  /**
39
55
  * Toggles the displaying of changes in the editor.
40
56
  */
@@ -45,18 +61,20 @@ type TrackChangesPlugin = NextEditorPlugin<
45
61
  * Primary toolbar plugin for registering the track changes button.
46
62
  */
47
63
  OptionalPlugin<PrimaryToolbarPlugin>,
64
+ /**
65
+ * For ensuring the tracked changes align with the history
66
+ */
67
+ OptionalPlugin<HistoryPlugin>,
48
68
  /**
49
69
  * Show diff plugin for showing the changes in a diff view.
50
70
  */
51
71
  ShowDiffPlugin,
52
- ];
53
- pluginConfiguration?: {
54
72
  /**
55
- * Whether the track changes button should be shown on the toolbar.
56
- * Defaults to false.
73
+ * Toolbar plugin for registering the track changes button. Will be replacing the Primary Toolbar Plugin
57
74
  */
58
- showOnToolbar?: boolean;
59
- };
75
+ OptionalPlugin<ToolbarPlugin>,
76
+ ];
77
+ pluginConfiguration?: TrackChangesPluginOptions;
60
78
  sharedState: {
61
79
  /**
62
80
  * Whether the track changes feature is currently displaying changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-track-changes",
3
- "version": "7.0.29",
3
+ "version": "7.0.30",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/button": "^23.11.0",
32
32
  "@atlaskit/editor-plugin-history": "8.0.1",
33
33
  "@atlaskit/editor-plugin-primary-toolbar": "^9.0.0",
34
- "@atlaskit/editor-plugin-show-diff": "6.2.14",
34
+ "@atlaskit/editor-plugin-show-diff": "6.2.15",
35
35
  "@atlaskit/editor-plugin-toolbar": "^5.1.0",
36
36
  "@atlaskit/editor-prosemirror": "^7.3.0",
37
37
  "@atlaskit/editor-toolbar": "^0.20.0",