plitejs 54.0.0-beta.6 → 54.0.0-beta.8
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/README.md +4 -4
- package/dist/authored/index.d.ts +67 -47
- package/dist/authored/index.js +7640 -4563
- package/dist/{authored-veto-BsBDXC0b.js → authored-veto-DLmBMIcy.js} +1 -1
- package/dist/clipboard-format-key-SzffxWqa.js +14 -0
- package/dist/{comparison-plan-IOewH50q.js → comparison-plan-BqFJWjO4.js} +142 -14
- package/dist/{create-editor-DRRzGwaC.js → create-editor-kU8fg-PF.js} +30 -78
- package/dist/diff/index.d.ts +2 -32
- package/dist/diff/index.js +92 -372
- package/dist/dom/index.d.ts +3 -2
- package/dist/dom/index.js +3 -2
- package/dist/{dom-CVYV5Qd5.js → dom-SUWlnfT9.js} +1052 -261
- package/dist/history/index.d.ts +5 -5
- package/dist/history/index.js +3237 -2096
- package/dist/history-skip-CcEhIzak.js +35 -0
- package/dist/hyperscript/index.d.ts +1 -1
- package/dist/hyperscript/index.js +1 -1
- package/dist/{hyperscript-CT6hhnAY.js → hyperscript-DdeGYoSc.js} +3 -2
- package/dist/{index-PDROnF1G.d.ts → index-4PpawhYe.d.ts} +1 -1
- package/dist/{index-VZrKWWeh.d.ts → index-BsOySJwr.d.ts} +86 -203
- package/dist/{index-D7-n2GCk.d.ts → index-CHEKdrHP.d.ts} +32 -24
- package/dist/{comparison-types-DBQFu7Rt.d.ts → index-DM-b6jEe.d.ts} +21 -57
- package/dist/{index-BT7D4vtf.d.ts → index-DqmhcD_0.d.ts} +1 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +66 -5
- package/dist/law-check-Bvnz2EKh.js +19271 -0
- package/dist/pagination/index.d.ts +1 -1
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/react.d.ts +14 -11
- package/dist/pagination/react.js +237 -144
- package/dist/{pagination-Cs5ka6hW.js → pagination-XEnxZ1DX.js} +2 -1
- package/dist/{plugin-Bm6nsPHh.js → plugin-B8uCi-Hr.js} +17196 -22475
- package/dist/{range-geometry-DO-kbNrb.d.ts → range-geometry-B2f67yLv.d.ts} +1 -1
- package/dist/{range-geometry-D1XfYWs0.js → range-geometry-BGKYQHqO.js} +3 -2
- package/dist/react/index.d.ts +4 -5
- package/dist/react/index.js +8 -7
- package/dist/react/virtualized.d.ts +5 -5
- package/dist/react/virtualized.js +69 -43
- package/dist/{react-BYtwRr4v.js → react-B6B-5z7t.js} +141 -171
- package/dist/{retraction-DnEUo8oE.js → retraction-BMzQ2on5.js} +2 -18
- package/dist/scroll-root-DudA40xj.js +25 -0
- package/dist/{src-DIQDddmh.js → src--BZ7fZY4.js} +183 -64
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +4 -3
- package/dist/{index-DHt8nZQ6.d.ts → tx-only-D8lpB-sT.d.ts} +9246 -8660
- package/dist/{editor-owner-CGj1wYCa.js → update-policy-J-4sHmrg.js} +54 -2
- package/dist/{use-editor-dom-scope-hT7W9d-p.js → use-editor-dom-scope-BFWvutxn.js} +18267 -15917
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/dist/yjs/react/index.d.ts +3 -3
- package/dist/yjs/react/index.js +3 -3
- package/dist/{yjs-C_g9gZwI.js → yjs-DPngKQWQ.js} +420 -164
- package/package.json +2 -9
- package/dist/annotation-store-metrics-Ccjkef45.js +0 -12
- package/dist/annotations/index.d.ts +0 -2
- package/dist/annotations/index.js +0 -2
- package/dist/index-BvQzYVAW.d.ts +0 -71
- package/dist/mapped-view-store-CBk2-bDR.js +0 -120
- package/dist/store-BLYxJgOU.js +0 -747
package/dist/diff/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
1
|
+
import { Li as jsonEqual } from "../law-check-Bvnz2EKh.js";
|
|
2
|
+
import { C as uniqueSpans, S as stripComparisonElementIds, _ as fillComparisonElementIds, a as comparisonTextRuns, b as spanKey, c as COMPARISON_POLICY, d as comparisonChangeHashPayload, f as comparisonDocumentsEqual, g as detachComparisonEnvelope, h as detachComparisonDocument, i as comparisonTextPoint, l as COMPARISON_WORD, m as createComparisonSnapshot, o as comparisonTextSpans, p as comparisonHash, r as planComparison, s as createComparisonIndex, u as assertComparisonActive, v as mergeGroups, w as yieldComparisonWork, x as stableStringify, y as needsComparisonElementIds } from "../comparison-plan-BqFJWjO4.js";
|
|
3
3
|
import { DiffMatchPatch, DiffOp } from "diff-match-patch-ts";
|
|
4
4
|
//#region src/diff/lib/comparison-matcher.ts
|
|
5
5
|
const CANDIDATES_PER_NODE = 24;
|
|
@@ -1255,7 +1255,7 @@ const matchComparison = async (before, after, comparisonId, options) => {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
const beforeNodeBySpan = new Map(beforeElements.map((node) => [spanKey(node.span), node]));
|
|
1257
1257
|
const afterNodeBySpan = new Map(afterElements.map((node) => [spanKey(node.span), node]));
|
|
1258
|
-
const unsupportedSpans = uniqueSpans
|
|
1258
|
+
const unsupportedSpans = uniqueSpans(changes.flatMap(({ effects }) => effects.flatMap((effect) => {
|
|
1259
1259
|
if (effect.kind !== "structure" && effect.kind !== "wrapper" && effect.kind !== "node-type") return [];
|
|
1260
1260
|
return [...effect.before.filter((value) => {
|
|
1261
1261
|
const node = beforeNodeBySpan.get(spanKey(value));
|
|
@@ -1283,17 +1283,45 @@ const matchComparison = async (before, after, comparisonId, options) => {
|
|
|
1283
1283
|
text
|
|
1284
1284
|
})));
|
|
1285
1285
|
});
|
|
1286
|
+
const pairByAfter = new Map(pairs.map((pair) => [pair.after, pair.before]));
|
|
1287
|
+
const inPlaceCache = /* @__PURE__ */ new Map();
|
|
1288
|
+
const isInPlace = (afterIndex) => {
|
|
1289
|
+
const cached = inPlaceCache.get(afterIndex);
|
|
1290
|
+
if (cached !== void 0) return cached;
|
|
1291
|
+
const beforeIndex = pairByAfter.get(afterIndex);
|
|
1292
|
+
if (beforeIndex === void 0 || moved.has(pairKey(beforeIndex, afterIndex))) {
|
|
1293
|
+
inPlaceCache.set(afterIndex, false);
|
|
1294
|
+
return false;
|
|
1295
|
+
}
|
|
1296
|
+
const beforeNode = before.nodes[beforeIndex];
|
|
1297
|
+
const afterNode = after.nodes[afterIndex];
|
|
1298
|
+
if (beforeNode.root !== afterNode.root) {
|
|
1299
|
+
inPlaceCache.set(afterIndex, false);
|
|
1300
|
+
return false;
|
|
1301
|
+
}
|
|
1302
|
+
const result = beforeNode.parentIndex === null && afterNode.parentIndex === null ? true : beforeNode.parentIndex !== null && afterNode.parentIndex !== null && pairByAfter.get(afterNode.parentIndex) === beforeNode.parentIndex && isInPlace(afterNode.parentIndex);
|
|
1303
|
+
inPlaceCache.set(afterIndex, result);
|
|
1304
|
+
return result;
|
|
1305
|
+
};
|
|
1306
|
+
const splitJoinHeads = relations.flatMap((relation) => (relation.kind === "split" || relation.kind === "join") && relation.before.length > 0 && relation.after.length > 0 ? [[relation.before[0], relation.after[0]]] : []);
|
|
1307
|
+
const isInPlaceParent = (beforeIndex, afterIndex) => {
|
|
1308
|
+
const beforeNode = before.nodes[beforeIndex];
|
|
1309
|
+
const afterNode = after.nodes[afterIndex];
|
|
1310
|
+
if (beforeNode.root !== afterNode.root) return false;
|
|
1311
|
+
return beforeNode.parentIndex === null && afterNode.parentIndex === null ? true : beforeNode.parentIndex !== null && afterNode.parentIndex !== null && pairByAfter.get(afterNode.parentIndex) === beforeNode.parentIndex && isInPlace(afterNode.parentIndex);
|
|
1312
|
+
};
|
|
1313
|
+
const inPlaceMatches = Object.freeze([...pairs.filter((pair) => isInPlace(pair.after)).map((pair) => Object.freeze([pair.before, pair.after])), ...splitJoinHeads.filter(([beforeIndex, afterIndex]) => !pairByAfter.has(afterIndex) && isInPlaceParent(beforeIndex, afterIndex)).map((pair) => Object.freeze(pair))]);
|
|
1286
1314
|
return Object.freeze({
|
|
1287
1315
|
candidateEdges,
|
|
1288
1316
|
changes: composeSetMemberGroups(composeWrapperGroups(composeLogicalGroups(changes, pairs, before, after)), memberPairs, before, after),
|
|
1289
1317
|
diagnostics: Object.freeze(diagnostics),
|
|
1318
|
+
inPlaceMatches,
|
|
1290
1319
|
localAlignmentCells,
|
|
1291
1320
|
visibleEquivalent
|
|
1292
1321
|
});
|
|
1293
1322
|
};
|
|
1294
1323
|
//#endregion
|
|
1295
1324
|
//#region src/diff/lib/compare.ts
|
|
1296
|
-
const THREE_WAY_STATE = /* @__PURE__ */ new WeakMap();
|
|
1297
1325
|
const allRootSpans = (index) => Object.freeze([...index.roots.values()].map(({ length, name }) => Object.freeze({
|
|
1298
1326
|
from: 0,
|
|
1299
1327
|
root: name,
|
|
@@ -1336,139 +1364,76 @@ const coarseFallback = (id, before, after) => {
|
|
|
1336
1364
|
})
|
|
1337
1365
|
});
|
|
1338
1366
|
};
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
before,
|
|
1345
|
-
evidence,
|
|
1346
|
-
kind
|
|
1347
|
-
})),
|
|
1348
|
-
effects: group.effects.map(({ id: _id, ...effect }) => effect),
|
|
1349
|
-
evidence: group.evidence
|
|
1350
|
-
});
|
|
1351
|
-
const publishThreeWayGroup = (comparisonId, index, group, branches) => {
|
|
1352
|
-
const id = `${comparisonId}:change:${index}`;
|
|
1353
|
-
return Object.freeze({
|
|
1354
|
-
after: group.after,
|
|
1355
|
-
before: group.before,
|
|
1356
|
-
branches: Object.freeze([...branches]),
|
|
1357
|
-
correspondence: Object.freeze(group.correspondence.map((item, correspondenceIndex) => Object.freeze({
|
|
1367
|
+
const rekeyComparedChanges = (changes, fromPrefix, toPrefix) => {
|
|
1368
|
+
const rekey = (value) => value.startsWith(fromPrefix) ? `${toPrefix}${value.slice(fromPrefix.length)}` : value;
|
|
1369
|
+
return Object.freeze(changes.map((group) => Object.freeze({
|
|
1370
|
+
...group,
|
|
1371
|
+
correspondence: Object.freeze(group.correspondence.map((item) => Object.freeze({
|
|
1358
1372
|
...item,
|
|
1359
|
-
id:
|
|
1373
|
+
id: rekey(item.id)
|
|
1360
1374
|
}))),
|
|
1361
|
-
effects: Object.freeze(group.effects.map((effect
|
|
1375
|
+
effects: Object.freeze(group.effects.map((effect) => Object.freeze({
|
|
1362
1376
|
...effect,
|
|
1363
|
-
id:
|
|
1377
|
+
id: rekey(effect.id)
|
|
1364
1378
|
}))),
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
});
|
|
1369
|
-
};
|
|
1370
|
-
const spansTouch = (left, right) => left.some((a) => right.some((b) => {
|
|
1371
|
-
if (a.root !== b.root) return false;
|
|
1372
|
-
if (a.from === a.to && b.from === b.to) return a.from === b.from;
|
|
1373
|
-
if (a.from === a.to) return b.from <= a.from && a.from <= b.to;
|
|
1374
|
-
if (b.from === b.to) return a.from <= b.from && b.from <= a.to;
|
|
1375
|
-
return Math.max(a.from, b.from) < Math.min(a.to, b.to);
|
|
1376
|
-
}));
|
|
1377
|
-
const propertyKeys = (group) => new Set(group.effects.flatMap((effect) => effect.kind === "property" ? [...effect.beforeProperties, ...effect.afterProperties].flatMap(Object.keys) : []));
|
|
1378
|
-
const groupsConflict = (left, right) => {
|
|
1379
|
-
if (!spansTouch(left.before, right.before)) return false;
|
|
1380
|
-
const leftKinds = new Set(left.effects.map(({ kind }) => kind));
|
|
1381
|
-
const rightKinds = new Set(right.effects.map(({ kind }) => kind));
|
|
1382
|
-
if (leftKinds.size === 1 && leftKinds.has("placement") && [...rightKinds].every((kind) => kind === "text" || kind === "property") || rightKinds.size === 1 && rightKinds.has("placement") && [...leftKinds].every((kind) => kind === "text" || kind === "property")) return false;
|
|
1383
|
-
if ([...leftKinds].every((kind) => kind === "property") && [...rightKinds].every((kind) => kind === "property")) {
|
|
1384
|
-
const rightProperties = propertyKeys(right);
|
|
1385
|
-
return [...propertyKeys(left)].some((key) => rightProperties.has(key));
|
|
1386
|
-
}
|
|
1387
|
-
return true;
|
|
1388
|
-
};
|
|
1389
|
-
const conflictKind = (local, remote, gridSpans) => {
|
|
1390
|
-
const effects = [...local, ...remote].flatMap(({ effects: value }) => value);
|
|
1391
|
-
const kinds = new Set(effects.map(({ kind }) => kind));
|
|
1392
|
-
if (kinds.has("root-create") || kinds.has("root-delete")) return "root";
|
|
1393
|
-
if ([...local, ...remote].some(({ before }) => spansTouch(before, gridSpans))) return "grid";
|
|
1394
|
-
if (kinds.has("delete") && [...kinds].some((kind) => kind !== "delete" && kind !== "structure")) return "delete-edit";
|
|
1395
|
-
if (kinds.has("placement")) return "placement";
|
|
1396
|
-
if (local.every(({ effects: value }) => value.some(({ kind }) => kind === "insert")) && remote.every(({ effects: value }) => value.some(({ kind }) => kind === "insert"))) return "order";
|
|
1397
|
-
return "structure";
|
|
1398
|
-
};
|
|
1399
|
-
const uniqueSpans = (spans) => Object.freeze([...new Map(spans.map((span) => [`${span.root}:${span.from}:${span.to}`, span])).values()]);
|
|
1400
|
-
const buildConflicts = (comparisonId, local, remote, gridSpans) => {
|
|
1401
|
-
const { find, join } = disjointSets(local.length + remote.length);
|
|
1402
|
-
const edges = local.flatMap((localGroup, localIndex) => remote.flatMap((remoteGroup, remoteIndex) => groupsConflict(localGroup, remoteGroup) ? [[localIndex, local.length + remoteIndex]] : []));
|
|
1403
|
-
for (const [left, right] of edges) join(left, right);
|
|
1404
|
-
for (const [offset, branchGroups] of [[0, local], [local.length, remote]]) {
|
|
1405
|
-
const indexById = new Map(branchGroups.map(({ id: groupId }, index) => [groupId, offset + index]));
|
|
1406
|
-
branchGroups.forEach(({ requiredChangeIds }, index) => {
|
|
1407
|
-
for (const requiredId of requiredChangeIds) {
|
|
1408
|
-
const required = indexById.get(requiredId);
|
|
1409
|
-
if (required !== void 0) join(offset + index, required);
|
|
1410
|
-
}
|
|
1411
|
-
});
|
|
1412
|
-
}
|
|
1413
|
-
const components = [...new Set(edges.map(([left]) => find(left)))].map((root) => ({
|
|
1414
|
-
local: local.filter((_group, index) => find(index) === root),
|
|
1415
|
-
remote: remote.filter((_group, index) => find(local.length + index) === root)
|
|
1416
|
-
}));
|
|
1417
|
-
return Object.freeze(components.map((component, index) => {
|
|
1418
|
-
const localGroups = [...component.local];
|
|
1419
|
-
const remoteGroups = [...component.remote];
|
|
1420
|
-
const localIds = Object.freeze(localGroups.map(({ id }) => id));
|
|
1421
|
-
const remoteIds = Object.freeze(remoteGroups.map(({ id }) => id));
|
|
1422
|
-
const kind = conflictKind(localGroups, remoteGroups, gridSpans);
|
|
1423
|
-
const changeIds = Object.freeze([...localIds, ...remoteIds]);
|
|
1424
|
-
const requiredChangeIds = Object.freeze([...new Set([...localGroups, ...remoteGroups].flatMap(({ requiredChangeIds: ids }) => ids))].filter((id) => !changeIds.includes(id)));
|
|
1425
|
-
return Object.freeze({
|
|
1426
|
-
base: uniqueSpans([...localGroups, ...remoteGroups].flatMap(({ before }) => before)),
|
|
1427
|
-
changeIds,
|
|
1428
|
-
id: `${comparisonId}:conflict:${index}:${comparisonHash({
|
|
1429
|
-
kind,
|
|
1430
|
-
localIds,
|
|
1431
|
-
remoteIds
|
|
1432
|
-
})}`,
|
|
1433
|
-
kind,
|
|
1434
|
-
local: Object.freeze({
|
|
1435
|
-
branch: "local",
|
|
1436
|
-
changeIds: localIds,
|
|
1437
|
-
spans: uniqueSpans(localGroups.flatMap(({ after }) => after))
|
|
1438
|
-
}),
|
|
1439
|
-
remote: Object.freeze({
|
|
1440
|
-
branch: "remote",
|
|
1441
|
-
changeIds: remoteIds,
|
|
1442
|
-
spans: uniqueSpans(remoteGroups.flatMap(({ after }) => after))
|
|
1443
|
-
}),
|
|
1444
|
-
requiredChangeIds
|
|
1445
|
-
});
|
|
1446
|
-
}));
|
|
1379
|
+
id: rekey(group.id),
|
|
1380
|
+
requiredChangeIds: Object.freeze(group.requiredChangeIds.map(rekey))
|
|
1381
|
+
})));
|
|
1447
1382
|
};
|
|
1448
|
-
|
|
1383
|
+
/** Compare two immutable schema-valid documents without installing editor state. */
|
|
1384
|
+
async function compare(input) {
|
|
1449
1385
|
assertComparisonActive(input.signal);
|
|
1450
1386
|
const beforeEnvelopeFingerprint = detachComparisonEnvelope(input.before);
|
|
1451
1387
|
const afterEnvelopeFingerprint = detachComparisonEnvelope(input.after);
|
|
1452
1388
|
const beforeDocument = detachComparisonDocument(input.before, input.schema);
|
|
1453
|
-
const
|
|
1389
|
+
const rawAfterDocument = detachComparisonDocument(input.after, input.schema);
|
|
1390
|
+
const fillsIds = needsComparisonElementIds(beforeDocument, rawAfterDocument);
|
|
1454
1391
|
const before = createComparisonSnapshot(beforeDocument, input.schema, input.projection?.before ?? "accepted", beforeEnvelopeFingerprint);
|
|
1455
|
-
const after = createComparisonSnapshot(afterDocument, input.schema, input.projection?.after ?? "accepted", afterEnvelopeFingerprint);
|
|
1456
|
-
await yieldComparisonWork(input.signal);
|
|
1457
|
-
const id = `comparison:${comparisonHash({
|
|
1458
|
-
after: after.fingerprint,
|
|
1459
|
-
before: before.fingerprint,
|
|
1460
|
-
policy: COMPARISON_POLICY
|
|
1461
|
-
})}`;
|
|
1462
|
-
const beforeIndex = createComparisonIndex(beforeDocument, input.schema);
|
|
1463
|
-
const afterIndex = createComparisonIndex(afterDocument, input.schema);
|
|
1464
1392
|
const beforeRoots = beforeDocument.roots ?? {};
|
|
1465
|
-
const
|
|
1466
|
-
const
|
|
1467
|
-
createdRoots: new Set(Object.keys(
|
|
1468
|
-
deletedRoots: new Set(Object.keys(beforeRoots).filter((root) => !Object.hasOwn(
|
|
1393
|
+
const rawAfterRoots = rawAfterDocument.roots ?? {};
|
|
1394
|
+
const matchOptions = {
|
|
1395
|
+
createdRoots: new Set(Object.keys(rawAfterRoots).filter((root) => !Object.hasOwn(beforeRoots, root))),
|
|
1396
|
+
deletedRoots: new Set(Object.keys(beforeRoots).filter((root) => !Object.hasOwn(rawAfterRoots, root))),
|
|
1469
1397
|
signal: input.signal
|
|
1470
|
-
}
|
|
1471
|
-
let
|
|
1398
|
+
};
|
|
1399
|
+
let afterDocument = rawAfterDocument;
|
|
1400
|
+
let after;
|
|
1401
|
+
let id;
|
|
1402
|
+
let beforeIndex;
|
|
1403
|
+
let afterIndex;
|
|
1404
|
+
let matched;
|
|
1405
|
+
let matchedChanges;
|
|
1406
|
+
let diagnostics;
|
|
1407
|
+
if (fillsIds) {
|
|
1408
|
+
await yieldComparisonWork(input.signal);
|
|
1409
|
+
const matchPrefix = "comparison:pending";
|
|
1410
|
+
const beforeMatchIndex = createComparisonIndex(stripComparisonElementIds(beforeDocument), input.schema);
|
|
1411
|
+
const afterMatchIndex = createComparisonIndex(stripComparisonElementIds(rawAfterDocument), input.schema);
|
|
1412
|
+
matched = await matchComparison(beforeMatchIndex, afterMatchIndex, matchPrefix, matchOptions);
|
|
1413
|
+
afterDocument = fillComparisonElementIds(beforeDocument, rawAfterDocument, beforeMatchIndex, afterMatchIndex, matched.inPlaceMatches);
|
|
1414
|
+
after = createComparisonSnapshot(afterDocument, input.schema, input.projection?.after ?? "accepted", afterEnvelopeFingerprint);
|
|
1415
|
+
id = `comparison:${comparisonHash({
|
|
1416
|
+
after: after.fingerprint,
|
|
1417
|
+
before: before.fingerprint,
|
|
1418
|
+
policy: COMPARISON_POLICY
|
|
1419
|
+
})}`;
|
|
1420
|
+
beforeIndex = createComparisonIndex(beforeDocument, input.schema);
|
|
1421
|
+
afterIndex = createComparisonIndex(afterDocument, input.schema);
|
|
1422
|
+
matchedChanges = rekeyComparedChanges(matched.changes, matchPrefix, id);
|
|
1423
|
+
({diagnostics} = matched);
|
|
1424
|
+
} else {
|
|
1425
|
+
after = createComparisonSnapshot(afterDocument, input.schema, input.projection?.after ?? "accepted", afterEnvelopeFingerprint);
|
|
1426
|
+
await yieldComparisonWork(input.signal);
|
|
1427
|
+
id = `comparison:${comparisonHash({
|
|
1428
|
+
after: after.fingerprint,
|
|
1429
|
+
before: before.fingerprint,
|
|
1430
|
+
policy: COMPARISON_POLICY
|
|
1431
|
+
})}`;
|
|
1432
|
+
beforeIndex = createComparisonIndex(beforeDocument, input.schema);
|
|
1433
|
+
afterIndex = createComparisonIndex(afterDocument, input.schema);
|
|
1434
|
+
matched = await matchComparison(beforeIndex, afterIndex, id, matchOptions);
|
|
1435
|
+
({changes: matchedChanges, diagnostics} = matched);
|
|
1436
|
+
}
|
|
1472
1437
|
if (matchedChanges.length === 0 && !matched.visibleEquivalent && !comparisonDocumentsEqual(beforeDocument, afterDocument)) {
|
|
1473
1438
|
const fallback = coarseFallback(id, beforeIndex, afterIndex);
|
|
1474
1439
|
matchedChanges = Object.freeze([fallback.change]);
|
|
@@ -1485,7 +1450,7 @@ const compareTwoWay = async (input) => {
|
|
|
1485
1450
|
if (!comparisonDocumentsEqual(change.invert(beforeDocument).apply(afterDocument), beforeDocument)) throw new Error("Comparison inverse does not reconstruct the source document.");
|
|
1486
1451
|
assertComparisonActive(input.signal);
|
|
1487
1452
|
const comparisonId = `${id}:${comparisonHash({
|
|
1488
|
-
change: change
|
|
1453
|
+
change: comparisonChangeHashPayload(change),
|
|
1489
1454
|
changes,
|
|
1490
1455
|
diagnostics
|
|
1491
1456
|
})}`;
|
|
@@ -1496,253 +1461,8 @@ const compareTwoWay = async (input) => {
|
|
|
1496
1461
|
changes,
|
|
1497
1462
|
diagnostics,
|
|
1498
1463
|
id: comparisonId,
|
|
1499
|
-
kind: "two-way",
|
|
1500
1464
|
policy: COMPARISON_POLICY
|
|
1501
1465
|
});
|
|
1502
|
-
};
|
|
1503
|
-
const compareThreeWay = async (input) => {
|
|
1504
|
-
assertComparisonActive(input.signal);
|
|
1505
|
-
const [local, remote] = await Promise.all([compareTwoWay({
|
|
1506
|
-
after: input.local,
|
|
1507
|
-
before: input.base,
|
|
1508
|
-
schema: input.schema,
|
|
1509
|
-
signal: input.signal
|
|
1510
|
-
}), compareTwoWay({
|
|
1511
|
-
after: input.remote,
|
|
1512
|
-
before: input.base,
|
|
1513
|
-
schema: input.schema,
|
|
1514
|
-
signal: input.signal
|
|
1515
|
-
})]);
|
|
1516
|
-
const base = local.before;
|
|
1517
|
-
const id = `comparison:${comparisonHash({
|
|
1518
|
-
base: base.fingerprint,
|
|
1519
|
-
local: local.after.fingerprint,
|
|
1520
|
-
policy: COMPARISON_POLICY,
|
|
1521
|
-
remote: remote.after.fingerprint
|
|
1522
|
-
})}`;
|
|
1523
|
-
const localIds = /* @__PURE__ */ new Map();
|
|
1524
|
-
const remoteIds = /* @__PURE__ */ new Map();
|
|
1525
|
-
const commonRemoteIds = /* @__PURE__ */ new Set();
|
|
1526
|
-
const remoteByKey = /* @__PURE__ */ new Map();
|
|
1527
|
-
for (const group of remote.changes) {
|
|
1528
|
-
const key = groupSemanticKey(group);
|
|
1529
|
-
const bucket = remoteByKey.get(key) ?? [];
|
|
1530
|
-
bucket.push(group);
|
|
1531
|
-
remoteByKey.set(key, bucket);
|
|
1532
|
-
}
|
|
1533
|
-
const staged = [];
|
|
1534
|
-
for (const group of local.changes) {
|
|
1535
|
-
const matching = remoteByKey.get(groupSemanticKey(group))?.shift();
|
|
1536
|
-
staged.push(Object.freeze({
|
|
1537
|
-
branches: matching ? Object.freeze(["local", "remote"]) : Object.freeze(["local"]),
|
|
1538
|
-
group,
|
|
1539
|
-
localId: group.id,
|
|
1540
|
-
...matching ? { remoteId: matching.id } : {}
|
|
1541
|
-
}));
|
|
1542
|
-
}
|
|
1543
|
-
for (const groups of remoteByKey.values()) for (const group of groups) staged.push(Object.freeze({
|
|
1544
|
-
branches: Object.freeze(["remote"]),
|
|
1545
|
-
group,
|
|
1546
|
-
remoteId: group.id
|
|
1547
|
-
}));
|
|
1548
|
-
const published = staged.map((item, index) => {
|
|
1549
|
-
const group = publishThreeWayGroup(id, index, item.group, item.branches);
|
|
1550
|
-
if (item.localId) localIds.set(group.id, item.localId);
|
|
1551
|
-
if (item.remoteId) {
|
|
1552
|
-
remoteIds.set(group.id, item.remoteId);
|
|
1553
|
-
if (item.localId) commonRemoteIds.add(group.id);
|
|
1554
|
-
}
|
|
1555
|
-
return group;
|
|
1556
|
-
});
|
|
1557
|
-
const localPublicBySource = new Map([...localIds].map(([publishedId, sourceId]) => [sourceId, publishedId]));
|
|
1558
|
-
const remotePublicBySource = new Map([...remoteIds].map(([publishedId, sourceId]) => [sourceId, publishedId]));
|
|
1559
|
-
const changes = Object.freeze(published.map((group, index) => {
|
|
1560
|
-
const source = staged[index];
|
|
1561
|
-
if (!source) throw new Error("Missing three-way comparison source.");
|
|
1562
|
-
const requiredChangeIds = Object.freeze([...new Set([...source.localId ? local.changes.find(({ id: sourceId }) => sourceId === source.localId)?.requiredChangeIds.map((sourceId) => localPublicBySource.get(sourceId)) ?? [] : [], ...source.remoteId ? remote.changes.find(({ id: sourceId }) => sourceId === source.remoteId)?.requiredChangeIds.map((sourceId) => remotePublicBySource.get(sourceId)) ?? [] : []].filter((required) => Boolean(required && required !== group.id)))]);
|
|
1563
|
-
return Object.freeze({
|
|
1564
|
-
...group,
|
|
1565
|
-
requiredChangeIds
|
|
1566
|
-
});
|
|
1567
|
-
}));
|
|
1568
|
-
const localGroups = changes.filter(({ branches }) => branches?.includes("local"));
|
|
1569
|
-
const remoteGroups = changes.filter(({ branches, id: groupId }) => branches?.includes("remote") && !commonRemoteIds.has(groupId));
|
|
1570
|
-
const gridSpans = createComparisonIndex(base.document, input.schema).nodes.flatMap(({ span, structure }) => structure?.kind === "grid" ? [span] : []);
|
|
1571
|
-
const conflicts = buildConflicts(id, localGroups, remoteGroups, gridSpans);
|
|
1572
|
-
const diagnostics = Object.freeze([
|
|
1573
|
-
...local.diagnostics,
|
|
1574
|
-
...remote.diagnostics,
|
|
1575
|
-
...conflicts.length > 0 ? [Object.freeze({
|
|
1576
|
-
code: "ambiguous",
|
|
1577
|
-
message: "Concurrent branch contributions require explicit conflict resolution.",
|
|
1578
|
-
severity: "warning",
|
|
1579
|
-
spans: uniqueSpans(conflicts.flatMap(({ base: spans }) => spans))
|
|
1580
|
-
})] : []
|
|
1581
|
-
]);
|
|
1582
|
-
const comparisonId = `${id}:${comparisonHash({
|
|
1583
|
-
changes,
|
|
1584
|
-
conflicts,
|
|
1585
|
-
diagnostics
|
|
1586
|
-
})}`;
|
|
1587
|
-
const comparison = Object.freeze({
|
|
1588
|
-
base,
|
|
1589
|
-
changes,
|
|
1590
|
-
conflicts,
|
|
1591
|
-
diagnostics,
|
|
1592
|
-
id: comparisonId,
|
|
1593
|
-
kind: "three-way",
|
|
1594
|
-
local: local.after,
|
|
1595
|
-
policy: COMPARISON_POLICY,
|
|
1596
|
-
remote: remote.after
|
|
1597
|
-
});
|
|
1598
|
-
THREE_WAY_STATE.set(comparison, Object.freeze({
|
|
1599
|
-
local,
|
|
1600
|
-
localIds,
|
|
1601
|
-
remote,
|
|
1602
|
-
remoteIds,
|
|
1603
|
-
schema: input.schema
|
|
1604
|
-
}));
|
|
1605
|
-
return comparison;
|
|
1606
|
-
};
|
|
1607
|
-
function compare(input) {
|
|
1608
|
-
return "base" in input ? compareThreeWay(input) : compareTwoWay(input);
|
|
1609
|
-
}
|
|
1610
|
-
const invalidResolution = (message) => Object.freeze({
|
|
1611
|
-
diagnostics: Object.freeze([Object.freeze({
|
|
1612
|
-
code: "invalid-resolution",
|
|
1613
|
-
message,
|
|
1614
|
-
severity: "warning"
|
|
1615
|
-
})]),
|
|
1616
|
-
status: "invalid"
|
|
1617
|
-
});
|
|
1618
|
-
const annotateResolvedComparison = (comparison, branches) => {
|
|
1619
|
-
if (comparison.changes.length === 0 || branches.length === 0) return comparison;
|
|
1620
|
-
const changes = Object.freeze(comparison.changes.map((group) => Object.freeze({
|
|
1621
|
-
...group,
|
|
1622
|
-
branches: Object.freeze([...branches])
|
|
1623
|
-
})));
|
|
1624
|
-
const prefix = `comparison:${comparisonHash({
|
|
1625
|
-
after: comparison.after.fingerprint,
|
|
1626
|
-
before: comparison.before.fingerprint,
|
|
1627
|
-
policy: comparison.policy
|
|
1628
|
-
})}`;
|
|
1629
|
-
return Object.freeze({
|
|
1630
|
-
...comparison,
|
|
1631
|
-
changes,
|
|
1632
|
-
id: `${prefix}:${comparisonHash({
|
|
1633
|
-
change: comparison.change.toJSON(),
|
|
1634
|
-
changes,
|
|
1635
|
-
diagnostics: comparison.diagnostics
|
|
1636
|
-
})}`
|
|
1637
|
-
});
|
|
1638
|
-
};
|
|
1639
|
-
const restoreBaselineSnapshot = (comparison, before) => {
|
|
1640
|
-
const prefix = `comparison:${comparisonHash({
|
|
1641
|
-
after: comparison.after.fingerprint,
|
|
1642
|
-
before: before.fingerprint,
|
|
1643
|
-
policy: comparison.policy
|
|
1644
|
-
})}`;
|
|
1645
|
-
return Object.freeze({
|
|
1646
|
-
...comparison,
|
|
1647
|
-
before,
|
|
1648
|
-
id: `${prefix}:${comparisonHash({
|
|
1649
|
-
change: comparison.change.toJSON(),
|
|
1650
|
-
changes: comparison.changes,
|
|
1651
|
-
diagnostics: comparison.diagnostics
|
|
1652
|
-
})}`
|
|
1653
|
-
});
|
|
1654
|
-
};
|
|
1655
|
-
/** Resolve one published three-way comparison without rematching its inputs. */
|
|
1656
|
-
async function resolveComparison(input) {
|
|
1657
|
-
assertComparisonActive(input.signal);
|
|
1658
|
-
const state = THREE_WAY_STATE.get(input.comparison);
|
|
1659
|
-
if (!state) return invalidResolution("The comparison was not created by this resolver.");
|
|
1660
|
-
const resolutions = input.resolutions ?? [];
|
|
1661
|
-
const byConflict = /* @__PURE__ */ new Map();
|
|
1662
|
-
for (const resolution of resolutions) {
|
|
1663
|
-
if (resolution.comparisonId !== input.comparison.id || byConflict.has(resolution.conflictId) || !input.comparison.conflicts.some(({ id }) => id === resolution.conflictId)) return invalidResolution("A resolution has an unknown, duplicate, or stale comparison identity.");
|
|
1664
|
-
byConflict.set(resolution.conflictId, resolution);
|
|
1665
|
-
}
|
|
1666
|
-
const unresolved = input.comparison.conflicts.filter(({ id }) => !byConflict.has(id));
|
|
1667
|
-
if (unresolved.length > 0) return Object.freeze({
|
|
1668
|
-
conflicts: Object.freeze([...unresolved]),
|
|
1669
|
-
status: "unresolved"
|
|
1670
|
-
});
|
|
1671
|
-
const customChoices = resolutions.filter(({ choice }) => typeof choice === "object");
|
|
1672
|
-
if (customChoices.length > 0) {
|
|
1673
|
-
if (customChoices.length !== resolutions.length || customChoices.length !== input.comparison.conflicts.length) return invalidResolution("Custom resolution documents must resolve every conflict together.");
|
|
1674
|
-
let target;
|
|
1675
|
-
try {
|
|
1676
|
-
const custom = customChoices[0];
|
|
1677
|
-
if (!custom) return invalidResolution("A custom resolution target is missing.");
|
|
1678
|
-
target = detachComparisonDocument(custom.choice.document, state.schema);
|
|
1679
|
-
if (customChoices.some(({ choice }) => {
|
|
1680
|
-
return !comparisonDocumentsEqual(detachComparisonDocument(choice.document, state.schema), target);
|
|
1681
|
-
})) return invalidResolution("Custom resolutions must name one identical target document.");
|
|
1682
|
-
} catch {
|
|
1683
|
-
return invalidResolution("A custom resolution document does not satisfy the comparison schema.");
|
|
1684
|
-
}
|
|
1685
|
-
const baseline = input.comparison[input.baseline];
|
|
1686
|
-
const comparison = restoreBaselineSnapshot(await compareTwoWay({
|
|
1687
|
-
after: target,
|
|
1688
|
-
before: baseline.document,
|
|
1689
|
-
schema: state.schema,
|
|
1690
|
-
signal: input.signal
|
|
1691
|
-
}), baseline);
|
|
1692
|
-
return Object.freeze({
|
|
1693
|
-
comparison,
|
|
1694
|
-
status: "resolved"
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
const excludedLocal = /* @__PURE__ */ new Set();
|
|
1698
|
-
const excludedRemote = /* @__PURE__ */ new Set();
|
|
1699
|
-
for (const conflict of input.comparison.conflicts) {
|
|
1700
|
-
const choice = byConflict.get(conflict.id)?.choice;
|
|
1701
|
-
if (choice === "local") for (const groupId of conflict.remote.changeIds) excludedRemote.add(groupId);
|
|
1702
|
-
else if (choice === "remote") for (const groupId of conflict.local.changeIds) excludedLocal.add(groupId);
|
|
1703
|
-
}
|
|
1704
|
-
const localSelected = [...state.localIds.keys()].filter((groupId) => !excludedLocal.has(groupId));
|
|
1705
|
-
const sourcesOf = (ids, groupIds) => [...groupIds].flatMap((groupId) => {
|
|
1706
|
-
const sourceId = ids.get(groupId);
|
|
1707
|
-
return sourceId ? [sourceId] : [];
|
|
1708
|
-
});
|
|
1709
|
-
const leftOut = new Set(sourcesOf(state.remoteIds, localSelected));
|
|
1710
|
-
const branch = (comparison, ids, selected, excluded, met) => {
|
|
1711
|
-
const plan = comparisonPlanOf(comparison, state.schema);
|
|
1712
|
-
if (!plan) return null;
|
|
1713
|
-
const closed = closeOverRequired(comparison.changes.map((group) => ({
|
|
1714
|
-
...group,
|
|
1715
|
-
requiredChangeIds: group.requiredChangeIds.filter((id) => !met.has(id))
|
|
1716
|
-
})), sourcesOf(ids, selected));
|
|
1717
|
-
const excludedSources = new Set(sourcesOf(ids, excluded));
|
|
1718
|
-
const all = closed.size === comparison.changes.length;
|
|
1719
|
-
if ([...closed].some((id) => excludedSources.has(id)) || plan.windows.some(({ owners }) => owners.some((id) => closed.has(id)) && owners.some((id) => met.has(id))) || !all && !plan.partitioned) return null;
|
|
1720
|
-
return {
|
|
1721
|
-
change: plan.select(all ? "all" : closed),
|
|
1722
|
-
size: closed.size
|
|
1723
|
-
};
|
|
1724
|
-
};
|
|
1725
|
-
const local = branch(state.local, state.localIds, localSelected, excludedLocal, /* @__PURE__ */ new Set());
|
|
1726
|
-
const remote = branch(state.remote, state.remoteIds, [...state.remoteIds.keys()].filter((groupId) => !excludedRemote.has(groupId) && !leftOut.has(state.remoteIds.get(groupId) ?? "")), excludedRemote, leftOut);
|
|
1727
|
-
if (!local || !remote) return invalidResolution("The selected branch contributions cannot be separated into one exact change.");
|
|
1728
|
-
let target;
|
|
1729
|
-
try {
|
|
1730
|
-
target = detachComparisonDocument(DocumentChange.transform(local.change, remote.change, input.comparison.base.document).b.apply(local.change.apply(input.comparison.base.document)), state.schema);
|
|
1731
|
-
} catch {
|
|
1732
|
-
return invalidResolution("The selected branch contributions do not form one schema-valid document.");
|
|
1733
|
-
}
|
|
1734
|
-
const baseline = input.comparison[input.baseline];
|
|
1735
|
-
const compared = restoreBaselineSnapshot(await compareTwoWay({
|
|
1736
|
-
after: target,
|
|
1737
|
-
before: baseline.document,
|
|
1738
|
-
schema: state.schema,
|
|
1739
|
-
signal: input.signal
|
|
1740
|
-
}), baseline);
|
|
1741
|
-
const branches = Object.freeze([...local.size > 0 ? ["local"] : [], ...remote.size > 0 ? ["remote"] : []]);
|
|
1742
|
-
return Object.freeze({
|
|
1743
|
-
comparison: annotateResolvedComparison(compared, branches),
|
|
1744
|
-
status: "resolved"
|
|
1745
|
-
});
|
|
1746
1466
|
}
|
|
1747
1467
|
//#endregion
|
|
1748
|
-
export { compare
|
|
1468
|
+
export { compare };
|
package/dist/dom/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ts as getDOMClipboardFormatKey } from "../tx-only-D8lpB-sT.js";
|
|
2
|
+
import { $ as ClipboardSliceWrite, $t as isBefore, A as DataTransferFormat, At as DOMCoverageMaterializeRangeRole, B as DOMApi, Bt as DOMNode, C as writeDOMSelection, Ct as DOMCoverage, D as DataTransferDecodeContext, Dt as DOMCoverageBoundaryState, E as usesAppleDOMHotkeys, Et as DOMCoverageBoundaryEdge, F as writeDataTransferFragment, Ft as DOMCoverageReason, G as DOMEditorClipboardCapability, Gt as DOMText, H as DOMClipboardInsertDataHandler, Ht as DOMRange, I as DOMEditorOptions, It as DOMCoverageRuntimeRange, J as DOMVisualPointOptions, Jt as getActiveElement, K as DOMResolutionError, Kt as closestShadowAware, L as DOMPlugin, Lt as DOMCoverageSelectionPolicy, M as DataTransferSchemaClaim, Mt as DOMCoverageMaterializeResult, N as DataTransferSnapshot, Nt as DOMCoveragePathRange, O as DataTransferDiagnostic, Ot as DOMCoverageCopyPolicy, P as dataTransferFormats, Pt as DOMCoveragePointResult, Q as ClipboardSliceRead, Qt as isAfter, R as DOMPluginTypes, Rt as DOMCoverageSession, S as readDOMSelectionRange, St as DOMDropTargetOptions, T as isGeckoDOMHost, Tt as DOMCoverageBoundaryAnchor, U as DOMDragApi, Ut as DOMSelection, V as DOMClipboardApi, Vt as DOMPoint, Wt as DOMStaticRange, X as isTrackedMutation, Xt as getSelection, Y as ScrollIntoViewTarget, Yt as getDefaultView, Z as ScrollIntoViewOptions, Zt as hasShadowRoot, _ as createCompiledHotkeyMatcher, _t as DropIndicator, a as isLeaf, an as normalizeDOMPoint, at as writeDOMRangeData, b as getEditorDOMRoot, bt as DOMDropTarget, c as isText, ct as TextDiff, d as Hotkeys, dt as normalizePoint, en as isDOMElement, et as DOMFragmentDataHtml, f as HotkeyMatchOptions, ft as normalizeRange, g as ariaKeyShortcuts, gt as DOMGeometryRect, h as KeyboardEventLike, ht as verifyDiffState, i as isElement, in as isPlainTextOnlyPaste, it as writeDOMFragmentData, j as DataTransferFormatPhase, jt as DOMCoverageMaterializeReason, k as DataTransferEncodeContext, kt as DOMCoverageMaterializeHandler, l as isVoid, lt as applyStringDiff, m as HotkeySpec, mt as targetRange, n as getNodeDataAttributeKeys, nn as isDOMSelection, nt as cleanDOMClipboardContents, o as isNode, ot as Key, p as HotkeyPlatform, pt as normalizeStringDiff, q as DOMVisualPoint, qt as containsShadowAware, r as isEditor, rn as isDOMText, rt as domCommands, s as isString, st as StringDiff, t as getElements, tn as isDOMNode, tt as DOMFragmentDataPayload, u as keyToDataAttribute, ut as mergeStringDiffs, v as isHotkey, vt as DOMDragStart, w as CAN_USE_DOM, wt as DOMCoverageBoundary, x as DOMSelectionPoints, xt as DOMDropTargetInput, y as TRIPLE_CLICK, yt as DOMDropEdge, z as dom, zt as DOMElement } from "../index-CHEKdrHP.js";
|
|
3
|
+
export { CAN_USE_DOM, type ClipboardSliceRead, type ClipboardSliceWrite, type DOMApi, type DOMClipboardApi, type DOMClipboardInsertDataHandler, DOMCoverage, type DOMCoverageBoundary, type DOMCoverageBoundaryAnchor, type DOMCoverageBoundaryEdge, type DOMCoverageBoundaryState, type DOMCoverageCopyPolicy, type DOMCoverageMaterializeHandler, type DOMCoverageMaterializeRangeRole, type DOMCoverageMaterializeReason, type DOMCoverageMaterializeResult, type DOMCoveragePathRange, type DOMCoveragePointResult, type DOMCoverageReason, type DOMCoverageRuntimeRange, type DOMCoverageSelectionPolicy, type DOMCoverageSession, type DOMDragApi, type DOMDragStart, type DOMDropEdge, type DOMDropTarget, type DOMDropTargetInput, type DOMDropTargetOptions, type DOMEditorClipboardCapability, type DOMEditorOptions, type DOMElement, type DOMFragmentDataHtml, type DOMFragmentDataPayload, type DOMGeometryRect, type DOMNode, type DOMPlugin, type DOMPluginTypes, type DOMPoint, type DOMRange, DOMResolutionError, type DOMSelection, type DOMSelectionPoints, type DOMStaticRange, type DOMText, type DOMVisualPoint, type DOMVisualPointOptions, type DataTransferDecodeContext, type DataTransferDiagnostic, type DataTransferEncodeContext, type DataTransferFormat, type DataTransferFormatPhase, type DataTransferSchemaClaim, type DataTransferSnapshot, type DropIndicator, type HotkeyMatchOptions, type HotkeyPlatform, type HotkeySpec, Hotkeys, Key, type KeyboardEventLike, type ScrollIntoViewOptions, type ScrollIntoViewTarget, type StringDiff, TRIPLE_CLICK, type TextDiff, applyStringDiff, ariaKeyShortcuts, cleanDOMClipboardContents, closestShadowAware, containsShadowAware, createCompiledHotkeyMatcher, dataTransferFormats, dom, domCommands, getActiveElement, getDOMClipboardFormatKey, getDefaultView, getEditorDOMRoot, getElements, getNodeDataAttributeKeys, getSelection, hasShadowRoot, isAfter, isBefore, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isEditor, isElement, isGeckoDOMHost, isHotkey, isLeaf, isNode, isPlainTextOnlyPaste, isString, isText, isTrackedMutation, isVoid, keyToDataAttribute, mergeStringDiffs, normalizeDOMPoint, normalizePoint, normalizeRange, normalizeStringDiff, readDOMSelectionRange, targetRange, usesAppleDOMHotkeys, verifyDiffState, writeDOMFragmentData, writeDOMRangeData, writeDOMSelection, writeDataTransferFragment };
|
package/dist/dom/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { r as getDOMClipboardFormatKey } from "../clipboard-format-key-SzffxWqa.js";
|
|
2
|
+
import { $r as normalizeDOMPoint, C as normalizeRange, Dn as CAN_USE_DOM, E as verifyDiffState, En as writeDOMSelection, Et as dataTransferFormats, Fn as usesAppleDOMHotkeys, Gr as isDOMElement, Hr as hasShadowRoot, Ir as closestShadowAware, Jr as isDOMNode, L as isTrackedMutation, Lr as containsShadowAware, Mn as isGeckoDOMHost, O as DOMResolutionError, Ot as writeDataTransferFragment, Rr as getActiveElement, S as normalizePoint, St as domCommands, T as targetRange, Tt as writeDOMRangeData, Ur as isAfter, Vr as getSelection, Wr as isBefore, Xr as isDOMText, Yr as isDOMSelection, Zr as isPlainTextOnlyPaste, Zt as getEditorDOMRoot, _ as TRIPLE_CLICK, a as isLeaf, c as isText, d as Hotkeys, g as isHotkey, h as createCompiledHotkeyMatcher, i as isElement, kt as Key, l as isVoid, m as ariaKeyShortcuts, n as getNodeDataAttributeKeys, o as isNode, r as isEditor, s as isString, t as getElements, u as keyToDataAttribute, ur as DOMCoverage, v as dom, w as normalizeStringDiff, wt as writeDOMFragmentData, x as mergeStringDiffs, xn as readDOMSelectionRange, xt as cleanDOMClipboardContents, y as applyStringDiff, zr as getDefaultView } from "../dom-SUWlnfT9.js";
|
|
3
|
+
export { CAN_USE_DOM, DOMCoverage, DOMResolutionError, Hotkeys, Key, TRIPLE_CLICK, applyStringDiff, ariaKeyShortcuts, cleanDOMClipboardContents, closestShadowAware, containsShadowAware, createCompiledHotkeyMatcher, dataTransferFormats, dom, domCommands, getActiveElement, getDOMClipboardFormatKey, getDefaultView, getEditorDOMRoot, getElements, getNodeDataAttributeKeys, getSelection, hasShadowRoot, isAfter, isBefore, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isEditor, isElement, isGeckoDOMHost, isHotkey, isLeaf, isNode, isPlainTextOnlyPaste, isString, isText, isTrackedMutation, isVoid, keyToDataAttribute, mergeStringDiffs, normalizeDOMPoint, normalizePoint, normalizeRange, normalizeStringDiff, readDOMSelectionRange, targetRange, usesAppleDOMHotkeys, verifyDiffState, writeDOMFragmentData, writeDOMRangeData, writeDOMSelection, writeDataTransferFragment };
|