@fluid-experimental/property-changeset 2.103.0 → 2.110.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/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +47 -4
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/test/array.spec.js +52 -0
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/changeset_operations/array.d.ts.map +1 -1
- package/lib/changeset_operations/array.js +47 -4
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/test/array.spec.js +52 -0
- package/lib/test/array.spec.js.map +1 -1
- package/lib/test/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/changeset_operations/array.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3F,OAAO,EAEN,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EAEZ,eAAe,EACf,eAAe,EAEf,eAAe,EACf,MAAM,6BAA6B,CAAC;AAMrC;;;;GAIG;AACH,aAAK,uBAAuB;IAC3B;;OAEG;IACH,SAAS,IAAA;IAET;;OAEG;IACH,SAAS,IAAA;IAET;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,gBAAgB,IAAA;IAEhB;;OAEG;IACH,gBAAgB,IAAA;IAEhB;;OAEG;IACH,kBAAkB,IAAA;IAElB;;OAEG;IACH,cAAc,IAAA;CACd;AAWD;;GAEG;AAEH,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,gBAAgB;IAC9D,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,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;;;;;;;;;OAsDG;IACH,SAAgB,yBAAyB,CACxC,uBAAuB,EAAE,mBAAmB,EAC5C,gCAAgC,EAAE,mBAAmB,EACrD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,YAAY,EAAE,EAC7B,UAAU,CAAC,EAAE,qBAAqB,QAkDlC;CACD"}
|
|
@@ -1183,7 +1183,19 @@ var ChangeSetArrayFunctions;
|
|
|
1183
1183
|
let currentIndexOffset = 0;
|
|
1184
1184
|
let lastIteratorARemove;
|
|
1185
1185
|
const segment = {};
|
|
1186
|
+
// Two-stage skip state for paired REMOVE+INSERT handling. When splitOverlapping's
|
|
1187
|
+
// special case emits a paired INSERT early (because its position fell behind the
|
|
1188
|
+
// advancing REMOVE), we record that INSERT's operation reference here. On the next
|
|
1189
|
+
// advancement, we detect the iterator re-yielding that same INSERT (it was only
|
|
1190
|
+
// peeked, not consumed) and call next() a second time to skip past it. This prevents
|
|
1191
|
+
// the INSERT from being emitted twice in the output.
|
|
1186
1192
|
let skipIteratorBOperation;
|
|
1193
|
+
// Skip-aware iterator advancement, mirroring advanceRebaseIteratorB in
|
|
1194
|
+
// _rebaseArrayChangeSetForProperty (~20 lines below in this file).
|
|
1195
|
+
// Stage 1: If the just-emitted segment matches the paired removeInsertOperation
|
|
1196
|
+
// (by reference equality), record it for skipping — do NOT advance yet.
|
|
1197
|
+
// Stage 2: On the next call, advance normally. If the iterator yields the recorded
|
|
1198
|
+
// INSERT, advance again to skip past it. Then clear the skip state.
|
|
1187
1199
|
const advanceIteratorB = () => {
|
|
1188
1200
|
if (opB.removeInsertOperation &&
|
|
1189
1201
|
segment.op !== undefined &&
|
|
@@ -1340,6 +1352,39 @@ var ChangeSetArrayFunctions;
|
|
|
1340
1352
|
resultPropertyChanges.writeOffset = 0;
|
|
1341
1353
|
let currentIndexOffset = 0;
|
|
1342
1354
|
const segment = {};
|
|
1355
|
+
// Two-stage skip state for paired REMOVE+INSERT handling. When splitOverlapping's
|
|
1356
|
+
// special case emits a paired INSERT early (because its position fell behind the
|
|
1357
|
+
// advancing REMOVE), we record that INSERT's operation reference here. On the next
|
|
1358
|
+
// advancement, we detect the iterator re-yielding that same INSERT (it was only
|
|
1359
|
+
// peeked, not consumed) and call next() a second time to skip past it. This prevents
|
|
1360
|
+
// the INSERT from being emitted twice in the rebased output.
|
|
1361
|
+
let skipIteratorBOperation;
|
|
1362
|
+
// Reference to iteratorB's mutable operation descriptor — a shared object that is
|
|
1363
|
+
// updated in-place each time iteratorB.next() is called.
|
|
1364
|
+
const opB = iteratorB.opDescription;
|
|
1365
|
+
// Skip-aware iterator advancement, mirroring advanceIteratorB in
|
|
1366
|
+
// _performApplyAfterOnPropertyArray. The two closures capture different local scopes
|
|
1367
|
+
// so they are intentionally kept separate rather than extracted into a shared helper.
|
|
1368
|
+
// Stage 1: If the just-emitted segment matches the paired removeInsertOperation
|
|
1369
|
+
// (by reference equality), record it for skipping — do NOT advance yet.
|
|
1370
|
+
// Stage 2: On the next call, advance normally. If the iterator yields the recorded
|
|
1371
|
+
// INSERT, advance again to skip past it. Then clear the skip state.
|
|
1372
|
+
const advanceRebaseIteratorB = () => {
|
|
1373
|
+
if (opB.removeInsertOperation &&
|
|
1374
|
+
segment.op !== undefined &&
|
|
1375
|
+
skipIteratorBOperation === undefined &&
|
|
1376
|
+
segment.op.operation === opB.removeInsertOperation) {
|
|
1377
|
+
skipIteratorBOperation = segment.op.operation;
|
|
1378
|
+
}
|
|
1379
|
+
else {
|
|
1380
|
+
iteratorB.next();
|
|
1381
|
+
if (skipIteratorBOperation && opB.operation === skipIteratorBOperation) {
|
|
1382
|
+
iteratorB.next();
|
|
1383
|
+
}
|
|
1384
|
+
skipIteratorBOperation = undefined;
|
|
1385
|
+
getRangeForAppliedOperation(opB, rangeB, undefined, in_options);
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1343
1388
|
// create ranges for A and B: A is the current state and B is the change set to be applied
|
|
1344
1389
|
while (!iteratorA.atEnd() || !iteratorB.atEnd()) {
|
|
1345
1390
|
splitOverlapping(rangeA, rangeB, segment, true, in_options);
|
|
@@ -1352,14 +1397,12 @@ var ChangeSetArrayFunctions;
|
|
|
1352
1397
|
}
|
|
1353
1398
|
if (segment.flag === ArrayChangeSetRangeType.completeB ||
|
|
1354
1399
|
segment.flag === ArrayChangeSetRangeType.completeBpartOfA) {
|
|
1355
|
-
|
|
1356
|
-
getRangeForAppliedOperation(iteratorB.opDescription, rangeB, undefined, in_options);
|
|
1400
|
+
advanceRebaseIteratorB();
|
|
1357
1401
|
}
|
|
1358
1402
|
if (segment.flag === ArrayChangeSetRangeType.completeAcompleteB) {
|
|
1359
1403
|
iteratorA.next();
|
|
1360
1404
|
getRangeForAppliedOperation(opA, rangeA, ArrayChangeSetRangeType.completeA, in_options);
|
|
1361
|
-
|
|
1362
|
-
getRangeForAppliedOperation(iteratorB.opDescription, rangeB, undefined, in_options);
|
|
1405
|
+
advanceRebaseIteratorB();
|
|
1363
1406
|
}
|
|
1364
1407
|
if (opA.offset !== undefined) {
|
|
1365
1408
|
// the correct index offset for the next operation is given by A's offset
|