@atlaskit/editor-plugin-show-diff 10.4.0 → 10.4.1
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 +8 -0
- package/dist/cjs/pm-plugins/decorations/createAnchorDecorationWidgets.js +1 -16
- package/dist/es2019/pm-plugins/decorations/createAnchorDecorationWidgets.js +1 -16
- package/dist/esm/pm-plugins/decorations/createAnchorDecorationWidgets.js +1 -16
- package/dist/types/pm-plugins/decorations/createAnchorDecorationWidgets.d.ts +0 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 10.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`81ce4d8f5cd8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/81ce4d8f5cd8a) -
|
|
8
|
+
Show blue indicators for new added paragraphs and headings
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 10.4.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -176,17 +176,7 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
176
176
|
side: -999
|
|
177
177
|
}));
|
|
178
178
|
};
|
|
179
|
-
|
|
180
|
-
var matchesFullNodeRange = false;
|
|
181
|
-
doc.nodesBetween(from, to, function (node, pos) {
|
|
182
|
-
if (pos === from && pos + node.nodeSize === to) {
|
|
183
|
-
matchesFullNodeRange = true;
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
return true;
|
|
187
|
-
});
|
|
188
|
-
return matchesFullNodeRange;
|
|
189
|
-
};
|
|
179
|
+
|
|
190
180
|
/**
|
|
191
181
|
* Creates invisible anchor widgets for a single block-changed diff so that the
|
|
192
182
|
* `IndicatorBar` can use CSS anchor positioning to align itself with the diff.
|
|
@@ -197,8 +187,6 @@ var isFullNodeRange = function isFullNodeRange(doc, from, to) {
|
|
|
197
187
|
* - An optional `left` anchor is placed inside a resizable container (table,
|
|
198
188
|
* layout, expand) so the bar aligns within the container boundary.
|
|
199
189
|
*
|
|
200
|
-
* Unlike the inline variant there is no `isFullNodeRange` guard — block diffs
|
|
201
|
-
* always span exactly one block node so the anchors are always needed.
|
|
202
190
|
*/
|
|
203
191
|
var createBlockIndicatorAnchorWidgets = exports.createBlockIndicatorAnchorWidgets = function createBlockIndicatorAnchorWidgets(_ref2) {
|
|
204
192
|
var doc = _ref2.doc,
|
|
@@ -309,9 +297,6 @@ var createInlineIndicatorAnchorWidgets = exports.createInlineIndicatorAnchorWidg
|
|
|
309
297
|
from = _ref3.from,
|
|
310
298
|
to = _ref3.to,
|
|
311
299
|
diffId = _ref3.diffId;
|
|
312
|
-
if (isFullNodeRange(doc, from, to)) {
|
|
313
|
-
return [];
|
|
314
|
-
}
|
|
315
300
|
var leftAnchor = createLeftAnchorWidget({
|
|
316
301
|
doc: doc,
|
|
317
302
|
from: from,
|
|
@@ -174,17 +174,7 @@ export const createLeftAnchorWidget = ({
|
|
|
174
174
|
side: -999
|
|
175
175
|
}));
|
|
176
176
|
};
|
|
177
|
-
|
|
178
|
-
let matchesFullNodeRange = false;
|
|
179
|
-
doc.nodesBetween(from, to, (node, pos) => {
|
|
180
|
-
if (pos === from && pos + node.nodeSize === to) {
|
|
181
|
-
matchesFullNodeRange = true;
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
return true;
|
|
185
|
-
});
|
|
186
|
-
return matchesFullNodeRange;
|
|
187
|
-
};
|
|
177
|
+
|
|
188
178
|
/**
|
|
189
179
|
* Creates invisible anchor widgets for a single block-changed diff so that the
|
|
190
180
|
* `IndicatorBar` can use CSS anchor positioning to align itself with the diff.
|
|
@@ -195,8 +185,6 @@ const isFullNodeRange = (doc, from, to) => {
|
|
|
195
185
|
* - An optional `left` anchor is placed inside a resizable container (table,
|
|
196
186
|
* layout, expand) so the bar aligns within the container boundary.
|
|
197
187
|
*
|
|
198
|
-
* Unlike the inline variant there is no `isFullNodeRange` guard — block diffs
|
|
199
|
-
* always span exactly one block node so the anchors are always needed.
|
|
200
188
|
*/
|
|
201
189
|
export const createBlockIndicatorAnchorWidgets = ({
|
|
202
190
|
doc,
|
|
@@ -305,9 +293,6 @@ export const createInlineIndicatorAnchorWidgets = ({
|
|
|
305
293
|
to,
|
|
306
294
|
diffId
|
|
307
295
|
}) => {
|
|
308
|
-
if (isFullNodeRange(doc, from, to)) {
|
|
309
|
-
return [];
|
|
310
|
-
}
|
|
311
296
|
const leftAnchor = createLeftAnchorWidget({
|
|
312
297
|
doc,
|
|
313
298
|
from,
|
|
@@ -171,17 +171,7 @@ export var createLeftAnchorWidget = function createLeftAnchorWidget(_ref) {
|
|
|
171
171
|
side: -999
|
|
172
172
|
}));
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
var matchesFullNodeRange = false;
|
|
176
|
-
doc.nodesBetween(from, to, function (node, pos) {
|
|
177
|
-
if (pos === from && pos + node.nodeSize === to) {
|
|
178
|
-
matchesFullNodeRange = true;
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
return true;
|
|
182
|
-
});
|
|
183
|
-
return matchesFullNodeRange;
|
|
184
|
-
};
|
|
174
|
+
|
|
185
175
|
/**
|
|
186
176
|
* Creates invisible anchor widgets for a single block-changed diff so that the
|
|
187
177
|
* `IndicatorBar` can use CSS anchor positioning to align itself with the diff.
|
|
@@ -192,8 +182,6 @@ var isFullNodeRange = function isFullNodeRange(doc, from, to) {
|
|
|
192
182
|
* - An optional `left` anchor is placed inside a resizable container (table,
|
|
193
183
|
* layout, expand) so the bar aligns within the container boundary.
|
|
194
184
|
*
|
|
195
|
-
* Unlike the inline variant there is no `isFullNodeRange` guard — block diffs
|
|
196
|
-
* always span exactly one block node so the anchors are always needed.
|
|
197
185
|
*/
|
|
198
186
|
export var createBlockIndicatorAnchorWidgets = function createBlockIndicatorAnchorWidgets(_ref2) {
|
|
199
187
|
var doc = _ref2.doc,
|
|
@@ -304,9 +292,6 @@ export var createInlineIndicatorAnchorWidgets = function createInlineIndicatorAn
|
|
|
304
292
|
from = _ref3.from,
|
|
305
293
|
to = _ref3.to,
|
|
306
294
|
diffId = _ref3.diffId;
|
|
307
|
-
if (isFullNodeRange(doc, from, to)) {
|
|
308
|
-
return [];
|
|
309
|
-
}
|
|
310
295
|
var leftAnchor = createLeftAnchorWidget({
|
|
311
296
|
doc: doc,
|
|
312
297
|
from: from,
|
|
@@ -31,8 +31,6 @@ export declare const createLeftAnchorWidget: ({ doc, from, diffId, }: {
|
|
|
31
31
|
* - An optional `left` anchor is placed inside a resizable container (table,
|
|
32
32
|
* layout, expand) so the bar aligns within the container boundary.
|
|
33
33
|
*
|
|
34
|
-
* Unlike the inline variant there is no `isFullNodeRange` guard — block diffs
|
|
35
|
-
* always span exactly one block node so the anchors are always needed.
|
|
36
34
|
*/
|
|
37
35
|
export declare const createBlockIndicatorAnchorWidgets: ({ doc, from, to, diffId, }: {
|
|
38
36
|
diffId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.1",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
29
29
|
"@atlaskit/editor-tables": "^3.0.0",
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
31
|
-
"@atlaskit/tmp-editor-statsig": "^124.
|
|
32
|
-
"@atlaskit/tokens": "^15.
|
|
31
|
+
"@atlaskit/tmp-editor-statsig": "^124.3.0",
|
|
32
|
+
"@atlaskit/tokens": "^15.7.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@compiled/react": "^0.20.0",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/button": "^24.3.0",
|
|
42
42
|
"@atlaskit/css": "^1.0.0",
|
|
43
43
|
"@atlaskit/dropdown-menu": "^17.1.0",
|
|
44
|
-
"@atlaskit/editor-core": "^221.
|
|
44
|
+
"@atlaskit/editor-core": "^221.9.0",
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^9.0.0",
|
|
46
46
|
"@atlaskit/form": "^16.1.0",
|
|
47
47
|
"@atlaskit/primitives": "^20.6.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-intl": "^7.0.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^116.
|
|
57
|
+
"@atlaskit/editor-common": "^116.27.0",
|
|
58
58
|
"react": "^18.2.0"
|
|
59
59
|
},
|
|
60
60
|
"techstack": {
|