@atlaskit/editor-plugin-show-diff 16.0.16 → 16.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.
- package/CHANGELOG.md +23 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/pm-plugins/decorations/createAnchorDecorationWidgets.js +19 -13
- package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.js +2 -1
- package/dist/cjs/pm-plugins/decorations/createChangedRowDecorationWidgets.js +3 -0
- package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.js +2 -1
- package/dist/cjs/pm-plugins/decorations/createNodeChangedDecorationWidget.js +9 -0
- package/dist/cjs/pm-plugins/decorations/decorationKeys.js +12 -2
- package/dist/cjs/pm-plugins/main.js +22 -20
- package/dist/cjs/pm-plugins/scrollToDiff.js +20 -0
- package/dist/cjs/ui/IndicatorBar/IndicatorBar.js +1 -1
- package/dist/cjs/ui/IndicatorBar/IndicatorBarContentComponent.js +1 -1
- package/dist/es2019/pm-plugins/decorations/createAnchorDecorationWidgets.js +7 -3
- package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.js +4 -3
- package/dist/es2019/pm-plugins/decorations/createChangedRowDecorationWidgets.js +4 -1
- package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.js +3 -2
- package/dist/es2019/pm-plugins/decorations/createNodeChangedDecorationWidget.js +10 -1
- package/dist/es2019/pm-plugins/decorations/decorationKeys.js +10 -0
- package/dist/es2019/pm-plugins/main.js +21 -19
- package/dist/es2019/pm-plugins/scrollToDiff.js +21 -3
- package/dist/es2019/ui/IndicatorBar/IndicatorBar.js +1 -1
- package/dist/es2019/ui/IndicatorBar/IndicatorBarContentComponent.js +1 -1
- package/dist/esm/pm-plugins/decorations/createAnchorDecorationWidgets.js +19 -13
- package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.js +3 -2
- package/dist/esm/pm-plugins/decorations/createChangedRowDecorationWidgets.js +4 -1
- package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.js +3 -2
- package/dist/esm/pm-plugins/decorations/createNodeChangedDecorationWidget.js +10 -1
- package/dist/esm/pm-plugins/decorations/decorationKeys.js +10 -0
- package/dist/esm/pm-plugins/main.js +22 -20
- package/dist/esm/pm-plugins/scrollToDiff.js +21 -2
- package/dist/esm/ui/IndicatorBar/IndicatorBar.js +1 -1
- package/dist/esm/ui/IndicatorBar/IndicatorBarContentComponent.js +1 -1
- package/dist/types/entry-points/show-diff-plugin-type.d.ts +1 -1
- package/dist/types/pm-plugins/decorations/colorSchemes/attributions.d.ts +2 -2
- package/dist/types/pm-plugins/decorations/decorationKeys.d.ts +9 -0
- package/dist/types/pm-plugins/main.d.ts +7 -1
- package/dist/types/pm-plugins/scrollToDiff.d.ts +5 -1
- package/dist/types/showDiffPluginType.d.ts +19 -2
- package/package.json +6 -5
|
@@ -3,12 +3,21 @@ import type { NextEditorPlugin, EditorCommand, OptionalPlugin } from '@atlaskit/
|
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
4
4
|
import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
5
5
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
+
import type { LimitedModePlugin } from '@atlaskit/editor-plugin-limited-mode/limited-mode-plugin-type';
|
|
6
7
|
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
7
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
8
9
|
import type { Step } from '@atlaskit/editor-prosemirror/transform-override';
|
|
9
10
|
import type { SmartDiffThresholds as SmartDiffThresholdsInternal } from './pm-plugins/calculateDiff/smart/thresholds';
|
|
10
|
-
import type { ColorScheme as ResolvedColorScheme
|
|
11
|
-
|
|
11
|
+
import type { ColorScheme as ResolvedColorScheme } from './pm-plugins/decorations/colorSchemes/types';
|
|
12
|
+
/**
|
|
13
|
+
* `'standard'` (purple insertions, default) and `'traditional'` (green/red) are the two
|
|
14
|
+
* plugin-configured schemes. The remaining accent names are the attribution palette used for
|
|
15
|
+
* per-contributor colouring (`stepsWithAttribution`) — callers of the imperative `showDiff`
|
|
16
|
+
* command (see `PMDiffParams.colorScheme`) can also pass one of these directly to match a
|
|
17
|
+
* specific contributor's colour outside of attribution mode, for example matching a Review
|
|
18
|
+
* moment diff to the streaming highlight of the agent that produced it.
|
|
19
|
+
*/
|
|
20
|
+
export type ColorScheme = ResolvedColorScheme;
|
|
12
21
|
export type DiffType = 'inline' | 'block' | 'step' | 'smart';
|
|
13
22
|
/**
|
|
14
23
|
* Attribution for a ProseMirror step.
|
|
@@ -142,6 +151,13 @@ export type DiffParams = {
|
|
|
142
151
|
steps: StepJson[];
|
|
143
152
|
};
|
|
144
153
|
export type PMDiffParams = {
|
|
154
|
+
/**
|
|
155
|
+
* Overrides the colour scheme for this repaint only. Unset falls back to the plugin's
|
|
156
|
+
* configured `DiffParams.colorScheme` (ultimately `'standard'`, purple). Persists across
|
|
157
|
+
* `SCROLL_TO_NEXT`/`SCROLL_TO_PREVIOUS` repaints of the same diff, and resets when the diff
|
|
158
|
+
* is hidden.
|
|
159
|
+
*/
|
|
160
|
+
colorScheme?: ColorScheme;
|
|
145
161
|
/**
|
|
146
162
|
* For the `smart` diffType, where node/paragraph-level deleted content is rendered relative to
|
|
147
163
|
* the new content. Defaults to `'top'`. Ignored for other diff types.
|
|
@@ -232,6 +248,7 @@ export type ShowDiffPlugin = NextEditorPlugin<'showDiff', {
|
|
|
232
248
|
dependencies: [
|
|
233
249
|
OptionalPlugin<AnalyticsPlugin>,
|
|
234
250
|
OptionalPlugin<UserIntentPlugin>,
|
|
251
|
+
OptionalPlugin<LimitedModePlugin>,
|
|
235
252
|
/** Carries the live-region announcement made when stepping between changes. */
|
|
236
253
|
OptionalPlugin<AccessibilityUtilsPlugin>
|
|
237
254
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaskit/adf-schema": "^57.
|
|
23
|
+
"@atlaskit/adf-schema": "^57.5.0",
|
|
24
24
|
"@atlaskit/avatar": "^28.0.0",
|
|
25
25
|
"@atlaskit/custom-steps": "^1.1.0",
|
|
26
26
|
"@atlaskit/editor-plugin-accessibility-utils": "^18.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-analytics": "^18.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-limited-mode": "^15.0.0",
|
|
28
29
|
"@atlaskit/editor-plugin-user-intent": "^16.0.0",
|
|
29
30
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
30
31
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
33
34
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
34
35
|
"@atlaskit/primitives": "^22.5.0",
|
|
35
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
36
|
+
"@atlaskit/tmp-editor-statsig": "^198.0.0",
|
|
36
37
|
"@atlaskit/tokens": "^17.0.0",
|
|
37
38
|
"@babel/runtime": "^7.0.0",
|
|
38
39
|
"@compiled/react": "^1.0.2",
|
|
@@ -57,14 +58,14 @@
|
|
|
57
58
|
"@atlassian/confluence-presets": "workspace:^",
|
|
58
59
|
"@atlassian/content-reconciliation": "^0.1.3506",
|
|
59
60
|
"@atlassian/editor-ai-injected-editors": "^32.0.0",
|
|
60
|
-
"@atlassian/editor-plugin-ai": "^72.
|
|
61
|
+
"@atlassian/editor-plugin-ai": "^72.3.0",
|
|
61
62
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
62
63
|
"react": "^19.2.0",
|
|
63
64
|
"react-dom": "^19.2.0",
|
|
64
65
|
"react-intl": "^7.0.0"
|
|
65
66
|
},
|
|
66
67
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^122.
|
|
68
|
+
"@atlaskit/editor-common": "^122.10.0",
|
|
68
69
|
"react": "^18.2.0 || ^19.2.0",
|
|
69
70
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
70
71
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|