plitejs 0.0.1 → 54.0.0-beta.3
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/LICENSE +4 -1
- package/README.md +83 -0
- package/dist/annotation-store-metrics-Ccjkef45.js +12 -0
- package/dist/annotations/index.d.ts +2 -0
- package/dist/annotations/index.js +2 -0
- package/dist/authored/index.d.ts +596 -0
- package/dist/authored/index.js +18558 -0
- package/dist/authored-veto-DSnQcHGR.js +6 -0
- package/dist/browser-protocol-pvt4HFF7.js +5 -0
- package/dist/comparison-plan-CEQL0ooW.js +1338 -0
- package/dist/comparison-types-Dt-unJZY.d.ts +179 -0
- package/dist/create-editor-CkHtPWXV.js +1107 -0
- package/dist/diff/index.d.ts +32 -0
- package/dist/diff/index.js +1748 -0
- package/dist/dom/index.d.ts +2 -0
- package/dist/dom/index.js +2 -0
- package/dist/dom-Cgfscvnm.js +9220 -0
- package/dist/editor-owner-IUmkTeXz.js +171 -0
- package/dist/editor-view-lifetime-GJKa_QGh.js +23 -0
- package/dist/history/index.d.ts +170 -0
- package/dist/history/index.js +6718 -0
- package/dist/hyperscript/index.d.ts +2 -0
- package/dist/hyperscript/index.js +2 -0
- package/dist/hyperscript-FPuoArEi.js +299 -0
- package/dist/index-BpQx2UG4.d.ts +1093 -0
- package/dist/index-Cw-oC2ps.d.ts +190 -0
- package/dist/index-DPWyk3lG.d.ts +65 -0
- package/dist/index-DpltOCot.d.ts +9753 -0
- package/dist/index-HPYawTae.d.ts +119 -0
- package/dist/index-K0Za9YXc.d.ts +1246 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal/index.js +156 -0
- package/dist/mapped-view-store-ld-6uxEU.js +120 -0
- package/dist/native-grouping-input-DMNcsIaW.js +8 -0
- package/dist/pagination/index.d.ts +169 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/react.d.ts +33 -0
- package/dist/pagination/react.js +1509 -0
- package/dist/pagination-D_A8iPJP.js +1021 -0
- package/dist/plugin-DWzkJbnJ.js +50999 -0
- package/dist/range-geometry-BLAHRE11.d.ts +38 -0
- package/dist/range-geometry-BjeLHOnl.js +486 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +7 -0
- package/dist/react/virtualized.d.ts +13 -0
- package/dist/react/virtualized.js +209 -0
- package/dist/react-DZ15gmz2.js +1018 -0
- package/dist/retraction-BMem8Rfk.js +109 -0
- package/dist/src-cT1OTKP_.js +1386 -0
- package/dist/store-Cz2mXyDe.js +704 -0
- package/dist/testing/index.d.ts +183 -0
- package/dist/testing/index.js +96 -0
- package/dist/use-editor-dom-scope-BbMDSCpW.js +28354 -0
- package/dist/yjs/index.d.ts +2 -0
- package/dist/yjs/index.js +2 -0
- package/dist/yjs/react/index.d.ts +26 -0
- package/dist/yjs/react/index.js +85 -0
- package/dist/yjs-DOK-m7kl.js +13413 -0
- package/package.json +191 -43
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "./index-DpltOCot.js";
|
|
2
|
+
import { RefObject } from "react";
|
|
3
|
+
//#region src/react/range-geometry.d.ts
|
|
4
|
+
/** An immutable rectangle in viewport coordinates. */
|
|
5
|
+
type ViewportRect = Readonly<{
|
|
6
|
+
bottom: number;
|
|
7
|
+
height: number;
|
|
8
|
+
left: number;
|
|
9
|
+
right: number;
|
|
10
|
+
top: number;
|
|
11
|
+
width: number;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}>;
|
|
15
|
+
/** The boxes of one range in viewport coordinates. */
|
|
16
|
+
type RangeRects = Readonly<{
|
|
17
|
+
boundingRect: ViewportRect;
|
|
18
|
+
focusRect: ViewportRect | null;
|
|
19
|
+
rects: readonly ViewportRect[];
|
|
20
|
+
}>;
|
|
21
|
+
/** Immutable DOM geometry for one range in one mounted Editable. */
|
|
22
|
+
type RangeGeometry = RangeRects & Readonly<{
|
|
23
|
+
/**
|
|
24
|
+
* The part of the Editable anyone can see: the viewport cut by every box
|
|
25
|
+
* that clips the Editable, its own box included when its overflow clips.
|
|
26
|
+
* Every range of one Editable shares it in a frame. `null` when none shows.
|
|
27
|
+
*/
|
|
28
|
+
clipRect: ViewportRect | null;
|
|
29
|
+
/**
|
|
30
|
+
* The range's boxes cut to `clipRect`, each line outside it dropped. A
|
|
31
|
+
* line that only touches the edge is outside; a caret on the edge is
|
|
32
|
+
* inside. `null` when nothing of the range is inside. Show or hide by it,
|
|
33
|
+
* and draw inside `clipRect`.
|
|
34
|
+
*/
|
|
35
|
+
visible: RangeRects | null;
|
|
36
|
+
}>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { RangeRects as n, ViewportRect as r, RangeGeometry as t };
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { Tu as getEditorRuntimeRoot, mu as RangeApi, pi as subscribeEditorViewState, wu as getEditorRuntimeOwner } from "./plugin-DWzkJbnJ.js";
|
|
2
|
+
import { Bt as findDOMRootRuntime, D as DOMEditor, H as subscribeEditorDOMScope, Jt as scheduleEditorDOMPhase, Q as walkClipChain, Qn as EDITOR_TO_ROOT_VIEW_EDITORS, Wn as EDITOR_TO_ELEMENT, Z as intersectClipChain, cn as CAN_USE_DOM, jn as hasUsableDOMRect, vr as getFlatTreeParentElement } from "./dom-Cgfscvnm.js";
|
|
3
|
+
import { useEffect, useLayoutEffect, useSyncExternalStore } from "react";
|
|
4
|
+
//#region src/react/hooks/use-isomorphic-layout-effect.ts
|
|
5
|
+
/**
|
|
6
|
+
* Prevent warning on SSR by falling back to useEffect when DOM isn't available
|
|
7
|
+
*/
|
|
8
|
+
const useIsomorphicLayoutEffect = CAN_USE_DOM ? useLayoutEffect : useEffect;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/react/range-geometry.ts
|
|
11
|
+
const toViewportRect = (rect) => Object.freeze({
|
|
12
|
+
bottom: rect.bottom,
|
|
13
|
+
height: rect.height,
|
|
14
|
+
left: rect.left,
|
|
15
|
+
right: rect.right,
|
|
16
|
+
top: rect.top,
|
|
17
|
+
width: rect.width,
|
|
18
|
+
x: rect.x,
|
|
19
|
+
y: rect.y
|
|
20
|
+
});
|
|
21
|
+
const boxRect = (left, top, right, bottom) => Object.freeze({
|
|
22
|
+
bottom,
|
|
23
|
+
height: bottom - top,
|
|
24
|
+
left,
|
|
25
|
+
right,
|
|
26
|
+
top,
|
|
27
|
+
width: right - left,
|
|
28
|
+
x: left,
|
|
29
|
+
y: top
|
|
30
|
+
});
|
|
31
|
+
const isRectEqual = (left, right) => left === right || !!left && !!right && left.bottom === right.bottom && left.height === right.height && left.left === right.left && left.right === right.right && left.top === right.top && left.width === right.width && left.x === right.x && left.y === right.y;
|
|
32
|
+
const isRangeRectsEqual = (left, right) => left === right || !!left && !!right && isRectEqual(left.boundingRect, right.boundingRect) && isRectEqual(left.focusRect, right.focusRect) && left.rects.length === right.rects.length && left.rects.every((rect, index) => isRectEqual(rect, right.rects[index] ?? null));
|
|
33
|
+
const isGeometryEqual = (left, right) => left === right || !!left && !!right && isRangeRectsEqual(left, right) && isRectEqual(left.clipRect, right.clipRect) && isRangeRectsEqual(left.visible, right.visible);
|
|
34
|
+
const unionRects = (rects) => rects.length === 0 ? null : boxRect(Math.min(...rects.map((rect) => rect.left)), Math.min(...rects.map((rect) => rect.top)), Math.max(...rects.map((rect) => rect.right)), Math.max(...rects.map((rect) => rect.bottom)));
|
|
35
|
+
const isOutside = (start, end, clipStart, clipEnd) => {
|
|
36
|
+
if (clipEnd <= clipStart) return true;
|
|
37
|
+
if (start === end) return start < clipStart || start > clipEnd;
|
|
38
|
+
return end <= clipStart || start >= clipEnd;
|
|
39
|
+
};
|
|
40
|
+
const cutRect = (rect, clip) => isOutside(rect.top, rect.bottom, clip.top, clip.bottom) || isOutside(rect.left, rect.right, clip.left, clip.right) ? null : boxRect(Math.max(rect.left, clip.left), Math.max(rect.top, clip.top), Math.min(rect.right, clip.right), Math.min(rect.bottom, clip.bottom));
|
|
41
|
+
const cutRects = (rects, clip) => {
|
|
42
|
+
const visible = [];
|
|
43
|
+
for (const rect of rects) {
|
|
44
|
+
const cut = cutRect(rect, clip);
|
|
45
|
+
if (cut) visible.push(cut);
|
|
46
|
+
}
|
|
47
|
+
return visible;
|
|
48
|
+
};
|
|
49
|
+
const withClip = (range, clipRect) => {
|
|
50
|
+
const rects = clipRect ? cutRects(range.rects, clipRect) : [];
|
|
51
|
+
const focusRect = clipRect && range.focusRect ? cutRect(range.focusRect, clipRect) : null;
|
|
52
|
+
const boundingRect = unionRects(rects) ?? focusRect;
|
|
53
|
+
return Object.freeze({
|
|
54
|
+
...range,
|
|
55
|
+
clipRect,
|
|
56
|
+
visible: boundingRect ? Object.freeze({
|
|
57
|
+
boundingRect,
|
|
58
|
+
focusRect,
|
|
59
|
+
rects: Object.freeze(rects)
|
|
60
|
+
}) : null
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const isWithinEditable = (editable, node) => editable === node || editable.contains(node);
|
|
64
|
+
const resolveViewEditor = (editor, editable) => {
|
|
65
|
+
const owner = getEditorRuntimeOwner(editor);
|
|
66
|
+
const candidates = /* @__PURE__ */ new Set([editor, ...EDITOR_TO_ROOT_VIEW_EDITORS.get(owner) ?? []]);
|
|
67
|
+
for (const candidate of candidates) {
|
|
68
|
+
if (getEditorRuntimeOwner(candidate) !== owner) continue;
|
|
69
|
+
if (EDITOR_TO_ELEMENT.get(candidate) !== editable) continue;
|
|
70
|
+
return candidate;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
};
|
|
74
|
+
const EVERYWHERE = Object.freeze({
|
|
75
|
+
bottom: Infinity,
|
|
76
|
+
height: Infinity,
|
|
77
|
+
left: -Infinity,
|
|
78
|
+
right: Infinity,
|
|
79
|
+
top: -Infinity,
|
|
80
|
+
width: Infinity
|
|
81
|
+
});
|
|
82
|
+
const readClipArea = (chain) => {
|
|
83
|
+
const rect = chain ? intersectClipChain(chain, EVERYWHERE) : null;
|
|
84
|
+
return rect ? boxRect(rect.left, rect.top, rect.right, rect.bottom) : null;
|
|
85
|
+
};
|
|
86
|
+
const hasMoved = (chain) => chain.visited.some(({ element, parent }) => getFlatTreeParentElement(element) !== parent);
|
|
87
|
+
const EDITOR_TO_GEOMETRY_COORDINATORS = /* @__PURE__ */ new WeakMap();
|
|
88
|
+
const createGeometryCoordinator = (document, onEmpty) => {
|
|
89
|
+
const scopes = /* @__PURE__ */ new Set();
|
|
90
|
+
const dirtyScopes = /* @__PURE__ */ new Set();
|
|
91
|
+
const rootLeases = /* @__PURE__ */ new Map();
|
|
92
|
+
const window = document.defaultView;
|
|
93
|
+
const resizeObserver = window?.ResizeObserver ? new window.ResizeObserver(rewalk) : null;
|
|
94
|
+
const attributeObserver = window?.MutationObserver ? new window.MutationObserver(rewalk) : null;
|
|
95
|
+
const resized = /* @__PURE__ */ new Set();
|
|
96
|
+
const shadowRoots = /* @__PURE__ */ new Set();
|
|
97
|
+
let cancelScheduled = null;
|
|
98
|
+
let expiring = false;
|
|
99
|
+
let scheduledEditable = null;
|
|
100
|
+
function forgetAreas() {
|
|
101
|
+
rootLeases.forEach((lease) => {
|
|
102
|
+
lease.area = void 0;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function rewalk() {
|
|
106
|
+
rootLeases.forEach((lease) => {
|
|
107
|
+
lease.area = void 0;
|
|
108
|
+
lease.stale = true;
|
|
109
|
+
});
|
|
110
|
+
requestAll();
|
|
111
|
+
}
|
|
112
|
+
function syncWatches() {
|
|
113
|
+
const resizeTargets = /* @__PURE__ */ new Set();
|
|
114
|
+
const roots = /* @__PURE__ */ new Set();
|
|
115
|
+
const missed = attributeObserver?.takeRecords().length ?? 0;
|
|
116
|
+
attributeObserver?.disconnect();
|
|
117
|
+
rootLeases.forEach((lease, editable) => {
|
|
118
|
+
resizeTargets.add(editable);
|
|
119
|
+
lease.chain?.boxes.forEach(({ element }) => resizeTargets.add(element));
|
|
120
|
+
lease.chain?.visited.forEach(({ element }) => {
|
|
121
|
+
const root = element.getRootNode();
|
|
122
|
+
attributeObserver?.observe(element, { attributeFilter: ["class", "style"] });
|
|
123
|
+
if (window && root instanceof window.ShadowRoot) roots.add(root);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
resized.forEach((target) => {
|
|
127
|
+
if (resizeTargets.has(target)) return;
|
|
128
|
+
resizeObserver?.unobserve(target);
|
|
129
|
+
resized.delete(target);
|
|
130
|
+
});
|
|
131
|
+
resizeTargets.forEach((target) => {
|
|
132
|
+
if (resized.has(target)) return;
|
|
133
|
+
resizeObserver?.observe(target);
|
|
134
|
+
resized.add(target);
|
|
135
|
+
});
|
|
136
|
+
shadowRoots.forEach((root) => {
|
|
137
|
+
if (roots.has(root)) return;
|
|
138
|
+
root.removeEventListener("scroll", onScroll, true);
|
|
139
|
+
shadowRoots.delete(root);
|
|
140
|
+
});
|
|
141
|
+
roots.forEach((root) => {
|
|
142
|
+
if (shadowRoots.has(root)) return;
|
|
143
|
+
root.addEventListener("scroll", onScroll, {
|
|
144
|
+
capture: true,
|
|
145
|
+
passive: true
|
|
146
|
+
});
|
|
147
|
+
shadowRoots.add(root);
|
|
148
|
+
});
|
|
149
|
+
if (missed > 0) rewalk();
|
|
150
|
+
}
|
|
151
|
+
function readArea(editable) {
|
|
152
|
+
const lease = rootLeases.get(editable);
|
|
153
|
+
if (!lease) return readClipArea(walkClipChain(editable, { self: true }));
|
|
154
|
+
if (lease.chain && hasMoved(lease.chain)) lease.stale = true;
|
|
155
|
+
if (lease.stale) {
|
|
156
|
+
lease.chain = walkClipChain(editable, { self: true });
|
|
157
|
+
lease.area = void 0;
|
|
158
|
+
lease.stale = false;
|
|
159
|
+
syncWatches();
|
|
160
|
+
}
|
|
161
|
+
if (lease.area !== void 0) return lease.area;
|
|
162
|
+
lease.area = readClipArea(lease.chain);
|
|
163
|
+
if (!expiring) {
|
|
164
|
+
expiring = true;
|
|
165
|
+
queueMicrotask(() => {
|
|
166
|
+
expiring = false;
|
|
167
|
+
forgetAreas();
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
return lease.area;
|
|
171
|
+
}
|
|
172
|
+
const scopesFor = (editable) => [...scopes].filter((scope) => scope.getEditable() === editable);
|
|
173
|
+
const cancelScheduledFor = (editable) => {
|
|
174
|
+
if (scheduledEditable !== editable) return;
|
|
175
|
+
cancelScheduled?.();
|
|
176
|
+
cancelScheduled = null;
|
|
177
|
+
scheduledEditable = null;
|
|
178
|
+
};
|
|
179
|
+
function flush() {
|
|
180
|
+
cancelScheduled = null;
|
|
181
|
+
scheduledEditable = null;
|
|
182
|
+
const pending = [...dirtyScopes];
|
|
183
|
+
dirtyScopes.clear();
|
|
184
|
+
pending.forEach((scope) => {
|
|
185
|
+
if (scopes.has(scope)) scope.refresh();
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function schedule() {
|
|
189
|
+
if (cancelScheduled || dirtyScopes.size === 0) return;
|
|
190
|
+
const schedulingScope = [...dirtyScopes].find((scope) => {
|
|
191
|
+
const editable = scope.getEditable();
|
|
192
|
+
const view = scope.getView();
|
|
193
|
+
return Boolean(editable?.isConnected && view && EDITOR_TO_ELEMENT.get(view) === editable);
|
|
194
|
+
});
|
|
195
|
+
const view = schedulingScope?.getView() ?? null;
|
|
196
|
+
const editable = schedulingScope?.getEditable() ?? null;
|
|
197
|
+
if (!view || !editable) {
|
|
198
|
+
flush();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
scheduledEditable = editable;
|
|
202
|
+
cancelScheduled = scheduleEditorDOMPhase(view, "dom-read", "Range geometry", flush, {
|
|
203
|
+
key: "range-geometry",
|
|
204
|
+
timing: "animation-frame"
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function requestAll() {
|
|
208
|
+
scopes.forEach((scope) => dirtyScopes.add(scope));
|
|
209
|
+
schedule();
|
|
210
|
+
}
|
|
211
|
+
function syncRootBinding(editable) {
|
|
212
|
+
const lease = rootLeases.get(editable);
|
|
213
|
+
if (!lease) return;
|
|
214
|
+
const view = scopesFor(editable).map((scope) => scope.getView()).find((candidate) => candidate !== null && EDITOR_TO_ELEMENT.get(candidate) === editable) ?? null;
|
|
215
|
+
const found = findDOMRootRuntime(editable);
|
|
216
|
+
const runtime = found?.connected && found.rootRef.current === editable && found.editor === view ? found : null;
|
|
217
|
+
const generation = runtime?.generation ?? -1;
|
|
218
|
+
if (lease.view === view && lease.runtime === runtime && lease.generation === generation) return;
|
|
219
|
+
lease.stopBinding?.();
|
|
220
|
+
lease.stopLayout?.();
|
|
221
|
+
lease.stopBinding = null;
|
|
222
|
+
lease.stopLayout = null;
|
|
223
|
+
cancelScheduledFor(editable);
|
|
224
|
+
lease.area = void 0;
|
|
225
|
+
lease.stale = true;
|
|
226
|
+
lease.view = view;
|
|
227
|
+
lease.runtime = runtime;
|
|
228
|
+
lease.generation = generation;
|
|
229
|
+
if (view) lease.stopBinding = subscribeEditorDOMScope(view, () => {
|
|
230
|
+
cancelScheduledFor(editable);
|
|
231
|
+
scopesFor(editable).forEach((scope) => scope.bindingChanged());
|
|
232
|
+
syncRootBinding(editable);
|
|
233
|
+
schedule();
|
|
234
|
+
});
|
|
235
|
+
if (runtime) lease.stopLayout = runtime.subscribeLayout(() => {
|
|
236
|
+
if (!runtime.connected || runtime.generation !== generation || runtime.rootRef.current !== editable) return;
|
|
237
|
+
lease.area = void 0;
|
|
238
|
+
scopesFor(editable).forEach((scope) => dirtyScopes.add(scope));
|
|
239
|
+
schedule();
|
|
240
|
+
});
|
|
241
|
+
schedule();
|
|
242
|
+
}
|
|
243
|
+
function onScroll() {
|
|
244
|
+
forgetAreas();
|
|
245
|
+
requestAll();
|
|
246
|
+
}
|
|
247
|
+
document.addEventListener("scroll", onScroll, {
|
|
248
|
+
capture: true,
|
|
249
|
+
passive: true
|
|
250
|
+
});
|
|
251
|
+
window?.addEventListener("resize", rewalk, { passive: true });
|
|
252
|
+
window?.visualViewport?.addEventListener("resize", rewalk, { passive: true });
|
|
253
|
+
window?.visualViewport?.addEventListener("scroll", onScroll, { passive: true });
|
|
254
|
+
return {
|
|
255
|
+
readArea,
|
|
256
|
+
register(scope, editable) {
|
|
257
|
+
scopes.add(scope);
|
|
258
|
+
const lease = rootLeases.get(editable) ?? {
|
|
259
|
+
chain: null,
|
|
260
|
+
count: 0,
|
|
261
|
+
generation: -1,
|
|
262
|
+
runtime: null,
|
|
263
|
+
stale: true,
|
|
264
|
+
stopBinding: null,
|
|
265
|
+
stopLayout: null,
|
|
266
|
+
view: null
|
|
267
|
+
};
|
|
268
|
+
lease.count += 1;
|
|
269
|
+
rootLeases.set(editable, lease);
|
|
270
|
+
if (lease.count === 1) syncWatches();
|
|
271
|
+
syncRootBinding(editable);
|
|
272
|
+
let active = true;
|
|
273
|
+
return () => {
|
|
274
|
+
if (!active) return;
|
|
275
|
+
active = false;
|
|
276
|
+
scopes.delete(scope);
|
|
277
|
+
dirtyScopes.delete(scope);
|
|
278
|
+
lease.count -= 1;
|
|
279
|
+
if (lease.count === 0) {
|
|
280
|
+
lease.stopBinding?.();
|
|
281
|
+
lease.stopLayout?.();
|
|
282
|
+
cancelScheduledFor(editable);
|
|
283
|
+
rootLeases.delete(editable);
|
|
284
|
+
syncWatches();
|
|
285
|
+
} else syncRootBinding(editable);
|
|
286
|
+
if (scopes.size > 0) {
|
|
287
|
+
schedule();
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
cancelScheduled?.();
|
|
291
|
+
cancelScheduled = null;
|
|
292
|
+
scheduledEditable = null;
|
|
293
|
+
resizeObserver?.disconnect();
|
|
294
|
+
attributeObserver?.disconnect();
|
|
295
|
+
document.removeEventListener("scroll", onScroll, true);
|
|
296
|
+
window?.removeEventListener("resize", rewalk);
|
|
297
|
+
window?.visualViewport?.removeEventListener("resize", rewalk);
|
|
298
|
+
window?.visualViewport?.removeEventListener("scroll", onScroll);
|
|
299
|
+
onEmpty();
|
|
300
|
+
};
|
|
301
|
+
},
|
|
302
|
+
request(scope) {
|
|
303
|
+
if (!scopes.has(scope)) return;
|
|
304
|
+
dirtyScopes.add(scope);
|
|
305
|
+
schedule();
|
|
306
|
+
},
|
|
307
|
+
syncBinding: syncRootBinding
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
const getGeometryCoordinator = (editor, document) => {
|
|
311
|
+
const owner = getEditorRuntimeOwner(editor);
|
|
312
|
+
const coordinators = EDITOR_TO_GEOMETRY_COORDINATORS.get(owner) ?? /* @__PURE__ */ new WeakMap();
|
|
313
|
+
const existing = coordinators.get(document);
|
|
314
|
+
if (existing) return existing;
|
|
315
|
+
const coordinator = createGeometryCoordinator(document, () => {
|
|
316
|
+
coordinators.delete(document);
|
|
317
|
+
});
|
|
318
|
+
coordinators.set(document, coordinator);
|
|
319
|
+
EDITOR_TO_GEOMETRY_COORDINATORS.set(owner, coordinators);
|
|
320
|
+
return coordinator;
|
|
321
|
+
};
|
|
322
|
+
const resolveRangeGeometry = (editor, editable, range) => {
|
|
323
|
+
const rangeRoot = range.anchor.root ?? range.focus.root;
|
|
324
|
+
if (rangeRoot && getEditorRuntimeRoot(editor) !== rangeRoot) return null;
|
|
325
|
+
let domRange;
|
|
326
|
+
let focusDOMRange;
|
|
327
|
+
try {
|
|
328
|
+
const resolvedRange = DOMEditor.resolveDOMRange(editor, range);
|
|
329
|
+
const resolvedFocusRange = DOMEditor.resolveDOMRange(editor, {
|
|
330
|
+
anchor: range.focus,
|
|
331
|
+
focus: range.focus
|
|
332
|
+
});
|
|
333
|
+
if (!resolvedRange || !resolvedFocusRange) return null;
|
|
334
|
+
domRange = resolvedRange;
|
|
335
|
+
focusDOMRange = resolvedFocusRange;
|
|
336
|
+
} catch {
|
|
337
|
+
return null;
|
|
338
|
+
}
|
|
339
|
+
return resolveDOMRangeGeometry(editable, domRange, focusDOMRange, RangeApi.isCollapsed(range));
|
|
340
|
+
};
|
|
341
|
+
const resolveDOMRangeGeometry = (editable, domRange, focusDOMRange, collapsed) => {
|
|
342
|
+
if (!isWithinEditable(editable, domRange.startContainer) || !isWithinEditable(editable, domRange.endContainer) || !isWithinEditable(editable, focusDOMRange.startContainer)) return null;
|
|
343
|
+
let focusDOMRect = focusDOMRange.getBoundingClientRect();
|
|
344
|
+
if (!hasUsableDOMRect(focusDOMRect)) focusDOMRect = ((focusDOMRange.startContainer.nodeType === 1 ? focusDOMRange.startContainer : focusDOMRange.startContainer.parentElement)?.closest("[data-editor-zero-width]"))?.getBoundingClientRect() ?? null;
|
|
345
|
+
const focusRect = hasUsableDOMRect(focusDOMRect) ? toViewportRect(focusDOMRect) : null;
|
|
346
|
+
const rects = collapsed ? [] : Array.from(domRange.getClientRects(), toViewportRect);
|
|
347
|
+
const boundingRect = unionRects(rects) ?? focusRect;
|
|
348
|
+
if (!boundingRect) return null;
|
|
349
|
+
return Object.freeze({
|
|
350
|
+
boundingRect,
|
|
351
|
+
focusRect,
|
|
352
|
+
rects: Object.freeze(rects)
|
|
353
|
+
});
|
|
354
|
+
};
|
|
355
|
+
function createRangeGeometryOwner(editor, source, editableRef) {
|
|
356
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
357
|
+
let activeLeases = 0;
|
|
358
|
+
let bindingGeneration = 0;
|
|
359
|
+
let coordinator = null;
|
|
360
|
+
let editable = null;
|
|
361
|
+
let range = null;
|
|
362
|
+
let rangeDirty = true;
|
|
363
|
+
let releaseCoordinator = null;
|
|
364
|
+
let snapshot = null;
|
|
365
|
+
let unsubscribeRange = null;
|
|
366
|
+
let unsubscribeViewState = null;
|
|
367
|
+
let view = null;
|
|
368
|
+
const measure = () => {
|
|
369
|
+
if (activeLeases === 0) return;
|
|
370
|
+
if (rangeDirty) {
|
|
371
|
+
range = view && "read" in source ? source.read(view) : null;
|
|
372
|
+
rangeDirty = false;
|
|
373
|
+
}
|
|
374
|
+
const rects = view && editable?.isConnected && EDITOR_TO_ELEMENT.get(view) === editable ? "measure" in source ? source.measure(view, editable) : range ? resolveRangeGeometry(view, editable, range) : null : null;
|
|
375
|
+
const next = rects && editable ? withClip(rects, coordinator?.readArea(editable) ?? null) : null;
|
|
376
|
+
if (isGeometryEqual(snapshot, next)) return;
|
|
377
|
+
snapshot = next;
|
|
378
|
+
listeners.forEach((listener) => listener());
|
|
379
|
+
};
|
|
380
|
+
const request = () => {
|
|
381
|
+
if (activeLeases === 0) return;
|
|
382
|
+
rangeDirty = true;
|
|
383
|
+
if (coordinator) coordinator.request(scope);
|
|
384
|
+
else measure();
|
|
385
|
+
};
|
|
386
|
+
const clearViewSubscriptions = () => {
|
|
387
|
+
bindingGeneration += 1;
|
|
388
|
+
unsubscribeRange?.();
|
|
389
|
+
unsubscribeViewState?.();
|
|
390
|
+
unsubscribeRange = null;
|
|
391
|
+
unsubscribeViewState = null;
|
|
392
|
+
range = null;
|
|
393
|
+
rangeDirty = true;
|
|
394
|
+
};
|
|
395
|
+
const syncBinding = () => {
|
|
396
|
+
const nextEditable = editableRef.current;
|
|
397
|
+
const nextView = nextEditable?.isConnected ? resolveViewEditor(editor, nextEditable) : null;
|
|
398
|
+
if (editable === nextEditable && view === nextView) return;
|
|
399
|
+
const previousEditable = editable;
|
|
400
|
+
clearViewSubscriptions();
|
|
401
|
+
editable = nextEditable;
|
|
402
|
+
view = nextView;
|
|
403
|
+
if (previousEditable !== nextEditable) {
|
|
404
|
+
releaseCoordinator?.();
|
|
405
|
+
releaseCoordinator = null;
|
|
406
|
+
coordinator = null;
|
|
407
|
+
}
|
|
408
|
+
if (!view || !editable?.isConnected) {
|
|
409
|
+
releaseCoordinator?.();
|
|
410
|
+
releaseCoordinator = null;
|
|
411
|
+
coordinator = null;
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
const generation = bindingGeneration;
|
|
415
|
+
const notify = () => {
|
|
416
|
+
if (activeLeases === 0 || generation !== bindingGeneration || view !== nextView) return;
|
|
417
|
+
request();
|
|
418
|
+
};
|
|
419
|
+
unsubscribeRange = source.subscribe(view, notify);
|
|
420
|
+
unsubscribeViewState = subscribeEditorViewState(view, notify);
|
|
421
|
+
coordinator ??= getGeometryCoordinator(editor, editable.ownerDocument);
|
|
422
|
+
releaseCoordinator ??= coordinator.register(scope, editable);
|
|
423
|
+
coordinator.syncBinding(editable);
|
|
424
|
+
};
|
|
425
|
+
const scope = {
|
|
426
|
+
bindingChanged: () => {
|
|
427
|
+
syncBinding();
|
|
428
|
+
request();
|
|
429
|
+
},
|
|
430
|
+
getEditable: () => editable,
|
|
431
|
+
getView: () => view,
|
|
432
|
+
refresh: measure
|
|
433
|
+
};
|
|
434
|
+
const refresh = () => {
|
|
435
|
+
if (activeLeases === 0) return;
|
|
436
|
+
syncBinding();
|
|
437
|
+
rangeDirty = true;
|
|
438
|
+
measure();
|
|
439
|
+
};
|
|
440
|
+
return {
|
|
441
|
+
activate() {
|
|
442
|
+
activeLeases += 1;
|
|
443
|
+
if (activeLeases === 1) refresh();
|
|
444
|
+
let released = false;
|
|
445
|
+
return () => {
|
|
446
|
+
if (released) return;
|
|
447
|
+
released = true;
|
|
448
|
+
activeLeases -= 1;
|
|
449
|
+
queueMicrotask(() => {
|
|
450
|
+
if (activeLeases > 0) return;
|
|
451
|
+
clearViewSubscriptions();
|
|
452
|
+
releaseCoordinator?.();
|
|
453
|
+
releaseCoordinator = null;
|
|
454
|
+
coordinator = null;
|
|
455
|
+
editable = null;
|
|
456
|
+
view = null;
|
|
457
|
+
snapshot = null;
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
},
|
|
461
|
+
getServerSnapshot: () => null,
|
|
462
|
+
getSnapshot: () => snapshot,
|
|
463
|
+
readArea() {
|
|
464
|
+
const target = editableRef.current;
|
|
465
|
+
if (!target?.isConnected) return null;
|
|
466
|
+
if (activeLeases === 0) return resolveViewEditor(editor, target) ? readClipArea(walkClipChain(target, { self: true })) : null;
|
|
467
|
+
if (target !== editable) syncBinding();
|
|
468
|
+
return coordinator ? coordinator.readArea(target) : null;
|
|
469
|
+
},
|
|
470
|
+
refresh,
|
|
471
|
+
subscribe(listener) {
|
|
472
|
+
listeners.add(listener);
|
|
473
|
+
return () => listeners.delete(listener);
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
const useRangeGeometryOwner = (owner) => {
|
|
478
|
+
useIsomorphicLayoutEffect(() => owner.activate(), [owner]);
|
|
479
|
+
useIsomorphicLayoutEffect(() => {
|
|
480
|
+
owner.refresh();
|
|
481
|
+
queueMicrotask(owner.refresh);
|
|
482
|
+
});
|
|
483
|
+
return useSyncExternalStore(owner.subscribe, owner.getSnapshot, owner.getServerSnapshot);
|
|
484
|
+
};
|
|
485
|
+
//#endregion
|
|
486
|
+
export { useRangeGeometryOwner as a, resolveRangeGeometry as i, cutRects as n, useIsomorphicLayoutEffect as o, resolveDOMRangeGeometry as r, createRangeGeometryOwner as t };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { $a as EditorSchemaContentRoot, $c as EditorDirectCommandDispatch, $h as TextEntry, $l as EditorSelectionTargetOptions, $m as EditorSelection, $n as EditorCommands, $o as SchemaElementHandle, $p as SelectionCollapseOptions, $s as ElementApi, $u as EditorUpdatePolicy, Aa as EditorSchemaContract, Ac as EditorBlockToggleOptions, Ad as PluginContributionInput, Ag as PointEntry, Ah as NodeDescendantsOptions, Al as EditorNodesOptions, Am as TxOnlyMethod, An as TransferDiagnostic, Ao as PropertyStringDescriptor, As as SchemaPropertyTypeChangePolicy, Au as EditorTransactionChanged, Bc as EditorCommandInput, Bh as NodeLevelsOptions, Bl as EditorReadMethodTree, Bn as TransferRefusalReason, Bo as SchemaContentOptions, Bs as SchemaTextPropertyOptions, Bu as EditorTransactionRootsApi, Cc as CompatibleEditorCommand, Cd as PluginApiFactory, Cg as LocationInterface, Ch as DescendantOf, Cl as EditorNextOptions, Cm as SelectionEdge, Cn as TransferPlugin, Co as PropertyEnumDescriptor, Cs as SchemaPropertyHandleValue, Cu as EditorTransactionAnchor, Dd as PluginCapabilities, Dg as BasePoint, Dh as NodeApi, Dl as EditorNodeGetOptions, Dm as TextUnitAdjustment, Dn as editorReads, Do as PropertyOptionsOf, Ds as SchemaPropertyReferences, Du as EditorTransactionBreakApi, Ec as DefinitionOf, Ed as PluginCandidateEditor, Eg as SpanInterface, Eh as NodeAncestorsOptions, El as EditorNodeChangeKind, Em as TextUnit, En as transferVeto, Eo as PropertyNumberDescriptor, Er as definePlugin, Es as SchemaPropertyLandingPolicy, Eu as EditorTransactionBlocksApi, Fa as EditorSchemaContractDiff, Fg as PathInterface, Fh as NodeFindTextRangesOptions, Fl as EditorReadAroundHandler, Fn as TransferLandingTarget, Fo as PropertyValueOptions, Fs as SchemaTextBlockOptions, Fu as EditorTransactionMarksApi, Gc as EditorCommitChanged, Gd as PluginReadFactory, Gh as NodeProps, Gl as EditorReplaceNodeOptions, Gn as TransferTarget, Go as SchemaContentRootOwnership, Gr as schema, Gs as EditorSchemaSource, Gt as invertEffect, Gu as EditorTransactionTextApi, Hc as EditorCommandResult, Hd as PluginPoint, Hh as NodeMatchPredicate, Hi as setEditorViewing, Hl as EditorReadRegistration, Hn as TransferSide, Ho as SchemaContentRoot, Hr as PropertyBuilderApi, Hs as SchemaValue, Hu as EditorTransactionSliceApi, Ia as EditorSchemaContractElement, Ic as EditorCommandContinuation, Ig as PathLevelsOptions, Ih as NodeHasPropsOptions, Il as EditorReadContext, Im as defineCommand, In as TransferOutcome, Io as SchemaBuiltInGroupName, Is as SchemaTextProperties, Iu as EditorTransactionNodesApi, Jc as EditorCommitListener, Jd as PluginReconfigureOptions, Jh as NodeTextRangeQuery, Jl as EditorSchemaGetProperty, Jm as JsonNode, Jn as TransferWrap, Jo as SchemaContentRule, Jp as TextDeleteOptions, Ju as EditorUniqueHolder, Kc as EditorCommitContext, Kd as PluginReadFactoryContext, Kh as NodeTextRangeEntry, Kl as EditorRootEntry, Kn as TransferVeto, Ko as SchemaContentRootSlotsFor, Kr as target, Kt as mapEffect, Ku as EditorTransactionTopLevelRange, La as EditorSchemaContractRoot, Lc as EditorCommandDescriptor, Lg as EditorJsonValue, Lh as NodeIn, Ll as EditorReadDescriptor, Lm as DocumentChange, Ln as TransferPatch, Lo as SchemaContent, Ls as SchemaTextProperty, Lu as EditorTransactionPluginsApi, Ma as EditorSchemaContractChangeKind, Mc as EditorCanonicalUpdateTag, Md as PluginDefinitionInput, Mg as Path, Mh as NodeEntry, Ml as EditorParentOptions, Mm as txLocate, Mn as TransferInput, Mo as PropertyValueDescriptor, Ms as SchemaRootNames, Mu as EditorTransactionDocumentChangeKind, Na as EditorSchemaContractContentProgram, Nc as EditorCommand, Ng as PathAncestorsOptions, Nh as NodeEntryIn, Nl as EditorPreviousOptions, Nm as txOnly, Nn as TransferIntent, No as PropertyValueKind, Ns as SchemaTarget, Nu as EditorTransactionEffectsApi, Oc as EditorAboveOptions, Od as PluginCleanupContext, Og as Point, Oh as NodeChildEntry, Om as TxDeclaredMethod, On as TransferAdoptInput, Oo as PropertySetDescriptor, Os as SchemaPropertyRole, Ou as EditorTransactionChangeContext, Pa as EditorSchemaContractContentRoot, Pc as EditorCommandAroundHandler, Pd as PluginDependencyReference, Pg as PathApi, Ph as NodeEntryOf, Pl as EditorRead, Pm as txSelection, Pn as TransferLandingInput, Po as PropertyValueOf, Ps as SchemaText, Pu as EditorTransactionFragmentApi, Qa as EditorSchemaContent, Qc as EditorCoreUpdateTransaction, Qd as PluginTypeProvider, Qh as NodeTypeSelector, Ql as EditorSelectionBlockOptions, Qm as EditorSchemaValidationPropertyContext, Qn as DeleteFragmentCommand, Qo as SchemaElementFor, Qp as TextRemoveTextOptions, Qs as Element, Qt as encodeEditorEffect, Qu as EditorUpdateMethods, Rc as EditorCommandDispatch, Rh as NodeInterface, Ri as setEditorReadOnly, Rl as EditorReadInput, Rn as TransferPatchProperties, Ro as SchemaContentDefault, Rs as SchemaTextPropertyDefinition, Ru as EditorTransactionRecordsApi, Sc as BlockInsertOptions, Sd as PluginActivationContext, Sg as LocationApi, Sh as DescendantIn, Sl as EditorMarksOf, Sm as RangeMode, Sn as TransferApi, So as PropertyBooleanDescriptor, Ss as SchemaPropertyHandle, Su as EditorToggleMarkOptions, Td as PluginCandidateContext, Tg as SpanApi, Th as Node, Tl as EditorNodeChangeHandler, Tm as TextDirection, Tn as transfer, To as PropertyJsonOptions, Tr as defineEditorSchema, Ts as SchemaPropertyKey, Tu as EditorTransactionAnnotationsApi, Uc as EditorCommit, Ud as PluginPortal, Uf as getSelection, Uh as NodeNodesOptions, Ul as EditorReadResult, Un as TransferSideInput, Uo as SchemaContentRootContribution, Us as SchemaValueFromPlugins, Ut as defineEffect, Uu as EditorTransactionSpecBuilder, Va as diffEditorSchemaContracts, Vc as EditorCommandPlace, Vd as PluginMigrationContext, Vh as NodeMatch, Vl as EditorReadMethods, Vn as TransferRelation, Vo as SchemaContentPrefixSlot, Vr as definePluginPoint, Vs as SchemaTypesTarget, Vu as EditorTransactionSelectionApi, Wc as EditorCommitChangeKind, Wd as PluginReadContext, Wh as NodeOf, Wl as EditorReplaceChildrenOptions, Wn as TransferSourceInput, Wo as SchemaContentRootInput, Wr as property, Wt as defineUpdateAnnotation, Wu as EditorTransactionTagsApi, Xc as EditorCoreStateView, Xd as PluginSlotLike, Xh as NodeTextRangeView, Xl as EditorSchemaReadProperty, Xm as EditorSchemaValidationCode, Xn as CollapseSelectionCommand, Xo as SchemaElement, Xp as TextInsertTextOptions, Xr as getEditorRuntimeOwner, Xt as decodeEditorEffect, Xu as EditorUpdateAnnotation, Ya as restoreEditorSchemaContract, Yc as EditorCommitRuntimeChangeKind, Yd as PluginReference, Yh as NodeTextRangeRoot, Yl as EditorSchemaPropertyReadOptions, Yn as AddMarkCommand, Yo as SchemaDescendant, Yp as TextInsertFragmentOptions, Yu as EditorUpdate, Za as DerivedEditorSchemaIdentity, Zc as EditorCoreUpdateMethods, Zh as NodeTextsOptions, Zl as EditorSchemaVocabulary, Zm as EditorSchemaValidationDiagnostic, Zn as DeleteCommand, Zo as SchemaElementConstructionPropertiesFor, Zp as TextMutationMethods, Zs as BaseElement, Zu as EditorUpdateContext, _c as TextIn, _d as NamedRootKey, _f as TargetFreshnessRequest, _g as Range, _h as ChildOf, _l as EditorIsEditorOptions, _m as NodeWrapNodesOptions, _n as nodeWriteVeto, _o as EditorSchemaPropertyQuery, _s as SchemaPluginsOf, ac as ElementOrTextIn, af as ProjectedRangeSegment, ah as SelectionValue, al as EditorEffectCollabEncodeContext, am as NodeInsertNodesOptions, an as PluginSlot, ao as EditorSchemaElement, ar as RemoveMarkCommand, as as SchemaElementPropertyKeys, au as EditorStateNodesApi, bd as PersistedDocumentInput, bf as Value, bg as RangeInterface, bh as DescendantEntryIn, bl as EditorLifecycleErrorSink, bm as MoveUnit, bn as AuthoredVeto, bo as EditorSchemaUnknownPolicy, br as PluginPublicationError, bs as SchemaPropertyDefinition, bu as EditorTextChangeHandler, cc as BooleanMarkKeysOf, cd as EditorValuePersistence, cf as SerializedEditorSelection, ch as DecorationAttributes, cl as EditorEffectHistoryReplayResult, cm as NodeMergeNodesOptions, cn as ContentSlice, co as EditorSchemaElementStructure, cr as SelectCommand, cs as SchemaElementShapeFor, cu as EditorStateRuntimeApi, dc as MarkKeysOf, dd as EditorViewOptions, df as SnapshotInput, dg as AnchorDeletionPolicy, dh as Ancestor, dl as EditorFragmentDeletionOptions, dm as NodeRemoveNodesOptions, dn as AuthoredProjectionDiagnostic, do as EditorSchemaOverride, dr as ToggleBlockCommand, ds as SchemaElementTarget, du as EditorStateSliceApi, ec as ElementEntry, ed as EditorUpdatePolicyFor, ef as PluginTypes, eg as TextEntryIn, eh as NodeSelection, em as SelectionMoveOptions, eo as EditorSchemaContribution, er as InsertBreakCommand, es as SchemaElementInput, eu as EditorSliceReadOptions, fc as MarksIn, fd as HistoryApi, ff as StateFieldCollabPolicy, fg as AnchorOptions, fh as AncestorEntry, fl as EditorFragmentReadOptions, fm as NodeReplaceChildrenOptions, fo as EditorSchemaOverrideInput, fr as ToggleMarkCommand, fs as SchemaElementTypes, fu as EditorStateTextApi, g as setDebugValueScrubber, gc as TextEqualsOptions, gd as InitialValue, gf as StateFieldValueInput, gg as BaseRange, gh as BaseNode, gl as EditorInstalledUpdateGroups, gm as NodeUnwrapNodesOptions, gn as NodeWriteVetoInput, go as EditorSchemaPropertyOverrideInput, gs as SchemaKeyPrefix, gu as EditorStateViewApi, hc as TextApi, hd as HistorySettlement, hf as StateFieldInitial, hg as RangeAnchorAssociation, hh as AncestorOf, hl as EditorInstalledReadGroups, hm as NodeUnsetNodesOptions, hn as NodeWriteVeto, ho as EditorSchemaPropertyOverride, hs as SchemaGroupOptions, hu as EditorStateView, i as compileEditorSchemaContract, ia as SliceLandingTarget, ic as ElementOf, if as PluginsOf, ih as SelectionAssociation, il as EditorEffectCollabDecodeContext, im as NodeDuplicateOptions, in as EditorSchemaValidationError, io as EditorSchemaDerivedDefinition, ir as MoveSelectionCommand, is as SchemaElementPropertyDefinition, iu as EditorStateMarksApi, ja as EditorSchemaContractChange, jc as EditorBreakExitOptions, jd as PluginDefinition, jg as PointInterface, jh as NodeElementsOptions, jl as EditorNodesReadOptions, jm as locateAt, jn as TransferEdge, jo as PropertyValidation, js as SchemaRecordSet, ju as EditorTransactionChangesApi, kc as EditorBlockOptions, kd as PluginContribution, kg as PointApi, kh as NodeChildrenOptions, kl as EditorNodeUnsetOptions, km as TxMethodDeclarations, kn as TransferCheck, ko as PropertySetOptions, ks as SchemaPropertySplitPolicy, ku as EditorTransactionChangeHandler, lc as BooleanMarksOf, lf as SerializedEditorValue, lg as Anchor, lh as DecorationRefresh, ll as EditorEffectType, lm as NodeMoveNodesOptions, lo as EditorSchemaIdentity, lr as SetNodesCommand, ls as SchemaElementSlicePolicy, lu as EditorStateSchemaApi, m as DebugValueScrubber, mc as Text, md as HistoryResult, mf as StateFieldHistoryPolicy, mg as EditorDocumentRange, mh as AncestorIn, ml as EditorInstalledApiGroups, mm as NodeSplitNodesOptions, mo as EditorSchemaProperty, ms as SchemaGroupNames, mu as EditorStateValueApi, n as PluginsFromOptions, na as SliceLanding, nc as ElementInterface, nd as EditorUpdateTagInput, nf as PluginUpdateFactoryContext, nh as Selection, nl as EditorDocumentValue, nm as SelectionSetPointOptions, nn as screenReaderAnnouncementEffect, no as EditorSchemaDefinition, nr as InsertSoftBreakCommand, ns as SchemaElementPropertiesFor, nt as createEditorView, nu as EditorStateField, oc as ElementOrTextOf, od as EditorUpdateValueFromPlugin, of as RootKey, oh as TextSelection, oi as documentReplacement, ol as EditorEffectCollabReplay, om as NodeInsertSplitOptions, on as PluginSlotValue, oo as EditorSchemaElementOverride, or as RemoveNodesCommand, os as SchemaElementPropertyOptions, ou as EditorStatePointsApi, pc as MarksOf, pd as HistoryOutcome, pf as StateFieldDescriptor, pg as AnchorValue, ph as AncestorEntryOf, pm as NodeSetNodesOptions, po as EditorSchemaPlugin, pr as editorCommands, ps as SchemaGroup, pu as EditorStateUniqueApi, qa as readEditorSchemaContract, qc as EditorCommitHandler, qd as PluginReadMiddlewareFactory, qh as NodeTextRangeMatch, ql as EditorRootOwner, qm as JsonEditorValue, qn as TransferVetoInput, qo as SchemaContentRootStructure, qu as EditorTransactionValueApi, ra as SliceLandingInput, rc as ElementIsElementOptions, rd as EditorUpdateTransaction, rh as SelectionApi, rl as EditorEffect, rm as BlockDuplicateOptions, rn as defineStateField, ro as EditorSchemaDelta, rp as isEditor, rr as InsertTextCommand, rs as SchemaElementProperty, ru as EditorStateFragmentApi, sc as BaseText, sd as EditorValueFromPlugins, sf as SerializedEditorEffect, sh as Decoration, sl as EditorEffectCollabTransport, sm as NodeLiftNodesOptions, sn as definePluginSlot, so as EditorSchemaElementOverrideInput, sr as ReplaceSliceCommand, ss as SchemaElementPropertyValue, su as EditorStateRangesApi, t as EditorValueFromOptions, tc as ElementIn, td as EditorUpdateTag, tf as PluginUpdateFactory, tg as TextEntryOf, th as NodeSelectionMode, tl as EditorDocumentRecords, tm as SelectionMutationMethods, tn as valueCodecs, to as EditorSchemaDeclaration, tr as InsertNodesCommand, ts as SchemaElementProperties, tu as EditorSnapshot, uc as LeafPosition, ud as EditorView, uf as SnapshotIndex, ug as AnchorAssociation, uh as DecorationSource, ul as EditorElementBehavior, um as NodeMutationMethods, un as AuthoredDocumentProjection, uo as EditorSchemaNamedDefinition, ur as SetSelectionCommand, us as SchemaElementStructure, uu as EditorStateSelectionApi, vc as TextInterface, vd as NodeKey, vf as TopLevelRuntimeRange, vg as RangeApi, vh as Descendant, vl as EditorLevelsOptions, vm as LeafEdge, vo as EditorSchemaRepairCode, vs as SchemaProperty, vu as EditorTargetRuntime, wd as PluginApiFactoryContext, wg as Span, wh as ElementEntryOf, wl as EditorNodeChangeContext, wm as SelectionMode, wn as TransferRead, wo as PropertyJsonDescriptor, ws as SchemaPropertyIds, wu as EditorTransactionAnchorApi, xd as Plugin, xf as ValueOf, xg as Location, xh as DescendantEntryOf, xl as EditorMarks, xm as RangeDirection, xn as authoredVeto, xo as NamedEditorSchemaIdentity, xs as SchemaPropertyExclusiveGroup, xu as EditorToggleBlockOptions, yc as TextOf, yd as NodeTarget, yf as TransactionSpec, yg as RangeEdgesOptions, yh as DescendantEntry, yl as EditorLifecycleError, ym as MaximizeMode, yn as AuthoredTouch, yo as EditorSchemaStructureProperty, ys as SchemaPropertyCopyPolicy, yu as EditorTextChangeContext, zc as EditorCommandHandler, zd as PluginInput, zh as NodeIsNodeOptions, zl as EditorReadMethodRecord, zn as TransferPayload, zo as SchemaContentInput, zs as SchemaTextPropertyKeys, zu as EditorTransactionRemoved } from "../index-DpltOCot.js";
|
|
2
|
+
import { a as AnnotationSnapshot, c as OwnedAnnotationStore, d as ViewSourceError, f as ViewSourceErrorSink, h as ViewSourceStatus, i as AnnotationRefreshOptions, l as ResolvedAnnotation, m as ViewSourcePhase, n as AnnotationAnchor, o as AnnotationStore, p as ViewSourceOptions, r as AnnotationChange, s as AnnotationStoreOptions, t as Annotation } from "../index-DPWyk3lG.js";
|
|
3
|
+
import { $ as EditorStateSelectorOptions, $t as EditablePasteResult, A as useContentRoot, At as EditableElementSlots, B as EditorRuntimeSelectorOptions, Bt as DOMTextSyncRendererCapabilityContext, C as UseEditableClipOptions, Ct as SelectionChangeContext, D as useEditor, Dt as EditableDOMCoverageBoundaryPlaceholderContext, E as UseEditorOptions, Et as EditableDOMCoverageBoundaryMaterializePayload, F as useAnnotation, Ft as RenderPlaceholderProps, G as UseElementSelectedOptions, Gt as EditableDOMBeforeInputHandler, H as useNodeSelector, Ht as setRetainedTextFlowRendererCapability, I as useAnnotations, It as RenderTextHostProps, J as useElement, Jt as EditableInputEventContext, K as useElementSelected, Kt as EditableHandlerContext, L as UseAnnotationStoreOptions, Lt as RenderTextPieceProps, M as UseRootChromeOptions, Mt as RenderElementProps, N as useRootChrome, Nt as RenderVoidProps, O as ContentRootController, Ot as EditableDOMCoverageBoundaryProps, P as useChildRoot, Pt as RenderLeafProps, Q as EditorSelectorOptions, Qt as EditableHistoryReplayResult, R as useAnnotationStore, Rt as RenderTextProps, S as useClaimEditableDOMCommit, St as EditorRootProps, T as useDropIndicator, Tt as Editable, U as useTextSelector, Ut as installBrowserHandle, V as EditorTextSelectorContext, Vt as setDOMTextSyncRendererCapability, W as UseElementSelectedMode, Wt as EditableDOMBeforeInputContext, X as EditorViewStateSelectorOptions, Xt as EditableDropResult, Y as useOptionalElement, Yt as EditableKeyDownHandler, Z as useEditorViewState, Zt as EditableHistoryReplayEvent, _ as useRuntimeState, _n as react, _t as EditorText, a as useStateFieldValue, an as ExternalTextDispatchResult, at as EditorReadOnlyProvider, b as UseEditorHistoryOptions, bt as CommitContext, c as CommandDispatcher, cn as ExternalTextSelectionState, ct as useOptionalEditorReadOnly, d as UseCommandOptions, dn as CreateEditorOptions, dt as useEditorRootElement, en as EditablePointerSelectionEndHandler, et as useEditorSelector, f as UseRootEditorOptions, fn as Editor, ft as useEditorScrollElement, g as useRootState, gn as createEditor, gt as useOptionalEditorContext, h as useRootEditor, hn as ReactPluginOptions, ht as useEditorContext, i as useSetStateField, in as ExternalTextDecoration, it as useEditorRuntimeState, j as RootChromeController, jt as EditableProps, k as UseContentRootOptions, kt as EditableDOMCoverageBoundaryScope, l as CommandFocusPolicy, ln as ExternalTextState, lt as useEditorFocused, m as useCommand, mn as ReactPlugin, mt as useEditorComposing, n as StateFieldSetter, nn as ExternalTextAdapter, nt as useEditorSelection, o as UseSelectionGeometryOptions, on as ExternalTextOptions, ot as EditorReadOnlyProviderProps, p as useCaretEditor, pn as ReactApi, pt as useEditorScrollElementRef, q as useElementPath, qt as EditableHandlerResult, r as UseStateFieldValueOptions, rn as ExternalTextChange, rt as EditorRuntimeStateSelectorOptions, s as useSelectionGeometry, sn as ExternalTextSelection, st as useEditorReadOnly, t as ReactUpdatePolicy, tn as ExternalTextActions, tt as useEditorState, u as RuntimeStateSelectorOptions, un as ExternalTextView, ut as useEditorEditableElement, v as EditorHistoryController, vn as TypedText, vt as EditorLeaf, w as useEditableClip, wt as ValueChangeContext, x as useEditorHistory, xt as EditorRoot, y as EditorHistoryFocusPolicy, yn as TypedTextListener, yt as EditorElement, z as EditorNodeSelectorContext, zt as EditorPlaceholder } from "../index-K0Za9YXc.js";
|
|
4
|
+
import { n as RangeRects, r as ViewportRect, t as RangeGeometry } from "../range-geometry-BLAHRE11.js";
|
|
5
|
+
export { type AddMarkCommand, Ancestor, AncestorEntry, AncestorEntryOf, AncestorIn, AncestorOf, type Anchor, type AnchorAssociation, type AnchorDeletionPolicy, type AnchorOptions, type AnchorValue, type Annotation, type AnnotationAnchor, type AnnotationChange, type AnnotationRefreshOptions, type AnnotationSnapshot, type AnnotationStore, type AnnotationStoreOptions, type AuthoredDocumentProjection, type AuthoredProjectionDiagnostic, type AuthoredTouch, type AuthoredVeto, BaseElement, BaseNode, BasePoint, BaseRange, BaseText, type BlockDuplicateOptions, type BlockInsertOptions, BooleanMarkKeysOf, BooleanMarksOf, ChildOf, type CollapseSelectionCommand, type CommandDispatcher, type CommandFocusPolicy, type CommitContext, type CompatibleEditorCommand, type ContentRootController, ContentSlice, type CreateEditorOptions, type DOMTextSyncRendererCapabilityContext, type DebugValueScrubber, type Decoration, type DecorationAttributes, type DecorationRefresh, type DecorationSource, type DefinitionOf, type DeleteCommand, type DeleteFragmentCommand, type DerivedEditorSchemaIdentity, Descendant, DescendantEntry, DescendantEntryIn, DescendantEntryOf, DescendantIn, DescendantOf, DocumentChange, Editable, type EditableDOMBeforeInputContext, type EditableDOMBeforeInputHandler, type EditableDOMCoverageBoundaryMaterializePayload, type EditableDOMCoverageBoundaryPlaceholderContext, type EditableDOMCoverageBoundaryProps, type EditableDOMCoverageBoundaryScope, type EditableDropResult, type EditableElementSlots, type EditableHandlerContext, type EditableHandlerResult, type EditableHistoryReplayEvent, type EditableHistoryReplayResult, type EditableInputEventContext, type EditableKeyDownHandler, type EditablePasteResult, type EditablePointerSelectionEndHandler, type EditableProps, type Editor, type EditorAboveOptions, type EditorBlockOptions, type EditorBlockToggleOptions, type EditorBreakExitOptions, type EditorCanonicalUpdateTag, type EditorCommand, type EditorCommandAroundHandler, type EditorCommandContinuation, type EditorCommandDescriptor, type EditorCommandDispatch, type EditorCommandHandler, type EditorCommandInput, type EditorCommandPlace, type EditorCommandResult, type EditorCommands, type EditorCommit, type EditorCommitChangeKind, type EditorCommitChanged, type EditorCommitContext, type EditorCommitHandler, type EditorCommitListener, type EditorCommitRuntimeChangeKind, type EditorCoreStateView, type EditorCoreUpdateMethods, type EditorCoreUpdateTransaction, type EditorDirectCommandDispatch, type EditorDocumentRange, type EditorDocumentRecords, type EditorDocumentValue, type EditorEffect, type EditorEffectCollabDecodeContext, type EditorEffectCollabEncodeContext, type EditorEffectCollabReplay, type EditorEffectCollabTransport, type EditorEffectHistoryReplayResult, type EditorEffectType, EditorElement, type EditorElementBehavior, type EditorFragmentDeletionOptions, type EditorFragmentReadOptions, type EditorHistoryController, type EditorHistoryFocusPolicy, type EditorInstalledApiGroups, type EditorInstalledReadGroups, type EditorInstalledUpdateGroups, type EditorIsEditorOptions, type EditorJsonValue, EditorLeaf, type EditorLevelsOptions, type EditorLifecycleError, type EditorLifecycleErrorSink, type EditorMarks, type EditorMarksOf, type EditorNextOptions, type EditorNodeChangeContext, type EditorNodeChangeHandler, type EditorNodeChangeKind, type EditorNodeGetOptions, type EditorNodeSelectorContext, type EditorNodeUnsetOptions, type EditorNodesOptions, type EditorNodesReadOptions, type EditorParentOptions, EditorPlaceholder, type EditorPreviousOptions, type EditorRead, type EditorReadAroundHandler, type EditorReadContext, type EditorReadDescriptor, type EditorReadInput, type EditorReadMethodRecord, type EditorReadMethodTree, type EditorReadMethods, EditorReadOnlyProvider, type EditorReadOnlyProviderProps, type EditorReadRegistration, type EditorReadResult, type EditorReplaceChildrenOptions, type EditorReplaceNodeOptions, EditorRoot, type EditorRootEntry, type EditorRootOwner, type EditorRootProps, type EditorRuntimeSelectorOptions, type EditorRuntimeStateSelectorOptions, type EditorSchemaContent, type EditorSchemaContentRoot, type EditorSchemaContract, type EditorSchemaContractChange, type EditorSchemaContractChangeKind, type EditorSchemaContractContentProgram, type EditorSchemaContractContentRoot, type EditorSchemaContractDiff, type EditorSchemaContractElement, type EditorSchemaContractRoot, type EditorSchemaContribution, type EditorSchemaDeclaration, type EditorSchemaDefinition, type EditorSchemaDelta, type EditorSchemaDerivedDefinition, type EditorSchemaElement, type EditorSchemaElementOverride, type EditorSchemaElementOverrideInput, type EditorSchemaElementStructure, type EditorSchemaGetProperty, type EditorSchemaIdentity, type EditorSchemaNamedDefinition, type EditorSchemaOverride, type EditorSchemaOverrideInput, type EditorSchemaPlugin, type EditorSchemaProperty, type EditorSchemaPropertyOverride, type EditorSchemaPropertyOverrideInput, type EditorSchemaPropertyQuery, type EditorSchemaPropertyReadOptions, type EditorSchemaReadProperty, type EditorSchemaRepairCode, type EditorSchemaSource, type EditorSchemaStructureProperty, type EditorSchemaUnknownPolicy, type EditorSchemaValidationCode, type EditorSchemaValidationDiagnostic, EditorSchemaValidationError, type EditorSchemaValidationPropertyContext, type EditorSchemaVocabulary, EditorSelection, type EditorSelectionBlockOptions, type EditorSelectionTargetOptions, type EditorSelectorOptions, type EditorSliceReadOptions, type EditorSnapshot, type EditorStateField, type EditorStateFragmentApi, type EditorStateMarksApi, type EditorStateNodesApi, type EditorStatePointsApi, type EditorStateRangesApi, type EditorStateRuntimeApi, type EditorStateSchemaApi, type EditorStateSelectionApi, type EditorStateSelectorOptions, type EditorStateSliceApi, type EditorStateTextApi, type EditorStateUniqueApi, type EditorStateValueApi, type EditorStateView, type EditorStateViewApi, type EditorTargetRuntime, EditorText, type EditorTextChangeContext, type EditorTextChangeHandler, type EditorTextSelectorContext, type EditorToggleBlockOptions, type EditorToggleMarkOptions, type EditorTransactionAnchor, type EditorTransactionAnchorApi, type EditorTransactionAnnotationsApi, type EditorTransactionBlocksApi, type EditorTransactionBreakApi, type EditorTransactionChangeContext, type EditorTransactionChangeHandler, type EditorTransactionChanged, type EditorTransactionChangesApi, type EditorTransactionDocumentChangeKind, type EditorTransactionEffectsApi, type EditorTransactionFragmentApi, type EditorTransactionMarksApi, type EditorTransactionNodesApi, type EditorTransactionPluginsApi, type EditorTransactionRecordsApi, type EditorTransactionRemoved, type EditorTransactionRootsApi, type EditorTransactionSelectionApi, type EditorTransactionSliceApi, type EditorTransactionSpecBuilder, type EditorTransactionTagsApi, type EditorTransactionTextApi, type EditorTransactionTopLevelRange, type EditorTransactionValueApi, type EditorUniqueHolder, type EditorUpdate, type EditorUpdateAnnotation, type EditorUpdateContext, type EditorUpdateMethods, type EditorUpdatePolicy, type EditorUpdatePolicyFor, type EditorUpdateTag, type EditorUpdateTagInput, type EditorUpdateTransaction, type EditorUpdateValueFromPlugin, type EditorValueFromOptions, type EditorValueFromPlugins, type EditorValuePersistence, type EditorView, type EditorViewOptions, type EditorViewStateSelectorOptions, Element, ElementApi, ElementEntry, ElementEntryOf, ElementIn, ElementInterface, ElementIsElementOptions, ElementOf, ElementOrTextIn, ElementOrTextOf, type ExternalTextActions, type ExternalTextAdapter, type ExternalTextChange, type ExternalTextDecoration, type ExternalTextDispatchResult, type ExternalTextOptions, type ExternalTextSelection, type ExternalTextSelectionState, type ExternalTextState, type ExternalTextView, type HistoryApi, type HistoryOutcome, type HistoryResult, type HistorySettlement, type InitialValue, type InsertBreakCommand, type InsertNodesCommand, type InsertSoftBreakCommand, type InsertTextCommand, type JsonEditorValue, type JsonNode, type LeafEdge, LeafPosition, Location, LocationApi, LocationInterface, MarkKeysOf, MarksIn, MarksOf, type MaximizeMode, type MoveSelectionCommand, type MoveUnit, type NamedEditorSchemaIdentity, type NamedRootKey, Node, NodeAncestorsOptions, NodeApi, NodeChildEntry, NodeChildrenOptions, NodeDescendantsOptions, type NodeDuplicateOptions, NodeElementsOptions, NodeEntry, NodeEntryIn, NodeEntryOf, NodeFindTextRangesOptions, NodeHasPropsOptions, NodeIn, type NodeInsertNodesOptions, type NodeInsertSplitOptions, NodeInterface, NodeIsNodeOptions, type NodeKey, NodeLevelsOptions, type NodeLiftNodesOptions, NodeMatch, NodeMatchPredicate, type NodeMergeNodesOptions, type NodeMoveNodesOptions, type NodeMutationMethods, NodeNodesOptions, NodeOf, NodeProps, type NodeRemoveNodesOptions, type NodeReplaceChildrenOptions, NodeSelection, NodeSelectionMode, type NodeSetNodesOptions, type NodeSplitNodesOptions, type NodeTarget, NodeTextRangeEntry, NodeTextRangeMatch, NodeTextRangeQuery, NodeTextRangeRoot, NodeTextRangeView, NodeTextsOptions, NodeTypeSelector, type NodeUnsetNodesOptions, type NodeUnwrapNodesOptions, type NodeWrapNodesOptions, type NodeWriteVeto, type NodeWriteVetoInput, type OwnedAnnotationStore, Path, PathAncestorsOptions, PathApi, PathInterface, PathLevelsOptions, type PersistedDocumentInput, type Plugin, type PluginActivationContext, type PluginApiFactory, type PluginApiFactoryContext, type PluginCandidateContext, type PluginCandidateEditor, type PluginCapabilities, type PluginCleanupContext, type PluginContribution, type PluginContributionInput, type PluginDefinition, type PluginDefinitionInput, type PluginDependencyReference, type PluginInput, type PluginMigrationContext, type PluginPoint, type PluginPortal, PluginPublicationError, type PluginReadContext, type PluginReadFactory, type PluginReadFactoryContext, type PluginReadMiddlewareFactory, type PluginReconfigureOptions, type PluginReference, type PluginSlot, type PluginSlotLike, type PluginSlotValue, type PluginTypeProvider, type PluginTypes, type PluginUpdateFactory, type PluginUpdateFactoryContext, type PluginsFromOptions, type PluginsOf, Point, PointApi, PointEntry, PointInterface, type ProjectedRangeSegment, type PropertyBooleanDescriptor, type PropertyBuilderApi, type PropertyEnumDescriptor, type PropertyJsonDescriptor, type PropertyJsonOptions, type PropertyNumberDescriptor, type PropertyOptionsOf, type PropertySetDescriptor, type PropertySetOptions, type PropertyStringDescriptor, type PropertyValidation, type PropertyValueDescriptor, type PropertyValueKind, type PropertyValueOf, type PropertyValueOptions, Range, type RangeAnchorAssociation, RangeApi, type RangeDirection, RangeEdgesOptions, type RangeGeometry, RangeInterface, type RangeMode, type RangeRects, type ReactApi, type ReactPlugin, type ReactPluginOptions, ReactUpdatePolicy, type RemoveMarkCommand, type RemoveNodesCommand, type RenderElementProps, type RenderLeafProps, type RenderPlaceholderProps, type RenderTextHostProps, type RenderTextPieceProps, type RenderTextProps, type RenderVoidProps, type ReplaceSliceCommand, type ResolvedAnnotation, type RootChromeController, type RootKey, type RuntimeStateSelectorOptions, type SchemaBuiltInGroupName, type SchemaContent, type SchemaContentDefault, type SchemaContentInput, type SchemaContentOptions, type SchemaContentPrefixSlot, type SchemaContentRoot, type SchemaContentRootContribution, type SchemaContentRootInput, type SchemaContentRootOwnership, type SchemaContentRootSlotsFor, type SchemaContentRootStructure, type SchemaContentRule, type SchemaDescendant, type SchemaElement, type SchemaElementConstructionPropertiesFor, type SchemaElementFor, type SchemaElementHandle, type SchemaElementInput, type SchemaElementProperties, type SchemaElementPropertiesFor, type SchemaElementProperty, type SchemaElementPropertyDefinition, type SchemaElementPropertyKeys, type SchemaElementPropertyOptions, type SchemaElementPropertyValue, type SchemaElementShapeFor, type SchemaElementSlicePolicy, type SchemaElementStructure, type SchemaElementTarget, type SchemaElementTypes, type SchemaGroup, type SchemaGroupNames, type SchemaGroupOptions, type SchemaKeyPrefix, type SchemaPluginsOf, type SchemaProperty, type SchemaPropertyCopyPolicy, type SchemaPropertyDefinition, type SchemaPropertyExclusiveGroup, type SchemaPropertyHandle, type SchemaPropertyHandleValue, type SchemaPropertyIds, type SchemaPropertyKey, type SchemaPropertyLandingPolicy, type SchemaPropertyReferences, type SchemaPropertyRole, type SchemaPropertySplitPolicy, type SchemaPropertyTypeChangePolicy, type SchemaRecordSet, type SchemaRootNames, type SchemaTarget, type SchemaText, type SchemaTextBlockOptions, type SchemaTextProperties, type SchemaTextProperty, type SchemaTextPropertyDefinition, type SchemaTextPropertyKeys, type SchemaTextPropertyOptions, type SchemaTypesTarget, type SchemaValue, type SchemaValueFromPlugins, type SelectCommand, Selection, SelectionApi, SelectionAssociation, type SelectionChangeContext, type SelectionCollapseOptions, type SelectionEdge, type SelectionMode, type SelectionMoveOptions, type SelectionMutationMethods, type SelectionSetPointOptions, SelectionValue, type SerializedEditorEffect, type SerializedEditorSelection, type SerializedEditorValue, type SetNodesCommand, type SetSelectionCommand, type SliceLanding, type SliceLandingInput, type SliceLandingTarget, type SnapshotIndex, type SnapshotInput, Span, SpanApi, SpanInterface, type StateFieldCollabPolicy, type StateFieldDescriptor, type StateFieldHistoryPolicy, type StateFieldInitial, type StateFieldSetter, type StateFieldValueInput, type TargetFreshnessRequest, Text, TextApi, type TextDeleteOptions, type TextDirection, TextEntry, TextEntryIn, TextEntryOf, TextEqualsOptions, TextIn, type TextInsertFragmentOptions, type TextInsertTextOptions, TextInterface, type TextMutationMethods, TextOf, type TextRemoveTextOptions, TextSelection, type TextUnit, type TextUnitAdjustment, type ToggleBlockCommand, type ToggleMarkCommand, type TopLevelRuntimeRange, type TransactionSpec, type TransferAdoptInput, type TransferApi, type TransferCheck, type TransferDiagnostic, type TransferEdge, type TransferInput, type TransferIntent, type TransferLandingInput, type TransferLandingTarget, type TransferOutcome, type TransferPatch, type TransferPatchProperties, type TransferPayload, type TransferPlugin, type TransferRead, type TransferRefusalReason, type TransferRelation, type TransferSide, type TransferSideInput, type TransferSourceInput, type TransferTarget, type TransferVeto, type TransferVetoInput, type TransferWrap, type TxDeclaredMethod, type TxMethodDeclarations, type TxOnlyMethod, type TypedText, type TypedTextListener, type UseAnnotationStoreOptions, type UseCommandOptions, type UseContentRootOptions, type UseEditableClipOptions, type UseEditorHistoryOptions, type UseEditorOptions, type UseElementSelectedMode, type UseElementSelectedOptions, type UseRootChromeOptions, type UseRootEditorOptions, type UseSelectionGeometryOptions, type UseStateFieldValueOptions, type Value, type ValueChangeContext, type ValueOf, type ViewSourceError, type ViewSourceErrorSink, type ViewSourceOptions, type ViewSourcePhase, type ViewSourceStatus, type ViewportRect, authoredVeto, compileEditorSchemaContract, createEditor, createEditorView, decodeEditorEffect, defineCommand, defineEditorSchema, defineEffect, definePlugin, definePluginPoint, definePluginSlot, defineStateField, defineUpdateAnnotation, diffEditorSchemaContracts, documentReplacement, editorCommands, editorReads, encodeEditorEffect, getEditorRuntimeOwner, installBrowserHandle, invertEffect, isEditor, locateAt, mapEffect, nodeWriteVeto, property, react, readEditorSchemaContract, getSelection as readEditorSelection, restoreEditorSchemaContract, schema, screenReaderAnnouncementEffect, setDOMTextSyncRendererCapability, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, setRetainedTextFlowRendererCapability, target, transfer, transferVeto, txLocate, txOnly, txSelection, useAnnotation, useAnnotationStore, useAnnotations, useCaretEditor, useChildRoot, useClaimEditableDOMCommit, useCommand, useContentRoot, useDropIndicator, useEditableClip, useEditor, useEditorComposing, useEditorContext, useEditorEditableElement, useEditorFocused, useEditorHistory, useEditorReadOnly, useEditorRootElement, useEditorRuntimeState, useEditorScrollElement, useEditorScrollElementRef, useEditorSelection, useEditorSelector, useEditorState, useEditorViewState, useElement, useElementPath, useElementSelected, useNodeSelector, useOptionalEditorContext, useOptionalEditorReadOnly, useOptionalElement, useRootChrome, useRootEditor, useRootState, useRuntimeState, useSelectionGeometry, useSetStateField, useStateFieldValue, useTextSelector, valueCodecs };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { A as definePluginSlot, An as documentReplacement, B as NodeApi, Bf as defineEffect, Bo as txOnly, Cl as diffEditorSchemaContracts, D as property, Hf as invertEffect, Il as readEditorSchemaContract, Is as EditorSchemaValidationError, O as schema, Qc as nodeWriteVeto, Rf as valueCodecs, Ro as locateAt, St as isEditor, Uf as mapEffect, Vf as defineUpdateAnnotation, Vo as txSelection, Yu as DocumentChange, au as ElementApi, ba as editorReads, c as defineEditorSchema, ci as setEditorViewing, ct as getSelection, fu as LocationApi, hu as PointApi, ii as setEditorReadOnly, iu as SelectionApi, jf as encodeEditorEffect, k as target, kf as decodeEditorEffect, ku as defineCommand, l as definePlugin, lu as TextApi, mn as editorCommands, mu as RangeApi, pu as SpanApi, rc as ContentSlice, so as createEditorView, su as setDebugValueScrubber, t as PluginPublicationError, tu as definePluginPoint, wu as getEditorRuntimeOwner, xu as PathApi, zl as restoreEditorSchemaContract, zo as txLocate } from "../plugin-DWzkJbnJ.js";
|
|
2
|
+
import { i as transfer, o as transferVeto, t as defineStateField } from "../src-cT1OTKP_.js";
|
|
3
|
+
import { _ as screenReaderAnnouncementEffect, n as compileEditorSchemaContract } from "../create-editor-CkHtPWXV.js";
|
|
4
|
+
import { t as authoredVeto } from "../authored-veto-DSnQcHGR.js";
|
|
5
|
+
import { A as useRootState, B as setDOMTextSyncRendererCapability, Bt as useOptionalEditorReadOnly, C as useSelectionGeometry, Ct as ReactUpdatePolicy, D as useCommand, E as useCaretEditor, F as useEditorViewState, Ht as useEditorComposing, I as useEditorSelection, It as useElement, J as useEditorSelector, Lt as useOptionalElement, M as useChildRoot, N as useNodeSelector, P as useTextSelector, Rt as EditorReadOnlyProvider, T as useRootChrome, Ut as useEditorContext, V as setRetainedTextFlowRendererCapability, Vt as useEditorFocused, Wt as useOptionalEditorContext, Y as useEditorState, Z as useClaimEditableDOMCommit, a as useEditorScrollElementRef, c as EditorElement, d as EditorText, i as useEditorScrollElement, j as useRuntimeState, k as useRootEditor, l as EditorRoot, m as EditorLeaf, o as Editable, p as EditorPlaceholder, r as useEditorRootElement, t as useEditorEditableElement, w as useContentRoot, zt as useEditorReadOnly } from "../use-editor-dom-scope-BbMDSCpW.js";
|
|
6
|
+
import { a as useDropIndicator, c as react, d as useAnnotationStore, f as useElementSelected, h as installBrowserHandle, i as useEditableClip, l as useAnnotation, m as useEditorRuntimeState, n as useStateFieldValue, o as useEditor, p as useElementPath, r as useEditorHistory, s as createEditor, t as useSetStateField, u as useAnnotations } from "../react-DZ15gmz2.js";
|
|
7
|
+
export { ContentSlice, DocumentChange, Editable, EditorElement, EditorLeaf, EditorPlaceholder, EditorReadOnlyProvider, EditorRoot, EditorSchemaValidationError, EditorText, ElementApi, LocationApi, NodeApi, PathApi, PluginPublicationError, PointApi, RangeApi, ReactUpdatePolicy, SelectionApi, SpanApi, TextApi, authoredVeto, compileEditorSchemaContract, createEditor, createEditorView, decodeEditorEffect, defineCommand, defineEditorSchema, defineEffect, definePlugin, definePluginPoint, definePluginSlot, defineStateField, defineUpdateAnnotation, diffEditorSchemaContracts, documentReplacement, editorCommands, editorReads, encodeEditorEffect, getEditorRuntimeOwner, installBrowserHandle, invertEffect, isEditor, locateAt, mapEffect, nodeWriteVeto, property, react, readEditorSchemaContract, getSelection as readEditorSelection, restoreEditorSchemaContract, schema, screenReaderAnnouncementEffect, setDOMTextSyncRendererCapability, setDebugValueScrubber, setEditorReadOnly, setEditorViewing, setRetainedTextFlowRendererCapability, target, transfer, transferVeto, txLocate, txOnly, txSelection, useAnnotation, useAnnotationStore, useAnnotations, useCaretEditor, useChildRoot, useClaimEditableDOMCommit, useCommand, useContentRoot, useDropIndicator, useEditableClip, useEditor, useEditorComposing, useEditorContext, useEditorEditableElement, useEditorFocused, useEditorHistory, useEditorReadOnly, useEditorRootElement, useEditorRuntimeState, useEditorScrollElement, useEditorScrollElementRef, useEditorSelection, useEditorSelector, useEditorState, useEditorViewState, useElement, useElementPath, useElementSelected, useNodeSelector, useOptionalEditorContext, useOptionalEditorReadOnly, useOptionalElement, useRootChrome, useRootEditor, useRootState, useRuntimeState, useSelectionGeometry, useSetStateField, useStateFieldValue, useTextSelector, valueCodecs };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Qs as Element, of as RootKey } from "../index-DpltOCot.js";
|
|
2
|
+
import { jt as EditableProps } from "../index-K0Za9YXc.js";
|
|
3
|
+
//#region src/react/virtualized.d.ts
|
|
4
|
+
type VirtualizedEditableProps<TElement extends Element = Element, TRoot extends RootKey = RootKey> = EditableProps<TElement, TRoot> & {
|
|
5
|
+
/** Estimated height in CSS pixels for an unmeasured top-level block. */
|
|
6
|
+
estimatedBlockSize?: number;
|
|
7
|
+
/** Extra top-level blocks rendered before and after the visible range. */
|
|
8
|
+
overscan?: number;
|
|
9
|
+
};
|
|
10
|
+
/** Render one explicitly virtualized Plite root. */
|
|
11
|
+
declare const VirtualizedEditable: <TElement extends Element, const TRoot extends RootKey = RootKey>({ root, ...props }: VirtualizedEditableProps<TElement, TRoot>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { VirtualizedEditable, VirtualizedEditableProps };
|