@atlaskit/editor-common 130.1.0 → 130.2.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 +33 -0
- package/collab-agent-edit-chrome-ranges/package.json +10 -0
- package/dist/cjs/collab/agent-edit-changed-ranges.js +5 -288
- package/dist/cjs/collab/agent-edit-chrome-ranges.js +15 -0
- package/dist/cjs/collab/agent-edit-range-mapping.js +553 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/collab/agent-edit-changed-ranges.js +5 -244
- package/dist/es2019/collab/agent-edit-chrome-ranges.js +10 -0
- package/dist/es2019/collab/agent-edit-range-mapping.js +463 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/collab/agent-edit-changed-ranges.js +5 -286
- package/dist/esm/collab/agent-edit-chrome-ranges.js +10 -0
- package/dist/esm/collab/agent-edit-range-mapping.js +546 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/collab/agent-edit-changed-ranges.d.ts +4 -1
- package/dist/types/collab/agent-edit-chrome-ranges.d.ts +8 -0
- package/dist/types/collab/agent-edit-range-mapping.d.ts +7 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 130.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a43e85621e87c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a43e85621e87c) -
|
|
8
|
+
Lower sticky table headers, masks, and dependent controls below the agent control under the
|
|
9
|
+
platform_editor_sticky_headers_zindex experiment.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 130.2.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [`9d77c18b03981`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9d77c18b03981) -
|
|
17
|
+
Add transaction-aware mapping for existing agent edit highlight ranges, used by
|
|
18
|
+
platform_editor_ai_streaming_ux_experience_m1 to preserve surviving targets across streaming
|
|
19
|
+
replacements.
|
|
20
|
+
|
|
21
|
+
Keep agent highlights on edited blocks across shorter responses, restores, and cumulative AI
|
|
22
|
+
streaming replacements. Preserve earlier activity through temporary previews and restore, discard
|
|
23
|
+
ambiguous node identities, and rebuild normalized preview activity after structural collaborator
|
|
24
|
+
edits instead of indexing the saved document on every inline edit.
|
|
25
|
+
|
|
26
|
+
Use bounded snapshot traversal and require unambiguous source and destination identities when
|
|
27
|
+
preserving carried activity.
|
|
28
|
+
|
|
29
|
+
Preserve the existing changed-range detector behavior outside M1. Require unique source IDs only
|
|
30
|
+
for M1 callers, and retain unchanged preview state references on no-op transactions.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 130.1.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/collab-agent-edit-chrome-ranges",
|
|
3
|
+
"main": "../dist/cjs/collab/agent-edit-chrome-ranges.js",
|
|
4
|
+
"module": "../dist/esm/collab/agent-edit-chrome-ranges.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/collab/agent-edit-chrome-ranges.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/collab/agent-edit-chrome-ranges.d.ts"
|
|
10
|
+
}
|
|
@@ -1,239 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.getAgentEditChangedRanges = getAgentEditChangedRanges;
|
|
8
|
-
var
|
|
9
|
-
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
10
|
-
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; } } }; }
|
|
11
|
-
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; } }
|
|
12
|
-
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
|
-
// localId is identity metadata: regenerating it alone should not create activity.
|
|
14
|
-
var sameAttrs = function sameAttrs(left, right) {
|
|
15
|
-
var keys = Object.keys(left).filter(function (key) {
|
|
16
|
-
return key !== 'localId';
|
|
17
|
-
});
|
|
18
|
-
return keys.length === Object.keys(right).filter(function (key) {
|
|
19
|
-
return key !== 'localId';
|
|
20
|
-
}).length && keys.every(function (key) {
|
|
21
|
-
return (0, _isEqual.default)(left[key], right[key]);
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Compare the node's own type, attributes and marks, without comparing its children.
|
|
26
|
-
var sameMarkup = function sameMarkup(left, right) {
|
|
27
|
-
return left.type === right.type && sameAttrs(left.attrs, right.attrs) && left.marks.length === right.marks.length && left.marks.every(function (mark, index) {
|
|
28
|
-
return mark.type === right.marks[index].type && sameAttrs(mark.attrs, right.marks[index].attrs);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
var _sameNode = function sameNode(left, right) {
|
|
32
|
-
if (left === right) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
if (!sameMarkup(left, right) || left.text !== right.text || left.childCount !== right.childCount) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
for (var index = 0; index < left.childCount; index++) {
|
|
39
|
-
if (!_sameNode(left.child(index), right.child(index))) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return true;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// Positions include document structure, not just character offsets. A non-leaf node
|
|
47
|
-
// uses one position for each opening/closing boundary, plus the size of its content.
|
|
48
|
-
// Example: paragraph('Hi') at pos 0 has nodeSize 4, outer range [0, 4),
|
|
49
|
-
// and text content [1, 3). All ranges here use an exclusive end position.
|
|
50
|
-
|
|
51
|
-
// Keep the reason internally so a panel attribute change can survive child edits.
|
|
52
|
-
// Only ordinary { from, to } ranges are returned to the chrome consumer.
|
|
53
|
-
|
|
54
|
-
var _collectChanges = function collectChanges(before, after, map, ranges) {
|
|
55
|
-
var node = after.node,
|
|
56
|
-
pos = after.pos;
|
|
57
|
-
if (before && _sameNode(before.node, node)) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
// Text edits belong to their textblock. A node's own markup change instead
|
|
61
|
-
// owns its full content, so we stop here rather than adding child ranges too.
|
|
62
|
-
var markupChanged = !!before && node.isBlock && !sameMarkup(before.node, node);
|
|
63
|
-
if (node.isTextblock || markupChanged) {
|
|
64
|
-
if (node.content.size > 0) {
|
|
65
|
-
ranges.push({
|
|
66
|
-
from: pos,
|
|
67
|
-
to: pos + node.nodeSize,
|
|
68
|
-
markupChanged: markupChanged
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
var byPosition = new Map();
|
|
74
|
-
var byId = new Map();
|
|
75
|
-
var oldChildren = [];
|
|
76
|
-
before === null || before === void 0 || before.node.forEach(function (child, offset) {
|
|
77
|
-
// forEach offsets start inside the parent. Skip its opening boundary (+1)
|
|
78
|
-
// to convert this child offset into an absolute document position.
|
|
79
|
-
var previous = {
|
|
80
|
-
node: child,
|
|
81
|
-
pos: before.pos + 1 + offset
|
|
82
|
-
};
|
|
83
|
-
oldChildren.push(previous);
|
|
84
|
-
// This 1 is a mapping bias, not an added offset: follow the right side
|
|
85
|
-
// of an insertion at the child's start, keeping the original child after it.
|
|
86
|
-
var mapped = map.mapResult(previous.pos, 1);
|
|
87
|
-
if (!mapped.deleted) {
|
|
88
|
-
byPosition.set(mapped.pos, previous);
|
|
89
|
-
}
|
|
90
|
-
var id = child.attrs.localId;
|
|
91
|
-
if (typeof id === 'string' && id) {
|
|
92
|
-
// Duplicate IDs cannot identify a unique old child.
|
|
93
|
-
byId.set(id, byId.has(id) ? null : previous);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
var nextChildren = [];
|
|
97
|
-
node.forEach(function (child, offset) {
|
|
98
|
-
return nextChildren.push({
|
|
99
|
-
node: child,
|
|
100
|
-
pos: pos + 1 + offset
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
// Narrow edits usually preserve mapped positions. Whole-container replacements
|
|
104
|
-
// may erase those positions, so stable child IDs provide a second way to match.
|
|
105
|
-
var preferred = nextChildren.map(function (next) {
|
|
106
|
-
var _ref, _byPosition$get;
|
|
107
|
-
return (_ref = (_byPosition$get = byPosition.get(next.pos)) !== null && _byPosition$get !== void 0 ? _byPosition$get : byId.get(next.node.attrs.localId)) !== null && _ref !== void 0 ? _ref : undefined;
|
|
108
|
-
});
|
|
109
|
-
var claims = new Map();
|
|
110
|
-
var _iterator = _createForOfIteratorHelper(preferred),
|
|
111
|
-
_step;
|
|
112
|
-
try {
|
|
113
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
114
|
-
var match = _step.value;
|
|
115
|
-
if (match) {
|
|
116
|
-
var _claims$get;
|
|
117
|
-
claims.set(match, ((_claims$get = claims.get(match)) !== null && _claims$get !== void 0 ? _claims$get : 0) + 1);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
} catch (err) {
|
|
121
|
-
_iterator.e(err);
|
|
122
|
-
} finally {
|
|
123
|
-
_iterator.f();
|
|
124
|
-
}
|
|
125
|
-
nextChildren.forEach(function (next, index) {
|
|
126
|
-
var match = preferred[index];
|
|
127
|
-
// Same-index fallback supports replacements that regenerate IDs but keep
|
|
128
|
-
// the child structure. Different child counts make that correspondence unsafe.
|
|
129
|
-
var aligned = oldChildren.length === node.childCount ? oldChildren[index] : undefined;
|
|
130
|
-
// Reserve every position/ID match before fallback, including later siblings.
|
|
131
|
-
// Reusing one old sibling can otherwise disguise an equal-text insertion.
|
|
132
|
-
var previous = match && claims.get(match) === 1 ? match : aligned && !claims.has(aligned) ? aligned : undefined;
|
|
133
|
-
_collectChanges(previous, next, map, ranges);
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
var findPreservedNode = function findPreservedNode(doc, previous, markupChanged, indexes) {
|
|
137
|
-
var id = previous.attrs.localId;
|
|
138
|
-
if (typeof id !== 'string' || !id) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
var byId = indexes.get(doc);
|
|
142
|
-
if (!byId) {
|
|
143
|
-
// Build only when mapping loses a candidate, then reuse for every range
|
|
144
|
-
// visiting this immutable snapshot. Ordinary mapped edits need no scan.
|
|
145
|
-
var nodeIndex = new Map();
|
|
146
|
-
doc.descendants(function (node, pos) {
|
|
147
|
-
var localId = node.attrs.localId;
|
|
148
|
-
if (typeof localId === 'string' && localId) {
|
|
149
|
-
// Keep duplicates ambiguous, including IDs outside the changed subtree.
|
|
150
|
-
nodeIndex.set(localId, nodeIndex.has(localId) ? null : {
|
|
151
|
-
node: node,
|
|
152
|
-
pos: pos
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
indexes.set(doc, nodeIndex);
|
|
157
|
-
byId = nodeIndex;
|
|
158
|
-
}
|
|
159
|
-
var match = byId.get(id);
|
|
160
|
-
// Attribute/mark activity belongs to the node even when its children are edited.
|
|
161
|
-
// Content-only activity still requires the entire candidate to survive unchanged.
|
|
162
|
-
var isPreserved = markupChanged ? sameMarkup : _sameNode;
|
|
163
|
-
return match && isPreserved(previous, match.node) ? match : undefined;
|
|
164
|
-
};
|
|
165
|
-
var mapToFinalBlocks = function mapToFinalBlocks(tr, index, range, indexes) {
|
|
166
|
-
var _tr$docs;
|
|
167
|
-
var from = range.from,
|
|
168
|
-
to = range.to;
|
|
169
|
-
// Track inner content separately from outer node bounds: +1 skips the opening
|
|
170
|
-
// boundary and -1 excludes the closing boundary (see paragraph example above).
|
|
171
|
-
var contentFrom = from + 1;
|
|
172
|
-
var contentTo = to - 1;
|
|
173
|
-
// docs[i] is the document BEFORE step i, so docs[i + 1] is its result.
|
|
174
|
-
// The last step has no next snapshot; tr.doc is its result instead.
|
|
175
|
-
var node = ((_tr$docs = tr.docs[index + 1]) !== null && _tr$docs !== void 0 ? _tr$docs : tr.doc).nodeAt(from);
|
|
176
|
-
if (!node) {
|
|
177
|
-
return [];
|
|
178
|
-
}
|
|
179
|
-
// Later non-AI steps also shift/delete existing activity, even though they
|
|
180
|
-
// cannot create new activity themselves. Process every intermediate document.
|
|
181
|
-
for (var next = index + 1; next < tr.steps.length; next++) {
|
|
182
|
-
var _tr$docs2;
|
|
183
|
-
var map = tr.mapping.maps[next];
|
|
184
|
-
var after = (_tr$docs2 = tr.docs[next + 1]) !== null && _tr$docs2 !== void 0 ? _tr$docs2 : tr.doc;
|
|
185
|
-
// Mapping biases +1 (right) and -1 (left) keep boundary insertions outside
|
|
186
|
-
// the tracked content. These arguments do not add/subtract document positions.
|
|
187
|
-
var start = map.mapResult(contentFrom, 1);
|
|
188
|
-
var end = map.mapResult(contentTo, -1);
|
|
189
|
-
if (start.deleted && end.deleted || end.pos <= start.pos) {
|
|
190
|
-
// A cumulative replacement can preserve the candidate content or owned markup.
|
|
191
|
-
// Check every intermediate doc so deletion then reinsertion never resurrects it.
|
|
192
|
-
var preserved = findPreservedNode(after, node, range.markupChanged, indexes);
|
|
193
|
-
if (!preserved) {
|
|
194
|
-
return [];
|
|
195
|
-
}
|
|
196
|
-
from = preserved.pos;
|
|
197
|
-
to = from + preserved.node.nodeSize;
|
|
198
|
-
contentFrom = from + 1;
|
|
199
|
-
contentTo = to - 1;
|
|
200
|
-
node = preserved.node;
|
|
201
|
-
} else {
|
|
202
|
-
// Apply the same inward biases to the outer node bounds.
|
|
203
|
-
from = map.map(from, 1);
|
|
204
|
-
to = map.map(to, -1);
|
|
205
|
-
contentFrom = start.pos;
|
|
206
|
-
contentTo = end.pos;
|
|
207
|
-
var current = after.nodeAt(from);
|
|
208
|
-
if (current && current.nodeSize === to - from) {
|
|
209
|
-
node = current;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
if (from < 0 || to > tr.doc.content.size || contentTo <= contentFrom) {
|
|
214
|
-
return [];
|
|
215
|
-
}
|
|
216
|
-
var finalNode = tr.doc.nodeAt(from);
|
|
217
|
-
if (finalNode !== null && finalNode !== void 0 && finalNode.isBlock && finalNode.nodeSize === to - from) {
|
|
218
|
-
return [{
|
|
219
|
-
from: from,
|
|
220
|
-
to: to
|
|
221
|
-
}];
|
|
222
|
-
}
|
|
223
|
-
// Joins/splits can leave mapped boundaries inside the final textblock.
|
|
224
|
-
var blocks = [];
|
|
225
|
-
tr.doc.nodesBetween(contentFrom, contentTo, function (child, pos) {
|
|
226
|
-
if (child.isTextblock) {
|
|
227
|
-
blocks.push({
|
|
228
|
-
from: pos,
|
|
229
|
-
to: pos + child.nodeSize
|
|
230
|
-
});
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
return blocks;
|
|
235
|
-
};
|
|
236
|
-
|
|
7
|
+
var _agentEditRangeMapping = require("./agent-edit-range-mapping");
|
|
237
8
|
/**
|
|
238
9
|
* Returns whole content-block ranges for selected applied steps, in tr.doc coordinates.
|
|
239
10
|
* Callers select actual AI writes (excluding restores, acknowledgments and preparation)
|
|
@@ -242,63 +13,9 @@ var mapToFinalBlocks = function mapToFinalBlocks(tr, index, range, indexes) {
|
|
|
242
13
|
* Comparing each step's snapshots also handles attribute/mark steps with empty maps.
|
|
243
14
|
* Shared unchanged subtrees are skipped by reference. Only localId changes are ignored;
|
|
244
15
|
* meaningful attributes and marks retain the affected node's full content scope.
|
|
16
|
+
* Callers can require unique source IDs when preserving ranges across replacements.
|
|
245
17
|
*/
|
|
246
|
-
function getAgentEditChangedRanges(tr, includedStepIndexes) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
// and no cache is retained between transactions or streaming chunks.
|
|
250
|
-
var indexes = new WeakMap();
|
|
251
|
-
var ranges = [];
|
|
252
|
-
var _iterator2 = _createForOfIteratorHelper(new Set(includedStepIndexes)),
|
|
253
|
-
_step2;
|
|
254
|
-
try {
|
|
255
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
256
|
-
var _tr$docs3;
|
|
257
|
-
var index = _step2.value;
|
|
258
|
-
if (!Number.isInteger(index) || index < 0 || index >= tr.steps.length) {
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
var changed = [];
|
|
262
|
-
// The root document has no opening boundary. Using -1 makes the recursive
|
|
263
|
-
// parent.pos + 1 + offset formula place its first child at position 0.
|
|
264
|
-
_collectChanges({
|
|
265
|
-
node: tr.docs[index],
|
|
266
|
-
pos: -1
|
|
267
|
-
}, {
|
|
268
|
-
node: (_tr$docs3 = tr.docs[index + 1]) !== null && _tr$docs3 !== void 0 ? _tr$docs3 : tr.doc,
|
|
269
|
-
pos: -1
|
|
270
|
-
}, tr.steps[index].getMap(), changed);
|
|
271
|
-
for (var _i = 0, _changed = changed; _i < _changed.length; _i++) {
|
|
272
|
-
var range = _changed[_i];
|
|
273
|
-
ranges.push.apply(ranges, (0, _toConsumableArray2.default)(mapToFinalBlocks(tr, index, range, indexes)));
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// Return only the surviving final-document ranges, never intermediate step states.
|
|
278
|
-
// Sort outer ranges before their children, then discard duplicates/contained ranges.
|
|
279
|
-
// Separate ranges stay separate; this must not highlight the untouched gaps.
|
|
280
|
-
} catch (err) {
|
|
281
|
-
_iterator2.e(err);
|
|
282
|
-
} finally {
|
|
283
|
-
_iterator2.f();
|
|
284
|
-
}
|
|
285
|
-
var unique = [];
|
|
286
|
-
var _iterator3 = _createForOfIteratorHelper(ranges.sort(function (left, right) {
|
|
287
|
-
return left.from - right.from || right.to - left.to;
|
|
288
|
-
})),
|
|
289
|
-
_step3;
|
|
290
|
-
try {
|
|
291
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
292
|
-
var _range = _step3.value;
|
|
293
|
-
var previous = unique[unique.length - 1];
|
|
294
|
-
if (!previous || _range.to > previous.to) {
|
|
295
|
-
unique.push(_range);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
} catch (err) {
|
|
299
|
-
_iterator3.e(err);
|
|
300
|
-
} finally {
|
|
301
|
-
_iterator3.f();
|
|
302
|
-
}
|
|
303
|
-
return unique;
|
|
18
|
+
function getAgentEditChangedRanges(tr, includedStepIndexes, options) {
|
|
19
|
+
var _options$requireUniqu;
|
|
20
|
+
return _agentEditRangeMapping.agentEditRangeMapping.getChangedRanges(tr, includedStepIndexes, (_options$requireUniqu = options === null || options === void 0 ? void 0 : options.requireUniqueSourceIds) !== null && _options$requireUniqu !== void 0 ? _options$requireUniqu : false);
|
|
304
21
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mapAgentEditChromeRanges = mapAgentEditChromeRanges;
|
|
7
|
+
var _agentEditRangeMapping = require("./agent-edit-range-mapping");
|
|
8
|
+
/**
|
|
9
|
+
* Maps existing textblock activity through each applied step into tr.doc coordinates.
|
|
10
|
+
* Replaced content is dropped unless an unchanged block survives with a unique ID
|
|
11
|
+
* or in the same structural slot. Newly changed blocks belong to the producer.
|
|
12
|
+
*/
|
|
13
|
+
function mapAgentEditChromeRanges(tr, ranges) {
|
|
14
|
+
return _agentEditRangeMapping.agentEditRangeMapping.mapChromeRanges(tr, ranges);
|
|
15
|
+
}
|