plitejs 54.0.0-beta.5 → 54.0.0-beta.7
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 +25 -8
- package/dist/authored/index.js +4316 -735
- package/dist/{authored-veto-Cu-5JdVj.js → authored-veto-CferDljr.js} +1 -1
- package/dist/clipboard-format-key-CLFcThXH.js +14 -0
- package/dist/{comparison-plan-BJxnVPcS.js → comparison-plan-7iIABSWG.js} +108 -2
- package/dist/{comparison-types-Bvvxzxq2.d.ts → comparison-types-CsmDG5r2.d.ts} +1 -1
- package/dist/{create-editor-XvI_4sYc.js → create-editor-acDgsovY.js} +25 -49
- package/dist/diff/index.d.ts +2 -2
- package/dist/diff/index.js +111 -20
- package/dist/dom/index.d.ts +3 -2
- package/dist/dom/index.js +3 -2
- package/dist/{dom-BjspML2h.js → dom-B5bAma7X.js} +859 -210
- package/dist/history/index.d.ts +1 -1
- package/dist/history/index.js +5302 -4295
- package/dist/hyperscript/index.d.ts +1 -1
- package/dist/hyperscript/index.js +1 -1
- package/dist/{hyperscript-BFypA5qW.js → hyperscript-BXUV6sdO.js} +2 -2
- package/dist/{index-BwmXxqbi.d.ts → index-CTTjpWgb.d.ts} +1 -1
- package/dist/{index-DaXz-4c7.d.ts → index-D8DQ1YFB.d.ts} +22 -22
- package/dist/{index-CYac3_ID.d.ts → index-DJvrmSRP.d.ts} +82 -199
- package/dist/{index-BUJsM0oV.d.ts → index-LhVJuuEf.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +5 -5
- 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 +150 -103
- package/dist/{pagination-ChDBJtdC.js → pagination-CwjmxPoX.js} +1 -1
- package/dist/{plugin-BvM4s-Lr.js → plugin-BZCGtqMI.js} +8691 -2054
- package/dist/{range-geometry-wFuJaBlA.d.ts → range-geometry-CZari453.d.ts} +1 -1
- package/dist/{range-geometry-B5CITwMp.js → range-geometry-CqWrwkjH.js} +2 -2
- package/dist/react/index.d.ts +4 -5
- package/dist/react/index.js +7 -7
- package/dist/react/virtualized.d.ts +5 -5
- package/dist/react/virtualized.js +12 -7
- package/dist/{react-cmFeNP6P.js → react-DO9IETEQ.js} +128 -126
- package/dist/{retraction-lXQwo2Ia.js → retraction-RHEKiF3h.js} +1 -1
- package/dist/{src-BA6F9yxN.js → src-fLbHzUjC.js} +277 -72
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +3 -3
- package/dist/{index-QuqD4Dyj.d.ts → tx-only-1FM45FSj.d.ts} +9060 -8608
- package/dist/{editor-owner-CRgIQ625.js → update-policy-C32RjjGt.js} +53 -2
- package/dist/{use-editor-dom-scope-B4gF9t_Y.js → use-editor-dom-scope-CUBnNAZV.js} +6133 -4076
- 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-CWdWDrpv.js → yjs-BMguSAX_.js} +311 -127
- package/package.json +1 -7
- 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-CRmyGzS8.d.ts +0 -71
- package/dist/mapped-view-store-XUJ-fnHE.js +0 -120
- package/dist/native-grouping-input-8kO12VK9.js +0 -8
- package/dist/store-Bllfuqp4.js +0 -717
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hd as definePluginPoint } from "./plugin-BZCGtqMI.js";
|
|
2
2
|
//#region src/core/authored-veto.ts
|
|
3
3
|
/** Contribute a reason Suggesting refuses a change that touches an element. */
|
|
4
4
|
const authoredVeto = definePluginPoint("authored.veto");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { kd as getEditorRuntimeOwner } from "./plugin-BZCGtqMI.js";
|
|
2
|
+
//#region src/internal/clipboard-format-key.ts
|
|
3
|
+
const DEFAULT_CLIPBOARD_FORMAT_KEY = "x-editor-fragment";
|
|
4
|
+
const EDITOR_TO_CLIPBOARD_FORMAT_KEY = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
const setDOMClipboardFormatKey = (editor, clipboardFormatKey) => {
|
|
6
|
+
EDITOR_TO_CLIPBOARD_FORMAT_KEY.set(getEditorRuntimeOwner(editor), clipboardFormatKey);
|
|
7
|
+
};
|
|
8
|
+
const clearDOMClipboardFormatKey = (editor) => {
|
|
9
|
+
EDITOR_TO_CLIPBOARD_FORMAT_KEY.delete(getEditorRuntimeOwner(editor));
|
|
10
|
+
};
|
|
11
|
+
/** Read the configured MIME suffix used for exact Plite clipboard payloads. */
|
|
12
|
+
const getDOMClipboardFormatKey = (editor) => EDITOR_TO_CLIPBOARD_FORMAT_KEY.get(getEditorRuntimeOwner(editor)) ?? "x-editor-fragment";
|
|
13
|
+
//#endregion
|
|
14
|
+
export { setDOMClipboardFormatKey as i, clearDOMClipboardFormatKey as n, getDOMClipboardFormatKey as r, DEFAULT_CLIPBOARD_FORMAT_KEY as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mm as jsonEqual, Nf as RootChange, Qf as DocumentIndex, Yf as storedElementIdOf, em as snapshotEditorJsonValue, fp as isElementNode, ip as canonicalJsonKey, jm as isRecord, km as cloneFrozen, mp as nodeProps, nl as lawCheckEnabled, pp as isTextNode, rf as DocumentChange } from "./plugin-BZCGtqMI.js";
|
|
2
2
|
//#region src/core/json-fingerprint.ts
|
|
3
3
|
/** Deterministic fingerprint for already validated JSON-compatible data. */
|
|
4
4
|
const fingerprintEditorJson = (value) => {
|
|
@@ -39,6 +39,112 @@ const detachComparisonDocument = (input, schema) => {
|
|
|
39
39
|
...candidate.roots ? { roots: candidate.roots } : {}
|
|
40
40
|
}, "Comparison document");
|
|
41
41
|
};
|
|
42
|
+
const scanIds = (nodes, onElement) => {
|
|
43
|
+
for (const node of nodes) {
|
|
44
|
+
if (!isElementNode(node)) continue;
|
|
45
|
+
onElement(storedElementIdOf(node));
|
|
46
|
+
scanIds(node.children, onElement);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const scanDocumentIds = (document, onElement) => {
|
|
50
|
+
scanIds(document.children, onElement);
|
|
51
|
+
const { roots } = document;
|
|
52
|
+
if (!roots) return;
|
|
53
|
+
for (const root of Object.keys(roots).sort()) scanIds(roots[root], onElement);
|
|
54
|
+
};
|
|
55
|
+
const pathKey = (root, path) => `${root ?? ""}:${path.join(",")}`;
|
|
56
|
+
const stripElementIdsFromNodes = (nodes) => nodes.map((node) => {
|
|
57
|
+
if (!isElementNode(node)) return node;
|
|
58
|
+
const children = stripElementIdsFromNodes(node.children);
|
|
59
|
+
if (storedElementIdOf(node) === void 0 && children === node.children) return node;
|
|
60
|
+
const { id: _id, ...rest } = node;
|
|
61
|
+
return Object.freeze({
|
|
62
|
+
...rest,
|
|
63
|
+
children
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
const needsComparisonElementIds = (before, after) => {
|
|
67
|
+
let beforeHasId = false;
|
|
68
|
+
scanDocumentIds(before, (id) => {
|
|
69
|
+
if (id !== void 0) beforeHasId = true;
|
|
70
|
+
});
|
|
71
|
+
if (!beforeHasId) return false;
|
|
72
|
+
let afterMissingId = false;
|
|
73
|
+
scanDocumentIds(after, (id) => {
|
|
74
|
+
if (id === void 0) afterMissingId = true;
|
|
75
|
+
});
|
|
76
|
+
return afterMissingId;
|
|
77
|
+
};
|
|
78
|
+
const stripComparisonElementIds = (document) => {
|
|
79
|
+
const { roots } = document;
|
|
80
|
+
return Object.freeze({
|
|
81
|
+
children: stripElementIdsFromNodes(document.children),
|
|
82
|
+
...roots ? { roots: Object.freeze(Object.fromEntries(Object.keys(roots).sort().map((root) => [root, stripElementIdsFromNodes(roots[root])]))) } : {}
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const nodeAtPath = (document, root, path) => {
|
|
86
|
+
let list = root === null ? document.children : document.roots?.[root];
|
|
87
|
+
let current;
|
|
88
|
+
for (const index of path) {
|
|
89
|
+
current = list?.[index];
|
|
90
|
+
if (!current || !isElementNode(current)) return void 0;
|
|
91
|
+
list = current.children;
|
|
92
|
+
}
|
|
93
|
+
return current;
|
|
94
|
+
};
|
|
95
|
+
const fillComparisonElementIds = (before, after, beforeIndex, afterIndex, inPlaceMatches) => {
|
|
96
|
+
const used = /* @__PURE__ */ new Set();
|
|
97
|
+
scanDocumentIds(before, (id) => {
|
|
98
|
+
if (id !== void 0) used.add(id);
|
|
99
|
+
});
|
|
100
|
+
scanDocumentIds(after, (id) => {
|
|
101
|
+
if (id !== void 0) used.add(id);
|
|
102
|
+
});
|
|
103
|
+
const matchedIds = /* @__PURE__ */ new Map();
|
|
104
|
+
const claimed = /* @__PURE__ */ new Set();
|
|
105
|
+
scanDocumentIds(after, (id) => {
|
|
106
|
+
if (id !== void 0) claimed.add(id);
|
|
107
|
+
});
|
|
108
|
+
for (const [bIndex, aIndex] of inPlaceMatches) {
|
|
109
|
+
const bMeta = beforeIndex.nodes[bIndex];
|
|
110
|
+
const aMeta = afterIndex.nodes[aIndex];
|
|
111
|
+
const bNode = nodeAtPath(before, bMeta.root, bMeta.path);
|
|
112
|
+
const id = bNode ? storedElementIdOf(bNode) : void 0;
|
|
113
|
+
if (id !== void 0 && !claimed.has(id)) {
|
|
114
|
+
claimed.add(id);
|
|
115
|
+
matchedIds.set(pathKey(aMeta.root, aMeta.path), id);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
let next = 0;
|
|
119
|
+
const draw = () => {
|
|
120
|
+
while (used.has(`fill.${next}`)) next += 1;
|
|
121
|
+
const id = `fill.${next}`;
|
|
122
|
+
used.add(id);
|
|
123
|
+
next += 1;
|
|
124
|
+
return id;
|
|
125
|
+
};
|
|
126
|
+
const fillNodes = (nodes, root, prefix) => nodes.map((node, index) => {
|
|
127
|
+
if (!isElementNode(node)) return node;
|
|
128
|
+
const path = [...prefix, index];
|
|
129
|
+
const children = fillNodes(node.children, root, path);
|
|
130
|
+
const existing = storedElementIdOf(node);
|
|
131
|
+
const id = existing ?? matchedIds.get(pathKey(root, path)) ?? draw();
|
|
132
|
+
if (existing !== void 0 && children === node.children) return node;
|
|
133
|
+
return Object.freeze({
|
|
134
|
+
...node,
|
|
135
|
+
...existing === void 0 ? { id } : {},
|
|
136
|
+
children
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
const afterRoots = after.roots;
|
|
140
|
+
const afterRootKeys = Object.keys(afterRoots ?? {}).sort();
|
|
141
|
+
const children = fillNodes(after.children, null, []);
|
|
142
|
+
const roots = afterRoots && afterRootKeys.length > 0 ? Object.freeze(Object.fromEntries(afterRootKeys.map((root) => [root, fillNodes(afterRoots[root], root, [])]))) : void 0;
|
|
143
|
+
return Object.freeze({
|
|
144
|
+
children,
|
|
145
|
+
...roots ? { roots } : {}
|
|
146
|
+
});
|
|
147
|
+
};
|
|
42
148
|
const createComparisonSnapshot = (document, schema, projection, envelopeFingerprint) => {
|
|
43
149
|
const identity = schema.identity();
|
|
44
150
|
const fingerprint = fingerprintEditorJson({
|
|
@@ -1335,4 +1441,4 @@ const closeOverRequired = (groups, ids) => {
|
|
|
1335
1441
|
return closed;
|
|
1336
1442
|
};
|
|
1337
1443
|
//#endregion
|
|
1338
|
-
export {
|
|
1444
|
+
export { uniqueSpans as C, stripComparisonElementIds as S, fingerprintEditorJson as T, fillComparisonElementIds as _, comparisonTextRuns as a, spanKey$1 as b, COMPARISON_POLICY as c, comparisonDocumentsEqual as d, comparisonHash as f, disjointSets as g, detachComparisonEnvelope as h, comparisonTextPoint as i, COMPARISON_WORD as l, detachComparisonDocument as m, comparisonPlanOf as n, comparisonTextSpans as o, createComparisonSnapshot as p, planComparison as r, createComparisonIndex as s, closeOverRequired as t, assertComparisonActive as u, mergeGroups as v, yieldComparisonWork as w, stableStringify as x, needsComparisonElementIds as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as EditorDocumentValue, Uf as DocumentChange, fm as EditorSchemaIdentity, vi as Value } from "./tx-only-1FM45FSj.js";
|
|
2
2
|
//#region src/diff/lib/comparison-types.d.ts
|
|
3
3
|
/** A comparison-local interval in the canonical document token coordinate. */
|
|
4
4
|
type ComparisonSpan = Readonly<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $a as previous, Ac as constructLoadedDocumentChange, At as isVoid, Au as registerEffectTypeInRegistry, Bt as path$1, Ci as snapshotInitialDocumentState, Cn as applyTransactionSpecToDocument, Cs as subscribeCommit, Cu as getCompiledEditorSchema, Dl as authoredDocumentCapabilityPoint, Dt as isInline, Es as createEditorUpdateApi, Et as isEnd$1, Eu as getPluginRegistry, Fr as initializePublicState, G as before, Gl as assertNoDocumentViewRead, Gn as getChildren$1, Gr as readEditor, Gt as range, H as above$1, Hr as loadOpenedRecords, Hs as repairLoadedDocument, Ir as invalidateEditorTransactionSpecs, Ka as range$1, Li as withEditorRootChildren, Ls as admitDocument, M as createCommandDispatch, Mi as transformEditorSnapshotInput, Mr as initializeEditorSchemaDocument, Nd as setEditorRuntime, Ni as updateEditor, Nr as initializeEditorSchemaSelection, Nt as levels$1, Od as getEditorRuntime, Ou as initializeBasePluginRegistry, Pc as isEmptyElement, Pm as getDefined, Pr as initializeEditorSchemaSnapshot, Ql as hasActiveAnchors, Qn as getEditorChildrenRoot, Qs as createEditorSchema, Ri as withEditorRootChildrenGenerator, Rs as admitEditorDocument, Ss as subscribe, Su as finalizePluginRegistry, Ts as createEditorReadApi, Tt as isEmpty$1, Tu as getPluginContributions, V as NodeApi, Vs as onlyDocumentAdmission, Vt as point, W as after, Wn as getChildList, Xn as getCurrentSelection, Zn as getCurrentSelectionRoot, Zs as createDetachedEditorSchema, _ as markEditorDormant, _r as getPathByNodeKey, am as defineEffect, bc as mapDetachedSelectionThroughChange, bo as node, bu as assertPluginPublicationInactive, ci as seedUniqueMaps, d as extendEditor, dm as LocationApi, dr as getLiveNode, eo as elementReadOnly, fn as voidEditor, fr as getLiveSelection, ft as hasInlines$1, gd as point$1, hm as getCommonLocationRoot, hr as getNodeKey, io as after$1, ja as getFragment, jd as getEditorSchema, jt as last$1, kl as createEditorAnchorApi, kn as createTransactionSpec, kt as isStart$1, lo as getCharacterDistance, mc as assertSelectionSupported, md as failInvariant, mm as MAIN_ROOT_KEY, ni as repairEditorValue, nt as getChildren, oi as saveEditorSchemaDocument, oo as resolveShouldMergeNodesRemovePrevNode, pm as PointApi, pr as getLiveText, ro as before$1, s as createEditorViewPluginApis, tr as getEditorDocumentValue, u as destroyEditor, um as RangeApi, uo as getWordDistances, ur as getLastCommit, ut as getSnapshot, v as prepareInitialPluginPublication, vd as SelectionApi, vm as PathApi, vo as nodes, wd as isEditorContent, ws as subscribeSource, xc as mapSelectionThroughChange, xr as getSnapshot$1, xt as isBlock$1, xu as createPluginRegistry, y as prepareScopedPluginPublication, yo as normalizeNodeMatch, yu as setEditorLifecycleErrorSink, zc as loadElementIds, zs as documentAdmissionPoint, zt as parent$1 } from "./plugin-BZCGtqMI.js";
|
|
2
2
|
/**
|
|
3
3
|
* Local, ephemeral screen-reader text emitted by an application command.
|
|
4
4
|
*
|
|
@@ -480,46 +480,6 @@ function* positions(editor, options = {}) {
|
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
483
|
-
//#region src/editor/previous.ts
|
|
484
|
-
const previous = ((editor, options = {}) => {
|
|
485
|
-
const { from = "before", mode = "lowest", voids = false } = options;
|
|
486
|
-
const { at = getSnapshot(editor).selection } = options;
|
|
487
|
-
let match = normalizeNodeMatch(options.type, options.match);
|
|
488
|
-
if (!at || !LocationApi.isLocation(at)) return;
|
|
489
|
-
if (LocationApi.isPath(at) && at.length === 0) return;
|
|
490
|
-
if (options.sibling) {
|
|
491
|
-
if (!LocationApi.isPath(at)) return;
|
|
492
|
-
if (!PathApi.hasPrevious(at)) return;
|
|
493
|
-
const previousPath = PathApi.previous(at);
|
|
494
|
-
if (!NodeApi.has(editor, previousPath)) return;
|
|
495
|
-
return node(editor, previousPath);
|
|
496
|
-
}
|
|
497
|
-
let start;
|
|
498
|
-
if (from === "parent" && LocationApi.isPath(at) && at.length > 1) {
|
|
499
|
-
start = at;
|
|
500
|
-
const baseMatch = match;
|
|
501
|
-
match = (node, path) => !PathApi.isAfter(path, at) && !PathApi.equals(path, at) && (baseMatch?.(node, path) ?? true);
|
|
502
|
-
}
|
|
503
|
-
const pointBeforeLocation = start ? void 0 : before(editor, at, { voids });
|
|
504
|
-
if (!start) {
|
|
505
|
-
if (!pointBeforeLocation) return;
|
|
506
|
-
start = pointBeforeLocation.path;
|
|
507
|
-
}
|
|
508
|
-
const firstEntry = first$1(editor, []);
|
|
509
|
-
if (!firstEntry) return;
|
|
510
|
-
const [, to] = firstEntry;
|
|
511
|
-
const span = [start, to];
|
|
512
|
-
if (match == null) match = LocationApi.isPath(at) ? (_node, path) => PathApi.isSibling(path, at) : () => true;
|
|
513
|
-
const [innerPrevious] = nodes(editor, {
|
|
514
|
-
reverse: true,
|
|
515
|
-
at: span,
|
|
516
|
-
match,
|
|
517
|
-
mode,
|
|
518
|
-
voids
|
|
519
|
-
});
|
|
520
|
-
return innerPrevious;
|
|
521
|
-
});
|
|
522
|
-
//#endregion
|
|
523
483
|
//#region src/range-projection.ts
|
|
524
484
|
const lastProjection = /* @__PURE__ */ new WeakMap();
|
|
525
485
|
const projectRangeInSnapshot = (snapshot, range) => {
|
|
@@ -875,9 +835,10 @@ const publishInitialPlugins = (editor, input, explicitInitialDocument, options =
|
|
|
875
835
|
const initialSelectionRoot = getCurrentSelectionRoot(editor);
|
|
876
836
|
const preparedDocumentValidated = publication.configurationChanged && explicitInitialDocument && publication.documentChange.empty;
|
|
877
837
|
try {
|
|
878
|
-
adoptInitialDocumentChange(editor, publication.documentChange, publication.schemaCompilation());
|
|
838
|
+
const mappedSelection = adoptInitialDocumentChange(editor, publication.documentChange, publication.schemaCompilation());
|
|
879
839
|
publication.stage();
|
|
880
840
|
publication.commit();
|
|
841
|
+
if (mappedSelection) initializeEditorSchemaSelection(editor, mappedSelection.selection, mappedSelection.root);
|
|
881
842
|
const validatePublishedDocument = (requireExplicitDocument = explicitInitialDocument, validateDocument = true) => {
|
|
882
843
|
const publishedDocument = getEditorDocumentValue(editor);
|
|
883
844
|
if (requireExplicitDocument && publishedDocument.children.length === 0) throw new Error("initialValue is invalid! Expected at least one element.");
|
|
@@ -919,20 +880,31 @@ const publishInitialPlugins = (editor, input, explicitInitialDocument, options =
|
|
|
919
880
|
if (getPluginRegistry(editor).schemaContributions.records.size > 0) disarmSchemaBootstrap(editor);
|
|
920
881
|
};
|
|
921
882
|
const adoptInitialDocumentChange = (editor, change, compilation) => {
|
|
922
|
-
if (change.empty) return;
|
|
883
|
+
if (change.empty) return null;
|
|
923
884
|
const initialDocument = getEditorDocumentValue(editor);
|
|
924
885
|
const initialSelection = getLiveSelection(editor);
|
|
925
886
|
const initialSelectionRoot = getCurrentSelectionRoot(editor);
|
|
926
887
|
const schema = compilation?.schema ?? getCompiledEditorSchema(editor);
|
|
927
888
|
const admitted = admitDocument(compilation && onlyDocumentAdmission(compilation.contributions(documentAdmissionPoint)), change.apply(initialDocument), schema);
|
|
928
|
-
initializeEditorSchemaDocument(editor, admitted.document, schema);
|
|
929
|
-
if (!initialSelection) return;
|
|
930
|
-
const
|
|
889
|
+
initializeEditorSchemaDocument(editor, admitted.document, schema, true);
|
|
890
|
+
if (!initialSelection) return null;
|
|
891
|
+
const detachedSchema = compilation ? createDetachedEditorSchema(schema, admitted.document) : null;
|
|
892
|
+
const mapped = detachedSchema ? mapDetachedSelectionThroughChange(detachedSchema, initialSelection, change.compose(admitted.change), initialDocument, admitted.document, initialSelectionRoot, {
|
|
893
|
+
association: "backward",
|
|
894
|
+
preferPositionMapping: true
|
|
895
|
+
}) : mapSelectionThroughChange(editor, initialSelection, change.compose(admitted.change), initialDocument, admitted.document, initialSelectionRoot, {
|
|
931
896
|
association: "backward",
|
|
932
897
|
preferPositionMapping: true
|
|
933
898
|
}).selection;
|
|
934
899
|
if (!mapped) throw new Error("Initial selection cannot be mapped through schema fitting.");
|
|
935
|
-
|
|
900
|
+
if (detachedSchema && SelectionApi.isText(initialSelection) && initialSelection.marks !== void 0 && SelectionApi.isText(mapped)) {
|
|
901
|
+
const marksRoot = mapped.focus.root ?? SelectionApi.root(mapped) ?? initialSelectionRoot;
|
|
902
|
+
detachedSchema.validateTextPropertiesAtValue(initialSelection.marks, mapped.focus.path, admitted.document, marksRoot);
|
|
903
|
+
}
|
|
904
|
+
return {
|
|
905
|
+
root: initialSelectionRoot,
|
|
906
|
+
selection: mapped
|
|
907
|
+
};
|
|
936
908
|
};
|
|
937
909
|
const assertEditorSchemaBootstrap = (editor) => {
|
|
938
910
|
if (!PENDING_SCHEMA_BOOTSTRAP.has(editor)) throw new Error("Editor schema initialization requires an editor without an installed schema.");
|
|
@@ -1094,15 +1066,19 @@ const createEditorImplementation = (options, dormant) => {
|
|
|
1094
1066
|
armSchemaBootstrap(editor);
|
|
1095
1067
|
if (options.plugins) publishInitialPlugins(editor, options.plugins, initialState.explicit);
|
|
1096
1068
|
else {
|
|
1069
|
+
snapshotInitialDocumentState(editor);
|
|
1097
1070
|
loadOpenedRecords(editor, void 0);
|
|
1098
1071
|
const initialDocument = getEditorDocumentValue(editor);
|
|
1099
1072
|
if (initialState.explicit && initialDocument.children.length === 0) throw new Error("initialValue is invalid! Expected at least one element.");
|
|
1100
1073
|
assertSelectionSupported(editor, getLiveSelection(editor), initialDocument);
|
|
1101
|
-
|
|
1074
|
+
getEditorSchema(editor).assertDocument(initialDocument);
|
|
1075
|
+
const compiled = getCompiledEditorSchema(editor);
|
|
1076
|
+
const repair = repairLoadedDocument(null, initialDocument, compiled, loadElementIds(compiled, initialDocument, null));
|
|
1077
|
+
adoptInitialDocumentChange(editor, repair ? repair.change.compose(constructLoadedDocumentChange(editor, repair.value)) : constructLoadedDocumentChange(editor, initialDocument), null);
|
|
1102
1078
|
seedUniqueMaps(editor);
|
|
1103
1079
|
}
|
|
1104
1080
|
snapshotInitialDocumentState(editor);
|
|
1105
1081
|
return editor;
|
|
1106
1082
|
};
|
|
1107
1083
|
//#endregion
|
|
1108
|
-
export {
|
|
1084
|
+
export { createEditor as a, initializePlugins as c, assertEditorOptions as d, readEditorOptions as f, screenReaderAnnouncementEffect as g, getScreenReaderAnnouncements as h, createDormantEditor as i, withCompiledEditorSchemaCapabilityEntries as l, getTextRunBetweenAtomics as m, compileEditorSchemaContract as n, getEditorAuthoredDocumentCapability as o, projectRangeInSnapshot as p, compileEditorSchemaContractEntries as r, initializePluginEntries as s, compileEditorSchemaCapabilityEntries as t, EDITOR_OPTION_KEYS as u };
|
package/dist/diff/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ComparisonConflictAlternative, c as ComparisonEffect, d as ComparisonResolutionResult, f as ComparisonSnapshot, h as TwoWayComparison, i as ComparisonConflict, l as ComparisonEvidence, m as ThreeWayComparison, n as Comparison, o as ComparisonCorrespondence, p as ComparisonSpan, r as ComparisonBranch, s as ComparisonDiagnostic, t as ComparedChange, u as ComparisonResolution } from "../comparison-types-
|
|
1
|
+
import { tn as EditorStateSchemaApi, vi as Value } from "../tx-only-1FM45FSj.js";
|
|
2
|
+
import { a as ComparisonConflictAlternative, c as ComparisonEffect, d as ComparisonResolutionResult, f as ComparisonSnapshot, h as TwoWayComparison, i as ComparisonConflict, l as ComparisonEvidence, m as ThreeWayComparison, n as Comparison, o as ComparisonCorrespondence, p as ComparisonSpan, r as ComparisonBranch, s as ComparisonDiagnostic, t as ComparedChange, u as ComparisonResolution } from "../comparison-types-CsmDG5r2.js";
|
|
3
3
|
//#region src/diff/lib/compare.d.ts
|
|
4
4
|
type TwoWayInput<V extends Value> = Readonly<{
|
|
5
5
|
after: unknown;
|
package/dist/diff/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
1
|
+
import { Mm as jsonEqual, rf as DocumentChange } from "../plugin-BZCGtqMI.js";
|
|
2
|
+
import { C as uniqueSpans$1, S as stripComparisonElementIds, _ as fillComparisonElementIds, a as comparisonTextRuns, b as spanKey, c as COMPARISON_POLICY, d as comparisonDocumentsEqual, f as comparisonHash, g as disjointSets, h as detachComparisonEnvelope, i as comparisonTextPoint, l as COMPARISON_WORD, m as detachComparisonDocument, n as comparisonPlanOf, o as comparisonTextSpans, p as createComparisonSnapshot, r as planComparison, s as createComparisonIndex, t as closeOverRequired, u as assertComparisonActive, v as mergeGroups, w as yieldComparisonWork, x as stableStringify, y as needsComparisonElementIds } from "../comparison-plan-7iIABSWG.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;
|
|
@@ -1283,10 +1283,39 @@ 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
|
});
|
|
@@ -1445,30 +1474,75 @@ const buildConflicts = (comparisonId, local, remote, gridSpans) => {
|
|
|
1445
1474
|
});
|
|
1446
1475
|
}));
|
|
1447
1476
|
};
|
|
1477
|
+
const rekeyComparedChanges = (changes, fromPrefix, toPrefix) => {
|
|
1478
|
+
const rekey = (value) => value.startsWith(fromPrefix) ? `${toPrefix}${value.slice(fromPrefix.length)}` : value;
|
|
1479
|
+
return Object.freeze(changes.map((group) => Object.freeze({
|
|
1480
|
+
...group,
|
|
1481
|
+
correspondence: Object.freeze(group.correspondence.map((item) => Object.freeze({
|
|
1482
|
+
...item,
|
|
1483
|
+
id: rekey(item.id)
|
|
1484
|
+
}))),
|
|
1485
|
+
effects: Object.freeze(group.effects.map((effect) => Object.freeze({
|
|
1486
|
+
...effect,
|
|
1487
|
+
id: rekey(effect.id)
|
|
1488
|
+
}))),
|
|
1489
|
+
id: rekey(group.id),
|
|
1490
|
+
requiredChangeIds: Object.freeze(group.requiredChangeIds.map(rekey))
|
|
1491
|
+
})));
|
|
1492
|
+
};
|
|
1448
1493
|
const compareTwoWay = async (input) => {
|
|
1449
1494
|
assertComparisonActive(input.signal);
|
|
1450
1495
|
const beforeEnvelopeFingerprint = detachComparisonEnvelope(input.before);
|
|
1451
1496
|
const afterEnvelopeFingerprint = detachComparisonEnvelope(input.after);
|
|
1452
1497
|
const beforeDocument = detachComparisonDocument(input.before, input.schema);
|
|
1453
|
-
const
|
|
1498
|
+
const rawAfterDocument = detachComparisonDocument(input.after, input.schema);
|
|
1499
|
+
const fillsIds = needsComparisonElementIds(beforeDocument, rawAfterDocument);
|
|
1454
1500
|
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
1501
|
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(
|
|
1502
|
+
const rawAfterRoots = rawAfterDocument.roots ?? {};
|
|
1503
|
+
const matchOptions = {
|
|
1504
|
+
createdRoots: new Set(Object.keys(rawAfterRoots).filter((root) => !Object.hasOwn(beforeRoots, root))),
|
|
1505
|
+
deletedRoots: new Set(Object.keys(beforeRoots).filter((root) => !Object.hasOwn(rawAfterRoots, root))),
|
|
1469
1506
|
signal: input.signal
|
|
1470
|
-
}
|
|
1471
|
-
let
|
|
1507
|
+
};
|
|
1508
|
+
let afterDocument = rawAfterDocument;
|
|
1509
|
+
let after;
|
|
1510
|
+
let id;
|
|
1511
|
+
let beforeIndex;
|
|
1512
|
+
let afterIndex;
|
|
1513
|
+
let matched;
|
|
1514
|
+
let matchedChanges;
|
|
1515
|
+
let diagnostics;
|
|
1516
|
+
if (fillsIds) {
|
|
1517
|
+
await yieldComparisonWork(input.signal);
|
|
1518
|
+
const matchPrefix = "comparison:pending";
|
|
1519
|
+
const beforeMatchIndex = createComparisonIndex(stripComparisonElementIds(beforeDocument), input.schema);
|
|
1520
|
+
const afterMatchIndex = createComparisonIndex(stripComparisonElementIds(rawAfterDocument), input.schema);
|
|
1521
|
+
matched = await matchComparison(beforeMatchIndex, afterMatchIndex, matchPrefix, matchOptions);
|
|
1522
|
+
afterDocument = fillComparisonElementIds(beforeDocument, rawAfterDocument, beforeMatchIndex, afterMatchIndex, matched.inPlaceMatches);
|
|
1523
|
+
after = createComparisonSnapshot(afterDocument, input.schema, input.projection?.after ?? "accepted", afterEnvelopeFingerprint);
|
|
1524
|
+
id = `comparison:${comparisonHash({
|
|
1525
|
+
after: after.fingerprint,
|
|
1526
|
+
before: before.fingerprint,
|
|
1527
|
+
policy: COMPARISON_POLICY
|
|
1528
|
+
})}`;
|
|
1529
|
+
beforeIndex = createComparisonIndex(beforeDocument, input.schema);
|
|
1530
|
+
afterIndex = createComparisonIndex(afterDocument, input.schema);
|
|
1531
|
+
matchedChanges = rekeyComparedChanges(matched.changes, matchPrefix, id);
|
|
1532
|
+
({diagnostics} = matched);
|
|
1533
|
+
} else {
|
|
1534
|
+
after = createComparisonSnapshot(afterDocument, input.schema, input.projection?.after ?? "accepted", afterEnvelopeFingerprint);
|
|
1535
|
+
await yieldComparisonWork(input.signal);
|
|
1536
|
+
id = `comparison:${comparisonHash({
|
|
1537
|
+
after: after.fingerprint,
|
|
1538
|
+
before: before.fingerprint,
|
|
1539
|
+
policy: COMPARISON_POLICY
|
|
1540
|
+
})}`;
|
|
1541
|
+
beforeIndex = createComparisonIndex(beforeDocument, input.schema);
|
|
1542
|
+
afterIndex = createComparisonIndex(afterDocument, input.schema);
|
|
1543
|
+
matched = await matchComparison(beforeIndex, afterIndex, id, matchOptions);
|
|
1544
|
+
({changes: matchedChanges, diagnostics} = matched);
|
|
1545
|
+
}
|
|
1472
1546
|
if (matchedChanges.length === 0 && !matched.visibleEquivalent && !comparisonDocumentsEqual(beforeDocument, afterDocument)) {
|
|
1473
1547
|
const fallback = coarseFallback(id, beforeIndex, afterIndex);
|
|
1474
1548
|
matchedChanges = Object.freeze([fallback.change]);
|
|
@@ -1500,16 +1574,33 @@ const compareTwoWay = async (input) => {
|
|
|
1500
1574
|
policy: COMPARISON_POLICY
|
|
1501
1575
|
});
|
|
1502
1576
|
};
|
|
1577
|
+
const alignThreeWayBase = async (input) => {
|
|
1578
|
+
const rawBase = detachComparisonDocument(input.base, input.schema);
|
|
1579
|
+
if (needsComparisonElementIds(detachComparisonDocument(input.remote, input.schema), rawBase)) return (await compareTwoWay({
|
|
1580
|
+
after: input.base,
|
|
1581
|
+
before: input.remote,
|
|
1582
|
+
schema: input.schema,
|
|
1583
|
+
signal: input.signal
|
|
1584
|
+
})).after.document;
|
|
1585
|
+
if (needsComparisonElementIds(detachComparisonDocument(input.local, input.schema), rawBase)) return (await compareTwoWay({
|
|
1586
|
+
after: input.base,
|
|
1587
|
+
before: input.local,
|
|
1588
|
+
schema: input.schema,
|
|
1589
|
+
signal: input.signal
|
|
1590
|
+
})).after.document;
|
|
1591
|
+
return input.base;
|
|
1592
|
+
};
|
|
1503
1593
|
const compareThreeWay = async (input) => {
|
|
1504
1594
|
assertComparisonActive(input.signal);
|
|
1595
|
+
const alignedBase = await alignThreeWayBase(input);
|
|
1505
1596
|
const [local, remote] = await Promise.all([compareTwoWay({
|
|
1506
1597
|
after: input.local,
|
|
1507
|
-
before:
|
|
1598
|
+
before: alignedBase,
|
|
1508
1599
|
schema: input.schema,
|
|
1509
1600
|
signal: input.signal
|
|
1510
1601
|
}), compareTwoWay({
|
|
1511
1602
|
after: input.remote,
|
|
1512
|
-
before:
|
|
1603
|
+
before: alignedBase,
|
|
1513
1604
|
schema: input.schema,
|
|
1514
1605
|
signal: input.signal
|
|
1515
1606
|
})]);
|
package/dist/dom/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Vo as getDOMClipboardFormatKey } from "../tx-only-1FM45FSj.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 ScrollIntoViewTarget, Xt as getSelection, Y as ScrollIntoViewOptions, Yt as getDefaultView, Z as isTrackedMutation, 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-D8DQ1YFB.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-CLFcThXH.js";
|
|
2
|
+
import { Br as isDOMElement, C as normalizeRange, Cn as writeDOMSelection, E as verifyDiffState, Et as dataTransferFormats, Gr as isDOMText, Ir as getSelection, Jr as normalizeDOMPoint, Kr as isPlainTextOnlyPaste, L as isTrackedMutation, Lr as hasShadowRoot, Mn as usesAppleDOMHotkeys, Mr as containsShadowAware, Nr as getActiveElement, O as DOMResolutionError, Ot as writeDataTransferFragment, Pr as getDefaultView, Rr as isAfter, S as normalizePoint, St as domCommands, T as targetRange, Tt as writeDOMRangeData, Ur as isDOMNode, Wr as isDOMSelection, Zt as getEditorDOMRoot, _ as TRIPLE_CLICK, a as isLeaf, ar as DOMCoverage, c as isText, d as Hotkeys, g as isHotkey, h as createCompiledHotkeyMatcher, i as isElement, jr as closestShadowAware, kn as isGeckoDOMHost, 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, v as dom, vn as readDOMSelectionRange, w as normalizeStringDiff, wn as CAN_USE_DOM, wt as writeDOMFragmentData, x as mergeStringDiffs, xt as cleanDOMClipboardContents, y as applyStringDiff, zr as isBefore } from "../dom-B5bAma7X.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 };
|