@tiptap/extension-node-range 2.24.2 → 3.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,310 +1,306 @@
1
- import { Extension } from '@tiptap/core';
2
- import { SelectionRange, Selection, Plugin, PluginKey } from '@tiptap/pm/state';
3
- import { DecorationSet, Decoration } from '@tiptap/pm/view';
4
- import { NodeRange as NodeRange$1 } from '@tiptap/pm/model';
1
+ // src/node-range.ts
2
+ import { Extension } from "@tiptap/core";
3
+ import { Plugin, PluginKey } from "@tiptap/pm/state";
5
4
 
5
+ // src/helpers/getNodeRangeDecorations.ts
6
+ import { Decoration, DecorationSet } from "@tiptap/pm/view";
6
7
  function getNodeRangeDecorations(ranges) {
7
- if (!ranges.length) {
8
- return DecorationSet.empty;
8
+ if (!ranges.length) {
9
+ return DecorationSet.empty;
10
+ }
11
+ const decorations = [];
12
+ const doc = ranges[0].$from.node(0);
13
+ ranges.forEach((range) => {
14
+ const pos = range.$from.pos;
15
+ const node = range.$from.nodeAfter;
16
+ if (!node) {
17
+ return;
9
18
  }
10
- const decorations = [];
11
- const doc = ranges[0].$from.node(0);
12
- ranges.forEach(range => {
13
- const pos = range.$from.pos;
14
- const node = range.$from.nodeAfter;
15
- if (!node) {
16
- return;
17
- }
18
- decorations.push(Decoration.node(pos, pos + node.nodeSize, {
19
- class: 'ProseMirror-selectednoderange',
20
- }));
21
- });
22
- return DecorationSet.create(doc, decorations);
19
+ decorations.push(
20
+ Decoration.node(pos, pos + node.nodeSize, {
21
+ class: "ProseMirror-selectednoderange"
22
+ })
23
+ );
24
+ });
25
+ return DecorationSet.create(doc, decorations);
23
26
  }
24
27
 
28
+ // src/helpers/getSelectionRanges.ts
29
+ import { NodeRange } from "@tiptap/pm/model";
30
+ import { SelectionRange } from "@tiptap/pm/state";
25
31
  function getSelectionRanges($from, $to, depth) {
26
- const ranges = [];
27
- const doc = $from.node(0);
28
- // eslint-disable-next-line
29
- depth = (typeof depth === 'number' && depth >= 0)
30
- ? depth
31
- : $from.sameParent($to)
32
- ? Math.max(0, $from.sharedDepth($to.pos) - 1)
33
- : $from.sharedDepth($to.pos);
34
- const nodeRange = new NodeRange$1($from, $to, depth);
35
- const offset = nodeRange.depth === 0
36
- ? 0
37
- : doc.resolve(nodeRange.start).posAtIndex(0);
38
- nodeRange.parent.forEach((node, pos) => {
39
- const from = offset + pos;
40
- const to = from + node.nodeSize;
41
- if (from < nodeRange.start || from >= nodeRange.end) {
42
- return;
43
- }
44
- const selectionRange = new SelectionRange(doc.resolve(from), doc.resolve(to));
45
- ranges.push(selectionRange);
46
- });
47
- return ranges;
48
- }
49
-
50
- class NodeRangeBookmark {
51
- constructor(anchor, head) {
52
- this.anchor = anchor;
53
- this.head = head;
54
- }
55
- map(mapping) {
56
- return new NodeRangeBookmark(mapping.map(this.anchor), mapping.map(this.head));
57
- }
58
- resolve(doc) {
59
- const $anchor = doc.resolve(this.anchor);
60
- const $head = doc.resolve(this.head);
61
- return new NodeRangeSelection($anchor, $head);
32
+ const ranges = [];
33
+ const doc = $from.node(0);
34
+ if (typeof depth === "number" && depth >= 0) {
35
+ } else if ($from.sameParent($to)) {
36
+ depth = Math.max(0, $from.sharedDepth($to.pos) - 1);
37
+ } else {
38
+ depth = $from.sharedDepth($to.pos);
39
+ }
40
+ const nodeRange = new NodeRange($from, $to, depth);
41
+ const offset = nodeRange.depth === 0 ? 0 : doc.resolve(nodeRange.start).posAtIndex(0);
42
+ nodeRange.parent.forEach((node, pos) => {
43
+ const from = offset + pos;
44
+ const to = from + node.nodeSize;
45
+ if (from < nodeRange.start || from >= nodeRange.end) {
46
+ return;
62
47
  }
48
+ const selectionRange = new SelectionRange(doc.resolve(from), doc.resolve(to));
49
+ ranges.push(selectionRange);
50
+ });
51
+ return ranges;
63
52
  }
64
53
 
65
- class NodeRangeSelection extends Selection {
66
- constructor($anchor, $head, depth, bias = 1) {
67
- // if there is only a cursor we can’t calculate a direction of the selection
68
- // that’s why we adjust the head position by 1 in the desired direction
69
- const { doc } = $anchor;
70
- const isCursor = $anchor === $head;
71
- const isCursorAtEnd = $anchor.pos === doc.content.size && $head.pos === doc.content.size;
72
- const $correctedHead = isCursor && !isCursorAtEnd
73
- ? doc.resolve($head.pos + (bias > 0 ? 1 : -1))
74
- : $head;
75
- const $correctedAnchor = isCursor && isCursorAtEnd
76
- ? doc.resolve($anchor.pos - (bias > 0 ? 1 : -1))
77
- : $anchor;
78
- const ranges = getSelectionRanges($correctedAnchor.min($correctedHead), $correctedAnchor.max($correctedHead), depth);
79
- // get the smallest range start position
80
- // this will become the $anchor
81
- const $rangeFrom = ($correctedHead.pos >= $anchor.pos)
82
- ? ranges[0].$from
83
- : ranges[ranges.length - 1].$to;
84
- // get the biggest range end position
85
- // this will become the $head
86
- const $rangeTo = ($correctedHead.pos >= $anchor.pos)
87
- ? ranges[ranges.length - 1].$to
88
- : ranges[0].$from;
89
- super($rangeFrom, $rangeTo, ranges);
90
- this.depth = depth;
91
- }
92
- // we can safely ignore this TypeScript error: https://github.com/Microsoft/TypeScript/issues/338
93
- // @ts-ignore
94
- get $to() {
95
- return this.ranges[this.ranges.length - 1].$to;
96
- }
97
- eq(other) {
98
- return other instanceof NodeRangeSelection
99
- && other.$from.pos === this.$from.pos
100
- && other.$to.pos === this.$to.pos;
101
- }
102
- map(doc, mapping) {
103
- const $anchor = doc.resolve(mapping.map(this.anchor));
104
- const $head = doc.resolve(mapping.map(this.head));
105
- return new NodeRangeSelection($anchor, $head);
106
- }
107
- toJSON() {
108
- return {
109
- type: 'nodeRange',
110
- anchor: this.anchor,
111
- head: this.head,
112
- };
113
- }
114
- get isForwards() {
115
- return this.head >= this.anchor;
116
- }
117
- get isBackwards() {
118
- return !this.isForwards;
119
- }
120
- extendBackwards() {
121
- const { doc } = this.$from;
122
- if (this.isForwards && this.ranges.length > 1) {
123
- const ranges = this.ranges.slice(0, -1);
124
- const $from = ranges[0].$from;
125
- const $to = ranges[ranges.length - 1].$to;
126
- return new NodeRangeSelection($from, $to, this.depth);
127
- }
128
- const firstRange = this.ranges[0];
129
- const $from = doc.resolve(Math.max(0, firstRange.$from.pos - 1));
130
- return new NodeRangeSelection(this.$anchor, $from, this.depth);
131
- }
132
- extendForwards() {
133
- const { doc } = this.$from;
134
- if (this.isBackwards && this.ranges.length > 1) {
135
- const ranges = this.ranges.slice(1);
136
- const $from = ranges[0].$from;
137
- const $to = ranges[ranges.length - 1].$to;
138
- return new NodeRangeSelection($to, $from, this.depth);
139
- }
140
- const lastRange = this.ranges[this.ranges.length - 1];
141
- const $to = doc.resolve(Math.min(doc.content.size, lastRange.$to.pos + 1));
142
- return new NodeRangeSelection(this.$anchor, $to, this.depth);
143
- }
144
- static fromJSON(doc, json) {
145
- return new NodeRangeSelection(doc.resolve(json.anchor), doc.resolve(json.head));
146
- }
147
- static create(doc, anchor, head, depth, bias = 1) {
148
- return new this(doc.resolve(anchor), doc.resolve(head), depth, bias);
54
+ // src/helpers/NodeRangeSelection.ts
55
+ import { Selection } from "@tiptap/pm/state";
56
+
57
+ // src/helpers/NodeRangeBookmark.ts
58
+ var NodeRangeBookmark = class _NodeRangeBookmark {
59
+ constructor(anchor, head) {
60
+ this.anchor = anchor;
61
+ this.head = head;
62
+ }
63
+ map(mapping) {
64
+ return new _NodeRangeBookmark(mapping.map(this.anchor), mapping.map(this.head));
65
+ }
66
+ resolve(doc) {
67
+ const $anchor = doc.resolve(this.anchor);
68
+ const $head = doc.resolve(this.head);
69
+ return new NodeRangeSelection($anchor, $head);
70
+ }
71
+ };
72
+
73
+ // src/helpers/NodeRangeSelection.ts
74
+ var NodeRangeSelection = class _NodeRangeSelection extends Selection {
75
+ constructor($anchor, $head, depth, bias = 1) {
76
+ const { doc } = $anchor;
77
+ const isCursor = $anchor === $head;
78
+ const isCursorAtEnd = $anchor.pos === doc.content.size && $head.pos === doc.content.size;
79
+ const $correctedHead = isCursor && !isCursorAtEnd ? doc.resolve($head.pos + (bias > 0 ? 1 : -1)) : $head;
80
+ const $correctedAnchor = isCursor && isCursorAtEnd ? doc.resolve($anchor.pos - (bias > 0 ? 1 : -1)) : $anchor;
81
+ const ranges = getSelectionRanges($correctedAnchor.min($correctedHead), $correctedAnchor.max($correctedHead), depth);
82
+ const $rangeFrom = $correctedHead.pos >= $anchor.pos ? ranges[0].$from : ranges[ranges.length - 1].$to;
83
+ const $rangeTo = $correctedHead.pos >= $anchor.pos ? ranges[ranges.length - 1].$to : ranges[0].$from;
84
+ super($rangeFrom, $rangeTo, ranges);
85
+ this.depth = depth;
86
+ }
87
+ // we can safely ignore this TypeScript error: https://github.com/Microsoft/TypeScript/issues/338
88
+ // @ts-ignore
89
+ get $to() {
90
+ return this.ranges[this.ranges.length - 1].$to;
91
+ }
92
+ eq(other) {
93
+ return other instanceof _NodeRangeSelection && other.$from.pos === this.$from.pos && other.$to.pos === this.$to.pos;
94
+ }
95
+ map(doc, mapping) {
96
+ const $anchor = doc.resolve(mapping.map(this.anchor));
97
+ const $head = doc.resolve(mapping.map(this.head));
98
+ return new _NodeRangeSelection($anchor, $head);
99
+ }
100
+ toJSON() {
101
+ return {
102
+ type: "nodeRange",
103
+ anchor: this.anchor,
104
+ head: this.head
105
+ };
106
+ }
107
+ get isForwards() {
108
+ return this.head >= this.anchor;
109
+ }
110
+ get isBackwards() {
111
+ return !this.isForwards;
112
+ }
113
+ extendBackwards() {
114
+ const { doc } = this.$from;
115
+ if (this.isForwards && this.ranges.length > 1) {
116
+ const ranges = this.ranges.slice(0, -1);
117
+ const $from2 = ranges[0].$from;
118
+ const $to = ranges[ranges.length - 1].$to;
119
+ return new _NodeRangeSelection($from2, $to, this.depth);
149
120
  }
150
- getBookmark() {
151
- return new NodeRangeBookmark(this.anchor, this.head);
121
+ const firstRange = this.ranges[0];
122
+ const $from = doc.resolve(Math.max(0, firstRange.$from.pos - 1));
123
+ return new _NodeRangeSelection(this.$anchor, $from, this.depth);
124
+ }
125
+ extendForwards() {
126
+ const { doc } = this.$from;
127
+ if (this.isBackwards && this.ranges.length > 1) {
128
+ const ranges = this.ranges.slice(1);
129
+ const $from = ranges[0].$from;
130
+ const $to2 = ranges[ranges.length - 1].$to;
131
+ return new _NodeRangeSelection($to2, $from, this.depth);
152
132
  }
153
- }
133
+ const lastRange = this.ranges[this.ranges.length - 1];
134
+ const $to = doc.resolve(Math.min(doc.content.size, lastRange.$to.pos + 1));
135
+ return new _NodeRangeSelection(this.$anchor, $to, this.depth);
136
+ }
137
+ static fromJSON(doc, json) {
138
+ return new _NodeRangeSelection(doc.resolve(json.anchor), doc.resolve(json.head));
139
+ }
140
+ static create(doc, anchor, head, depth, bias = 1) {
141
+ return new this(doc.resolve(anchor), doc.resolve(head), depth, bias);
142
+ }
143
+ getBookmark() {
144
+ return new NodeRangeBookmark(this.anchor, this.head);
145
+ }
146
+ };
154
147
  NodeRangeSelection.prototype.visible = false;
155
148
 
149
+ // src/helpers/isNodeRangeSelection.ts
156
150
  function isNodeRangeSelection(value) {
157
- return value instanceof NodeRangeSelection;
151
+ return value instanceof NodeRangeSelection;
158
152
  }
159
153
 
160
- const NodeRange = Extension.create({
161
- name: 'nodeRange',
162
- addOptions() {
163
- return {
164
- depth: undefined,
165
- key: 'Mod',
166
- };
167
- },
168
- addKeyboardShortcuts() {
169
- return {
170
- // extend NodeRangeSelection upwards
171
- 'Shift-ArrowUp': ({ editor }) => {
172
- const { depth } = this.options;
173
- const { view, state } = editor;
174
- const { doc, selection, tr } = state;
175
- const { anchor, head } = selection;
176
- if (!isNodeRangeSelection(selection)) {
177
- const nodeRangeSelection = NodeRangeSelection.create(doc, anchor, head, depth, -1);
178
- tr.setSelection(nodeRangeSelection);
179
- view.dispatch(tr);
180
- return true;
181
- }
182
- const nodeRangeSelection = selection.extendBackwards();
183
- tr.setSelection(nodeRangeSelection);
184
- view.dispatch(tr);
185
- return true;
186
- },
187
- // extend NodeRangeSelection downwards
188
- 'Shift-ArrowDown': ({ editor }) => {
189
- const { depth } = this.options;
190
- const { view, state } = editor;
191
- const { doc, selection, tr } = state;
192
- const { anchor, head } = selection;
193
- if (!isNodeRangeSelection(selection)) {
194
- const nodeRangeSelection = NodeRangeSelection.create(doc, anchor, head, depth);
195
- tr.setSelection(nodeRangeSelection);
196
- view.dispatch(tr);
197
- return true;
198
- }
199
- const nodeRangeSelection = selection.extendForwards();
200
- tr.setSelection(nodeRangeSelection);
201
- view.dispatch(tr);
202
- return true;
203
- },
204
- // add `NodeRangeSelection` to all nodes
205
- 'Mod-a': ({ editor }) => {
206
- const { depth } = this.options;
207
- const { view, state } = editor;
208
- const { doc, tr } = state;
209
- const nodeRangeSelection = NodeRangeSelection.create(doc, 0, doc.content.size, depth);
210
- tr.setSelection(nodeRangeSelection);
211
- view.dispatch(tr);
212
- return true;
213
- },
214
- };
215
- },
216
- onSelectionUpdate() {
217
- const { selection } = this.editor.state;
218
- if (isNodeRangeSelection(selection)) {
219
- this.editor.view.dom.classList.add('ProseMirror-noderangeselection');
154
+ // src/node-range.ts
155
+ var NodeRange2 = Extension.create({
156
+ name: "nodeRange",
157
+ addOptions() {
158
+ return {
159
+ depth: void 0,
160
+ key: "Mod"
161
+ };
162
+ },
163
+ addKeyboardShortcuts() {
164
+ return {
165
+ // extend NodeRangeSelection upwards
166
+ "Shift-ArrowUp": ({ editor }) => {
167
+ const { depth } = this.options;
168
+ const { view, state } = editor;
169
+ const { doc, selection, tr } = state;
170
+ const { anchor, head } = selection;
171
+ if (!isNodeRangeSelection(selection)) {
172
+ const nodeRangeSelection2 = NodeRangeSelection.create(doc, anchor, head, depth, -1);
173
+ tr.setSelection(nodeRangeSelection2);
174
+ view.dispatch(tr);
175
+ return true;
220
176
  }
221
- },
222
- addProseMirrorPlugins() {
223
- let hideTextSelection = false;
224
- let activeMouseSelection = false;
225
- return [
226
- new Plugin({
227
- key: new PluginKey('nodeRange'),
228
- props: {
229
- attributes: () => {
230
- if (hideTextSelection) {
231
- return {
232
- class: 'ProseMirror-noderangeselection',
233
- };
234
- }
235
- return { class: '' };
236
- },
237
- handleDOMEvents: {
238
- mousedown: (view, event) => {
239
- const { key } = this.options;
240
- const isMac = /Mac/.test(navigator.platform);
241
- const isShift = !!event.shiftKey;
242
- const isControl = !!event.ctrlKey;
243
- const isAlt = !!event.altKey;
244
- const isMeta = !!event.metaKey;
245
- const isMod = isMac
246
- ? isMeta
247
- : isControl;
248
- if (key === null
249
- || key === undefined
250
- || (key === 'Shift' && isShift)
251
- || (key === 'Control' && isControl)
252
- || (key === 'Alt' && isAlt)
253
- || (key === 'Meta' && isMeta)
254
- || (key === 'Mod' && isMod)) {
255
- activeMouseSelection = true;
256
- }
257
- if (!activeMouseSelection) {
258
- return false;
259
- }
260
- document.addEventListener('mouseup', () => {
261
- activeMouseSelection = false;
262
- const { state } = view;
263
- const { doc, selection, tr } = state;
264
- const { $anchor, $head } = selection;
265
- if ($anchor.sameParent($head)) {
266
- return;
267
- }
268
- const nodeRangeSelection = NodeRangeSelection.create(doc, $anchor.pos, $head.pos, this.options.depth);
269
- tr.setSelection(nodeRangeSelection);
270
- view.dispatch(tr);
271
- }, { once: true });
272
- return false;
273
- },
274
- },
275
- // when selecting some text we want to render some decorations
276
- // to preview a `NodeRangeSelection`
277
- decorations: state => {
278
- const { selection } = state;
279
- const isNodeRange = isNodeRangeSelection(selection);
280
- hideTextSelection = false;
281
- if (!activeMouseSelection) {
282
- if (!isNodeRange) {
283
- return null;
284
- }
285
- hideTextSelection = true;
286
- return getNodeRangeDecorations(selection.ranges);
287
- }
288
- const { $from, $to } = selection;
289
- // selection is probably in the same node like a paragraph
290
- // so we don’t render decorations and show
291
- // a simple text selection instead
292
- if (!isNodeRange && $from.sameParent($to)) {
293
- return null;
294
- }
295
- // try to calculate some node ranges
296
- const nodeRanges = getSelectionRanges($from, $to, this.options.depth);
297
- if (!nodeRanges.length) {
298
- return null;
299
- }
300
- hideTextSelection = true;
301
- return getNodeRangeDecorations(nodeRanges);
302
- },
177
+ const nodeRangeSelection = selection.extendBackwards();
178
+ tr.setSelection(nodeRangeSelection);
179
+ view.dispatch(tr);
180
+ return true;
181
+ },
182
+ // extend NodeRangeSelection downwards
183
+ "Shift-ArrowDown": ({ editor }) => {
184
+ const { depth } = this.options;
185
+ const { view, state } = editor;
186
+ const { doc, selection, tr } = state;
187
+ const { anchor, head } = selection;
188
+ if (!isNodeRangeSelection(selection)) {
189
+ const nodeRangeSelection2 = NodeRangeSelection.create(doc, anchor, head, depth);
190
+ tr.setSelection(nodeRangeSelection2);
191
+ view.dispatch(tr);
192
+ return true;
193
+ }
194
+ const nodeRangeSelection = selection.extendForwards();
195
+ tr.setSelection(nodeRangeSelection);
196
+ view.dispatch(tr);
197
+ return true;
198
+ },
199
+ // add `NodeRangeSelection` to all nodes
200
+ "Mod-a": ({ editor }) => {
201
+ const { depth } = this.options;
202
+ const { view, state } = editor;
203
+ const { doc, tr } = state;
204
+ const nodeRangeSelection = NodeRangeSelection.create(doc, 0, doc.content.size, depth);
205
+ tr.setSelection(nodeRangeSelection);
206
+ view.dispatch(tr);
207
+ return true;
208
+ }
209
+ };
210
+ },
211
+ onSelectionUpdate() {
212
+ const { selection } = this.editor.state;
213
+ if (isNodeRangeSelection(selection)) {
214
+ this.editor.view.dom.classList.add("ProseMirror-noderangeselection");
215
+ }
216
+ },
217
+ addProseMirrorPlugins() {
218
+ let hideTextSelection = false;
219
+ let activeMouseSelection = false;
220
+ return [
221
+ new Plugin({
222
+ key: new PluginKey("nodeRange"),
223
+ props: {
224
+ attributes: () => {
225
+ if (hideTextSelection) {
226
+ return {
227
+ class: "ProseMirror-noderangeselection"
228
+ };
229
+ }
230
+ return { class: "" };
231
+ },
232
+ handleDOMEvents: {
233
+ mousedown: (view, event) => {
234
+ const { key } = this.options;
235
+ const isMac = /Mac/.test(navigator.platform);
236
+ const isShift = !!event.shiftKey;
237
+ const isControl = !!event.ctrlKey;
238
+ const isAlt = !!event.altKey;
239
+ const isMeta = !!event.metaKey;
240
+ const isMod = isMac ? isMeta : isControl;
241
+ if (key === null || key === void 0 || key === "Shift" && isShift || key === "Control" && isControl || key === "Alt" && isAlt || key === "Meta" && isMeta || key === "Mod" && isMod) {
242
+ activeMouseSelection = true;
243
+ }
244
+ if (!activeMouseSelection) {
245
+ return false;
246
+ }
247
+ document.addEventListener(
248
+ "mouseup",
249
+ () => {
250
+ activeMouseSelection = false;
251
+ const { state } = view;
252
+ const { doc, selection, tr } = state;
253
+ const { $anchor, $head } = selection;
254
+ if ($anchor.sameParent($head)) {
255
+ return;
256
+ }
257
+ const nodeRangeSelection = NodeRangeSelection.create(doc, $anchor.pos, $head.pos, this.options.depth);
258
+ tr.setSelection(nodeRangeSelection);
259
+ view.dispatch(tr);
303
260
  },
304
- }),
305
- ];
306
- },
261
+ { once: true }
262
+ );
263
+ return false;
264
+ }
265
+ },
266
+ // when selecting some text we want to render some decorations
267
+ // to preview a `NodeRangeSelection`
268
+ decorations: (state) => {
269
+ const { selection } = state;
270
+ const isNodeRange = isNodeRangeSelection(selection);
271
+ hideTextSelection = false;
272
+ if (!activeMouseSelection) {
273
+ if (!isNodeRange) {
274
+ return null;
275
+ }
276
+ hideTextSelection = true;
277
+ return getNodeRangeDecorations(selection.ranges);
278
+ }
279
+ const { $from, $to } = selection;
280
+ if (!isNodeRange && $from.sameParent($to)) {
281
+ return null;
282
+ }
283
+ const nodeRanges = getSelectionRanges($from, $to, this.options.depth);
284
+ if (!nodeRanges.length) {
285
+ return null;
286
+ }
287
+ hideTextSelection = true;
288
+ return getNodeRangeDecorations(nodeRanges);
289
+ }
290
+ }
291
+ })
292
+ ];
293
+ }
307
294
  });
308
295
 
309
- export { NodeRange, NodeRangeSelection, NodeRange as default, getNodeRangeDecorations, getSelectionRanges, isNodeRangeSelection };
310
- //# sourceMappingURL=index.js.map
296
+ // src/index.ts
297
+ var index_default = NodeRange2;
298
+ export {
299
+ NodeRange2 as NodeRange,
300
+ NodeRangeSelection,
301
+ index_default as default,
302
+ getNodeRangeDecorations,
303
+ getSelectionRanges,
304
+ isNodeRangeSelection
305
+ };
306
+ //# sourceMappingURL=index.js.map