editate 0.6.0 → 0.6.2
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/lib/commands.d.ts +3 -3
- package/lib/editor.d.ts +19 -4
- package/lib/index.cjs +214 -190
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +241 -209
- package/lib/index.js.map +1 -1
- package/lib/plugins/history.d.ts +17 -1
- package/lib/plugins/index.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -9,41 +9,34 @@ const t = ([t, e]) => t > e ? [ e, t ] : [ t, e ], e = ([t, e]) => t === e, n =
|
|
|
9
9
|
...e,
|
|
10
10
|
text: t
|
|
11
11
|
} ]
|
|
12
|
-
})), f = "delete", u = "insert_text", d = "insert_node", p = "set_attr", y = "set_node_attr", h = t => "text" in t, g = t => "children" in t,
|
|
12
|
+
})), f = "delete", u = "insert_text", d = "insert_node", p = "set_attr", y = "set_node_attr", h = t => "text" in t, g = t => "children" in t, _ = (t, e) => {
|
|
13
13
|
const n = r(t);
|
|
14
14
|
return n.length === r(e).length && n.every(n => n in e && ("text" === n || o(t[n], e[n])));
|
|
15
|
-
},
|
|
15
|
+
}, k = new WeakMap, b = ({children: t}, e = 0, n = t.length) => {
|
|
16
16
|
let r = 0, o = 0;
|
|
17
17
|
for (let c = e; c < n; c++) {
|
|
18
18
|
const e = t[c];
|
|
19
|
-
r +=
|
|
19
|
+
r += x(e), 0 !== o && g(e) && r++, o++;
|
|
20
20
|
}
|
|
21
21
|
return r;
|
|
22
|
-
},
|
|
22
|
+
}, x = t => {
|
|
23
23
|
if (g(t)) {
|
|
24
|
-
let e =
|
|
25
|
-
return null == e &&
|
|
24
|
+
let e = k.get(t);
|
|
25
|
+
return null == e && k.set(t, e = b(t)), e;
|
|
26
26
|
}
|
|
27
27
|
return h(t) ? t.text.length : 1;
|
|
28
28
|
}, m = (t, [e, n]) => {
|
|
29
29
|
let r = 0;
|
|
30
|
-
for (const n of e) r +=
|
|
30
|
+
for (const n of e) r += b(t, 0, n), 0 !== n && r++, t = t.children[n];
|
|
31
31
|
return r + n;
|
|
32
|
-
},
|
|
33
|
-
const n =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!r) break;
|
|
37
|
-
const o = r.t, c = r.o;
|
|
38
|
-
if (!g(c)) break;
|
|
39
|
-
e = r.i, n.push(o), t = c;
|
|
40
|
-
}
|
|
41
|
-
return [ n, e ];
|
|
42
|
-
}, v = (t, [e, n]) => [ m(t, e), m(t, n) ], M = (t, [e, n]) => [ w(t, e), w(t, n) ], S = (t, e = 0, n = t.length - 1) => {
|
|
32
|
+
}, v = (t, e) => {
|
|
33
|
+
const n = I(t, e);
|
|
34
|
+
return [ n.t, n.o ];
|
|
35
|
+
}, w = (t, [e, n]) => [ m(t, e), m(t, n) ], M = (t, [e, n]) => [ v(t, e), v(t, n) ], S = (t, e = 0, n = t.length - 1) => {
|
|
43
36
|
let r = e + 1;
|
|
44
37
|
for (;r <= n; ) {
|
|
45
38
|
const e = t[r - 1], o = t[r];
|
|
46
|
-
h(e) && h(o) &&
|
|
39
|
+
h(e) && h(o) && _(e, o) ? (t[r - 1] = {
|
|
47
40
|
...e,
|
|
48
41
|
text: e.text + o.text
|
|
49
42
|
}, t.splice(r, 1), n--) : r++;
|
|
@@ -69,21 +62,35 @@ const t = ([t, e]) => t > e ? [ e, t ] : [ t, e ], e = ([t, e]) => t === e, n =
|
|
|
69
62
|
}), A = ({children: t}, e) => {
|
|
70
63
|
for (let n = 0; n < t.length; n++) {
|
|
71
64
|
const r = t[n];
|
|
72
|
-
let o =
|
|
65
|
+
let o = x(r);
|
|
73
66
|
if (g(r) && o++, o > e) return {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
i: r,
|
|
68
|
+
l: n,
|
|
69
|
+
o: e
|
|
77
70
|
};
|
|
78
71
|
e -= o;
|
|
79
72
|
}
|
|
80
73
|
return null;
|
|
81
74
|
}, I = (t, e) => {
|
|
75
|
+
const n = [];
|
|
76
|
+
for (;t; ) {
|
|
77
|
+
const r = A(t, e);
|
|
78
|
+
if (!r) break;
|
|
79
|
+
const o = r.i;
|
|
80
|
+
if (!g(o)) break;
|
|
81
|
+
e = r.o, t = o, n.push(r.l);
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
i: t,
|
|
85
|
+
t: n,
|
|
86
|
+
o: e
|
|
87
|
+
};
|
|
88
|
+
}, P = (t, e) => {
|
|
82
89
|
const n = t.children, r = A(t, e);
|
|
83
90
|
if (r) {
|
|
84
|
-
const {
|
|
91
|
+
const {i: e, o, l: c} = r;
|
|
85
92
|
if (g(e)) {
|
|
86
|
-
const [r, s] =
|
|
93
|
+
const [r, s] = P(e, o), i = n.slice(0, c), a = n.slice(c + 1);
|
|
87
94
|
return i.push(r), a.unshift(s), [ {
|
|
88
95
|
...t,
|
|
89
96
|
children: i
|
|
@@ -117,9 +124,6 @@ const t = ([t, e]) => t > e ? [ e, t ] : [ t, e ], e = ([t, e]) => t === e, n =
|
|
|
117
124
|
...t,
|
|
118
125
|
children: []
|
|
119
126
|
} ];
|
|
120
|
-
}, P = (t, e) => {
|
|
121
|
-
for (let n = 0; n < e.length; n++) t = t.children[e[n]];
|
|
122
|
-
return t;
|
|
123
127
|
}, C = (t, e, n, r = 0) => {
|
|
124
128
|
if (r < e.length) {
|
|
125
129
|
const o = e[r];
|
|
@@ -133,12 +137,12 @@ const t = ([t, e]) => t > e ? [ e, t ] : [ t, e ], e = ([t, e]) => t === e, n =
|
|
|
133
137
|
}
|
|
134
138
|
return n;
|
|
135
139
|
}, H = (t, e, n, r) => {
|
|
136
|
-
const [o, c] =
|
|
140
|
+
const [o, c] = P(t, e), s = e < n ? P(t, n)[1] : c, i = o.children.slice();
|
|
137
141
|
return E(i, r, D), E(i, s.children, D), {
|
|
138
142
|
...t,
|
|
139
143
|
children: i
|
|
140
144
|
};
|
|
141
|
-
}, R = (t, e, n) => e >= n ? [] :
|
|
145
|
+
}, R = (t, e, n) => e >= n ? [] : P(P(t, n)[0], e)[1].children, B = (t, e) => e >= 0 && e <= x(t), N = (t, e) => e.reduce((t, e) => V(t, e), t), V = (t, e) => {
|
|
142
146
|
switch (e.type) {
|
|
143
147
|
case f:
|
|
144
148
|
{
|
|
@@ -157,16 +161,16 @@ const t = ([t, e]) => t > e ? [ e, t ] : [ t, e ], e = ([t, e]) => t === e, n =
|
|
|
157
161
|
case d:
|
|
158
162
|
{
|
|
159
163
|
const {at: n, fragment: r} = e;
|
|
160
|
-
if (t >= n) return t +
|
|
164
|
+
if (t >= n) return t + x({
|
|
161
165
|
children: r
|
|
162
166
|
});
|
|
163
167
|
break;
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
170
|
return t;
|
|
167
|
-
},
|
|
171
|
+
}, F = ([t, e], n) => [ V(t, n), V(e, n) ];
|
|
168
172
|
|
|
169
|
-
function
|
|
173
|
+
function L(e, n = t(e.selection)) {
|
|
170
174
|
e.apply({
|
|
171
175
|
type: "delete",
|
|
172
176
|
range: n
|
|
@@ -181,7 +185,7 @@ function T(t, e, n = t.selection[0]) {
|
|
|
181
185
|
});
|
|
182
186
|
}
|
|
183
187
|
|
|
184
|
-
function
|
|
188
|
+
function W(t, e, n = t.selection[0]) {
|
|
185
189
|
t.apply({
|
|
186
190
|
type: "insert_node",
|
|
187
191
|
at: n,
|
|
@@ -191,7 +195,7 @@ function q(t, e, n = t.selection[0]) {
|
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
197
|
|
|
194
|
-
function
|
|
198
|
+
function q(e, n) {
|
|
195
199
|
const r = t(e.selection);
|
|
196
200
|
e.apply({
|
|
197
201
|
type: "delete",
|
|
@@ -203,10 +207,10 @@ function J(e, n) {
|
|
|
203
207
|
});
|
|
204
208
|
}
|
|
205
209
|
|
|
206
|
-
function
|
|
210
|
+
function J(t, e) {
|
|
207
211
|
t.apply({
|
|
208
212
|
type: "delete",
|
|
209
|
-
range: [ 0,
|
|
213
|
+
range: [ 0, x(t.doc) ]
|
|
210
214
|
}).apply({
|
|
211
215
|
type: "insert_node",
|
|
212
216
|
at: 0,
|
|
@@ -214,7 +218,7 @@ function U(t, e) {
|
|
|
214
218
|
});
|
|
215
219
|
}
|
|
216
220
|
|
|
217
|
-
function
|
|
221
|
+
function U(e, n, r, o = t(e.selection)) {
|
|
218
222
|
e.apply({
|
|
219
223
|
type: "set_attr",
|
|
220
224
|
range: o,
|
|
@@ -223,7 +227,7 @@ function G(e, n, r, o = t(e.selection)) {
|
|
|
223
227
|
});
|
|
224
228
|
}
|
|
225
229
|
|
|
226
|
-
function
|
|
230
|
+
function G(e, n, r = t(e.selection)) {
|
|
227
231
|
const o = R(e.doc, ...r).flatMap(t => t.children.filter(h));
|
|
228
232
|
o.length && e.apply({
|
|
229
233
|
type: "set_attr",
|
|
@@ -233,20 +237,21 @@ function W(e, n, r = t(e.selection)) {
|
|
|
233
237
|
});
|
|
234
238
|
}
|
|
235
239
|
|
|
236
|
-
function Z(t, e, n, r =
|
|
240
|
+
function Z(t, e, n, r = t.selection[0]) {
|
|
241
|
+
const {t: o} = I(t.doc, r);
|
|
237
242
|
t.apply({
|
|
238
243
|
type: "set_node_attr",
|
|
239
|
-
path:
|
|
244
|
+
path: o,
|
|
240
245
|
key: e,
|
|
241
246
|
value: n
|
|
242
247
|
});
|
|
243
248
|
}
|
|
244
249
|
|
|
245
|
-
function j(t, e, n, r, o =
|
|
246
|
-
const c =
|
|
250
|
+
function j(t, e, n, r, o = t.selection[0]) {
|
|
251
|
+
const {i: c, t: s} = I(t.doc, o);
|
|
247
252
|
t.apply({
|
|
248
253
|
type: "set_node_attr",
|
|
249
|
-
path:
|
|
254
|
+
path: s,
|
|
250
255
|
key: e,
|
|
251
256
|
value: c[e] === n ? r : n
|
|
252
257
|
});
|
|
@@ -264,8 +269,8 @@ const $ = t => 1 === t.nodeType, tt = t => 8 === t.nodeType, et = () => X, nt =
|
|
|
264
269
|
if (t) return Y = "\n" === t ? it() ? 3 : 6 : 1;
|
|
265
270
|
} else if ($(X)) {
|
|
266
271
|
if ("BR" === X.tagName) return Y = it() ? 3 : 5;
|
|
267
|
-
if (K.
|
|
268
|
-
if (K.
|
|
272
|
+
if (K.u(X)) return Y = 2;
|
|
273
|
+
if (K.p(X)) return Y = 4;
|
|
269
274
|
}
|
|
270
275
|
return Y = 0;
|
|
271
276
|
}, ot = () => (Y = null, X = z.nextNode()), ct = () => {
|
|
@@ -296,24 +301,24 @@ const $ = t => 1 === t.nodeType, tt = t => 8 === t.nodeType, et = () => X, nt =
|
|
|
296
301
|
const n = t.getRangeAt(0);
|
|
297
302
|
if (e.contains(n.commonAncestorContainer)) return n;
|
|
298
303
|
}
|
|
299
|
-
},
|
|
304
|
+
}, _t = (t, e, n, r) => {
|
|
300
305
|
const o = ht(t);
|
|
301
306
|
(n || gt(o, t)) && (o.removeAllRanges(), o.addRange(e), r && (o.collapseToEnd(),
|
|
302
307
|
o.extend(e.startContainer, e.startOffset)));
|
|
303
|
-
},
|
|
308
|
+
}, kt = (t, e, [n, r], o, c, s) => {
|
|
304
309
|
const i = 0 === o, a = o > 0, l = a ? r : n, f = a ? n : r;
|
|
305
310
|
if (0 === l[0].length && 0 === l[1] && i && !e.hasChildNodes()) {
|
|
306
311
|
const n = t.createRange();
|
|
307
|
-
return n.setStart(e, 0), n.setEnd(e, 0),
|
|
312
|
+
return n.setStart(e, 0), n.setEnd(e, 0), _t(e, n, s);
|
|
308
313
|
}
|
|
309
|
-
const u =
|
|
314
|
+
const u = bt(e, l, c);
|
|
310
315
|
if (!u) return;
|
|
311
|
-
const d = i ? u :
|
|
316
|
+
const d = i ? u : bt(e, f, c);
|
|
312
317
|
if (!d) return;
|
|
313
|
-
const p = t.createRange(), [y, h] = u, [g,
|
|
314
|
-
$(y) ? h < 1 ? p.setStartBefore(y) : p.setStartAfter(y) : p.setStart(y, h), $(g) ?
|
|
315
|
-
|
|
316
|
-
},
|
|
318
|
+
const p = t.createRange(), [y, h] = u, [g, _] = d;
|
|
319
|
+
$(y) ? h < 1 ? p.setStartBefore(y) : p.setStartAfter(y) : p.setStart(y, h), $(g) ? _ < 1 ? p.setEndBefore(g) : p.setEndAfter(g) : p.setEnd(g, _),
|
|
320
|
+
_t(e, p, s, a);
|
|
321
|
+
}, bt = (t, [e, n], r) => r(() => {
|
|
317
322
|
let t, r = 0;
|
|
318
323
|
for (;t = at(); ) if (4 === t) {
|
|
319
324
|
if (r < e.length) for (let t = e[r++]; t > 0; t--) ct();
|
|
@@ -322,7 +327,7 @@ const $ = t => 1 === t.nodeType, tt = t => 8 === t.nodeType, et = () => X, nt =
|
|
|
322
327
|
if (n <= t) return [ et(), n ];
|
|
323
328
|
n -= t;
|
|
324
329
|
}
|
|
325
|
-
}, t),
|
|
330
|
+
}, t), xt = (t, e, r, o) => {
|
|
326
331
|
let c = !0;
|
|
327
332
|
if (t === e && !e.hasChildNodes()) return [ [ 0 ], 0 ];
|
|
328
333
|
if ($(e) && e.hasChildNodes()) {
|
|
@@ -351,9 +356,9 @@ const $ = t => 1 === t.nodeType, tt = t => 8 === t.nodeType, et = () => X, nt =
|
|
|
351
356
|
return [ n, s + r ];
|
|
352
357
|
}, t, e);
|
|
353
358
|
}, mt = (t, e, {startOffset: n, startContainer: r, endOffset: o, endContainer: c}) => {
|
|
354
|
-
const s =
|
|
355
|
-
return [ s, r === c && n === o ? s :
|
|
356
|
-
},
|
|
359
|
+
const s = xt(t, r, n, e);
|
|
360
|
+
return [ s, r === c && n === o ? s : xt(t, c, o, e) ];
|
|
361
|
+
}, vt = "undefined" != typeof navigator && /Mac|iP(hone|od|ad)/.test(navigator.platform), wt = (t, e) => {
|
|
357
362
|
const n = t.endsWith("+"), r = (n ? t.slice(0, -2) : t).split("+"), o = n ? "+" : r.pop(), c = "Space" === o ? " " : o.toLowerCase();
|
|
358
363
|
let s = !1, i = !1, a = !1, l = !1;
|
|
359
364
|
return r.forEach(t => {
|
|
@@ -367,7 +372,7 @@ const $ = t => 1 === t.nodeType, tt = t => 8 === t.nodeType, et = () => X, nt =
|
|
|
367
372
|
break;
|
|
368
373
|
|
|
369
374
|
case "Mod":
|
|
370
|
-
|
|
375
|
+
vt ? a = !0 : i = !0;
|
|
371
376
|
break;
|
|
372
377
|
|
|
373
378
|
case "Alt":
|
|
@@ -385,7 +390,20 @@ const $ = t => 1 === t.nodeType, tt = t => 8 === t.nodeType, et = () => X, nt =
|
|
|
385
390
|
|
|
386
391
|
function Mt(t) {
|
|
387
392
|
let e = 0, n = 0, r = !1;
|
|
388
|
-
const c = Date.now, s = [ [ t.doc, t.selection, [] ] ], i = () => s[e]
|
|
393
|
+
const c = Date.now, s = [ [ t.doc, t.selection, [] ] ], i = () => s[e], a = () => e > 0, l = () => e < s.length - 1, f = () => {
|
|
394
|
+
if (a()) {
|
|
395
|
+
const n = i()[1];
|
|
396
|
+
e--;
|
|
397
|
+
const c = t.doc;
|
|
398
|
+
r = !0, t.exec(J, i()[0].children), r = !1, o(c, t.doc) || (t.selection = n);
|
|
399
|
+
}
|
|
400
|
+
}, u = () => {
|
|
401
|
+
if (l()) {
|
|
402
|
+
e++;
|
|
403
|
+
const [n, c, s] = i(), a = t.doc;
|
|
404
|
+
r = !0, t.exec(J, n.children), r = !1, o(a, t.doc) || (t.selection = [ N(c[0], s), N(c[1], s) ]);
|
|
405
|
+
}
|
|
406
|
+
};
|
|
389
407
|
t.hook("apply", (i, a) => {
|
|
390
408
|
if (r) return;
|
|
391
409
|
const l = t.doc, f = t.selection;
|
|
@@ -400,49 +418,57 @@ function Mt(t) {
|
|
|
400
418
|
}
|
|
401
419
|
n = t, s[e][0] = u, s[e][2].push(i), s.splice(e + 1), e > 500 && (e--, s.shift());
|
|
402
420
|
}
|
|
403
|
-
}), t.hook("keyboard",
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
421
|
+
}), t.hook("keyboard", wt("Mod+Z", f)), t.hook("keyboard", wt("Shift+Mod+Z", u)),
|
|
422
|
+
t.set(Mt, {
|
|
423
|
+
undo: f,
|
|
424
|
+
redo: u,
|
|
425
|
+
undoable: a,
|
|
426
|
+
redoable: l
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function St(t) {
|
|
431
|
+
t.get(Mt).undo();
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
function Dt(t) {
|
|
435
|
+
t.get(Mt).redo();
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function Et(t) {
|
|
439
|
+
return t.get(Mt).undoable();
|
|
417
440
|
}
|
|
418
441
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
442
|
+
function Ot(t) {
|
|
443
|
+
return t.get(Mt).redoable();
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
const At = [], It = () => {}, Pt = t => {
|
|
447
|
+
throw Error(t);
|
|
448
|
+
}, Ct = ({doc: n, readonly: r = !1, schema: a, isBlock: g = ft, onWarn: _ = console.warn, onError: k = Pt}) => {
|
|
449
|
+
let b = [ 0, 0 ];
|
|
450
|
+
const x = t => {
|
|
451
|
+
if (!a) return _("An unsafe operation was detected. We recommend using schema option."),
|
|
423
452
|
!0;
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
if (!
|
|
427
|
-
e
|
|
453
|
+
const e = a["~standard"].validate(t);
|
|
454
|
+
if (e instanceof Promise) k("async validate is not supported"); else {
|
|
455
|
+
if (!e.issues) return !0;
|
|
456
|
+
_(e.issues.map(t => t.message).join("\n"));
|
|
428
457
|
}
|
|
429
458
|
return !1;
|
|
430
459
|
};
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
b = t;
|
|
434
|
-
}) && b) throw Error(b);
|
|
435
|
-
const S = new Map, D = t => S.get(t) || St, E = new Map, O = t => {
|
|
460
|
+
a && !x(n) && k("Invalid document");
|
|
461
|
+
const v = new Map, S = new WeakMap, D = t => v.get(t) || At, E = new Map, O = t => {
|
|
436
462
|
const e = E.get(t);
|
|
437
463
|
e && !e[1] && (e[1] = !0, i(() => {
|
|
438
464
|
e[1] = !1, e[0].forEach(t => {
|
|
439
465
|
t();
|
|
440
466
|
});
|
|
441
467
|
}));
|
|
442
|
-
},
|
|
443
|
-
if (!r) if (Array.isArray(t)) for (const e of t)
|
|
468
|
+
}, P = t => {
|
|
469
|
+
if (!r) if (Array.isArray(t)) for (const e of t) V(e); else V(t);
|
|
444
470
|
return T;
|
|
445
|
-
},
|
|
471
|
+
}, V = t => {
|
|
446
472
|
const e = n, r = D("apply"), c = r.length;
|
|
447
473
|
let s = 0;
|
|
448
474
|
const i = () => {
|
|
@@ -457,7 +483,7 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
457
483
|
case f:
|
|
458
484
|
{
|
|
459
485
|
const [r, o] = n.range;
|
|
460
|
-
B(t, r) && B(t, o) && r < o && (t = H(t, r, o, []), e =
|
|
486
|
+
B(t, r) && B(t, o) && r < o && (t = H(t, r, o, []), e = F(e, n));
|
|
461
487
|
break;
|
|
462
488
|
}
|
|
463
489
|
|
|
@@ -465,13 +491,13 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
465
491
|
{
|
|
466
492
|
const {at: r, text: o} = n;
|
|
467
493
|
if (B(t, r) && o) {
|
|
468
|
-
const
|
|
469
|
-
let
|
|
470
|
-
if (
|
|
471
|
-
const t =
|
|
472
|
-
h(t) && (
|
|
494
|
+
const {i: c, o: s} = I(t, r), i = A(c, s - 1);
|
|
495
|
+
let a;
|
|
496
|
+
if (i) {
|
|
497
|
+
const t = i.i;
|
|
498
|
+
h(t) && (a = t);
|
|
473
499
|
}
|
|
474
|
-
t = H(t, r, r, l(o,
|
|
500
|
+
t = H(t, r, r, l(o, a, c)), e = F(e, n);
|
|
475
501
|
}
|
|
476
502
|
break;
|
|
477
503
|
}
|
|
@@ -479,7 +505,7 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
479
505
|
case d:
|
|
480
506
|
{
|
|
481
507
|
const {at: r, fragment: o} = n;
|
|
482
|
-
B(t, r) && o.length && (t = H(t, r, r, o), e =
|
|
508
|
+
B(t, r) && o.length && (t = H(t, r, r, o), e = F(e, n));
|
|
483
509
|
break;
|
|
484
510
|
}
|
|
485
511
|
|
|
@@ -498,7 +524,10 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
498
524
|
|
|
499
525
|
case y:
|
|
500
526
|
{
|
|
501
|
-
const {path: e, key: r, value: o} = n, c =
|
|
527
|
+
const {path: e, key: r, value: o} = n, c = ((t, e) => {
|
|
528
|
+
for (let n = 0; n < e.length; n++) t = t.children[e[n]];
|
|
529
|
+
return t;
|
|
530
|
+
})(t, e);
|
|
502
531
|
c && (t = C(t, e, {
|
|
503
532
|
...c,
|
|
504
533
|
[r]: o
|
|
@@ -507,28 +536,28 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
507
536
|
}
|
|
508
537
|
}
|
|
509
538
|
return [ t, e ];
|
|
510
|
-
})(n,
|
|
511
|
-
(({type: t}) => t === d || t === p || t === y)(t) && !
|
|
539
|
+
})(n, b, t);
|
|
540
|
+
(({type: t}) => t === d || t === p || t === y)(t) && !x(e) || (n = e, b = r);
|
|
512
541
|
} catch (t) {
|
|
513
|
-
|
|
542
|
+
_("rollback operation: " + t);
|
|
514
543
|
}
|
|
515
544
|
}
|
|
516
545
|
}, a = e => {
|
|
517
546
|
e && (t = e), s++, i();
|
|
518
547
|
};
|
|
519
548
|
i(), o(e, n) || O("change");
|
|
520
|
-
},
|
|
521
|
-
!((t, [e, n]) => B(t, e) && B(t, n))(n, t) ||
|
|
549
|
+
}, L = t => {
|
|
550
|
+
!((t, [e, n]) => B(t, e) && B(t, n))(n, t) || b[0] === t[0] && b[1] === t[1] || (b = t,
|
|
522
551
|
O("selectionchange"));
|
|
523
552
|
}, T = {
|
|
524
553
|
get doc() {
|
|
525
554
|
return n;
|
|
526
555
|
},
|
|
527
556
|
get selection() {
|
|
528
|
-
return
|
|
557
|
+
return b;
|
|
529
558
|
},
|
|
530
559
|
set selection(t) {
|
|
531
|
-
|
|
560
|
+
L(t);
|
|
532
561
|
},
|
|
533
562
|
get readonly() {
|
|
534
563
|
return r;
|
|
@@ -536,7 +565,7 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
536
565
|
set readonly(t) {
|
|
537
566
|
r = t, O("readonly");
|
|
538
567
|
},
|
|
539
|
-
apply:
|
|
568
|
+
apply: P,
|
|
540
569
|
on: (t, e) => {
|
|
541
570
|
let n = E.get(t);
|
|
542
571
|
n || E.set(t, n = [ new Set, !1 ]);
|
|
@@ -546,8 +575,8 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
546
575
|
};
|
|
547
576
|
},
|
|
548
577
|
hook: (t, e) => {
|
|
549
|
-
let n =
|
|
550
|
-
return n ||
|
|
578
|
+
let n = v.get(t);
|
|
579
|
+
return n || v.set(t, n = []), n.push(e), () => {
|
|
551
580
|
const t = n.indexOf(e);
|
|
552
581
|
-1 !== t && n.splice(t, 1);
|
|
553
582
|
};
|
|
@@ -556,17 +585,19 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
556
585
|
const n = t(T, ...e);
|
|
557
586
|
return void 0 === n ? T : n;
|
|
558
587
|
},
|
|
588
|
+
get: t => (S.has(t) || k("No value found for key"), S.get(t)),
|
|
589
|
+
set: (t, e) => (S.set(t, e), T),
|
|
559
590
|
input: o => {
|
|
560
|
-
if (!window.InputEvent || !s(InputEvent.prototype.getTargetRanges)) return
|
|
561
|
-
|
|
591
|
+
if (!window.InputEvent || !s(InputEvent.prototype.getTargetRanges)) return _("beforeinput event is not supported."),
|
|
592
|
+
It;
|
|
562
593
|
const {contentEditable: i, role: a, ariaMultiLine: l, ariaReadOnly: f} = o, u = o.style.whiteSpace;
|
|
563
594
|
o.role = "textbox", o.style.whiteSpace = "pre-wrap", o.ariaMultiLine = "true";
|
|
564
|
-
let d = !1, p = null, y = !1, h = !1,
|
|
565
|
-
const
|
|
595
|
+
let d = !1, p = null, y = !1, h = !1, k = !1;
|
|
596
|
+
const x = yt(o), v = (t => {
|
|
566
597
|
const e = (n, r, o) => {
|
|
567
598
|
const c = K, s = Q, i = z, a = X, l = Y;
|
|
568
599
|
try {
|
|
569
|
-
return z || (K = t, Q = e, z = K.
|
|
600
|
+
return z || (K = t, Q = e, z = K.h.createTreeWalker(r, 5)), o && (z.currentNode = X = o),
|
|
570
601
|
n();
|
|
571
602
|
} finally {
|
|
572
603
|
K = c, Q = s, z = i, X = a, Y = l, z && a && (z.currentNode = a);
|
|
@@ -574,9 +605,9 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
574
605
|
};
|
|
575
606
|
return e;
|
|
576
607
|
})({
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
608
|
+
h: x,
|
|
609
|
+
p: g,
|
|
610
|
+
u: dt
|
|
580
611
|
}), S = () => {
|
|
581
612
|
o.contentEditable = r ? "false" : "true", o.ariaReadOnly = r ? "true" : null;
|
|
582
613
|
};
|
|
@@ -589,11 +620,11 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
589
620
|
});
|
|
590
621
|
}), O = T.on("readonly", S), A = t => {
|
|
591
622
|
for (const e of D("paste")) {
|
|
592
|
-
const n = e(t,
|
|
623
|
+
const n = e(t, v);
|
|
593
624
|
if (n) return n;
|
|
594
625
|
}
|
|
595
|
-
|
|
596
|
-
},
|
|
626
|
+
_("failed to serialize pasted data");
|
|
627
|
+
}, I = ((t, e) => {
|
|
597
628
|
let n = !1;
|
|
598
629
|
const r = [], o = t => {
|
|
599
630
|
n && r.push(...t);
|
|
@@ -608,7 +639,7 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
608
639
|
childList: !0,
|
|
609
640
|
subtree: !0
|
|
610
641
|
}), {
|
|
611
|
-
|
|
642
|
+
_: t => {
|
|
612
643
|
let e;
|
|
613
644
|
for (;e = t.pop(); ) if ("childList" === e.type) {
|
|
614
645
|
const {target: t, removedNodes: n, addedNodes: r, nextSibling: o} = e;
|
|
@@ -620,43 +651,43 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
620
651
|
k: t => {
|
|
621
652
|
!n && t && s(), n = t;
|
|
622
653
|
},
|
|
623
|
-
|
|
624
|
-
|
|
654
|
+
m: i,
|
|
655
|
+
v: () => {
|
|
625
656
|
r.splice(0), c.disconnect();
|
|
626
657
|
}
|
|
627
658
|
};
|
|
628
659
|
})(o, () => {
|
|
629
|
-
|
|
660
|
+
kt(x, o, M(n, b), b[0] - b[1], v);
|
|
630
661
|
}), C = () => {
|
|
631
|
-
|
|
662
|
+
L(w(n, ((t, e) => {
|
|
632
663
|
const n = ht(t), r = gt(n, t);
|
|
633
664
|
if (!r) return [ [ [ 0 ], 0 ], [ [ 0 ], 0 ] ];
|
|
634
665
|
const o = mt(t, e, r), c = pt(n.anchorNode, n.focusNode);
|
|
635
666
|
return (0 === c ? n.anchorOffset > n.focusOffset : 2 & c) ? [ o[1], o[0] ] : o;
|
|
636
|
-
})(o,
|
|
667
|
+
})(o, v)));
|
|
637
668
|
}, H = () => {
|
|
638
|
-
const t =
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
},
|
|
642
|
-
if (!y) for (const e of D("keyboard")) if (e(t)) return t.preventDefault(), void
|
|
643
|
-
},
|
|
669
|
+
const t = I.m();
|
|
670
|
+
I.k(!1), t.length && (I._(t), x.removeEventListener("selectionchange", U), kt(x, o, M(n, b), b[0] - b[1], v, !0),
|
|
671
|
+
x.addEventListener("selectionchange", U)), p && (L(p[1]), P(p[0]), p = null), y = !1;
|
|
672
|
+
}, R = t => {
|
|
673
|
+
if (!y) for (const e of D("keyboard")) if (e(t)) return t.preventDefault(), void I.k(!1);
|
|
674
|
+
}, B = () => {
|
|
644
675
|
y || H();
|
|
645
|
-
},
|
|
676
|
+
}, V = t => {
|
|
646
677
|
t.preventDefault();
|
|
647
678
|
const r = t.inputType;
|
|
648
679
|
if (r.startsWith("format")) return;
|
|
649
680
|
if ("historyUndo" === r || "historyRedo" === r) return;
|
|
650
|
-
y ?
|
|
681
|
+
y ? I.k(!0) : C();
|
|
651
682
|
const c = t.getTargetRanges()[0];
|
|
652
683
|
if (c) {
|
|
653
|
-
const s =
|
|
684
|
+
const s = w(n, mt(o, v, c));
|
|
654
685
|
let i, a = "insertParagraph" === r || "insertLineBreak" === r ? "\n" : t.data;
|
|
655
686
|
if (null == a) {
|
|
656
687
|
const e = t.dataTransfer;
|
|
657
688
|
e && (a = e.getData("text/plain"));
|
|
658
689
|
}
|
|
659
|
-
p || (p = [ [],
|
|
690
|
+
p || (p = [ [], b ]), i = p[0], e(s) || i.push({
|
|
660
691
|
type: "delete",
|
|
661
692
|
range: s
|
|
662
693
|
}), a && i.push({
|
|
@@ -666,33 +697,30 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
666
697
|
});
|
|
667
698
|
}
|
|
668
699
|
y || H();
|
|
669
|
-
},
|
|
700
|
+
}, F = () => {
|
|
670
701
|
y || C(), y = !0;
|
|
671
|
-
},
|
|
702
|
+
}, W = () => {
|
|
672
703
|
H();
|
|
673
|
-
},
|
|
704
|
+
}, q = () => {
|
|
674
705
|
h = !0, C();
|
|
675
|
-
},
|
|
706
|
+
}, J = () => {
|
|
676
707
|
h = !1;
|
|
677
|
-
},
|
|
678
|
-
!h || y ||
|
|
679
|
-
},
|
|
680
|
-
if (C(), !e(
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
t.preventDefault(), Z(t.clipboardData);
|
|
686
|
-
}, $ = e => {
|
|
687
|
-
e.preventDefault(), r || (Z(e.clipboardData), I({
|
|
708
|
+
}, U = () => {
|
|
709
|
+
!h || y || k || C();
|
|
710
|
+
}, G = t => {
|
|
711
|
+
if (C(), !e(b)) for (const e of D("copy")) e(t);
|
|
712
|
+
}, Z = t => {
|
|
713
|
+
t.preventDefault(), G(t.clipboardData);
|
|
714
|
+
}, j = e => {
|
|
715
|
+
e.preventDefault(), r || (G(e.clipboardData), P({
|
|
688
716
|
type: "delete",
|
|
689
|
-
range: t(
|
|
717
|
+
range: t(b)
|
|
690
718
|
}));
|
|
691
|
-
},
|
|
719
|
+
}, $ = e => {
|
|
692
720
|
e.preventDefault();
|
|
693
721
|
const n = A(e.clipboardData);
|
|
694
722
|
if (n) {
|
|
695
|
-
const e = t(
|
|
723
|
+
const e = t(b), r = e[0], o = [ {
|
|
696
724
|
type: "delete",
|
|
697
725
|
range: e
|
|
698
726
|
} ];
|
|
@@ -704,29 +732,29 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
704
732
|
type: "insert_node",
|
|
705
733
|
at: r,
|
|
706
734
|
fragment: n
|
|
707
|
-
}),
|
|
735
|
+
}), P(o);
|
|
708
736
|
}
|
|
709
|
-
},
|
|
737
|
+
}, tt = e => {
|
|
710
738
|
e.preventDefault();
|
|
711
739
|
const r = e.dataTransfer, s = ((t, e, {clientX: n, clientY: r}, o) => {
|
|
712
740
|
if (t.caretPositionFromPoint) {
|
|
713
741
|
const c = t.caretPositionFromPoint(n, r);
|
|
714
|
-
if (c) return
|
|
742
|
+
if (c) return xt(e, c.offsetNode, c.offset, o);
|
|
715
743
|
} else if (t.caretRangeFromPoint) {
|
|
716
744
|
const c = t.caretRangeFromPoint(n, r);
|
|
717
|
-
if (c) return
|
|
745
|
+
if (c) return xt(e, c.startContainer, c.startOffset, o);
|
|
718
746
|
}
|
|
719
|
-
})(
|
|
747
|
+
})(x, o, e, v);
|
|
720
748
|
if (r && s) {
|
|
721
749
|
let e;
|
|
722
750
|
const o = [];
|
|
723
|
-
|
|
751
|
+
k && o.push({
|
|
724
752
|
type: "delete",
|
|
725
|
-
range: t(
|
|
753
|
+
range: t(b)
|
|
726
754
|
});
|
|
727
755
|
const i = A(r);
|
|
728
756
|
if (i) {
|
|
729
|
-
const t = m(n, s), r =
|
|
757
|
+
const t = m(n, s), r = N(t, o);
|
|
730
758
|
o.push(c(i) ? {
|
|
731
759
|
type: "insert_text",
|
|
732
760
|
at: r,
|
|
@@ -735,39 +763,39 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
735
763
|
type: "insert_node",
|
|
736
764
|
at: r,
|
|
737
765
|
fragment: i
|
|
738
|
-
}), e = [ r,
|
|
766
|
+
}), e = [ r, N(t, o) ];
|
|
739
767
|
}
|
|
740
|
-
|
|
768
|
+
P(o), e && L(e);
|
|
741
769
|
}
|
|
742
|
-
},
|
|
743
|
-
|
|
744
|
-
},
|
|
745
|
-
|
|
770
|
+
}, et = t => {
|
|
771
|
+
k = !0, G(t.dataTransfer);
|
|
772
|
+
}, nt = () => {
|
|
773
|
+
k = !1;
|
|
746
774
|
};
|
|
747
|
-
|
|
748
|
-
o.addEventListener("beforeinput",
|
|
749
|
-
o.addEventListener("compositionend",
|
|
750
|
-
o.addEventListener("copy",
|
|
751
|
-
o.addEventListener("drop",
|
|
752
|
-
const
|
|
775
|
+
x.addEventListener("selectionchange", U), o.addEventListener("keydown", R), o.addEventListener("input", B),
|
|
776
|
+
o.addEventListener("beforeinput", V), o.addEventListener("compositionstart", F),
|
|
777
|
+
o.addEventListener("compositionend", W), o.addEventListener("focus", q), o.addEventListener("blur", J),
|
|
778
|
+
o.addEventListener("copy", Z), o.addEventListener("cut", j), o.addEventListener("paste", $),
|
|
779
|
+
o.addEventListener("drop", tt), o.addEventListener("dragstart", et), o.addEventListener("dragend", nt);
|
|
780
|
+
const rt = [];
|
|
753
781
|
return D("mount").forEach(t => {
|
|
754
782
|
const e = t(o);
|
|
755
|
-
e &&
|
|
783
|
+
e && rt.push(e);
|
|
756
784
|
}), () => {
|
|
757
785
|
d || (d = !0, E(), O(), o.contentEditable = i, o.role = a, o.ariaMultiLine = l,
|
|
758
|
-
o.ariaReadOnly = f, o.style.whiteSpace = u,
|
|
759
|
-
o.removeEventListener("keydown",
|
|
760
|
-
o.removeEventListener("compositionstart",
|
|
761
|
-
o.removeEventListener("focus",
|
|
762
|
-
o.removeEventListener("cut",
|
|
763
|
-
o.removeEventListener("dragstart",
|
|
786
|
+
o.ariaReadOnly = f, o.style.whiteSpace = u, I.v(), x.removeEventListener("selectionchange", U),
|
|
787
|
+
o.removeEventListener("keydown", R), o.removeEventListener("input", B), o.removeEventListener("beforeinput", V),
|
|
788
|
+
o.removeEventListener("compositionstart", F), o.removeEventListener("compositionend", W),
|
|
789
|
+
o.removeEventListener("focus", q), o.removeEventListener("blur", J), o.removeEventListener("copy", Z),
|
|
790
|
+
o.removeEventListener("cut", j), o.removeEventListener("paste", $), o.removeEventListener("drop", tt),
|
|
791
|
+
o.removeEventListener("dragstart", et), o.removeEventListener("dragend", nt), rt.forEach(t => {
|
|
764
792
|
t();
|
|
765
793
|
}));
|
|
766
794
|
};
|
|
767
795
|
}
|
|
768
796
|
};
|
|
769
797
|
return T.exec(Mt), T;
|
|
770
|
-
},
|
|
798
|
+
}, Ht = (t, e) => {
|
|
771
799
|
t.hook("paste", t => {
|
|
772
800
|
for (const n of t.items) if ("file" === n.kind) {
|
|
773
801
|
const t = e[n.type];
|
|
@@ -782,19 +810,23 @@ const St = [], Dt = () => {}, Et = ({doc: n, readonly: r = !1, schema: a, isBloc
|
|
|
782
810
|
});
|
|
783
811
|
};
|
|
784
812
|
|
|
785
|
-
function
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
children: e
|
|
790
|
-
},
|
|
791
|
-
}),
|
|
813
|
+
function Rt(e, n) {
|
|
814
|
+
const r = n && n.serializer;
|
|
815
|
+
e.hook("copy", n => {
|
|
816
|
+
n.setData("text/plain", a({
|
|
817
|
+
children: R(e.doc, ...t(e.selection))
|
|
818
|
+
}, r));
|
|
819
|
+
}), e.hook("paste", t => t.getData("text/plain"));
|
|
792
820
|
}
|
|
793
821
|
|
|
794
|
-
function
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
822
|
+
function Bt(t, e) {
|
|
823
|
+
let n = null;
|
|
824
|
+
t.hook("mount", t => (n = t, () => {
|
|
825
|
+
n = null;
|
|
826
|
+
})), t.hook("copy", t => {
|
|
827
|
+
if (!n) return;
|
|
828
|
+
const e = document.createElement("div");
|
|
829
|
+
e.appendChild(gt(ht(n), n).cloneContents()), t.setData("text/html", e.innerHTML);
|
|
798
830
|
}), t.hook("paste", ((t, e = []) => (n, r) => {
|
|
799
831
|
const o = n.getData("text/html");
|
|
800
832
|
if (o) {
|
|
@@ -829,21 +861,21 @@ function It(t, e) {
|
|
|
829
861
|
})(e.serializeText, e.serializers));
|
|
830
862
|
}
|
|
831
863
|
|
|
832
|
-
const
|
|
864
|
+
const Nt = "application/x-editate-editor";
|
|
833
865
|
|
|
834
|
-
function
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
}),
|
|
866
|
+
function Vt(e) {
|
|
867
|
+
e.hook("copy", n => {
|
|
868
|
+
n.setData(Nt, JSON.stringify(R(e.doc, ...t(e.selection))));
|
|
869
|
+
}), e.hook("paste", t => {
|
|
838
870
|
try {
|
|
839
|
-
return JSON.parse(t.getData(
|
|
871
|
+
return JSON.parse(t.getData(Nt));
|
|
840
872
|
} catch (t) {
|
|
841
873
|
return null;
|
|
842
874
|
}
|
|
843
875
|
});
|
|
844
876
|
}
|
|
845
877
|
|
|
846
|
-
function
|
|
878
|
+
function Ft(t) {
|
|
847
879
|
t.hook("apply", t => {
|
|
848
880
|
console.log("apply", t);
|
|
849
881
|
}), t.on("change", () => {
|
|
@@ -853,16 +885,16 @@ function Ht(t) {
|
|
|
853
885
|
});
|
|
854
886
|
}
|
|
855
887
|
|
|
856
|
-
function
|
|
888
|
+
function Lt(t, e) {
|
|
857
889
|
r(e).forEach(n => {
|
|
858
890
|
const r = e[n];
|
|
859
|
-
t.hook("keyboard",
|
|
891
|
+
t.hook("keyboard", wt(n, () => {
|
|
860
892
|
r();
|
|
861
893
|
}));
|
|
862
894
|
});
|
|
863
895
|
}
|
|
864
896
|
|
|
865
|
-
function
|
|
897
|
+
function Tt(t) {
|
|
866
898
|
t.hook("mount", t => {
|
|
867
899
|
t.ariaMultiLine = null;
|
|
868
900
|
}), t.hook("apply", (t, e) => {
|
|
@@ -876,17 +908,17 @@ function Bt(t) {
|
|
|
876
908
|
});
|
|
877
909
|
}
|
|
878
910
|
|
|
879
|
-
const
|
|
880
|
-
const o =
|
|
911
|
+
const Wt = ({text: t, singleline: e, onChange: n, ...r}) => {
|
|
912
|
+
const o = Ct({
|
|
881
913
|
...r,
|
|
882
914
|
doc: {
|
|
883
915
|
children: l(t)
|
|
884
916
|
}
|
|
885
|
-
}).exec(
|
|
917
|
+
}).exec(Rt);
|
|
886
918
|
return o.on("change", () => {
|
|
887
919
|
n(a(o.doc));
|
|
888
|
-
}), e && o.exec(
|
|
920
|
+
}), e && o.exec(Tt), o;
|
|
889
921
|
};
|
|
890
922
|
|
|
891
|
-
export {
|
|
923
|
+
export { L as Delete, U as Format, W as InsertNode, T as InsertText, Dt as Redo, Ot as Redoable, J as ReplaceDoc, q as ReplaceText, Z as SetBlockAttr, j as ToggleBlockAttr, G as ToggleFormat, St as Undo, Et as Undoable, Ct as createEditor, Wt as createPlainEditor, Ft as debugPlugin, Ht as fileTransferPlugin, Bt as htmlTransferPlugin, Vt as internalTranferPlugin, Lt as keymapPlugin, Rt as plainTransferPlugin, Tt as singlelinePlugin };
|
|
892
924
|
//# sourceMappingURL=index.js.map
|