@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.6
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/browser/{DesignerIcon-DdfuH2jW.js → DesignerIcon-XKBRy_0Q.js} +640 -640
- package/dist/browser/createResourceDialog-Cf7QpXp6.js +505 -0
- package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
- package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
- package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
- package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
- package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
- package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
- package/dist/browser/dist-DxahK_I8.js +2688 -0
- package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
- package/dist/browser/{esm-C9jQK70n.js → esm-CTcBY7hh.js} +5 -6
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +2 -2
- package/dist/browser/flow-authoring.js +475 -209
- package/dist/browser/flow-change.d.ts +98 -8
- package/dist/browser/flow-change.js +319 -96
- package/dist/browser/{flowChanges-Bs-ZcJV8.js → flowChanges-BDqD_Q4G.js} +1628 -1555
- package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-DDidwd8h.js} +9 -1
- package/dist/browser/{flowWorkspace-BewofPeU.js → flowWorkspace-CPBHm14t.js} +9803 -9769
- package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → getPseudoElementBounds-5LArT6Xc.js} +494 -474
- package/dist/browser/icons-CRxvozBE.js +726 -0
- package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-_TgJ_7Oq.js} +256 -257
- package/dist/browser/{waitNotificationInputs-DtrPBwA1.js → waitNotificationInputs-lPrLDTOd.js} +2 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +573 -578
- package/dist/browser/{workbenchSelect-CX8KtT7L.js → workbenchSelect-Cf1zlVm9.js} +398 -398
- package/dist/common/control-api-conformance.js +27 -19
- package/dist/common/control-api.d.ts +4 -11
- package/dist/common/control-api.js +6 -18
- package/dist/common/flow-encoding.js +4 -0
- package/dist/common/flow-semantics.js +8 -10
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +27 -0
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +17 -18
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CUSrALSX.js +0 -1620
- package/dist/browser/icons-DRoMXL5h.js +0 -521
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as
|
|
3
|
-
import { C as
|
|
4
|
-
import {
|
|
5
|
-
import { i as ke, n as Ae, o as je, r as Me } from "./dist-CPuF50D9.js";
|
|
1
|
+
import { E as e, M as t, T as n, _ as r, b as i, c as a, d as o, h as s, j as c, k as l, n as u, w as d, x as f, z as p } from "./dist-DxahK_I8.js";
|
|
2
|
+
import { S as m, _ as ee, a as h, b as te, d as ne, g as re, h as ie, i as g, l as ae, m as oe, n as se, o as ce, p as _, r as le, s as v, t as ue, v as de, w as fe, y as pe } from "./dist-Mecbzdl2.js";
|
|
3
|
+
import { C as me, E as he, O as y, T as ge, _ as _e, a as ve, b as ye, c as be, d as xe, g as Se, n as Ce, p as we, r as b, t as x, u as Te, v as Ee, w as De, x as Oe } from "./dist-BKuSVKCC.js";
|
|
4
|
+
import { i as ke, n as Ae, o as je, r as Me } from "./dist-meg_oHVR.js";
|
|
6
5
|
import { t as Ne } from "./dist-CeSZ2xSM.js";
|
|
7
6
|
//#region ../../node_modules/.bun/@codemirror+commands@6.11.0/node_modules/@codemirror/commands/dist/index.js
|
|
8
7
|
var Pe = (e) => {
|
|
@@ -137,8 +136,8 @@ function Ue(e, t, n = t.selection.ranges) {
|
|
|
137
136
|
}
|
|
138
137
|
return null;
|
|
139
138
|
}
|
|
140
|
-
var We = /*@__PURE__*/
|
|
141
|
-
return
|
|
139
|
+
var We = /*@__PURE__*/ ue.define(), Ge = /*@__PURE__*/ ue.define(), Ke = /*@__PURE__*/ v.define(), qe = /*@__PURE__*/ v.define({ combine(e) {
|
|
140
|
+
return pe(e, {
|
|
142
141
|
minDepth: 100,
|
|
143
142
|
newGroupDelay: 500,
|
|
144
143
|
joinToEvent: (e, t) => t
|
|
@@ -147,7 +146,7 @@ var We = /*@__PURE__*/ ee.define(), Ge = /*@__PURE__*/ ee.define(), Ke = /*@__PU
|
|
|
147
146
|
newGroupDelay: Math.min,
|
|
148
147
|
joinToEvent: (e, t) => (n, r) => e(n, r) || t(n, r)
|
|
149
148
|
});
|
|
150
|
-
} }), Je = /*@__PURE__*/
|
|
149
|
+
} }), Je = /*@__PURE__*/ oe.define({
|
|
151
150
|
create() {
|
|
152
151
|
return D.empty;
|
|
153
152
|
},
|
|
@@ -158,9 +157,9 @@ var We = /*@__PURE__*/ ee.define(), Ge = /*@__PURE__*/ ee.define(), Ke = /*@__PU
|
|
|
158
157
|
return o = i ? T(o, o.length, n.minDepth, i) : it(o, t.startState.selection), new D(a == 0 ? r.rest : o, a == 0 ? o : r.rest);
|
|
159
158
|
}
|
|
160
159
|
let i = t.annotation(Ge);
|
|
161
|
-
if ((i == "full" || i == "before") && (e = e.isolate()), t.annotation(
|
|
162
|
-
let a = w.fromTransaction(t),
|
|
163
|
-
return a ? e = e.addChanges(a,
|
|
160
|
+
if ((i == "full" || i == "before") && (e = e.isolate()), t.annotation(re.addToHistory) === !1) return t.changes.empty ? e : e.addMapping(t.changes.desc);
|
|
161
|
+
let a = w.fromTransaction(t), o = t.annotation(re.time), s = t.annotation(re.userEvent);
|
|
162
|
+
return a ? e = e.addChanges(a, o, s, n, t) : t.selection && (e = e.addSelection(t.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (e = e.isolate()), e;
|
|
164
163
|
},
|
|
165
164
|
toJSON(e) {
|
|
166
165
|
return {
|
|
@@ -176,7 +175,7 @@ function Ye(e = {}) {
|
|
|
176
175
|
return [
|
|
177
176
|
Je,
|
|
178
177
|
qe.of(e),
|
|
179
|
-
|
|
178
|
+
b.domEventHandlers({ beforeinput(e, t) {
|
|
180
179
|
let n = e.inputType == "historyUndo" ? Xe : e.inputType == "historyRedo" ? Ze : null;
|
|
181
180
|
return n ? (e.preventDefault(), n(t)) : !1;
|
|
182
181
|
} })
|
|
@@ -207,7 +206,7 @@ var Xe = /*@__PURE__*/ C(0, !1), Ze = /*@__PURE__*/ C(1, !1), Qe = /*@__PURE__*/
|
|
|
207
206
|
};
|
|
208
207
|
}
|
|
209
208
|
static fromJSON(t) {
|
|
210
|
-
return new e(t.changes &&
|
|
209
|
+
return new e(t.changes && le.fromJSON(t.changes), [], t.mapped && se.fromJSON(t.mapped), t.startSelection && h.fromJSON(t.startSelection), t.selectionsAfter.map(h.fromJSON));
|
|
211
210
|
}
|
|
212
211
|
static fromTransaction(t, n) {
|
|
213
212
|
let r = E;
|
|
@@ -269,7 +268,7 @@ function st(e, t, n) {
|
|
|
269
268
|
let r = nt(e.selectionsAfter.length ? e.selectionsAfter.map((e) => e.map(t)) : E, n);
|
|
270
269
|
if (!e.changes) return w.selection(r);
|
|
271
270
|
let i = e.changes.map(t), a = t.mapDesc(e.changes, !0), o = e.mapped ? e.mapped.composeDesc(a) : a;
|
|
272
|
-
return new w(i,
|
|
271
|
+
return new w(i, _.mapEffects(e.effects, t), o, e.startSelection.map(a), r);
|
|
273
272
|
}
|
|
274
273
|
var ct = /^(input\.type|delete)($|\.)/, D = class e {
|
|
275
274
|
constructor(e, t, n = 0, r = void 0) {
|
|
@@ -280,7 +279,7 @@ var ct = /^(input\.type|delete)($|\.)/, D = class e {
|
|
|
280
279
|
}
|
|
281
280
|
addChanges(t, n, r, i, a) {
|
|
282
281
|
let o = this.done, s = o[o.length - 1];
|
|
283
|
-
return o = s && s.changes && !s.changes.empty && t.changes && (!r || ct.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, et(s.changes, t.changes)) || r == "input.type.compose") ? T(o, o.length - 1, i.minDepth, new w(t.changes.compose(s.changes), nt(
|
|
282
|
+
return o = s && s.changes && !s.changes.empty && t.changes && (!r || ct.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, et(s.changes, t.changes)) || r == "input.type.compose") ? T(o, o.length - 1, i.minDepth, new w(t.changes.compose(s.changes), nt(_.mapEffects(t.effects, s.changes), s.effects), s.mapped, s.startSelection, E)) : T(o, o.length, i.minDepth, t), new e(o, E, n, r);
|
|
284
283
|
}
|
|
285
284
|
addSelection(t, n, r, i) {
|
|
286
285
|
let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : E;
|
|
@@ -353,7 +352,7 @@ var lt = [
|
|
|
353
352
|
}
|
|
354
353
|
];
|
|
355
354
|
function O(e, t) {
|
|
356
|
-
return
|
|
355
|
+
return h.create(e.ranges.map(t), e.mainIndex);
|
|
357
356
|
}
|
|
358
357
|
function k(e, t) {
|
|
359
358
|
return e.update({
|
|
@@ -367,13 +366,13 @@ function A({ state: e, dispatch: t }, n) {
|
|
|
367
366
|
return !r.eq(e.selection, !0) && (t(k(e, r)), !0);
|
|
368
367
|
}
|
|
369
368
|
function j(e, t) {
|
|
370
|
-
return
|
|
369
|
+
return h.cursor(t ? e.to : e.from);
|
|
371
370
|
}
|
|
372
371
|
function ut(e, t) {
|
|
373
372
|
return A(e, (n) => n.empty ? e.moveByChar(n, t) : j(n, t));
|
|
374
373
|
}
|
|
375
374
|
function M(e) {
|
|
376
|
-
return e.textDirectionAt(e.state.selection.main.head) ==
|
|
375
|
+
return e.textDirectionAt(e.state.selection.main.head) == Ce.LTR;
|
|
377
376
|
}
|
|
378
377
|
var dt = (e) => ut(e, !M(e)), ft = (e) => ut(e, M(e));
|
|
379
378
|
function pt(e, t) {
|
|
@@ -386,15 +385,15 @@ function gt(e, t, n) {
|
|
|
386
385
|
let r = t.to - t.from;
|
|
387
386
|
return r && (r > 2 || /[^\s,.;:]/.test(e.sliceDoc(t.from, t.to))) || t.firstChild;
|
|
388
387
|
}
|
|
389
|
-
function N(
|
|
390
|
-
let
|
|
391
|
-
for (let
|
|
392
|
-
let n =
|
|
388
|
+
function N(e, n, r) {
|
|
389
|
+
let i = t(e).resolveInner(n.head), a = r ? p.closedBy : p.openedBy;
|
|
390
|
+
for (let t = n.head;;) {
|
|
391
|
+
let n = r ? i.childAfter(t) : i.childBefore(t);
|
|
393
392
|
if (!n) break;
|
|
394
|
-
gt(
|
|
393
|
+
gt(e, n, a) ? i = n : t = r ? n.to : n.from;
|
|
395
394
|
}
|
|
396
|
-
let
|
|
397
|
-
return
|
|
395
|
+
let o = i.type.prop(a), s, c;
|
|
396
|
+
return c = o && (s = r ? l(e, i.from, 1) : l(e, i.to, -1)) && s.matched ? r ? s.end.to : s.end.from : r ? i.to : i.from, h.cursor(c, r ? -1 : 1);
|
|
398
397
|
}
|
|
399
398
|
var _t = (e) => A(e, (t) => N(e.state, t, !M(e))), vt = (e) => A(e, (t) => N(e.state, t, M(e)));
|
|
400
399
|
function yt(e, t) {
|
|
@@ -408,7 +407,7 @@ var bt = (e) => yt(e, !1), xt = (e) => yt(e, !0);
|
|
|
408
407
|
function St(e) {
|
|
409
408
|
let t = e.scrollDOM.clientHeight < e.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
|
|
410
409
|
if (t) {
|
|
411
|
-
for (let t of e.state.facet(
|
|
410
|
+
for (let t of e.state.facet(b.scrollMargins)) {
|
|
412
411
|
let i = t(e);
|
|
413
412
|
i?.top && (n = Math.max(i?.top, n)), i?.bottom && (r = Math.max(i?.bottom, r));
|
|
414
413
|
}
|
|
@@ -427,7 +426,7 @@ function Ct(e, t) {
|
|
|
427
426
|
let a;
|
|
428
427
|
if (n.selfScroll) {
|
|
429
428
|
let t = e.coordsAtPos(r.selection.main.head), o = e.scrollDOM.getBoundingClientRect(), s = o.top + n.marginTop, c = o.bottom - n.marginBottom;
|
|
430
|
-
t && t.top > s && t.bottom < c && (a =
|
|
429
|
+
t && t.top > s && t.bottom < c && (a = b.scrollIntoView(i.main.head, {
|
|
431
430
|
y: "start",
|
|
432
431
|
yMargin: t.top - s
|
|
433
432
|
}));
|
|
@@ -436,32 +435,32 @@ function Ct(e, t) {
|
|
|
436
435
|
}
|
|
437
436
|
var wt = (e) => Ct(e, !1), Tt = (e) => Ct(e, !0);
|
|
438
437
|
function P(e, t, n) {
|
|
439
|
-
let
|
|
440
|
-
if (
|
|
441
|
-
let n = /^\s*/.exec(e.state.sliceDoc(
|
|
442
|
-
n && t.head !=
|
|
438
|
+
let r = e.lineBlockAt(t.head), i = e.moveToLineBoundary(t, n);
|
|
439
|
+
if (i.head == t.head && i.head != (n ? r.to : r.from) && (i = e.moveToLineBoundary(t, n, !1)), !n && i.head == r.from && r.length) {
|
|
440
|
+
let n = /^\s*/.exec(e.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
|
|
441
|
+
n && t.head != r.from + n && (i = h.cursor(r.from + n));
|
|
443
442
|
}
|
|
444
|
-
return
|
|
443
|
+
return i;
|
|
445
444
|
}
|
|
446
|
-
var Et = (e) => A(e, (t) => P(e, t, !0)), Dt = (e) => A(e, (t) => P(e, t, !1)), Ot = (e) => A(e, (t) => P(e, t, !M(e))), kt = (e) => A(e, (t) => P(e, t, M(e))), At = (e) => A(e, (t) =>
|
|
445
|
+
var Et = (e) => A(e, (t) => P(e, t, !0)), Dt = (e) => A(e, (t) => P(e, t, !1)), Ot = (e) => A(e, (t) => P(e, t, !M(e))), kt = (e) => A(e, (t) => P(e, t, M(e))), At = (e) => A(e, (t) => h.cursor(e.lineBlockAt(t.head).from, 1)), jt = (e) => A(e, (t) => h.cursor(e.lineBlockAt(t.head).to, -1));
|
|
447
446
|
function Mt(e, t, n) {
|
|
448
|
-
let
|
|
449
|
-
let
|
|
450
|
-
if (!
|
|
451
|
-
|
|
452
|
-
let
|
|
453
|
-
return n ?
|
|
447
|
+
let r = !1, i = O(e.selection, (t) => {
|
|
448
|
+
let i = l(e, t.head, -1) || l(e, t.head, 1) || t.head > 0 && l(e, t.head - 1, 1) || t.head < e.doc.length && l(e, t.head + 1, -1);
|
|
449
|
+
if (!i || !i.end) return t;
|
|
450
|
+
r = !0;
|
|
451
|
+
let a = i.start.from == t.head ? i.end.to : i.end.from;
|
|
452
|
+
return n ? h.range(t.anchor, a) : h.cursor(a);
|
|
454
453
|
});
|
|
455
|
-
return
|
|
454
|
+
return r ? (t(k(e, i)), !0) : !1;
|
|
456
455
|
}
|
|
457
456
|
var Nt = ({ state: e, dispatch: t }) => Mt(e, t, !1);
|
|
458
457
|
function F(e, t, n) {
|
|
459
|
-
let
|
|
460
|
-
e.undirectional && e.head >= e.anchor != t && (e =
|
|
461
|
-
let
|
|
462
|
-
return
|
|
458
|
+
let r = O(e.state.selection, (e) => {
|
|
459
|
+
e.undirectional && e.head >= e.anchor != t && (e = h.range(e.head, e.anchor));
|
|
460
|
+
let r = n(e);
|
|
461
|
+
return h.range(e.anchor, r.head, r.goalColumn, r.bidiLevel || void 0, r.assoc);
|
|
463
462
|
});
|
|
464
|
-
return !
|
|
463
|
+
return !r.eq(e.state.selection) && (e.dispatch(k(e.state, r)), !0);
|
|
465
464
|
}
|
|
466
465
|
function Pt(e, t) {
|
|
467
466
|
return F(e, t, (n) => e.moveByChar(n, t));
|
|
@@ -490,7 +489,7 @@ var Kt = (e) => Gt(e, !1), qt = (e) => Gt(e, !0), Jt = (e) => F(e, !0, (t) => P(
|
|
|
490
489
|
}, Zt = (e) => {
|
|
491
490
|
let t = M(e);
|
|
492
491
|
return F(e, t, (n) => P(e, n, t));
|
|
493
|
-
}, Qt = (e) => F(e, !1, (t) =>
|
|
492
|
+
}, Qt = (e) => F(e, !1, (t) => h.cursor(e.lineBlockAt(t.head).from)), $t = (e) => F(e, !0, (t) => h.cursor(e.lineBlockAt(t.head).to)), en = ({ state: e, dispatch: t }) => (t(k(e, { anchor: 0 })), !0), tn = ({ state: e, dispatch: t }) => (t(k(e, { anchor: e.doc.length })), !0), nn = ({ state: e, dispatch: t }) => (t(k(e, {
|
|
494
493
|
anchor: e.selection.main.anchor,
|
|
495
494
|
head: 0
|
|
496
495
|
})), !0), rn = ({ state: e, dispatch: t }) => (t(k(e, {
|
|
@@ -503,95 +502,95 @@ var Kt = (e) => Gt(e, !1), qt = (e) => Gt(e, !0), Jt = (e) => F(e, !0, (t) => P(
|
|
|
503
502
|
},
|
|
504
503
|
userEvent: "select"
|
|
505
504
|
})), !0), on = ({ state: e, dispatch: t }) => {
|
|
506
|
-
let n = R(e).map(({ from: t, to: n }) =>
|
|
505
|
+
let n = R(e).map(({ from: t, to: n }) => h.undirectionalRange(t, Math.min(n + 1, e.doc.length)));
|
|
507
506
|
return t(e.update({
|
|
508
|
-
selection:
|
|
507
|
+
selection: h.create(n),
|
|
509
508
|
userEvent: "select"
|
|
510
509
|
})), !0;
|
|
511
|
-
}, sn = ({ state: e, dispatch:
|
|
512
|
-
let
|
|
513
|
-
let
|
|
514
|
-
if (
|
|
515
|
-
let e =
|
|
510
|
+
}, sn = ({ state: e, dispatch: n }) => {
|
|
511
|
+
let r = O(e.selection, (n) => {
|
|
512
|
+
let r = t(e), i = r.resolveStack(n.from, 1);
|
|
513
|
+
if (n.empty) {
|
|
514
|
+
let e = r.resolveStack(n.from, -1);
|
|
516
515
|
e.node.from >= i.node.from && e.node.to <= i.node.to && (i = e);
|
|
517
516
|
}
|
|
518
517
|
for (let e = i; e; e = e.next) {
|
|
519
|
-
let { node:
|
|
520
|
-
if ((
|
|
518
|
+
let { node: t } = e;
|
|
519
|
+
if ((t.from < n.from && t.to >= n.to || t.to > n.to && t.from <= n.from) && e.next) return h.undirectionalRange(t.from, t.to);
|
|
521
520
|
}
|
|
522
|
-
return
|
|
521
|
+
return n;
|
|
523
522
|
});
|
|
524
|
-
return !
|
|
523
|
+
return !r.eq(e.selection) && (n(k(e, r)), !0);
|
|
525
524
|
};
|
|
526
525
|
function cn(e, t) {
|
|
527
|
-
let { state: n } = e,
|
|
526
|
+
let { state: n } = e, r = n.selection, i = n.selection.ranges.slice();
|
|
528
527
|
for (let r of n.selection.ranges) {
|
|
529
|
-
let
|
|
530
|
-
if (t ?
|
|
528
|
+
let a = n.doc.lineAt(r.head);
|
|
529
|
+
if (t ? a.to < e.state.doc.length : a.from > 0) for (let n = r;;) {
|
|
531
530
|
let r = e.moveVertically(n, t);
|
|
532
|
-
if (r.head <
|
|
533
|
-
|
|
531
|
+
if (r.head < a.from || r.head > a.to) {
|
|
532
|
+
i.some((e) => e.head == r.head) || i.push(r);
|
|
534
533
|
break;
|
|
535
534
|
}
|
|
536
535
|
if (r.head == n.head) break;
|
|
537
536
|
n = r;
|
|
538
537
|
}
|
|
539
538
|
}
|
|
540
|
-
return
|
|
539
|
+
return i.length != r.ranges.length && (e.dispatch(k(n, h.create(i, i.length - 1))), !0);
|
|
541
540
|
}
|
|
542
541
|
var ln = (e) => cn(e, !1), un = (e) => cn(e, !0), dn = ({ state: e, dispatch: t }) => {
|
|
543
|
-
let n = e.selection,
|
|
544
|
-
return n.ranges.length > 1 ?
|
|
542
|
+
let n = e.selection, r = null;
|
|
543
|
+
return n.ranges.length > 1 ? r = h.create([n.main]) : n.main.empty || (r = h.create([h.cursor(n.main.head)])), r ? (t(k(e, r)), !0) : !1;
|
|
545
544
|
};
|
|
546
545
|
function I(e, t) {
|
|
547
546
|
if (e.state.readOnly) return !1;
|
|
548
|
-
let n = "delete.selection", { state:
|
|
549
|
-
let { from:
|
|
550
|
-
if (
|
|
551
|
-
let
|
|
552
|
-
|
|
553
|
-
} else
|
|
554
|
-
return
|
|
547
|
+
let n = "delete.selection", { state: r } = e, i = r.changeByRange((r) => {
|
|
548
|
+
let { from: i, to: a } = r;
|
|
549
|
+
if (i == a) {
|
|
550
|
+
let o = t(r);
|
|
551
|
+
o < i ? (n = "delete.backward", o = L(e, o, !1)) : o > i && (n = "delete.forward", o = L(e, o, !0)), i = Math.min(i, o), a = Math.max(a, o);
|
|
552
|
+
} else i = L(e, i, !1), a = L(e, a, !0);
|
|
553
|
+
return i == a ? { range: r } : {
|
|
555
554
|
changes: {
|
|
556
|
-
from:
|
|
557
|
-
to:
|
|
555
|
+
from: i,
|
|
556
|
+
to: a
|
|
558
557
|
},
|
|
559
|
-
range:
|
|
558
|
+
range: h.cursor(i, i < r.head ? -1 : 1)
|
|
560
559
|
};
|
|
561
560
|
});
|
|
562
|
-
return !
|
|
561
|
+
return !i.changes.empty && (e.dispatch(r.update(i, {
|
|
563
562
|
scrollIntoView: !0,
|
|
564
563
|
userEvent: n,
|
|
565
|
-
effects: n == "delete.selection" ?
|
|
564
|
+
effects: n == "delete.selection" ? b.announce.of(r.phrase("Selection deleted")) : void 0
|
|
566
565
|
})), !0);
|
|
567
566
|
}
|
|
568
567
|
function L(e, t, n) {
|
|
569
|
-
if (e instanceof
|
|
568
|
+
if (e instanceof b) for (let r of e.state.facet(b.atomicRanges).map((t) => t(e))) r.between(t, t, (e, r) => {
|
|
570
569
|
e < t && r > t && (t = n ? r : e);
|
|
571
570
|
});
|
|
572
571
|
return t;
|
|
573
572
|
}
|
|
574
|
-
var fn = (e,
|
|
575
|
-
let
|
|
576
|
-
if (
|
|
577
|
-
if (
|
|
578
|
-
let e =
|
|
579
|
-
for (let t = 0; t < e &&
|
|
580
|
-
|
|
581
|
-
} else
|
|
582
|
-
return
|
|
583
|
-
}), pn = (e) => fn(e, !1, !0), mn = (e) => fn(e, !0, !1), hn = (e,
|
|
584
|
-
let
|
|
573
|
+
var fn = (e, t, n) => I(e, (r) => {
|
|
574
|
+
let a = r.from, { state: o } = e, s = o.doc.lineAt(a), c, l;
|
|
575
|
+
if (n && !t && a > s.from && a < s.from + 200 && !/[^ \t]/.test(c = s.text.slice(0, a - s.from))) {
|
|
576
|
+
if (c[c.length - 1] == " ") return a - 1;
|
|
577
|
+
let e = te(c, o.tabSize) % i(o) || i(o);
|
|
578
|
+
for (let t = 0; t < e && c[c.length - 1 - t] == " "; t++) a--;
|
|
579
|
+
l = a;
|
|
580
|
+
} else l = m(s.text, a - s.from, t, t) + s.from, l == a && s.number != (t ? o.doc.lines : 1) ? l += t ? 1 : -1 : !t && /[\ufe00-\ufe0f]/.test(s.text.slice(l - s.from, a - s.from)) && (l = m(s.text, l - s.from, !1, !1) + s.from);
|
|
581
|
+
return l;
|
|
582
|
+
}), pn = (e) => fn(e, !1, !0), mn = (e) => fn(e, !0, !1), hn = (e, t) => I(e, (n) => {
|
|
583
|
+
let r = n.head, { state: i } = e, a = i.doc.lineAt(r), o = i.charCategorizer(r);
|
|
585
584
|
for (let e = null;;) {
|
|
586
|
-
if (
|
|
587
|
-
|
|
585
|
+
if (r == (t ? a.to : a.from)) {
|
|
586
|
+
r == n.head && a.number != (t ? i.doc.lines : 1) && (r += t ? 1 : -1);
|
|
588
587
|
break;
|
|
589
588
|
}
|
|
590
|
-
let
|
|
591
|
-
if (e != null &&
|
|
592
|
-
(
|
|
589
|
+
let s = m(a.text, r - a.from, t) + a.from, c = a.text.slice(Math.min(r, s) - a.from, Math.max(r, s) - a.from), l = o(c);
|
|
590
|
+
if (e != null && l != e) break;
|
|
591
|
+
(c != " " || r != n.head) && (e = l), r = s;
|
|
593
592
|
}
|
|
594
|
-
return
|
|
593
|
+
return r;
|
|
595
594
|
}), gn = (e) => hn(e, !1), _n = (e) => hn(e, !0), vn = (e) => I(e, (t) => {
|
|
596
595
|
let n = e.lineBlockAt(t.head).to;
|
|
597
596
|
return t.head < n ? n : Math.min(e.state.doc.length, t.head + 1);
|
|
@@ -607,29 +606,29 @@ var fn = (e, n, r) => I(e, (a) => {
|
|
|
607
606
|
changes: {
|
|
608
607
|
from: e.from,
|
|
609
608
|
to: e.to,
|
|
610
|
-
insert:
|
|
609
|
+
insert: ie.of(["", ""])
|
|
611
610
|
},
|
|
612
|
-
range:
|
|
611
|
+
range: h.cursor(e.from)
|
|
613
612
|
}));
|
|
614
613
|
return t(e.update(n, {
|
|
615
614
|
scrollIntoView: !0,
|
|
616
615
|
userEvent: "input"
|
|
617
616
|
})), !0;
|
|
618
|
-
}, Sn = ({ state: e, dispatch:
|
|
617
|
+
}, Sn = ({ state: e, dispatch: t }) => {
|
|
619
618
|
if (e.readOnly) return !1;
|
|
620
|
-
let
|
|
621
|
-
if (!
|
|
622
|
-
let
|
|
619
|
+
let n = e.changeByRange((t) => {
|
|
620
|
+
if (!t.empty || t.from == 0 || t.from == e.doc.length) return { range: t };
|
|
621
|
+
let n = t.from, r = e.doc.lineAt(n), i = n == r.from ? n - 1 : m(r.text, n - r.from, !1) + r.from, a = n == r.to ? n + 1 : m(r.text, n - r.from, !0) + r.from;
|
|
623
622
|
return {
|
|
624
623
|
changes: {
|
|
625
|
-
from:
|
|
626
|
-
to:
|
|
627
|
-
insert: e.doc.slice(
|
|
624
|
+
from: i,
|
|
625
|
+
to: a,
|
|
626
|
+
insert: e.doc.slice(n, a).append(e.doc.slice(i, n))
|
|
628
627
|
},
|
|
629
|
-
range:
|
|
628
|
+
range: h.cursor(a)
|
|
630
629
|
};
|
|
631
630
|
});
|
|
632
|
-
return !
|
|
631
|
+
return !n.changes.empty && (t(e.update(n, {
|
|
633
632
|
scrollIntoView: !0,
|
|
634
633
|
userEvent: "move.character"
|
|
635
634
|
})), !0);
|
|
@@ -652,34 +651,34 @@ function R(e) {
|
|
|
652
651
|
}
|
|
653
652
|
function Cn(e, t, n) {
|
|
654
653
|
if (e.readOnly) return !1;
|
|
655
|
-
let
|
|
654
|
+
let r = [], i = [];
|
|
656
655
|
for (let t of R(e)) {
|
|
657
656
|
if (n ? t.to == e.doc.length : t.from == 0) continue;
|
|
658
|
-
let
|
|
657
|
+
let a = e.doc.lineAt(n ? t.to + 1 : t.from - 1), o = a.length + 1;
|
|
659
658
|
if (n) {
|
|
660
|
-
|
|
659
|
+
r.push({
|
|
661
660
|
from: t.to,
|
|
662
|
-
to:
|
|
661
|
+
to: a.to
|
|
663
662
|
}, {
|
|
664
663
|
from: t.from,
|
|
665
|
-
insert:
|
|
664
|
+
insert: a.text + e.lineBreak
|
|
666
665
|
});
|
|
667
|
-
for (let n of t.ranges)
|
|
666
|
+
for (let n of t.ranges) i.push(h.range(Math.min(e.doc.length, n.anchor + o), Math.min(e.doc.length, n.head + o)));
|
|
668
667
|
} else {
|
|
669
|
-
|
|
670
|
-
from:
|
|
668
|
+
r.push({
|
|
669
|
+
from: a.from,
|
|
671
670
|
to: t.from
|
|
672
671
|
}, {
|
|
673
672
|
from: t.to,
|
|
674
|
-
insert: e.lineBreak +
|
|
673
|
+
insert: e.lineBreak + a.text
|
|
675
674
|
});
|
|
676
|
-
for (let e of t.ranges)
|
|
675
|
+
for (let e of t.ranges) i.push(h.range(e.anchor - o, e.head - o));
|
|
677
676
|
}
|
|
678
677
|
}
|
|
679
|
-
return
|
|
680
|
-
changes:
|
|
678
|
+
return r.length ? (t(e.update({
|
|
679
|
+
changes: r,
|
|
681
680
|
scrollIntoView: !0,
|
|
682
|
-
selection:
|
|
681
|
+
selection: h.create(i, e.selection.mainIndex),
|
|
683
682
|
userEvent: "move.line"
|
|
684
683
|
})), !0) : !1;
|
|
685
684
|
}
|
|
@@ -722,41 +721,41 @@ var Dn = ({ state: e, dispatch: t }) => En(e, t, !1), On = ({ state: e, dispatch
|
|
|
722
721
|
userEvent: "delete.line"
|
|
723
722
|
}), !0;
|
|
724
723
|
};
|
|
725
|
-
function An(
|
|
726
|
-
if (/\(\)|\[\]|\{\}/.test(
|
|
724
|
+
function An(e, n) {
|
|
725
|
+
if (/\(\)|\[\]|\{\}/.test(e.sliceDoc(n - 1, n + 1))) return {
|
|
727
726
|
from: n,
|
|
728
727
|
to: n
|
|
729
728
|
};
|
|
730
|
-
let r =
|
|
731
|
-
return i && a && i.to <= n && a.from >= n && (o = i.type.prop(
|
|
729
|
+
let r = t(e).resolveInner(n), i = r.childBefore(n), a = r.childAfter(n), o;
|
|
730
|
+
return i && a && i.to <= n && a.from >= n && (o = i.type.prop(p.closedBy)) && o.indexOf(a.name) > -1 && e.doc.lineAt(i.to).from == e.doc.lineAt(a.from).from && !/\S/.test(e.sliceDoc(i.to, a.from)) ? {
|
|
732
731
|
from: i.to,
|
|
733
732
|
to: a.from
|
|
734
733
|
} : null;
|
|
735
734
|
}
|
|
736
735
|
var jn = /*@__PURE__*/ Nn(!1), Mn = /*@__PURE__*/ Nn(!0);
|
|
737
736
|
function Nn(e) {
|
|
738
|
-
return ({ state: t, dispatch:
|
|
737
|
+
return ({ state: t, dispatch: r }) => {
|
|
739
738
|
if (t.readOnly) return !1;
|
|
740
|
-
let
|
|
741
|
-
let { from:
|
|
742
|
-
e && (
|
|
743
|
-
let
|
|
744
|
-
simulateBreak:
|
|
745
|
-
simulateDoubleBreak: !!
|
|
746
|
-
}),
|
|
747
|
-
for (
|
|
748
|
-
|
|
749
|
-
let
|
|
750
|
-
return
|
|
739
|
+
let i = t.changeByRange((r) => {
|
|
740
|
+
let { from: i, to: a } = r, o = t.doc.lineAt(i), s = !e && i == a && An(t, i);
|
|
741
|
+
e && (i = a = (a <= o.to ? o : t.doc.lineAt(a)).to);
|
|
742
|
+
let c = new u(t, {
|
|
743
|
+
simulateBreak: i,
|
|
744
|
+
simulateDoubleBreak: !!s
|
|
745
|
+
}), l = f(c, i);
|
|
746
|
+
for (l ??= te(/^\s*/.exec(t.doc.lineAt(i).text)[0], t.tabSize); a < o.to && /\s/.test(o.text[a - o.from]);) a++;
|
|
747
|
+
s ? {from: i, to: a} = s : i > o.from && i < o.from + 100 && !/\S/.test(o.text.slice(0, i)) && (i = o.from);
|
|
748
|
+
let d = ["", n(t, l)];
|
|
749
|
+
return s && d.push(n(t, c.lineIndent(o.from, -1))), {
|
|
751
750
|
changes: {
|
|
752
|
-
from:
|
|
753
|
-
to:
|
|
754
|
-
insert:
|
|
751
|
+
from: i,
|
|
752
|
+
to: a,
|
|
753
|
+
insert: ie.of(d)
|
|
755
754
|
},
|
|
756
|
-
range:
|
|
755
|
+
range: h.cursor(i + 1 + d[1].length)
|
|
757
756
|
};
|
|
758
757
|
});
|
|
759
|
-
return
|
|
758
|
+
return r(t.update(i, {
|
|
760
759
|
scrollIntoView: !0,
|
|
761
760
|
userEvent: "input"
|
|
762
761
|
})), !0;
|
|
@@ -764,47 +763,47 @@ function Nn(e) {
|
|
|
764
763
|
}
|
|
765
764
|
function Pn(e, t) {
|
|
766
765
|
let n = -1;
|
|
767
|
-
return e.changeByRange((
|
|
768
|
-
let
|
|
769
|
-
for (let
|
|
770
|
-
let o = e.doc.lineAt(
|
|
771
|
-
o.number > n && (
|
|
766
|
+
return e.changeByRange((r) => {
|
|
767
|
+
let i = [];
|
|
768
|
+
for (let a = r.from; a <= r.to;) {
|
|
769
|
+
let o = e.doc.lineAt(a);
|
|
770
|
+
o.number > n && (r.empty || r.to > o.from) && (t(o, i, r), n = o.number), a = o.to + 1;
|
|
772
771
|
}
|
|
773
|
-
let
|
|
772
|
+
let a = e.changes(i);
|
|
774
773
|
return {
|
|
775
|
-
changes:
|
|
776
|
-
range:
|
|
774
|
+
changes: i,
|
|
775
|
+
range: h.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
|
|
777
776
|
};
|
|
778
777
|
});
|
|
779
778
|
}
|
|
780
779
|
var Fn = ({ state: e, dispatch: t }) => {
|
|
781
780
|
if (e.readOnly) return !1;
|
|
782
|
-
let
|
|
783
|
-
let
|
|
784
|
-
if (
|
|
785
|
-
/\S/.test(t.text) || (
|
|
786
|
-
let
|
|
787
|
-
(
|
|
781
|
+
let r = Object.create(null), i = new u(e, { overrideIndentation: (e) => r[e] ?? -1 }), a = Pn(e, (t, a, o) => {
|
|
782
|
+
let s = f(i, t.from);
|
|
783
|
+
if (s == null) return;
|
|
784
|
+
/\S/.test(t.text) || (s = 0);
|
|
785
|
+
let c = /^\s*/.exec(t.text)[0], l = n(e, s);
|
|
786
|
+
(c != l || o.from < t.from + c.length) && (r[t.from] = s, a.push({
|
|
788
787
|
from: t.from,
|
|
789
|
-
to: t.from +
|
|
790
|
-
insert:
|
|
788
|
+
to: t.from + c.length,
|
|
789
|
+
insert: l
|
|
791
790
|
}));
|
|
792
791
|
});
|
|
793
|
-
return
|
|
794
|
-
}, In = ({ state:
|
|
795
|
-
|
|
796
|
-
from:
|
|
797
|
-
insert:
|
|
792
|
+
return a.changes.empty || t(e.update(a, { userEvent: "indent" })), !0;
|
|
793
|
+
}, In = ({ state: t, dispatch: n }) => !t.readOnly && (n(t.update(Pn(t, (n, r) => {
|
|
794
|
+
r.push({
|
|
795
|
+
from: n.from,
|
|
796
|
+
insert: t.facet(e)
|
|
798
797
|
});
|
|
799
|
-
}), { userEvent: "input.indent" })), !0), Ln = ({ state: e, dispatch: t }) => !e.readOnly && (t(e.update(Pn(e, (t,
|
|
800
|
-
let
|
|
801
|
-
if (!
|
|
802
|
-
let
|
|
803
|
-
for (;
|
|
804
|
-
|
|
805
|
-
from: t.from +
|
|
806
|
-
to: t.from +
|
|
807
|
-
insert:
|
|
798
|
+
}), { userEvent: "input.indent" })), !0), Ln = ({ state: e, dispatch: t }) => !e.readOnly && (t(e.update(Pn(e, (t, r) => {
|
|
799
|
+
let a = /^\s*/.exec(t.text)[0];
|
|
800
|
+
if (!a) return;
|
|
801
|
+
let o = te(a, e.tabSize), s = 0, c = n(e, Math.max(0, o - i(e)));
|
|
802
|
+
for (; s < a.length && s < c.length && a.charCodeAt(s) == c.charCodeAt(s);) s++;
|
|
803
|
+
r.push({
|
|
804
|
+
from: t.from + s,
|
|
805
|
+
to: t.from + a.length,
|
|
806
|
+
insert: c.slice(s)
|
|
808
807
|
});
|
|
809
808
|
}), { userEvent: "delete.dedent" })), !0), Rn = (e) => (e.setTabFocusMode(), !0), zn = [
|
|
810
809
|
{
|
|
@@ -1117,7 +1116,7 @@ var Fn = ({ state: e, dispatch: t }) => {
|
|
|
1117
1116
|
if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done) return -1;
|
|
1118
1117
|
this.bufferPos = 0, this.buffer = this.iter.value;
|
|
1119
1118
|
}
|
|
1120
|
-
return
|
|
1119
|
+
return ee(this.buffer, this.bufferPos);
|
|
1121
1120
|
}
|
|
1122
1121
|
next() {
|
|
1123
1122
|
for (; this.matches.length;) this.matches.pop();
|
|
@@ -1127,8 +1126,8 @@ var Fn = ({ state: e, dispatch: t }) => {
|
|
|
1127
1126
|
for (;;) {
|
|
1128
1127
|
let e = this.peek();
|
|
1129
1128
|
if (e < 0) return this.done = !0, this;
|
|
1130
|
-
let t =
|
|
1131
|
-
this.bufferPos +=
|
|
1129
|
+
let t = fe(e), n = this.bufferStart + this.bufferPos;
|
|
1130
|
+
this.bufferPos += de(e);
|
|
1132
1131
|
let r = this.normalize(t);
|
|
1133
1132
|
if (r.length) for (let e = 0, i = n, a = !0;; e++) {
|
|
1134
1133
|
let n = r.charCodeAt(e), o = this.match(n, i, a, this.bufferPos + this.bufferStart, e == r.length - 1);
|
|
@@ -1255,7 +1254,7 @@ function B(e, t) {
|
|
|
1255
1254
|
return t;
|
|
1256
1255
|
}
|
|
1257
1256
|
var Xn = (e) => {
|
|
1258
|
-
let { state: t } = e, n = String(t.doc.lineAt(e.state.selection.main.head).number), { close:
|
|
1257
|
+
let { state: t } = e, n = String(t.doc.lineAt(e.state.selection.main.head).number), { close: r, result: i } = ge(e, {
|
|
1259
1258
|
label: t.phrase("Go to line"),
|
|
1260
1259
|
input: {
|
|
1261
1260
|
type: "text",
|
|
@@ -1265,21 +1264,21 @@ var Xn = (e) => {
|
|
|
1265
1264
|
focus: !0,
|
|
1266
1265
|
submitLabel: t.phrase("go")
|
|
1267
1266
|
});
|
|
1268
|
-
return
|
|
1269
|
-
let
|
|
1270
|
-
if (!
|
|
1271
|
-
e.dispatch({ effects:
|
|
1267
|
+
return i.then((n) => {
|
|
1268
|
+
let i = n && /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);
|
|
1269
|
+
if (!i) {
|
|
1270
|
+
e.dispatch({ effects: r });
|
|
1272
1271
|
return;
|
|
1273
1272
|
}
|
|
1274
|
-
let
|
|
1275
|
-
if (
|
|
1276
|
-
let e =
|
|
1277
|
-
|
|
1278
|
-
} else
|
|
1279
|
-
let
|
|
1273
|
+
let a = t.doc.lineAt(t.selection.main.head), [, o, s, c, l] = i, u = c ? +c.slice(1) : 0, d = s ? +s : a.number;
|
|
1274
|
+
if (s && l) {
|
|
1275
|
+
let e = d / 100;
|
|
1276
|
+
o && (e = e * (o == "-" ? -1 : 1) + a.number / t.doc.lines), d = Math.round(t.doc.lines * e);
|
|
1277
|
+
} else s && o && (d = d * (o == "-" ? -1 : 1) + a.number);
|
|
1278
|
+
let f = t.doc.line(Math.max(1, Math.min(t.doc.lines, d))), p = h.cursor(f.from + Math.max(0, Math.min(u, f.length)));
|
|
1280
1279
|
e.dispatch({
|
|
1281
|
-
effects: [
|
|
1282
|
-
selection:
|
|
1280
|
+
effects: [r, b.scrollIntoView(p.from, { y: "center" })],
|
|
1281
|
+
selection: p
|
|
1283
1282
|
});
|
|
1284
1283
|
}), !0;
|
|
1285
1284
|
}, Zn = {
|
|
@@ -1287,8 +1286,8 @@ var Xn = (e) => {
|
|
|
1287
1286
|
minSelectionLength: 1,
|
|
1288
1287
|
maxMatches: 100,
|
|
1289
1288
|
wholeWords: !1
|
|
1290
|
-
}, Qn = /*@__PURE__*/
|
|
1291
|
-
return
|
|
1289
|
+
}, Qn = /*@__PURE__*/ v.define({ combine(e) {
|
|
1290
|
+
return pe(e, Zn, {
|
|
1292
1291
|
highlightWordAroundCursor: (e, t) => e || t,
|
|
1293
1292
|
minSelectionLength: Math.min,
|
|
1294
1293
|
maxMatches: Math.min
|
|
@@ -1298,14 +1297,14 @@ function $n(e) {
|
|
|
1298
1297
|
let t = [ar, ir];
|
|
1299
1298
|
return e && t.push(Qn.of(e)), t;
|
|
1300
1299
|
}
|
|
1301
|
-
var er = /*@__PURE__*/
|
|
1300
|
+
var er = /*@__PURE__*/ x.mark({ class: "cm-selectionMatch" }), tr = /*@__PURE__*/ x.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
1302
1301
|
function nr(e, t, n, r) {
|
|
1303
|
-
return (n == 0 || e(t.sliceDoc(n - 1, n)) !=
|
|
1302
|
+
return (n == 0 || e(t.sliceDoc(n - 1, n)) != g.Word) && (r == t.doc.length || e(t.sliceDoc(r, r + 1)) != g.Word);
|
|
1304
1303
|
}
|
|
1305
1304
|
function rr(e, t, n, r) {
|
|
1306
|
-
return e(t.sliceDoc(n, n + 1)) ==
|
|
1305
|
+
return e(t.sliceDoc(n, n + 1)) == g.Word && e(t.sliceDoc(r - 1, r)) == g.Word;
|
|
1307
1306
|
}
|
|
1308
|
-
var ir = /*@__PURE__*/
|
|
1307
|
+
var ir = /*@__PURE__*/ ve.fromClass(class {
|
|
1309
1308
|
constructor(e) {
|
|
1310
1309
|
this.decorations = this.getDeco(e);
|
|
1311
1310
|
}
|
|
@@ -1314,36 +1313,36 @@ var ir = /*@__PURE__*/ se.fromClass(class {
|
|
|
1314
1313
|
}
|
|
1315
1314
|
getDeco(e) {
|
|
1316
1315
|
let t = e.state.facet(Qn), { state: n } = e, r = n.selection;
|
|
1317
|
-
if (r.ranges.length > 1) return
|
|
1316
|
+
if (r.ranges.length > 1) return x.none;
|
|
1318
1317
|
let i = r.main, a, o = null;
|
|
1319
1318
|
if (i.empty) {
|
|
1320
|
-
if (!t.highlightWordAroundCursor) return
|
|
1319
|
+
if (!t.highlightWordAroundCursor) return x.none;
|
|
1321
1320
|
let e = n.wordAt(i.head);
|
|
1322
|
-
if (!e) return
|
|
1321
|
+
if (!e) return x.none;
|
|
1323
1322
|
o = n.charCategorizer(i.head), a = n.sliceDoc(e.from, e.to);
|
|
1324
1323
|
} else {
|
|
1325
1324
|
let e = i.to - i.from;
|
|
1326
|
-
if (e < t.minSelectionLength || e > 200) return
|
|
1325
|
+
if (e < t.minSelectionLength || e > 200) return x.none;
|
|
1327
1326
|
if (t.wholeWords) {
|
|
1328
|
-
if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(nr(o, n, i.from, i.to) && rr(o, n, i.from, i.to))) return
|
|
1329
|
-
} else if (a = n.sliceDoc(i.from, i.to), !a) return
|
|
1327
|
+
if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(nr(o, n, i.from, i.to) && rr(o, n, i.from, i.to))) return x.none;
|
|
1328
|
+
} else if (a = n.sliceDoc(i.from, i.to), !a) return x.none;
|
|
1330
1329
|
}
|
|
1331
1330
|
let s = [];
|
|
1332
1331
|
for (let r of e.visibleRanges) {
|
|
1333
1332
|
let e = new z(n.doc, a, r.from, r.to);
|
|
1334
1333
|
for (; !e.next().done;) {
|
|
1335
1334
|
let { from: r, to: a } = e.value;
|
|
1336
|
-
if ((!o || nr(o, n, r, a)) && (i.empty && r <= i.from && a >= i.to ? s.push(tr.range(r, a)) : (r >= i.to || a <= i.from) && s.push(er.range(r, a)), s.length > t.maxMatches)) return
|
|
1335
|
+
if ((!o || nr(o, n, r, a)) && (i.empty && r <= i.from && a >= i.to ? s.push(tr.range(r, a)) : (r >= i.to || a <= i.from) && s.push(er.range(r, a)), s.length > t.maxMatches)) return x.none;
|
|
1337
1336
|
}
|
|
1338
1337
|
}
|
|
1339
|
-
return
|
|
1338
|
+
return x.set(s);
|
|
1340
1339
|
}
|
|
1341
|
-
}, { decorations: (e) => e.decorations }), ar = /*@__PURE__*/
|
|
1340
|
+
}, { decorations: (e) => e.decorations }), ar = /*@__PURE__*/ b.baseTheme({
|
|
1342
1341
|
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
1343
1342
|
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
1344
1343
|
}), or = ({ state: e, dispatch: t }) => {
|
|
1345
|
-
let { selection: n } = e,
|
|
1346
|
-
return !
|
|
1344
|
+
let { selection: n } = e, r = h.create(n.ranges.map((t) => e.wordAt(t.head) || h.cursor(t.head)), n.mainIndex);
|
|
1345
|
+
return !r.eq(n) && (t(e.update({ selection: r })), !0);
|
|
1347
1346
|
};
|
|
1348
1347
|
function sr(e, t) {
|
|
1349
1348
|
let { main: n, ranges: r } = e.selection, i = e.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
|
|
@@ -1365,22 +1364,22 @@ var cr = ({ state: e, dispatch: t }) => {
|
|
|
1365
1364
|
state: e,
|
|
1366
1365
|
dispatch: t
|
|
1367
1366
|
});
|
|
1368
|
-
let
|
|
1369
|
-
if (e.selection.ranges.some((t) => e.sliceDoc(t.from, t.to) !=
|
|
1370
|
-
let
|
|
1371
|
-
return
|
|
1372
|
-
selection: e.selection.addRange(
|
|
1373
|
-
effects:
|
|
1367
|
+
let r = e.sliceDoc(n[0].from, n[0].to);
|
|
1368
|
+
if (e.selection.ranges.some((t) => e.sliceDoc(t.from, t.to) != r)) return !1;
|
|
1369
|
+
let i = sr(e, r);
|
|
1370
|
+
return i ? (t(e.update({
|
|
1371
|
+
selection: e.selection.addRange(h.range(i.from, i.to), !1),
|
|
1372
|
+
effects: b.scrollIntoView(i.to)
|
|
1374
1373
|
})), !0) : !1;
|
|
1375
|
-
}, V = /*@__PURE__*/
|
|
1376
|
-
return
|
|
1374
|
+
}, V = /*@__PURE__*/ v.define({ combine(e) {
|
|
1375
|
+
return pe(e, {
|
|
1377
1376
|
top: !1,
|
|
1378
1377
|
caseSensitive: !1,
|
|
1379
1378
|
literal: !1,
|
|
1380
1379
|
regexp: !1,
|
|
1381
1380
|
wholeWord: !1,
|
|
1382
1381
|
createPanel: (e) => new Nr(e),
|
|
1383
|
-
scrollToMatch: (e) =>
|
|
1382
|
+
scrollToMatch: (e) => b.scrollIntoView(e)
|
|
1384
1383
|
});
|
|
1385
1384
|
} }), lr = class {
|
|
1386
1385
|
constructor(e) {
|
|
@@ -1396,7 +1395,7 @@ var cr = ({ state: e, dispatch: t }) => {
|
|
|
1396
1395
|
return this.regexp ? new gr(this) : new pr(this);
|
|
1397
1396
|
}
|
|
1398
1397
|
getCursor(e, t = 0, n) {
|
|
1399
|
-
let r = e.doc ? e :
|
|
1398
|
+
let r = e.doc ? e : ce.create({ doc: e });
|
|
1400
1399
|
return n ??= r.doc.length, this.regexp ? U(this, r, t, n) : H(this, r, t, n);
|
|
1401
1400
|
}
|
|
1402
1401
|
}, ur = class {
|
|
@@ -1412,7 +1411,7 @@ function H(e, t, n, r) {
|
|
|
1412
1411
|
return e.wholeWord && (i = fr(t.doc, t.charCategorizer(t.selection.main.head))), e.test && (i = dr(e.test, t, i)), new z(t.doc, e.unquoted, n, r, e.caseSensitive ? void 0 : (e) => e.toLowerCase(), i);
|
|
1413
1412
|
}
|
|
1414
1413
|
function fr(e, t) {
|
|
1415
|
-
return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = e.sliceString(a, Math.min(e.length, r + 2))), (t(W(i, n - a)) !=
|
|
1414
|
+
return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = e.sliceString(a, Math.min(e.length, r + 2))), (t(W(i, n - a)) != g.Word || t(G(i, n - a)) != g.Word) && (t(G(i, r - a)) != g.Word || t(W(i, r - a)) != g.Word));
|
|
1416
1415
|
}
|
|
1417
1416
|
var pr = class extends ur {
|
|
1418
1417
|
constructor(e) {
|
|
@@ -1465,14 +1464,14 @@ function U(e, t, n, r) {
|
|
|
1465
1464
|
test: i
|
|
1466
1465
|
}, n, r);
|
|
1467
1466
|
}
|
|
1468
|
-
function W(e,
|
|
1469
|
-
return e.slice(
|
|
1467
|
+
function W(e, t) {
|
|
1468
|
+
return e.slice(m(e, t, !1), t);
|
|
1470
1469
|
}
|
|
1471
|
-
function G(e,
|
|
1472
|
-
return e.slice(
|
|
1470
|
+
function G(e, t) {
|
|
1471
|
+
return e.slice(t, m(e, t));
|
|
1473
1472
|
}
|
|
1474
1473
|
function hr(e) {
|
|
1475
|
-
return (t, n, r) => !r[0].length || (e(W(r.input, r.index)) !=
|
|
1474
|
+
return (t, n, r) => !r[0].length || (e(W(r.input, r.index)) != g.Word || e(G(r.input, r.index)) != g.Word) && (e(G(r.input, r.index + r[0].length)) != g.Word || e(W(r.input, r.index + r[0].length)) != g.Word);
|
|
1476
1475
|
}
|
|
1477
1476
|
var gr = class extends ur {
|
|
1478
1477
|
nextMatch(e, t, n) {
|
|
@@ -1513,7 +1512,7 @@ var gr = class extends ur {
|
|
|
1513
1512
|
let i = U(this.spec, e, Math.max(0, t - 250), Math.min(n + 250, e.doc.length));
|
|
1514
1513
|
for (; !i.next().done;) r(i.value.from, i.value.to);
|
|
1515
1514
|
}
|
|
1516
|
-
}, K = /*@__PURE__*/
|
|
1515
|
+
}, K = /*@__PURE__*/ _.define(), _r = /*@__PURE__*/ _.define(), q = /*@__PURE__*/ oe.define({
|
|
1517
1516
|
create(e) {
|
|
1518
1517
|
return new vr(Dr(e).create(), null);
|
|
1519
1518
|
},
|
|
@@ -1521,12 +1520,12 @@ var gr = class extends ur {
|
|
|
1521
1520
|
for (let n of t.effects) n.is(K) ? e = new vr(n.value.create(), e.panel) : n.is(_r) && (e = new vr(e.query, n.value ? Er : null));
|
|
1522
1521
|
return e;
|
|
1523
1522
|
},
|
|
1524
|
-
provide: (e) =>
|
|
1523
|
+
provide: (e) => he.from(e, (e) => e.panel)
|
|
1525
1524
|
}), vr = class {
|
|
1526
1525
|
constructor(e, t) {
|
|
1527
1526
|
this.query = e, this.panel = t;
|
|
1528
1527
|
}
|
|
1529
|
-
}, yr = /*@__PURE__*/
|
|
1528
|
+
}, yr = /*@__PURE__*/ x.mark({ class: "cm-searchMatch" }), br = /*@__PURE__*/ x.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), xr = /*@__PURE__*/ ve.fromClass(class {
|
|
1530
1529
|
constructor(e) {
|
|
1531
1530
|
this.view = e, this.decorations = this.highlight(e.state.field(q));
|
|
1532
1531
|
}
|
|
@@ -1535,8 +1534,8 @@ var gr = class extends ur {
|
|
|
1535
1534
|
(t != e.startState.field(q) || e.docChanged || e.selectionSet || e.viewportChanged) && (this.decorations = this.highlight(t));
|
|
1536
1535
|
}
|
|
1537
1536
|
highlight({ query: e, panel: t }) {
|
|
1538
|
-
if (!t || !e.spec.valid) return
|
|
1539
|
-
let { view: n } = this, r = new
|
|
1537
|
+
if (!t || !e.spec.valid) return x.none;
|
|
1538
|
+
let { view: n } = this, r = new ne();
|
|
1540
1539
|
for (let t = 0, i = n.visibleRanges, a = i.length; t < a; t++) {
|
|
1541
1540
|
let { from: o, to: s } = i[t];
|
|
1542
1541
|
for (; t < a - 1 && s > i[t + 1].from - 500;) s = i[++t].to;
|
|
@@ -1555,57 +1554,57 @@ function J(e) {
|
|
|
1555
1554
|
};
|
|
1556
1555
|
}
|
|
1557
1556
|
var Y = /*@__PURE__*/ J((e, { query: t }) => {
|
|
1558
|
-
let { to: n } = e.state.selection.main,
|
|
1559
|
-
if (!
|
|
1560
|
-
let
|
|
1557
|
+
let { to: n } = e.state.selection.main, r = t.nextMatch(e.state, n, n);
|
|
1558
|
+
if (!r) return !1;
|
|
1559
|
+
let i = h.single(r.from, r.to), a = e.state.facet(V);
|
|
1561
1560
|
return e.dispatch({
|
|
1562
|
-
selection:
|
|
1563
|
-
effects: [Pr(e,
|
|
1561
|
+
selection: i,
|
|
1562
|
+
effects: [Pr(e, r), a.scrollToMatch(i.main, e)],
|
|
1564
1563
|
userEvent: "select.search"
|
|
1565
1564
|
}), kr(e), !0;
|
|
1566
1565
|
}), X = /*@__PURE__*/ J((e, { query: t }) => {
|
|
1567
|
-
let { state: n } = e, { from:
|
|
1568
|
-
if (!
|
|
1569
|
-
let
|
|
1566
|
+
let { state: n } = e, { from: r } = n.selection.main, i = t.prevMatch(n, r, r);
|
|
1567
|
+
if (!i) return !1;
|
|
1568
|
+
let a = h.single(i.from, i.to), o = e.state.facet(V);
|
|
1570
1569
|
return e.dispatch({
|
|
1571
|
-
selection:
|
|
1572
|
-
effects: [Pr(e,
|
|
1570
|
+
selection: a,
|
|
1571
|
+
effects: [Pr(e, i), o.scrollToMatch(a.main, e)],
|
|
1573
1572
|
userEvent: "select.search"
|
|
1574
1573
|
}), kr(e), !0;
|
|
1575
1574
|
}), Sr = /*@__PURE__*/ J((e, { query: t }) => {
|
|
1576
1575
|
let n = t.matchAll(e.state, 1e3);
|
|
1577
1576
|
return !n || !n.length ? !1 : (e.dispatch({
|
|
1578
|
-
selection:
|
|
1577
|
+
selection: h.create(n.map((e) => h.range(e.from, e.to))),
|
|
1579
1578
|
userEvent: "select.search.matches"
|
|
1580
1579
|
}), !0);
|
|
1581
1580
|
}), Cr = ({ state: e, dispatch: t }) => {
|
|
1582
1581
|
let n = e.selection;
|
|
1583
1582
|
if (n.ranges.length > 1 || n.main.empty) return !1;
|
|
1584
|
-
let { from:
|
|
1585
|
-
for (let t = new z(e.doc, e.sliceDoc(
|
|
1586
|
-
if (
|
|
1587
|
-
t.value.from ==
|
|
1583
|
+
let { from: r, to: i } = n.main, a = [], o = 0;
|
|
1584
|
+
for (let t = new z(e.doc, e.sliceDoc(r, i)); !t.next().done;) {
|
|
1585
|
+
if (a.length > 1e3) return !1;
|
|
1586
|
+
t.value.from == r && (o = a.length), a.push(h.range(t.value.from, t.value.to));
|
|
1588
1587
|
}
|
|
1589
1588
|
return t(e.update({
|
|
1590
|
-
selection:
|
|
1589
|
+
selection: h.create(a, o),
|
|
1591
1590
|
userEvent: "select.search.matches"
|
|
1592
1591
|
})), !0;
|
|
1593
1592
|
}, wr = /*@__PURE__*/ J((e, { query: t }) => {
|
|
1594
|
-
let { state: n } = e, { from:
|
|
1593
|
+
let { state: n } = e, { from: r, to: i } = n.selection.main;
|
|
1595
1594
|
if (n.readOnly) return !1;
|
|
1596
|
-
let
|
|
1597
|
-
if (!
|
|
1598
|
-
let
|
|
1599
|
-
|
|
1600
|
-
from:
|
|
1601
|
-
to:
|
|
1602
|
-
insert:
|
|
1603
|
-
}),
|
|
1604
|
-
let
|
|
1605
|
-
return
|
|
1606
|
-
changes:
|
|
1607
|
-
selection:
|
|
1608
|
-
effects:
|
|
1595
|
+
let a = t.nextMatch(n, r, r);
|
|
1596
|
+
if (!a) return !1;
|
|
1597
|
+
let o = a, s = [], c, l, u = [];
|
|
1598
|
+
o.precise ? o.from == r && o.to == i && (l = n.toText(t.getReplacement(o)), s.push({
|
|
1599
|
+
from: o.from,
|
|
1600
|
+
to: o.to,
|
|
1601
|
+
insert: l
|
|
1602
|
+
}), o = t.nextMatch(n, o.from, o.to), u.push(b.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))) : o = t.nextMatch(n, o.from, o.to);
|
|
1603
|
+
let d = e.state.changes(s);
|
|
1604
|
+
return o && (c = h.single(o.from, o.to).map(d), u.push(Pr(e, o)), u.push(n.facet(V).scrollToMatch(c.main, e))), e.dispatch({
|
|
1605
|
+
changes: d,
|
|
1606
|
+
selection: c,
|
|
1607
|
+
effects: u,
|
|
1609
1608
|
userEvent: "input.replace"
|
|
1610
1609
|
}), !0;
|
|
1611
1610
|
}), Tr = /*@__PURE__*/ J((e, { query: t }) => {
|
|
@@ -1623,7 +1622,7 @@ var Y = /*@__PURE__*/ J((e, { query: t }) => {
|
|
|
1623
1622
|
let r = e.state.phrase("replaced $ matches", n.length) + ".";
|
|
1624
1623
|
return e.dispatch({
|
|
1625
1624
|
changes: n,
|
|
1626
|
-
effects:
|
|
1625
|
+
effects: b.announce.of(r),
|
|
1627
1626
|
userEvent: "input.replace.all"
|
|
1628
1627
|
}), !0;
|
|
1629
1628
|
});
|
|
@@ -1643,7 +1642,7 @@ function Dr(e, t) {
|
|
|
1643
1642
|
});
|
|
1644
1643
|
}
|
|
1645
1644
|
function Or(e) {
|
|
1646
|
-
let t =
|
|
1645
|
+
let t = we(e, Er);
|
|
1647
1646
|
return t && t.dom.querySelector("[main-field]");
|
|
1648
1647
|
}
|
|
1649
1648
|
function kr(e) {
|
|
@@ -1658,12 +1657,12 @@ var Ar = (e) => {
|
|
|
1658
1657
|
let r = Dr(e.state, t.query.spec);
|
|
1659
1658
|
r.valid && e.dispatch({ effects: K.of(r) }), n.focus(), n.select();
|
|
1660
1659
|
}
|
|
1661
|
-
} else e.dispatch({ effects: [_r.of(!0), t ? K.of(Dr(e.state, t.query.spec)) :
|
|
1660
|
+
} else e.dispatch({ effects: [_r.of(!0), t ? K.of(Dr(e.state, t.query.spec)) : _.appendConfig.of(Ir)] });
|
|
1662
1661
|
return !0;
|
|
1663
1662
|
}, jr = (e) => {
|
|
1664
1663
|
let t = e.state.field(q, !1);
|
|
1665
1664
|
if (!t || !t.panel) return !1;
|
|
1666
|
-
let n =
|
|
1665
|
+
let n = we(e, Er);
|
|
1667
1666
|
return n && n.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: _r.of(!1) }), !0;
|
|
1668
1667
|
}, Mr = [
|
|
1669
1668
|
{
|
|
@@ -1707,7 +1706,7 @@ var Ar = (e) => {
|
|
|
1707
1706
|
constructor(e) {
|
|
1708
1707
|
this.view = e;
|
|
1709
1708
|
let t = this.query = e.state.field(q).query.spec;
|
|
1710
|
-
this.commit = this.commit.bind(this), this.searchField =
|
|
1709
|
+
this.commit = this.commit.bind(this), this.searchField = y("input", {
|
|
1711
1710
|
value: t.search,
|
|
1712
1711
|
placeholder: Z(e, "Find"),
|
|
1713
1712
|
"aria-label": Z(e, "Find"),
|
|
@@ -1717,7 +1716,7 @@ var Ar = (e) => {
|
|
|
1717
1716
|
"main-field": "true",
|
|
1718
1717
|
onchange: this.commit,
|
|
1719
1718
|
onkeyup: this.commit
|
|
1720
|
-
}), this.replaceField =
|
|
1719
|
+
}), this.replaceField = y("input", {
|
|
1721
1720
|
value: t.replace,
|
|
1722
1721
|
placeholder: Z(e, "Replace"),
|
|
1723
1722
|
"aria-label": Z(e, "Replace"),
|
|
@@ -1726,19 +1725,19 @@ var Ar = (e) => {
|
|
|
1726
1725
|
form: "",
|
|
1727
1726
|
onchange: this.commit,
|
|
1728
1727
|
onkeyup: this.commit
|
|
1729
|
-
}), this.caseField =
|
|
1728
|
+
}), this.caseField = y("input", {
|
|
1730
1729
|
type: "checkbox",
|
|
1731
1730
|
name: "case",
|
|
1732
1731
|
form: "",
|
|
1733
1732
|
checked: t.caseSensitive,
|
|
1734
1733
|
onchange: this.commit
|
|
1735
|
-
}), this.reField =
|
|
1734
|
+
}), this.reField = y("input", {
|
|
1736
1735
|
type: "checkbox",
|
|
1737
1736
|
name: "re",
|
|
1738
1737
|
form: "",
|
|
1739
1738
|
checked: t.regexp,
|
|
1740
1739
|
onchange: this.commit
|
|
1741
|
-
}), this.wordField =
|
|
1740
|
+
}), this.wordField = y("input", {
|
|
1742
1741
|
type: "checkbox",
|
|
1743
1742
|
name: "word",
|
|
1744
1743
|
form: "",
|
|
@@ -1746,14 +1745,14 @@ var Ar = (e) => {
|
|
|
1746
1745
|
onchange: this.commit
|
|
1747
1746
|
});
|
|
1748
1747
|
function n(e, t, n) {
|
|
1749
|
-
return
|
|
1748
|
+
return y("button", {
|
|
1750
1749
|
class: "cm-button",
|
|
1751
1750
|
name: e,
|
|
1752
1751
|
onclick: t,
|
|
1753
1752
|
type: "button"
|
|
1754
1753
|
}, n);
|
|
1755
1754
|
}
|
|
1756
|
-
this.dom =
|
|
1755
|
+
this.dom = y("div", {
|
|
1757
1756
|
onkeydown: (e) => this.keydown(e),
|
|
1758
1757
|
class: "cm-search"
|
|
1759
1758
|
}, [
|
|
@@ -1761,16 +1760,16 @@ var Ar = (e) => {
|
|
|
1761
1760
|
n("next", () => Y(e), [Z(e, "next")]),
|
|
1762
1761
|
n("prev", () => X(e), [Z(e, "previous")]),
|
|
1763
1762
|
n("select", () => Sr(e), [Z(e, "all")]),
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1763
|
+
y("label", null, [this.caseField, Z(e, "match case")]),
|
|
1764
|
+
y("label", null, [this.reField, Z(e, "regexp")]),
|
|
1765
|
+
y("label", null, [this.wordField, Z(e, "by word")]),
|
|
1767
1766
|
...e.state.readOnly ? [] : [
|
|
1768
|
-
|
|
1767
|
+
y("br"),
|
|
1769
1768
|
this.replaceField,
|
|
1770
1769
|
n("replace", () => wr(e), [Z(e, "replace")]),
|
|
1771
1770
|
n("replaceAll", () => Tr(e), [Z(e, "replace all")])
|
|
1772
1771
|
],
|
|
1773
|
-
|
|
1772
|
+
y("button", {
|
|
1774
1773
|
name: "close",
|
|
1775
1774
|
onclick: () => jr(e),
|
|
1776
1775
|
"aria-label": Z(e, "close"),
|
|
@@ -1789,7 +1788,7 @@ var Ar = (e) => {
|
|
|
1789
1788
|
e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: K.of(e) }));
|
|
1790
1789
|
}
|
|
1791
1790
|
keydown(e) {
|
|
1792
|
-
|
|
1791
|
+
De(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? X : Y)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), wr(this.view));
|
|
1793
1792
|
}
|
|
1794
1793
|
update(e) {
|
|
1795
1794
|
for (let t of e.transactions) for (let e of t.effects) e.is(K) && !e.value.eq(this.query) && this.setQuery(e.value);
|
|
@@ -1825,9 +1824,9 @@ function Pr(e, { from: t, to: n }) {
|
|
|
1825
1824
|
break;
|
|
1826
1825
|
}
|
|
1827
1826
|
}
|
|
1828
|
-
return
|
|
1827
|
+
return b.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`);
|
|
1829
1828
|
}
|
|
1830
|
-
var Fr = /*@__PURE__*/
|
|
1829
|
+
var Fr = /*@__PURE__*/ b.baseTheme({
|
|
1831
1830
|
".cm-panel.cm-search": {
|
|
1832
1831
|
padding: "2px 6px 4px",
|
|
1833
1832
|
position: "relative",
|
|
@@ -1854,41 +1853,41 @@ var Fr = /*@__PURE__*/ v.baseTheme({
|
|
|
1854
1853
|
"&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
|
|
1855
1854
|
}), Ir = [
|
|
1856
1855
|
q,
|
|
1857
|
-
/*@__PURE__*/
|
|
1856
|
+
/*@__PURE__*/ ae.low(xr),
|
|
1858
1857
|
Fr
|
|
1859
1858
|
], Lr = [
|
|
1859
|
+
Oe(),
|
|
1860
1860
|
_e(),
|
|
1861
|
-
|
|
1862
|
-
he(),
|
|
1861
|
+
Ee(),
|
|
1863
1862
|
Ye(),
|
|
1863
|
+
s(),
|
|
1864
1864
|
Te(),
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
Ce(),
|
|
1865
|
+
xe(),
|
|
1866
|
+
ce.allowMultipleSelections.of(!0),
|
|
1867
|
+
d(),
|
|
1868
|
+
c(o, { fallback: !0 }),
|
|
1869
|
+
a(),
|
|
1871
1870
|
Me(),
|
|
1872
1871
|
Ae(),
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1872
|
+
me(),
|
|
1873
|
+
be(),
|
|
1874
|
+
Se(),
|
|
1876
1875
|
$n(),
|
|
1877
|
-
|
|
1876
|
+
ye.of([
|
|
1878
1877
|
...ke,
|
|
1879
1878
|
...Vn,
|
|
1880
1879
|
...Mr,
|
|
1881
1880
|
...lt,
|
|
1882
|
-
...
|
|
1881
|
+
...r,
|
|
1883
1882
|
...je,
|
|
1884
1883
|
...Ne
|
|
1885
1884
|
])
|
|
1886
1885
|
], Rr = [
|
|
1887
|
-
|
|
1886
|
+
Ee(),
|
|
1888
1887
|
Ye(),
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1888
|
+
Te(),
|
|
1889
|
+
c(o, { fallback: !0 }),
|
|
1890
|
+
ye.of([...Vn, ...lt])
|
|
1892
1891
|
];
|
|
1893
1892
|
//#endregion
|
|
1894
|
-
export {
|
|
1893
|
+
export { b as EditorView, Lr as basicSetup, Rr as minimalSetup };
|