@atlaskit/editor-plugin-show-diff 17.1.5 → 17.1.6
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 +9 -0
- package/dist/cjs/pm-plugins/calculateDiff/calculateDiffDecorations.js +12 -1
- package/dist/cjs/pm-plugins/decorations/createAnchorDecorationWidgets.js +165 -32
- package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.js +5 -1
- package/dist/cjs/pm-plugins/decorations/createChangedRowDecorationWidgets.js +4 -1
- package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.js +5 -1
- package/dist/cjs/pm-plugins/decorations/createNodeChangedDecorationWidget.js +14 -1
- package/dist/cjs/pm-plugins/decorations/decorationKeys.js +8 -3
- package/dist/cjs/ui/IndicatorBar/IndicatorBarContentComponent.js +5 -3
- package/dist/es2019/pm-plugins/calculateDiff/calculateDiffDecorations.js +12 -1
- package/dist/es2019/pm-plugins/decorations/createAnchorDecorationWidgets.js +131 -12
- package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.js +5 -1
- package/dist/es2019/pm-plugins/decorations/createChangedRowDecorationWidgets.js +4 -1
- package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.js +5 -1
- package/dist/es2019/pm-plugins/decorations/createNodeChangedDecorationWidget.js +14 -1
- package/dist/es2019/pm-plugins/decorations/decorationKeys.js +7 -0
- package/dist/es2019/ui/IndicatorBar/IndicatorBarContentComponent.js +5 -3
- package/dist/esm/pm-plugins/calculateDiff/calculateDiffDecorations.js +12 -1
- package/dist/esm/pm-plugins/decorations/createAnchorDecorationWidgets.js +165 -32
- package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.js +5 -1
- package/dist/esm/pm-plugins/decorations/createChangedRowDecorationWidgets.js +4 -1
- package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.js +5 -1
- package/dist/esm/pm-plugins/decorations/createNodeChangedDecorationWidget.js +14 -1
- package/dist/esm/pm-plugins/decorations/decorationKeys.js +8 -3
- package/dist/esm/ui/IndicatorBar/IndicatorBarContentComponent.js +5 -3
- package/dist/types/pm-plugins/decorations/createAnchorDecorationWidgets.d.ts +14 -4
- package/dist/types/pm-plugins/decorations/createBlockChangedDecoration.d.ts +2 -1
- package/dist/types/pm-plugins/decorations/createChangedRowDecorationWidgets.d.ts +2 -1
- package/dist/types/pm-plugins/decorations/createInlineChangedDecoration.d.ts +2 -1
- package/dist/types/pm-plugins/decorations/createNodeChangedDecorationWidget.d.ts +2 -1
- package/dist/types/pm-plugins/decorations/decorationKeys.d.ts +3 -1
- package/dist/types/showDiffPluginType.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 17.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`188a9259b143b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/188a9259b143b) -
|
|
8
|
+
EDITOR-9127 [ux] Align the diff indicator outside the visible outer edges of a whole inserted
|
|
9
|
+
layout.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 17.1.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -192,6 +192,7 @@ var calculateNodesForBlockDecoration = function calculateNodesForBlockDecoration
|
|
|
192
192
|
colorScheme = _ref5.colorScheme,
|
|
193
193
|
_ref5$isInserted = _ref5.isInserted,
|
|
194
194
|
isInserted = _ref5$isInserted === void 0 ? true : _ref5$isInserted,
|
|
195
|
+
leftAnchorId = _ref5.leftAnchorId,
|
|
195
196
|
activeIndexPos = _ref5.activeIndexPos,
|
|
196
197
|
_ref5$shouldHideDelet = _ref5.shouldHideDeleted,
|
|
197
198
|
shouldHideDeleted = _ref5$shouldHideDelet === void 0 ? false : _ref5$shouldHideDelet,
|
|
@@ -230,6 +231,7 @@ var calculateNodesForBlockDecoration = function calculateNodesForBlockDecoration
|
|
|
230
231
|
},
|
|
231
232
|
colorScheme: colorScheme,
|
|
232
233
|
isInserted: isInserted,
|
|
234
|
+
leftAnchorId: leftAnchorId,
|
|
233
235
|
isActive: isActive,
|
|
234
236
|
shouldHideDeleted: shouldHideDeleted,
|
|
235
237
|
showContributorTags: showContributorTags,
|
|
@@ -271,6 +273,7 @@ var calculateNodesForBlockDecoration = function calculateNodesForBlockDecoration
|
|
|
271
273
|
},
|
|
272
274
|
colorScheme: colorScheme,
|
|
273
275
|
isInserted: isInserted,
|
|
276
|
+
leftAnchorId: leftAnchorId,
|
|
274
277
|
isActive: _isActive,
|
|
275
278
|
shouldHideDeleted: shouldHideDeleted,
|
|
276
279
|
showContributorTags: showContributorTags,
|
|
@@ -553,6 +556,10 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8
|
|
|
553
556
|
});
|
|
554
557
|
};
|
|
555
558
|
var createDecorationsForChange = function createDecorationsForChange(change) {
|
|
559
|
+
// Patch 2 makes all decorations generated for one replacement share this anchor. Their own
|
|
560
|
+
// IDs still identify their top/bottom bounds, while this ID makes their bars agree on one
|
|
561
|
+
// left edge. When the gate is off, factories retain their existing per-decoration anchors.
|
|
562
|
+
var leftAnchorId = (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? "replacement-".concat(change.fromA, "-").concat(change.toA, "-").concat(change.fromB, "-").concat(change.toB) : undefined;
|
|
556
563
|
var changeColorScheme = attributionColors ? (0, _attributions.getColorSchemeForChange)(change, attributedChanges, attributionColors, colorScheme) : colorScheme;
|
|
557
564
|
var attributionKey = showContributorTags ? (0, _attributions.getAttributionKeyForChange)(change, attributedChanges) : undefined;
|
|
558
565
|
var isActive = isRangeActive(activeIndexPos, change.fromB, change.toB);
|
|
@@ -685,6 +692,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8
|
|
|
685
692
|
fromB: from,
|
|
686
693
|
toB: to
|
|
687
694
|
},
|
|
695
|
+
leftAnchorId: leftAnchorId,
|
|
688
696
|
doc: tr.doc,
|
|
689
697
|
colorScheme: changeColorScheme,
|
|
690
698
|
isActive: isActive,
|
|
@@ -710,6 +718,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8
|
|
|
710
718
|
decorations.push.apply(decorations, (0, _toConsumableArray2.default)((0, _createInlineChangedDecoration.createInlineChangedDecoration)(_objectSpread({
|
|
711
719
|
attributionKey: attributionKey,
|
|
712
720
|
change: change,
|
|
721
|
+
leftAnchorId: leftAnchorId,
|
|
713
722
|
doc: tr.doc,
|
|
714
723
|
colorScheme: changeColorScheme,
|
|
715
724
|
isActive: isActive,
|
|
@@ -744,7 +753,8 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8
|
|
|
744
753
|
activeIndexPos: activeIndexPos,
|
|
745
754
|
intl: intl,
|
|
746
755
|
diffType: diffType,
|
|
747
|
-
coarseTableCellsOnly: useCoarseTableDecoration
|
|
756
|
+
coarseTableCellsOnly: useCoarseTableDecoration,
|
|
757
|
+
leftAnchorId: leftAnchorId
|
|
748
758
|
}))));
|
|
749
759
|
}
|
|
750
760
|
if (change.deleted.length > 0 && !isMarkOnly && !hasNoDeletedContent) {
|
|
@@ -769,6 +779,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref8
|
|
|
769
779
|
newDoc: tr.doc,
|
|
770
780
|
intl: intl,
|
|
771
781
|
activeIndexPos: activeIndexPos,
|
|
782
|
+
leftAnchorId: leftAnchorId,
|
|
772
783
|
showContributorTags: showContributorTags,
|
|
773
784
|
tagMountContext: tagMountContext
|
|
774
785
|
}, (0, _isExtendedEnabled.isExtendedEnabled)(diffType) && {
|
|
@@ -5,11 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.createLeftAnchorWidget = exports.createInlineIndicatorAnchorWidgets = exports.createDocMarginAnchorWidget = exports.createBlockIndicatorAnchorWidgets = exports.createAnchorNameSpan = exports.clampAnchorPosIntoCell = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
8
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
10
11
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
11
12
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
13
|
var _decorationKeys = require("./decorationKeys");
|
|
14
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
19
|
/**
|
|
@@ -36,21 +40,21 @@ var resolveDocLevelNode = function resolveDocLevelNode(doc, from) {
|
|
|
36
40
|
beforePos: nodeStart - 1
|
|
37
41
|
};
|
|
38
42
|
};
|
|
39
|
-
|
|
40
43
|
/**
|
|
41
44
|
* Handles edge cases for block nodes whose inline content can exceed the doc
|
|
42
45
|
* margin (tables, layouts, expands). Returns the position whose DOM should be
|
|
43
46
|
* measured to size the left anchor, or `undefined` when the diff is not inside
|
|
44
47
|
* such a node.
|
|
45
48
|
*/
|
|
46
|
-
var edgeCases = function edgeCases(doc, from) {
|
|
49
|
+
var edgeCases = function edgeCases(doc, from, nodeOverride) {
|
|
47
50
|
var resolved = resolveDocLevelNode(doc, from);
|
|
48
51
|
if (!resolved) {
|
|
49
52
|
return undefined;
|
|
50
53
|
}
|
|
51
|
-
var
|
|
54
|
+
var resolvedNode = resolved.node,
|
|
52
55
|
nodeStart = resolved.nodeStart,
|
|
53
56
|
beforePos = resolved.beforePos;
|
|
57
|
+
var node = (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? nodeOverride !== null && nodeOverride !== void 0 ? nodeOverride : resolvedNode : resolvedNode;
|
|
54
58
|
if (node.type.name === 'layoutSection' && (0, _fg.fg)('platform_editor_ai_show_diff_patch_1')) {
|
|
55
59
|
// Columns extend past the node-view wrapper via negative margins (12px or 20px).
|
|
56
60
|
// Measure their container so the indicator stays outside the diff outline, including
|
|
@@ -118,6 +122,45 @@ var edgeCases = function edgeCases(doc, from) {
|
|
|
118
122
|
return undefined;
|
|
119
123
|
}
|
|
120
124
|
};
|
|
125
|
+
var getEdgeCasesForSlice = function getEdgeCasesForSlice(doc, from, slice, measureElement) {
|
|
126
|
+
var _targets$find;
|
|
127
|
+
var resolved = resolveDocLevelNode(doc, from);
|
|
128
|
+
if (!resolved) {
|
|
129
|
+
return [];
|
|
130
|
+
}
|
|
131
|
+
var targets = [];
|
|
132
|
+
// edge cases can only be top level nodes, so we only care about the top level nodes in the slice
|
|
133
|
+
slice.content.forEach(function (node, offset) {
|
|
134
|
+
var edgeCase = edgeCases(doc, from + offset, node);
|
|
135
|
+
if (edgeCase) {
|
|
136
|
+
targets.push(_objectSpread(_objectSpread({}, edgeCase), {}, {
|
|
137
|
+
measureElement: measureElement
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return targets.length > 0 ? [{
|
|
142
|
+
beforePos: resolved.beforePos,
|
|
143
|
+
leftOffset: (_targets$find = targets.find(function (target) {
|
|
144
|
+
return target.leftOffset !== undefined;
|
|
145
|
+
})) === null || _targets$find === void 0 ? void 0 : _targets$find.leftOffset,
|
|
146
|
+
widthMeasureTargets: targets
|
|
147
|
+
}] : [];
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Finds the edge cases in the current document for either a whole range or one position.
|
|
152
|
+
* A missing `to` intentionally means the single-position lookup is the fallback.
|
|
153
|
+
*/
|
|
154
|
+
var getEdgeCasesForDocument = function getEdgeCasesForDocument(doc, from, to) {
|
|
155
|
+
if (to !== undefined) {
|
|
156
|
+
var edgeCasesForSlice = getEdgeCasesForSlice(doc, from, doc.slice(from, to));
|
|
157
|
+
if (edgeCasesForSlice.length > 0) {
|
|
158
|
+
return edgeCasesForSlice;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
var edgeCase = edgeCases(doc, from);
|
|
162
|
+
return edgeCase ? [edgeCase] : [];
|
|
163
|
+
};
|
|
121
164
|
|
|
122
165
|
/**
|
|
123
166
|
* Create a widget that marks the start of the doc margin.
|
|
@@ -148,10 +191,23 @@ var createDocMarginAnchorWidget = exports.createDocMarginAnchorWidget = function
|
|
|
148
191
|
* anchor positioning. Shared by inline and node (widget) diff decorations.
|
|
149
192
|
*/
|
|
150
193
|
var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLeftAnchorWidget(_ref) {
|
|
194
|
+
var _range$from;
|
|
151
195
|
var doc = _ref.doc,
|
|
152
196
|
from = _ref.from,
|
|
153
|
-
|
|
154
|
-
|
|
197
|
+
to = _ref.to,
|
|
198
|
+
diffId = _ref.diffId,
|
|
199
|
+
leftAnchorId = _ref.leftAnchorId,
|
|
200
|
+
measureElement = _ref.measureElement,
|
|
201
|
+
sliceOverride = _ref.sliceOverride,
|
|
202
|
+
underlyingRange = _ref.underlyingRange;
|
|
203
|
+
var overrideEdgeCases = sliceOverride ? getEdgeCasesForSlice(doc, from, sliceOverride, measureElement) : [];
|
|
204
|
+
var range = underlyingRange !== null && underlyingRange !== void 0 ? underlyingRange : to !== undefined ? {
|
|
205
|
+
from: from,
|
|
206
|
+
to: to
|
|
207
|
+
} : undefined;
|
|
208
|
+
var documentEdgeCases = getEdgeCasesForDocument(doc, (_range$from = range === null || range === void 0 ? void 0 : range.from) !== null && _range$from !== void 0 ? _range$from : from, range === null || range === void 0 ? void 0 : range.to);
|
|
209
|
+
var allEdgeCases = [].concat((0, _toConsumableArray2.default)(overrideEdgeCases), (0, _toConsumableArray2.default)(documentEdgeCases));
|
|
210
|
+
var edgeCase = (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? allEdgeCases[0] : edgeCases(doc, from);
|
|
155
211
|
if (edgeCase === undefined) {
|
|
156
212
|
return undefined;
|
|
157
213
|
}
|
|
@@ -160,7 +216,7 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
160
216
|
// resizable block container.
|
|
161
217
|
var beforePos = edgeCase.beforePos;
|
|
162
218
|
var leftAnchorKey = (0, _decorationKeys.buildAnchorDecorationKey)({
|
|
163
|
-
diffId: diffId,
|
|
219
|
+
diffId: leftAnchorId !== null && leftAnchorId !== void 0 ? leftAnchorId : diffId,
|
|
164
220
|
anchorType: _decorationKeys.AnchorTypeKey.left
|
|
165
221
|
});
|
|
166
222
|
var leftResizeObserver;
|
|
@@ -178,15 +234,87 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
178
234
|
anchor.style.setProperty('left', "calc(50% - ".concat((edgeCase === null || edgeCase === void 0 ? void 0 : edgeCase.leftOffset) || 0, "px)"));
|
|
179
235
|
anchor.style.setProperty('transform', 'translateX(-50%)');
|
|
180
236
|
wrapper.appendChild(anchor);
|
|
181
|
-
var
|
|
237
|
+
var _measureWidth = function measureWidth() {
|
|
182
238
|
var _nodeDOM$querySelecto;
|
|
239
|
+
if ((0, _fg.fg)('platform_editor_ai_show_diff_patch_2')) {
|
|
240
|
+
var widthMeasureTargets = allEdgeCases.flatMap(function (target) {
|
|
241
|
+
var _target$widthMeasureT;
|
|
242
|
+
return (_target$widthMeasureT = target.widthMeasureTargets) !== null && _target$widthMeasureT !== void 0 ? _target$widthMeasureT : [target];
|
|
243
|
+
});
|
|
244
|
+
if (getPos() === undefined || widthMeasureTargets.length === 0) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
var measuredElements = widthMeasureTargets.flatMap(function (_ref2) {
|
|
248
|
+
var targetMeasureElement = _ref2.measureElement,
|
|
249
|
+
measureLeft = _ref2.measureLeft,
|
|
250
|
+
measurePos = _ref2.measurePos,
|
|
251
|
+
measureSelector = _ref2.measureSelector;
|
|
252
|
+
if (measurePos === undefined) {
|
|
253
|
+
return [];
|
|
254
|
+
}
|
|
255
|
+
var nodeDOM = targetMeasureElement !== null && targetMeasureElement !== void 0 ? targetMeasureElement : view.nodeDOM(measurePos);
|
|
256
|
+
var elements = nodeDOM instanceof HTMLElement ? measureSelector ? Array.from(nodeDOM.querySelectorAll(measureSelector)) : [nodeDOM] : [];
|
|
257
|
+
return elements.map(function (element) {
|
|
258
|
+
return {
|
|
259
|
+
element: element,
|
|
260
|
+
measureLeft: measureLeft
|
|
261
|
+
};
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// A single diff can include multiple edge-case nodes, so measure the widest one.
|
|
266
|
+
var widest;
|
|
267
|
+
var _iterator = _createForOfIteratorHelper(measuredElements),
|
|
268
|
+
_step;
|
|
269
|
+
try {
|
|
270
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
271
|
+
var target = _step.value;
|
|
272
|
+
if (!widest || target.element.offsetWidth > widest.element.offsetWidth) {
|
|
273
|
+
widest = target;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} catch (err) {
|
|
277
|
+
_iterator.e(err);
|
|
278
|
+
} finally {
|
|
279
|
+
_iterator.f();
|
|
280
|
+
}
|
|
281
|
+
if (widest) {
|
|
282
|
+
var updateAnchor = function updateAnchor() {
|
|
283
|
+
if (getPos() === undefined) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (widest.measureLeft) {
|
|
287
|
+
var left = widest.element.getBoundingClientRect().left - wrapper.getBoundingClientRect().left;
|
|
288
|
+
anchor.style.setProperty('left', "".concat(left, "px"));
|
|
289
|
+
anchor.style.setProperty('transform', 'none');
|
|
290
|
+
}
|
|
291
|
+
anchor.style.setProperty('width', "".concat(widest.element.offsetWidth, "px"));
|
|
292
|
+
};
|
|
293
|
+
updateAnchor();
|
|
294
|
+
|
|
295
|
+
// Observe the measured elements for size changes (e.g. page
|
|
296
|
+
// resize) so the indicator stays aligned.
|
|
297
|
+
if (!leftResizeObserver) {
|
|
298
|
+
leftResizeObserver = new ResizeObserver(_measureWidth);
|
|
299
|
+
measuredElements.forEach(function (_ref3) {
|
|
300
|
+
var _leftResizeObserver;
|
|
301
|
+
var element = _ref3.element;
|
|
302
|
+
return (_leftResizeObserver = leftResizeObserver) === null || _leftResizeObserver === void 0 ? void 0 : _leftResizeObserver.observe(element);
|
|
303
|
+
});
|
|
304
|
+
if (widest.measureLeft) {
|
|
305
|
+
leftResizeObserver.observe(wrapper);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
183
311
|
if (getPos() === undefined || edgeCase.measurePos === undefined) {
|
|
184
312
|
return;
|
|
185
313
|
}
|
|
186
314
|
var nodeDOM = view.nodeDOM(edgeCase.measurePos);
|
|
187
315
|
var dom = edgeCase.measureSelector && nodeDOM instanceof HTMLElement ? (_nodeDOM$querySelecto = nodeDOM.querySelector(edgeCase.measureSelector)) !== null && _nodeDOM$querySelecto !== void 0 ? _nodeDOM$querySelecto : nodeDOM : nodeDOM;
|
|
188
316
|
if (dom instanceof HTMLElement) {
|
|
189
|
-
var
|
|
317
|
+
var _updateAnchor = function _updateAnchor() {
|
|
190
318
|
if (getPos() === undefined) {
|
|
191
319
|
return;
|
|
192
320
|
}
|
|
@@ -198,12 +326,12 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
198
326
|
anchor.style.setProperty('width', "".concat(dom.offsetWidth, "px"));
|
|
199
327
|
};
|
|
200
328
|
// Align against the block's horizontal extent.
|
|
201
|
-
|
|
329
|
+
_updateAnchor();
|
|
202
330
|
|
|
203
331
|
// Observe the measured element for size changes (e.g. page
|
|
204
332
|
// resize) so the indicator stays aligned. CCI-17981
|
|
205
333
|
if (!leftResizeObserver) {
|
|
206
|
-
leftResizeObserver = new ResizeObserver(
|
|
334
|
+
leftResizeObserver = new ResizeObserver(_updateAnchor);
|
|
207
335
|
leftResizeObserver.observe(dom);
|
|
208
336
|
if (edgeCase.measureLeft) {
|
|
209
337
|
leftResizeObserver.observe(wrapper);
|
|
@@ -214,7 +342,7 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
214
342
|
|
|
215
343
|
// The block DOM may not be settled synchronously (e.g. after a
|
|
216
344
|
// transaction), so defer the measurement like the gap cursor does.
|
|
217
|
-
requestAnimationFrame(
|
|
345
|
+
requestAnimationFrame(_measureWidth);
|
|
218
346
|
return wrapper;
|
|
219
347
|
}, _objectSpread(_objectSpread({}, (0, _decorationKeys.buildAnchorDecorationSpec)({
|
|
220
348
|
diffId: diffId,
|
|
@@ -222,8 +350,8 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
222
350
|
side: -999
|
|
223
351
|
})), {}, {
|
|
224
352
|
destroy: function destroy() {
|
|
225
|
-
var
|
|
226
|
-
return (
|
|
353
|
+
var _leftResizeObserver2;
|
|
354
|
+
return (_leftResizeObserver2 = leftResizeObserver) === null || _leftResizeObserver2 === void 0 ? void 0 : _leftResizeObserver2.disconnect();
|
|
227
355
|
}
|
|
228
356
|
}));
|
|
229
357
|
};
|
|
@@ -239,16 +367,18 @@ var createLeftAnchorWidget = exports.createLeftAnchorWidget = function createLef
|
|
|
239
367
|
* layout, expand) so the bar aligns within the container boundary.
|
|
240
368
|
*
|
|
241
369
|
*/
|
|
242
|
-
var createBlockIndicatorAnchorWidgets = exports.createBlockIndicatorAnchorWidgets = function createBlockIndicatorAnchorWidgets(
|
|
243
|
-
var
|
|
244
|
-
var doc =
|
|
245
|
-
from =
|
|
246
|
-
to =
|
|
247
|
-
diffId =
|
|
370
|
+
var createBlockIndicatorAnchorWidgets = exports.createBlockIndicatorAnchorWidgets = function createBlockIndicatorAnchorWidgets(_ref4) {
|
|
371
|
+
var _ref5, _parentTable$pos;
|
|
372
|
+
var doc = _ref4.doc,
|
|
373
|
+
from = _ref4.from,
|
|
374
|
+
to = _ref4.to,
|
|
375
|
+
diffId = _ref4.diffId,
|
|
376
|
+
leftAnchorId = _ref4.leftAnchorId;
|
|
248
377
|
var leftAnchor = createLeftAnchorWidget({
|
|
249
378
|
doc: doc,
|
|
250
379
|
from: from,
|
|
251
|
-
diffId: diffId
|
|
380
|
+
diffId: diffId,
|
|
381
|
+
leftAnchorId: leftAnchorId
|
|
252
382
|
});
|
|
253
383
|
var maybeLeftAnchor = leftAnchor ? [leftAnchor] : [];
|
|
254
384
|
|
|
@@ -287,7 +417,7 @@ var createBlockIndicatorAnchorWidgets = exports.createBlockIndicatorAnchorWidget
|
|
|
287
417
|
// bounding box or positioning context, so measuring its top produces an offset from the
|
|
288
418
|
// viewport origin and displaces the indicator into content below the editor. Keep the
|
|
289
419
|
// wrapper outside the layout, just as we do for tables, but still measure the target node.
|
|
290
|
-
var widgetPos = (
|
|
420
|
+
var widgetPos = (_ref5 = (_parentTable$pos = parentTable === null || parentTable === void 0 ? void 0 : parentTable.pos) !== null && _parentTable$pos !== void 0 ? _parentTable$pos : parentLayout === null || parentLayout === void 0 ? void 0 : parentLayout.pos) !== null && _ref5 !== void 0 ? _ref5 : from;
|
|
291
421
|
// Measure the actual cell/row DOM when inside one; otherwise measure the
|
|
292
422
|
// widget's own position.
|
|
293
423
|
var measurePos = parentCellOrRow ? parentCellOrRow.pos : from;
|
|
@@ -386,11 +516,11 @@ var createAnchorNameSpan = exports.createAnchorNameSpan = function createAnchorN
|
|
|
386
516
|
span.style.setProperty('anchor-name', "--".concat(anchorKey));
|
|
387
517
|
return span;
|
|
388
518
|
};
|
|
389
|
-
var createAnchorSpanWidget = function createAnchorSpanWidget(
|
|
390
|
-
var pos =
|
|
391
|
-
diffId =
|
|
392
|
-
anchorType =
|
|
393
|
-
side =
|
|
519
|
+
var createAnchorSpanWidget = function createAnchorSpanWidget(_ref6) {
|
|
520
|
+
var pos = _ref6.pos,
|
|
521
|
+
diffId = _ref6.diffId,
|
|
522
|
+
anchorType = _ref6.anchorType,
|
|
523
|
+
side = _ref6.side;
|
|
394
524
|
return _view.Decoration.widget(pos, function () {
|
|
395
525
|
return createAnchorNameSpan((0, _decorationKeys.buildAnchorDecorationKey)({
|
|
396
526
|
diffId: diffId,
|
|
@@ -407,15 +537,18 @@ var createAnchorSpanWidget = function createAnchorSpanWidget(_ref4) {
|
|
|
407
537
|
* Invisible `from`/`to` (and optional `left`) anchor widgets for one inline diff
|
|
408
538
|
* range, so the `IndicatorBar` can align itself via CSS anchor positioning.
|
|
409
539
|
*/
|
|
410
|
-
var createInlineIndicatorAnchorWidgets = exports.createInlineIndicatorAnchorWidgets = function createInlineIndicatorAnchorWidgets(
|
|
411
|
-
var doc =
|
|
412
|
-
from =
|
|
413
|
-
to =
|
|
414
|
-
diffId =
|
|
540
|
+
var createInlineIndicatorAnchorWidgets = exports.createInlineIndicatorAnchorWidgets = function createInlineIndicatorAnchorWidgets(_ref7) {
|
|
541
|
+
var doc = _ref7.doc,
|
|
542
|
+
from = _ref7.from,
|
|
543
|
+
to = _ref7.to,
|
|
544
|
+
diffId = _ref7.diffId,
|
|
545
|
+
leftAnchorId = _ref7.leftAnchorId;
|
|
415
546
|
var leftAnchor = createLeftAnchorWidget({
|
|
416
547
|
doc: doc,
|
|
417
548
|
from: from,
|
|
418
|
-
|
|
549
|
+
to: (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? to : undefined,
|
|
550
|
+
diffId: diffId,
|
|
551
|
+
leftAnchorId: leftAnchorId
|
|
419
552
|
});
|
|
420
553
|
var maybeLeftAnchor = leftAnchor ? [leftAnchor] : [];
|
|
421
554
|
|
|
@@ -184,6 +184,7 @@ var createBlockChangedDecoration = exports.createBlockChangedDecoration = functi
|
|
|
184
184
|
isInserted = _ref3$isInserted === void 0 ? true : _ref3$isInserted,
|
|
185
185
|
_ref3$isActive = _ref3.isActive,
|
|
186
186
|
isActive = _ref3$isActive === void 0 ? false : _ref3$isActive,
|
|
187
|
+
leftAnchorId = _ref3.leftAnchorId,
|
|
187
188
|
_ref3$shouldHideDelet = _ref3.shouldHideDeleted,
|
|
188
189
|
shouldHideDeleted = _ref3$shouldHideDelet === void 0 ? false : _ref3$shouldHideDelet,
|
|
189
190
|
_ref3$showContributor = _ref3.showContributorTags,
|
|
@@ -214,6 +215,7 @@ var createBlockChangedDecoration = exports.createBlockChangedDecoration = functi
|
|
|
214
215
|
colorScheme: colorScheme,
|
|
215
216
|
decorationType: 'block',
|
|
216
217
|
diffId: diffId,
|
|
218
|
+
leftAnchorId: leftAnchorId,
|
|
217
219
|
isActive: isActive,
|
|
218
220
|
isInserted: isInserted,
|
|
219
221
|
nodeName: change.name,
|
|
@@ -270,6 +272,7 @@ var createBlockChangedDecoration = exports.createBlockChangedDecoration = functi
|
|
|
270
272
|
colorScheme: colorScheme,
|
|
271
273
|
decorationType: 'block',
|
|
272
274
|
diffId: diffId,
|
|
275
|
+
leftAnchorId: leftAnchorId,
|
|
273
276
|
isActive: isActive,
|
|
274
277
|
isInserted: isInserted,
|
|
275
278
|
nodeName: change.name,
|
|
@@ -286,7 +289,8 @@ var createBlockChangedDecoration = exports.createBlockChangedDecoration = functi
|
|
|
286
289
|
doc: doc,
|
|
287
290
|
from: change.from,
|
|
288
291
|
to: change.to,
|
|
289
|
-
diffId: diffId
|
|
292
|
+
diffId: diffId,
|
|
293
|
+
leftAnchorId: leftAnchorId
|
|
290
294
|
})));
|
|
291
295
|
}
|
|
292
296
|
|
|
@@ -312,6 +312,7 @@ var createChangedRowDecorationWidgets = exports.createChangedRowDecorationWidget
|
|
|
312
312
|
isActive = _ref6.isActive,
|
|
313
313
|
_ref6$isInserted = _ref6.isInserted,
|
|
314
314
|
isInserted = _ref6$isInserted === void 0 ? false : _ref6$isInserted,
|
|
315
|
+
leftAnchorId = _ref6.leftAnchorId,
|
|
315
316
|
diffType = _ref6.diffType,
|
|
316
317
|
intl = _ref6.intl,
|
|
317
318
|
_ref6$showIndicators = _ref6.showIndicators,
|
|
@@ -366,7 +367,8 @@ var createChangedRowDecorationWidgets = exports.createChangedRowDecorationWidget
|
|
|
366
367
|
var leftAnchor = (0, _createAnchorDecorationWidgets.createLeftAnchorWidget)({
|
|
367
368
|
doc: newDoc,
|
|
368
369
|
from: safeInsertPos,
|
|
369
|
-
diffId: diffId
|
|
370
|
+
diffId: diffId,
|
|
371
|
+
leftAnchorId: leftAnchorId
|
|
370
372
|
});
|
|
371
373
|
if (leftAnchor) {
|
|
372
374
|
decorations.push(leftAnchor);
|
|
@@ -408,6 +410,7 @@ var createChangedRowDecorationWidgets = exports.createChangedRowDecorationWidget
|
|
|
408
410
|
colorScheme: colorScheme,
|
|
409
411
|
decorationType: 'widget',
|
|
410
412
|
diffId: diffId,
|
|
413
|
+
leftAnchorId: leftAnchorId,
|
|
411
414
|
isActive: isActive,
|
|
412
415
|
isInserted: isInserted,
|
|
413
416
|
diffType: diffType
|
|
@@ -146,6 +146,7 @@ var createInlineChangedDecoration = exports.createInlineChangedDecoration = func
|
|
|
146
146
|
isActive = _ref2$isActive === void 0 ? false : _ref2$isActive,
|
|
147
147
|
_ref2$isInserted = _ref2.isInserted,
|
|
148
148
|
isInserted = _ref2$isInserted === void 0 ? true : _ref2$isInserted,
|
|
149
|
+
leftAnchorId = _ref2.leftAnchorId,
|
|
149
150
|
_ref2$isAtomicInlineN = _ref2.isAtomicInlineNode,
|
|
150
151
|
isAtomicInlineNode = _ref2$isAtomicInlineN === void 0 ? false : _ref2$isAtomicInlineN,
|
|
151
152
|
_ref2$shouldHideDelet = _ref2.shouldHideDeleted,
|
|
@@ -182,6 +183,7 @@ var createInlineChangedDecoration = exports.createInlineChangedDecoration = func
|
|
|
182
183
|
colorScheme: colorScheme,
|
|
183
184
|
decorationType: 'inline',
|
|
184
185
|
diffId: diffId,
|
|
186
|
+
leftAnchorId: leftAnchorId,
|
|
185
187
|
isActive: isActive,
|
|
186
188
|
isInserted: isInserted
|
|
187
189
|
}))];
|
|
@@ -245,6 +247,7 @@ var createInlineChangedDecoration = exports.createInlineChangedDecoration = func
|
|
|
245
247
|
colorScheme: colorScheme,
|
|
246
248
|
decorationType: 'inline',
|
|
247
249
|
diffId: diffId,
|
|
250
|
+
leftAnchorId: leftAnchorId,
|
|
248
251
|
isActive: isActive,
|
|
249
252
|
isInserted: isInserted
|
|
250
253
|
}))];
|
|
@@ -280,7 +283,8 @@ var createInlineChangedDecoration = exports.createInlineChangedDecoration = func
|
|
|
280
283
|
doc: doc,
|
|
281
284
|
from: anchorFrom,
|
|
282
285
|
to: anchorTo,
|
|
283
|
-
diffId: diffId
|
|
286
|
+
diffId: diffId,
|
|
287
|
+
leftAnchorId: leftAnchorId
|
|
284
288
|
})));
|
|
285
289
|
}
|
|
286
290
|
|
|
@@ -41,6 +41,7 @@ var createTableCellContentWidgets = function createTableCellContentWidgets(_ref)
|
|
|
41
41
|
nodeViewSerializer = _ref.nodeViewSerializer,
|
|
42
42
|
colorScheme = _ref.colorScheme,
|
|
43
43
|
isInserted = _ref.isInserted,
|
|
44
|
+
leftAnchorId = _ref.leftAnchorId,
|
|
44
45
|
diffType = _ref.diffType;
|
|
45
46
|
// Collect the inner content position of each cell in the new document within
|
|
46
47
|
// the change range. Whole-cell replacement preserves cell count/order, so the
|
|
@@ -97,6 +98,7 @@ var createTableCellContentWidgets = function createTableCellContentWidgets(_ref)
|
|
|
97
98
|
colorScheme: colorScheme,
|
|
98
99
|
decorationType: 'widget',
|
|
99
100
|
diffId: crypto.randomUUID(),
|
|
101
|
+
leftAnchorId: leftAnchorId,
|
|
100
102
|
isInserted: isInserted,
|
|
101
103
|
diffType: diffType
|
|
102
104
|
}, (0, _isExtendedEnabled.isExtendedEnabled)(diffType) && {
|
|
@@ -122,6 +124,7 @@ var createNodeChangedDecorationWidget = exports.createNodeChangedDecorationWidge
|
|
|
122
124
|
activeIndexPos = _ref2.activeIndexPos,
|
|
123
125
|
_ref2$isInserted = _ref2.isInserted,
|
|
124
126
|
isInserted = _ref2$isInserted === void 0 ? false : _ref2$isInserted,
|
|
127
|
+
leftAnchorId = _ref2.leftAnchorId,
|
|
125
128
|
_ref2$showContributor = _ref2.showContributorTags,
|
|
126
129
|
showContributorTags = _ref2$showContributor === void 0 ? false : _ref2$showContributor,
|
|
127
130
|
_ref2$showIndicators = _ref2.showIndicators,
|
|
@@ -185,6 +188,7 @@ var createNodeChangedDecorationWidget = exports.createNodeChangedDecorationWidge
|
|
|
185
188
|
nodeViewSerializer: nodeViewSerializer,
|
|
186
189
|
colorScheme: colorScheme,
|
|
187
190
|
isInserted: isInserted,
|
|
191
|
+
leftAnchorId: leftAnchorId,
|
|
188
192
|
diffType: diffType
|
|
189
193
|
});
|
|
190
194
|
}
|
|
@@ -201,6 +205,7 @@ var createNodeChangedDecorationWidget = exports.createNodeChangedDecorationWidge
|
|
|
201
205
|
colorScheme: colorScheme,
|
|
202
206
|
isActive: isActive,
|
|
203
207
|
isInserted: isInserted,
|
|
208
|
+
leftAnchorId: leftAnchorId,
|
|
204
209
|
diffType: diffType,
|
|
205
210
|
intl: intl,
|
|
206
211
|
// Needed for the row's own indicator anchor; this path returns before the
|
|
@@ -499,7 +504,14 @@ var createNodeChangedDecorationWidget = exports.createNodeChangedDecorationWidge
|
|
|
499
504
|
var leftAnchor = (0, _createAnchorDecorationWidgets.createLeftAnchorWidget)({
|
|
500
505
|
doc: newDoc,
|
|
501
506
|
from: safeInsertPos,
|
|
502
|
-
diffId: diffId
|
|
507
|
+
diffId: diffId,
|
|
508
|
+
leftAnchorId: leftAnchorId,
|
|
509
|
+
measureElement: (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? dom : undefined,
|
|
510
|
+
sliceOverride: (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? slice : undefined,
|
|
511
|
+
underlyingRange: (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? {
|
|
512
|
+
from: change.fromB,
|
|
513
|
+
to: change.toB
|
|
514
|
+
} : undefined
|
|
503
515
|
});
|
|
504
516
|
if (leftAnchor) {
|
|
505
517
|
decorations.push(leftAnchor);
|
|
@@ -510,6 +522,7 @@ var createNodeChangedDecorationWidget = exports.createNodeChangedDecorationWidge
|
|
|
510
522
|
colorScheme: colorScheme,
|
|
511
523
|
decorationType: 'widget',
|
|
512
524
|
diffId: diffId,
|
|
525
|
+
leftAnchorId: leftAnchorId,
|
|
513
526
|
isActive: isActive,
|
|
514
527
|
isInserted: isInserted,
|
|
515
528
|
diffType: diffType
|
|
@@ -84,10 +84,11 @@ var buildDiffDecorationSpec = exports.buildDiffDecorationSpec = function buildDi
|
|
|
84
84
|
diffId = _ref3.diffId,
|
|
85
85
|
isActive = _ref3.isActive,
|
|
86
86
|
isInserted = _ref3.isInserted,
|
|
87
|
+
leftAnchorId = _ref3.leftAnchorId,
|
|
87
88
|
nodeName = _ref3.nodeName,
|
|
88
89
|
side = _ref3.side,
|
|
89
90
|
diffType = _ref3.diffType;
|
|
90
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
91
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
91
92
|
decorationFamily: DecorationFamily.diff,
|
|
92
93
|
decorationType: decorationType,
|
|
93
94
|
diffId: diffId,
|
|
@@ -103,6 +104,8 @@ var buildDiffDecorationSpec = exports.buildDiffDecorationSpec = function buildDi
|
|
|
103
104
|
isActive: isActive
|
|
104
105
|
} : {}), isInserted !== undefined ? {
|
|
105
106
|
isInserted: isInserted
|
|
107
|
+
} : {}), leftAnchorId ? {
|
|
108
|
+
leftAnchorId: leftAnchorId
|
|
106
109
|
} : {}), colorScheme ? {
|
|
107
110
|
colorScheme: colorScheme
|
|
108
111
|
} : {}), nodeName ? {
|
|
@@ -159,11 +162,13 @@ var isDiffDecoration = exports.isDiffDecoration = function isDiffDecoration(deco
|
|
|
159
162
|
var extractDiffDescriptors = exports.extractDiffDescriptors = function extractDiffDescriptors(decorations) {
|
|
160
163
|
return decorations.find(undefined, undefined, isDiffDecorationSpec).filter(isDiffDecoration).map(function (_ref5) {
|
|
161
164
|
var spec = _ref5.spec;
|
|
162
|
-
return _objectSpread(_objectSpread(_objectSpread({}, spec.colorScheme ? {
|
|
165
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, spec.colorScheme ? {
|
|
163
166
|
colorScheme: spec.colorScheme
|
|
164
167
|
} : {}), {}, {
|
|
165
168
|
id: spec.diffId
|
|
166
|
-
}, spec.
|
|
169
|
+
}, spec.leftAnchorId ? {
|
|
170
|
+
leftAnchorId: spec.leftAnchorId
|
|
171
|
+
} : {}), spec.isInserted !== undefined ? {
|
|
167
172
|
isInserted: spec.isInserted
|
|
168
173
|
} : {}), {}, {
|
|
169
174
|
type: spec.decorationType
|
|
@@ -12,6 +12,8 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
12
12
|
var _decorationKeys = require("../../pm-plugins/decorations/decorationKeys");
|
|
13
13
|
var _IndicatorBar = require("./IndicatorBar");
|
|
14
14
|
var renderIndicatorBar = function renderIndicatorBar(descriptor) {
|
|
15
|
+
var _descriptor$leftAncho;
|
|
16
|
+
var leftAnchorId = (_descriptor$leftAncho = descriptor.leftAnchorId) !== null && _descriptor$leftAncho !== void 0 ? _descriptor$leftAncho : descriptor.id;
|
|
15
17
|
switch (descriptor.type) {
|
|
16
18
|
case 'inline':
|
|
17
19
|
{
|
|
@@ -28,7 +30,7 @@ var renderIndicatorBar = function renderIndicatorBar(descriptor) {
|
|
|
28
30
|
anchorType: _decorationKeys.AnchorTypeKey.to
|
|
29
31
|
}),
|
|
30
32
|
anchorLeft: (0, _decorationKeys.buildAnchorDecorationKey)({
|
|
31
|
-
diffId:
|
|
33
|
+
diffId: leftAnchorId,
|
|
32
34
|
anchorType: _decorationKeys.AnchorTypeKey.left
|
|
33
35
|
})
|
|
34
36
|
});
|
|
@@ -48,7 +50,7 @@ var renderIndicatorBar = function renderIndicatorBar(descriptor) {
|
|
|
48
50
|
anchorTop: blockAnchor,
|
|
49
51
|
anchorBottom: blockAnchor,
|
|
50
52
|
anchorLeft: (0, _decorationKeys.buildAnchorDecorationKey)({
|
|
51
|
-
diffId:
|
|
53
|
+
diffId: leftAnchorId,
|
|
52
54
|
anchorType: _decorationKeys.AnchorTypeKey.left
|
|
53
55
|
})
|
|
54
56
|
});
|
|
@@ -66,7 +68,7 @@ var renderIndicatorBar = function renderIndicatorBar(descriptor) {
|
|
|
66
68
|
diffId: descriptor.id
|
|
67
69
|
}),
|
|
68
70
|
anchorLeft: (0, _decorationKeys.buildAnchorDecorationKey)({
|
|
69
|
-
diffId:
|
|
71
|
+
diffId: leftAnchorId,
|
|
70
72
|
anchorType: _decorationKeys.AnchorTypeKey.left
|
|
71
73
|
}),
|
|
72
74
|
anchorLeftFallback: (0, _decorationKeys.buildAnchorDecorationKey)({
|