@hpcc-js/codemirror 2.51.0 → 2.55.0
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.es6.js +723 -461
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +726 -464
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +20 -19
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Palette, HTMLWidget } from '@hpcc-js/common';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/codemirror";
|
|
4
|
-
var PKG_VERSION = "2.
|
|
5
|
-
var BUILD_VERSION = "2.
|
|
4
|
+
var PKG_VERSION = "2.55.0";
|
|
5
|
+
var BUILD_VERSION = "2.97.0";
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -48,21 +48,11 @@ var __assign = function() {
|
|
|
48
48
|
|
|
49
49
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
return module = {
|
|
53
|
-
path: basedir,
|
|
54
|
-
exports: {},
|
|
55
|
-
require: function (path, base) {
|
|
56
|
-
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
57
|
-
}
|
|
58
|
-
}, fn(module, module.exports), module.exports;
|
|
59
|
-
}
|
|
51
|
+
var css = {exports: {}};
|
|
60
52
|
|
|
61
|
-
|
|
62
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
63
|
-
}
|
|
53
|
+
var codemirror = {exports: {}};
|
|
64
54
|
|
|
65
|
-
|
|
55
|
+
(function (module, exports) {
|
|
66
56
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
67
57
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
68
58
|
|
|
@@ -73,7 +63,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
73
63
|
// at http://marijnhaverbeke.nl/blog/#cm-internals .
|
|
74
64
|
|
|
75
65
|
(function (global, factory) {
|
|
76
|
-
|
|
66
|
+
module.exports = factory() ;
|
|
77
67
|
}(commonjsGlobal, (function () {
|
|
78
68
|
// Kludges for bugs and behavior differences that can't be feature
|
|
79
69
|
// detected are enabled based on userAgent etc sniffing.
|
|
@@ -94,7 +84,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
94
84
|
var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
|
|
95
85
|
var phantom = /PhantomJS/.test(userAgent);
|
|
96
86
|
|
|
97
|
-
var ios =
|
|
87
|
+
var ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2);
|
|
98
88
|
var android = /Android/.test(userAgent);
|
|
99
89
|
// This is woefully incomplete. Suggestions for alternative methods welcome.
|
|
100
90
|
var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
|
|
@@ -266,7 +256,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
266
256
|
}
|
|
267
257
|
|
|
268
258
|
// Number of pixels added to scroller and sizer to hide scrollbar
|
|
269
|
-
var scrollerGap =
|
|
259
|
+
var scrollerGap = 50;
|
|
270
260
|
|
|
271
261
|
// Returned or thrown by various protocols to signal 'I'm not
|
|
272
262
|
// handling this'.
|
|
@@ -547,14 +537,15 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
547
537
|
for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
|
|
548
538
|
order.push(new BidiSpan(0, start, i$7));
|
|
549
539
|
} else {
|
|
550
|
-
var pos = i$7, at = order.length;
|
|
540
|
+
var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0;
|
|
551
541
|
for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
|
|
552
542
|
for (var j$2 = pos; j$2 < i$7;) {
|
|
553
543
|
if (countsAsNum.test(types[j$2])) {
|
|
554
|
-
if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }
|
|
544
|
+
if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }
|
|
555
545
|
var nstart = j$2;
|
|
556
546
|
for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
|
|
557
547
|
order.splice(at, 0, new BidiSpan(2, nstart, j$2));
|
|
548
|
+
at += isRTL;
|
|
558
549
|
pos = j$2;
|
|
559
550
|
} else { ++j$2; }
|
|
560
551
|
}
|
|
@@ -1262,7 +1253,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
1262
1253
|
var prop = lineClass[1] ? "bgClass" : "textClass";
|
|
1263
1254
|
if (output[prop] == null)
|
|
1264
1255
|
{ output[prop] = lineClass[2]; }
|
|
1265
|
-
else if (!(new RegExp("(
|
|
1256
|
+
else if (!(new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)")).test(output[prop]))
|
|
1266
1257
|
{ output[prop] += " " + lineClass[2]; }
|
|
1267
1258
|
} }
|
|
1268
1259
|
return type
|
|
@@ -1372,6 +1363,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
1372
1363
|
if (span.marker == marker) { return span }
|
|
1373
1364
|
} }
|
|
1374
1365
|
}
|
|
1366
|
+
|
|
1375
1367
|
// Remove a span from an array, returning undefined if no spans are
|
|
1376
1368
|
// left (we don't store arrays for lines without spans).
|
|
1377
1369
|
function removeMarkedSpan(spans, span) {
|
|
@@ -1380,9 +1372,16 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
1380
1372
|
{ if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
|
|
1381
1373
|
return r
|
|
1382
1374
|
}
|
|
1375
|
+
|
|
1383
1376
|
// Add a span to a line.
|
|
1384
|
-
function addMarkedSpan(line, span) {
|
|
1385
|
-
|
|
1377
|
+
function addMarkedSpan(line, span, op) {
|
|
1378
|
+
var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));
|
|
1379
|
+
if (inThisOp && inThisOp.has(line.markedSpans)) {
|
|
1380
|
+
line.markedSpans.push(span);
|
|
1381
|
+
} else {
|
|
1382
|
+
line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
|
|
1383
|
+
if (inThisOp) { inThisOp.add(line.markedSpans); }
|
|
1384
|
+
}
|
|
1386
1385
|
span.marker.attachLine(line);
|
|
1387
1386
|
}
|
|
1388
1387
|
|
|
@@ -1902,7 +1901,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
1902
1901
|
}
|
|
1903
1902
|
}
|
|
1904
1903
|
builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
|
|
1905
|
-
if (style || startStyle || endStyle || mustWrap || css) {
|
|
1904
|
+
if (style || startStyle || endStyle || mustWrap || css || attributes) {
|
|
1906
1905
|
var fullStyle = style || "";
|
|
1907
1906
|
if (startStyle) { fullStyle += startStyle; }
|
|
1908
1907
|
if (endStyle) { fullStyle += endStyle; }
|
|
@@ -2247,6 +2246,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
2247
2246
|
if (cm.options.lineNumbers || markers) {
|
|
2248
2247
|
var wrap$1 = ensureLineWrapped(lineView);
|
|
2249
2248
|
var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
|
|
2249
|
+
gutterWrap.setAttribute("aria-hidden", "true");
|
|
2250
2250
|
cm.display.input.setUneditable(gutterWrap);
|
|
2251
2251
|
wrap$1.insertBefore(gutterWrap, lineView.text);
|
|
2252
2252
|
if (lineView.line.gutterClass)
|
|
@@ -2403,12 +2403,14 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
2403
2403
|
function mapFromLineView(lineView, line, lineN) {
|
|
2404
2404
|
if (lineView.line == line)
|
|
2405
2405
|
{ return {map: lineView.measure.map, cache: lineView.measure.cache} }
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
{
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
{
|
|
2406
|
+
if (lineView.rest) {
|
|
2407
|
+
for (var i = 0; i < lineView.rest.length; i++)
|
|
2408
|
+
{ if (lineView.rest[i] == line)
|
|
2409
|
+
{ return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }
|
|
2410
|
+
for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)
|
|
2411
|
+
{ if (lineNo(lineView.rest[i$1]) > lineN)
|
|
2412
|
+
{ return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }
|
|
2413
|
+
}
|
|
2412
2414
|
}
|
|
2413
2415
|
|
|
2414
2416
|
// Render a line into the hidden node display.externalMeasured. Used
|
|
@@ -3021,7 +3023,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3021
3023
|
var x, y, space = display.lineSpace.getBoundingClientRect();
|
|
3022
3024
|
// Fails unpredictably on IE[67] when mouse is dragged around quickly.
|
|
3023
3025
|
try { x = e.clientX - space.left; y = e.clientY - space.top; }
|
|
3024
|
-
catch (e) { return null }
|
|
3026
|
+
catch (e$1) { return null }
|
|
3025
3027
|
var coords = coordsChar(cm, x, y), line;
|
|
3026
3028
|
if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
|
|
3027
3029
|
var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
|
|
@@ -3202,13 +3204,19 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3202
3204
|
var curFragment = result.cursors = document.createDocumentFragment();
|
|
3203
3205
|
var selFragment = result.selection = document.createDocumentFragment();
|
|
3204
3206
|
|
|
3207
|
+
var customCursor = cm.options.$customCursor;
|
|
3208
|
+
if (customCursor) { primary = true; }
|
|
3205
3209
|
for (var i = 0; i < doc.sel.ranges.length; i++) {
|
|
3206
3210
|
if (!primary && i == doc.sel.primIndex) { continue }
|
|
3207
3211
|
var range = doc.sel.ranges[i];
|
|
3208
3212
|
if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }
|
|
3209
3213
|
var collapsed = range.empty();
|
|
3210
|
-
if (
|
|
3211
|
-
|
|
3214
|
+
if (customCursor) {
|
|
3215
|
+
var head = customCursor(cm, range);
|
|
3216
|
+
if (head) { drawSelectionCursor(cm, head, curFragment); }
|
|
3217
|
+
} else if (collapsed || cm.options.showCursorWhenSelecting) {
|
|
3218
|
+
drawSelectionCursor(cm, range.head, curFragment);
|
|
3219
|
+
}
|
|
3212
3220
|
if (!collapsed)
|
|
3213
3221
|
{ drawSelectionRange(cm, range, selFragment); }
|
|
3214
3222
|
}
|
|
@@ -3224,6 +3232,12 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3224
3232
|
cursor.style.top = pos.top + "px";
|
|
3225
3233
|
cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
|
|
3226
3234
|
|
|
3235
|
+
if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) {
|
|
3236
|
+
var charPos = charCoords(cm, head, "div", null, null);
|
|
3237
|
+
var width = charPos.right - charPos.left;
|
|
3238
|
+
cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px";
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3227
3241
|
if (pos.other) {
|
|
3228
3242
|
// Secondary cursor, shown when on a 'jump' in bi-directional text
|
|
3229
3243
|
var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
|
|
@@ -3337,26 +3351,31 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3337
3351
|
var on = true;
|
|
3338
3352
|
display.cursorDiv.style.visibility = "";
|
|
3339
3353
|
if (cm.options.cursorBlinkRate > 0)
|
|
3340
|
-
{ display.blinker = setInterval(function () {
|
|
3341
|
-
cm.
|
|
3354
|
+
{ display.blinker = setInterval(function () {
|
|
3355
|
+
if (!cm.hasFocus()) { onBlur(cm); }
|
|
3356
|
+
display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
|
|
3357
|
+
}, cm.options.cursorBlinkRate); }
|
|
3342
3358
|
else if (cm.options.cursorBlinkRate < 0)
|
|
3343
3359
|
{ display.cursorDiv.style.visibility = "hidden"; }
|
|
3344
3360
|
}
|
|
3345
3361
|
|
|
3346
3362
|
function ensureFocus(cm) {
|
|
3347
|
-
if (!cm.
|
|
3363
|
+
if (!cm.hasFocus()) {
|
|
3364
|
+
cm.display.input.focus();
|
|
3365
|
+
if (!cm.state.focused) { onFocus(cm); }
|
|
3366
|
+
}
|
|
3348
3367
|
}
|
|
3349
3368
|
|
|
3350
3369
|
function delayBlurEvent(cm) {
|
|
3351
3370
|
cm.state.delayingBlurEvent = true;
|
|
3352
3371
|
setTimeout(function () { if (cm.state.delayingBlurEvent) {
|
|
3353
3372
|
cm.state.delayingBlurEvent = false;
|
|
3354
|
-
onBlur(cm);
|
|
3373
|
+
if (cm.state.focused) { onBlur(cm); }
|
|
3355
3374
|
} }, 100);
|
|
3356
3375
|
}
|
|
3357
3376
|
|
|
3358
3377
|
function onFocus(cm, e) {
|
|
3359
|
-
if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }
|
|
3378
|
+
if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }
|
|
3360
3379
|
|
|
3361
3380
|
if (cm.options.readOnly == "nocursor") { return }
|
|
3362
3381
|
if (!cm.state.focused) {
|
|
@@ -3391,10 +3410,14 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3391
3410
|
function updateHeightsInViewport(cm) {
|
|
3392
3411
|
var display = cm.display;
|
|
3393
3412
|
var prevBottom = display.lineDiv.offsetTop;
|
|
3413
|
+
var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);
|
|
3414
|
+
var oldHeight = display.lineDiv.getBoundingClientRect().top;
|
|
3415
|
+
var mustScroll = 0;
|
|
3394
3416
|
for (var i = 0; i < display.view.length; i++) {
|
|
3395
3417
|
var cur = display.view[i], wrapping = cm.options.lineWrapping;
|
|
3396
3418
|
var height = (void 0), width = 0;
|
|
3397
3419
|
if (cur.hidden) { continue }
|
|
3420
|
+
oldHeight += cur.line.height;
|
|
3398
3421
|
if (ie && ie_version < 8) {
|
|
3399
3422
|
var bot = cur.node.offsetTop + cur.node.offsetHeight;
|
|
3400
3423
|
height = bot - prevBottom;
|
|
@@ -3409,6 +3432,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3409
3432
|
}
|
|
3410
3433
|
var diff = cur.line.height - height;
|
|
3411
3434
|
if (diff > .005 || diff < -.005) {
|
|
3435
|
+
if (oldHeight < viewTop) { mustScroll -= diff; }
|
|
3412
3436
|
updateLineHeight(cur.line, height);
|
|
3413
3437
|
updateWidgetHeight(cur.line);
|
|
3414
3438
|
if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
|
|
@@ -3423,6 +3447,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3423
3447
|
}
|
|
3424
3448
|
}
|
|
3425
3449
|
}
|
|
3450
|
+
if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }
|
|
3426
3451
|
}
|
|
3427
3452
|
|
|
3428
3453
|
// Read and store the height of line widgets associated with the
|
|
@@ -3486,8 +3511,8 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3486
3511
|
// Set pos and end to the cursor positions around the character pos sticks to
|
|
3487
3512
|
// If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
|
|
3488
3513
|
// If pos == Pos(_, 0, "before"), pos and end are unchanged
|
|
3489
|
-
pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
|
|
3490
3514
|
end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
|
|
3515
|
+
pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
|
|
3491
3516
|
}
|
|
3492
3517
|
for (var limit = 0; limit < 5; limit++) {
|
|
3493
3518
|
var changed = false;
|
|
@@ -3538,14 +3563,15 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3538
3563
|
if (newTop != screentop) { result.scrollTop = newTop; }
|
|
3539
3564
|
}
|
|
3540
3565
|
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3566
|
+
var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;
|
|
3567
|
+
var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;
|
|
3568
|
+
var screenw = displayWidth(cm) - display.gutters.offsetWidth;
|
|
3543
3569
|
var tooWide = rect.right - rect.left > screenw;
|
|
3544
3570
|
if (tooWide) { rect.right = rect.left + screenw; }
|
|
3545
3571
|
if (rect.left < 10)
|
|
3546
3572
|
{ result.scrollLeft = 0; }
|
|
3547
3573
|
else if (rect.left < screenleft)
|
|
3548
|
-
{ result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }
|
|
3574
|
+
{ result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }
|
|
3549
3575
|
else if (rect.right > screenw + screenleft - 3)
|
|
3550
3576
|
{ result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }
|
|
3551
3577
|
return result
|
|
@@ -3612,7 +3638,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3612
3638
|
}
|
|
3613
3639
|
|
|
3614
3640
|
function setScrollTop(cm, val, forceScroll) {
|
|
3615
|
-
val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);
|
|
3641
|
+
val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));
|
|
3616
3642
|
if (cm.display.scroller.scrollTop == val && !forceScroll) { return }
|
|
3617
3643
|
cm.doc.scrollTop = val;
|
|
3618
3644
|
cm.display.scrollbars.setScrollTop(val);
|
|
@@ -3622,7 +3648,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3622
3648
|
// Sync scroller and scrollbar, ensure the gutter elements are
|
|
3623
3649
|
// aligned.
|
|
3624
3650
|
function setScrollLeft(cm, val, isScroller, forceScroll) {
|
|
3625
|
-
val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
|
|
3651
|
+
val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));
|
|
3626
3652
|
if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }
|
|
3627
3653
|
cm.doc.scrollLeft = val;
|
|
3628
3654
|
alignHorizontally(cm);
|
|
@@ -3682,6 +3708,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3682
3708
|
this.vert.firstChild.style.height =
|
|
3683
3709
|
Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
|
|
3684
3710
|
} else {
|
|
3711
|
+
this.vert.scrollTop = 0;
|
|
3685
3712
|
this.vert.style.display = "";
|
|
3686
3713
|
this.vert.firstChild.style.height = "0";
|
|
3687
3714
|
}
|
|
@@ -3837,7 +3864,8 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
3837
3864
|
scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
|
|
3838
3865
|
scrollToPos: null, // Used to scroll to a specific position
|
|
3839
3866
|
focus: false,
|
|
3840
|
-
id: ++nextOpId
|
|
3867
|
+
id: ++nextOpId, // Unique ID
|
|
3868
|
+
markArrays: null // Used by addMarkedSpan
|
|
3841
3869
|
};
|
|
3842
3870
|
pushOperation(cm.curOp);
|
|
3843
3871
|
}
|
|
@@ -4111,7 +4139,8 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4111
4139
|
function restoreSelection(snapshot) {
|
|
4112
4140
|
if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }
|
|
4113
4141
|
snapshot.activeElt.focus();
|
|
4114
|
-
if (
|
|
4142
|
+
if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&
|
|
4143
|
+
snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
|
|
4115
4144
|
var sel = window.getSelection(), range = document.createRange();
|
|
4116
4145
|
range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
|
|
4117
4146
|
range.collapse(false);
|
|
@@ -4209,6 +4238,8 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4209
4238
|
update.visible = visibleLines(cm.display, cm.doc, viewport);
|
|
4210
4239
|
if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
|
|
4211
4240
|
{ break }
|
|
4241
|
+
} else if (first) {
|
|
4242
|
+
update.visible = visibleLines(cm.display, cm.doc, viewport);
|
|
4212
4243
|
}
|
|
4213
4244
|
if (!updateDisplayIfNeeded(cm, update)) { break }
|
|
4214
4245
|
updateHeightsInViewport(cm);
|
|
@@ -4287,6 +4318,8 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4287
4318
|
function updateGutterSpace(display) {
|
|
4288
4319
|
var width = display.gutters.offsetWidth;
|
|
4289
4320
|
display.sizer.style.marginLeft = width + "px";
|
|
4321
|
+
// Send an event to consumers responding to changes in gutter width.
|
|
4322
|
+
signalLater(display, "gutterChanged", display);
|
|
4290
4323
|
}
|
|
4291
4324
|
|
|
4292
4325
|
function setDocumentHeight(cm, measure) {
|
|
@@ -4426,6 +4459,10 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4426
4459
|
// The element in which the editor lives.
|
|
4427
4460
|
d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
|
|
4428
4461
|
|
|
4462
|
+
// This attribute is respected by automatic translation systems such as Google Translate,
|
|
4463
|
+
// and may also be respected by tools used by human translators.
|
|
4464
|
+
d.wrapper.setAttribute('translate', 'no');
|
|
4465
|
+
|
|
4429
4466
|
// Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
|
|
4430
4467
|
if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
|
|
4431
4468
|
if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
|
|
@@ -4523,6 +4560,12 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4523
4560
|
|
|
4524
4561
|
function onScrollWheel(cm, e) {
|
|
4525
4562
|
var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
|
|
4563
|
+
var pixelsPerUnit = wheelPixelsPerUnit;
|
|
4564
|
+
if (e.deltaMode === 0) {
|
|
4565
|
+
dx = e.deltaX;
|
|
4566
|
+
dy = e.deltaY;
|
|
4567
|
+
pixelsPerUnit = 1;
|
|
4568
|
+
}
|
|
4526
4569
|
|
|
4527
4570
|
var display = cm.display, scroll = display.scroller;
|
|
4528
4571
|
// Quit if there's nothing to scroll here
|
|
@@ -4551,10 +4594,10 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4551
4594
|
// estimated pixels/delta value, we just handle horizontal
|
|
4552
4595
|
// scrolling entirely here. It'll be slightly off from native, but
|
|
4553
4596
|
// better than glitching out.
|
|
4554
|
-
if (dx && !gecko && !presto &&
|
|
4597
|
+
if (dx && !gecko && !presto && pixelsPerUnit != null) {
|
|
4555
4598
|
if (dy && canScrollY)
|
|
4556
|
-
{ updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy *
|
|
4557
|
-
setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx *
|
|
4599
|
+
{ updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }
|
|
4600
|
+
setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));
|
|
4558
4601
|
// Only prevent default scrolling if vertical scrolling is
|
|
4559
4602
|
// actually possible. Otherwise, it causes vertical scroll
|
|
4560
4603
|
// jitter on OSX trackpads when deltaX is small and deltaY
|
|
@@ -4567,15 +4610,15 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4567
4610
|
|
|
4568
4611
|
// 'Project' the visible viewport to cover the area that is being
|
|
4569
4612
|
// scrolled into view (if we know enough to estimate it).
|
|
4570
|
-
if (dy &&
|
|
4571
|
-
var pixels = dy *
|
|
4613
|
+
if (dy && pixelsPerUnit != null) {
|
|
4614
|
+
var pixels = dy * pixelsPerUnit;
|
|
4572
4615
|
var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
|
|
4573
4616
|
if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
|
|
4574
4617
|
else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
|
|
4575
4618
|
updateDisplaySimple(cm, {top: top, bottom: bot});
|
|
4576
4619
|
}
|
|
4577
4620
|
|
|
4578
|
-
if (wheelSamples < 20) {
|
|
4621
|
+
if (wheelSamples < 20 && e.deltaMode !== 0) {
|
|
4579
4622
|
if (display.wheelStartX == null) {
|
|
4580
4623
|
display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
|
|
4581
4624
|
display.wheelDX = dx; display.wheelDY = dy;
|
|
@@ -4834,6 +4877,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4834
4877
|
estimateLineHeights(cm);
|
|
4835
4878
|
loadMode(cm);
|
|
4836
4879
|
setDirectionClass(cm);
|
|
4880
|
+
cm.options.direction = doc.direction;
|
|
4837
4881
|
if (!cm.options.lineWrapping) { findMaxLine(cm); }
|
|
4838
4882
|
cm.options.mode = doc.modeOption;
|
|
4839
4883
|
regChange(cm);
|
|
@@ -4850,19 +4894,19 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
4850
4894
|
});
|
|
4851
4895
|
}
|
|
4852
4896
|
|
|
4853
|
-
function History(
|
|
4897
|
+
function History(prev) {
|
|
4854
4898
|
// Arrays of change events and selections. Doing something adds an
|
|
4855
4899
|
// event to done and clears undo. Undoing moves events from done
|
|
4856
4900
|
// to undone, redoing moves them in the other direction.
|
|
4857
4901
|
this.done = []; this.undone = [];
|
|
4858
|
-
this.undoDepth = Infinity;
|
|
4902
|
+
this.undoDepth = prev ? prev.undoDepth : Infinity;
|
|
4859
4903
|
// Used to track when changes can be merged into a single undo
|
|
4860
4904
|
// event
|
|
4861
4905
|
this.lastModTime = this.lastSelTime = 0;
|
|
4862
4906
|
this.lastOp = this.lastSelOp = null;
|
|
4863
4907
|
this.lastOrigin = this.lastSelOrigin = null;
|
|
4864
4908
|
// Used by the isClean() method
|
|
4865
|
-
this.generation = this.maxGeneration =
|
|
4909
|
+
this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;
|
|
4866
4910
|
}
|
|
4867
4911
|
|
|
4868
4912
|
// Create a history change event from an updateDoc-style change
|
|
@@ -5167,7 +5211,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
5167
5211
|
(cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
|
|
5168
5212
|
setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
|
|
5169
5213
|
|
|
5170
|
-
if (!(options && options.scroll === false) && doc.cm)
|
|
5214
|
+
if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor")
|
|
5171
5215
|
{ ensureCursorVisible(doc.cm); }
|
|
5172
5216
|
}
|
|
5173
5217
|
|
|
@@ -5795,7 +5839,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
5795
5839
|
};
|
|
5796
5840
|
|
|
5797
5841
|
LineWidget.prototype.changed = function () {
|
|
5798
|
-
var this$1 = this;
|
|
5842
|
+
var this$1$1 = this;
|
|
5799
5843
|
|
|
5800
5844
|
var oldH = this.height, cm = this.doc.cm, line = this.line;
|
|
5801
5845
|
this.height = null;
|
|
@@ -5806,7 +5850,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
5806
5850
|
runInOp(cm, function () {
|
|
5807
5851
|
cm.curOp.forceUpdate = true;
|
|
5808
5852
|
adjustScrollWhenAboveVisible(cm, line, diff);
|
|
5809
|
-
signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
|
|
5853
|
+
signalLater(cm, "lineWidgetChanged", cm, this$1$1, lineNo(line));
|
|
5810
5854
|
});
|
|
5811
5855
|
}
|
|
5812
5856
|
};
|
|
@@ -5824,7 +5868,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
5824
5868
|
changeLine(doc, handle, "widget", function (line) {
|
|
5825
5869
|
var widgets = line.widgets || (line.widgets = []);
|
|
5826
5870
|
if (widget.insertAt == null) { widgets.push(widget); }
|
|
5827
|
-
else { widgets.splice(Math.min(widgets.length
|
|
5871
|
+
else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }
|
|
5828
5872
|
widget.line = line;
|
|
5829
5873
|
if (cm && !lineIsHidden(doc, line)) {
|
|
5830
5874
|
var aboveVisible = heightAtLine(line) < doc.scrollTop;
|
|
@@ -5931,7 +5975,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
5931
5975
|
// Signals that the marker's widget changed, and surrounding layout
|
|
5932
5976
|
// should be recomputed.
|
|
5933
5977
|
TextMarker.prototype.changed = function () {
|
|
5934
|
-
var this$1 = this;
|
|
5978
|
+
var this$1$1 = this;
|
|
5935
5979
|
|
|
5936
5980
|
var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
|
|
5937
5981
|
if (!pos || !cm) { return }
|
|
@@ -5950,7 +5994,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
5950
5994
|
if (dHeight)
|
|
5951
5995
|
{ updateLineHeight(line, line.height + dHeight); }
|
|
5952
5996
|
}
|
|
5953
|
-
signalLater(cm, "markerChanged", cm, this$1);
|
|
5997
|
+
signalLater(cm, "markerChanged", cm, this$1$1);
|
|
5954
5998
|
});
|
|
5955
5999
|
};
|
|
5956
6000
|
|
|
@@ -6010,7 +6054,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6010
6054
|
if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
|
|
6011
6055
|
addMarkedSpan(line, new MarkedSpan(marker,
|
|
6012
6056
|
curLine == from.line ? from.ch : null,
|
|
6013
|
-
curLine == to.line ? to.ch : null));
|
|
6057
|
+
curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);
|
|
6014
6058
|
++curLine;
|
|
6015
6059
|
});
|
|
6016
6060
|
// lineIsHidden depends on the presence of the spans, so needs a second pass
|
|
@@ -6182,6 +6226,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6182
6226
|
getRange: function(from, to, lineSep) {
|
|
6183
6227
|
var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
|
|
6184
6228
|
if (lineSep === false) { return lines }
|
|
6229
|
+
if (lineSep === '') { return lines.join('') }
|
|
6185
6230
|
return lines.join(lineSep || this.lineSeparator())
|
|
6186
6231
|
},
|
|
6187
6232
|
|
|
@@ -6233,7 +6278,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6233
6278
|
var out = [];
|
|
6234
6279
|
for (var i = 0; i < ranges.length; i++)
|
|
6235
6280
|
{ out[i] = new Range(clipPos(this, ranges[i].anchor),
|
|
6236
|
-
clipPos(this, ranges[i].head)); }
|
|
6281
|
+
clipPos(this, ranges[i].head || ranges[i].anchor)); }
|
|
6237
6282
|
if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }
|
|
6238
6283
|
setSelection(this, normalizeSelection(this.cm, out, primary), options);
|
|
6239
6284
|
}),
|
|
@@ -6293,7 +6338,12 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6293
6338
|
for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }
|
|
6294
6339
|
return {undo: done, redo: undone}
|
|
6295
6340
|
},
|
|
6296
|
-
clearHistory: function() {
|
|
6341
|
+
clearHistory: function() {
|
|
6342
|
+
var this$1$1 = this;
|
|
6343
|
+
|
|
6344
|
+
this.history = new History(this.history);
|
|
6345
|
+
linkedDocs(this, function (doc) { return doc.history = this$1$1.history; }, true);
|
|
6346
|
+
},
|
|
6297
6347
|
|
|
6298
6348
|
markClean: function() {
|
|
6299
6349
|
this.cleanGeneration = this.changeGeneration(true);
|
|
@@ -6312,7 +6362,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6312
6362
|
undone: copyHistoryArray(this.history.undone)}
|
|
6313
6363
|
},
|
|
6314
6364
|
setHistory: function(histData) {
|
|
6315
|
-
var hist = this.history = new History(this.history
|
|
6365
|
+
var hist = this.history = new History(this.history);
|
|
6316
6366
|
hist.done = copyHistoryArray(histData.done.slice(0), null, true);
|
|
6317
6367
|
hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
|
|
6318
6368
|
},
|
|
@@ -6327,11 +6377,11 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6327
6377
|
}),
|
|
6328
6378
|
|
|
6329
6379
|
clearGutter: docMethodOp(function(gutterID) {
|
|
6330
|
-
var this$1 = this;
|
|
6380
|
+
var this$1$1 = this;
|
|
6331
6381
|
|
|
6332
6382
|
this.iter(function (line) {
|
|
6333
6383
|
if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
|
|
6334
|
-
changeLine(this$1, line, "gutter", function () {
|
|
6384
|
+
changeLine(this$1$1, line, "gutter", function () {
|
|
6335
6385
|
line.gutterMarkers[gutterID] = null;
|
|
6336
6386
|
if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }
|
|
6337
6387
|
return true
|
|
@@ -6544,28 +6594,39 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6544
6594
|
// and insert it.
|
|
6545
6595
|
if (files && files.length && window.FileReader && window.File) {
|
|
6546
6596
|
var n = files.length, text = Array(n), read = 0;
|
|
6547
|
-
var
|
|
6548
|
-
if (
|
|
6549
|
-
|
|
6550
|
-
{ return }
|
|
6551
|
-
|
|
6552
|
-
var reader = new FileReader;
|
|
6553
|
-
reader.onload = operation(cm, function () {
|
|
6554
|
-
var content = reader.result;
|
|
6555
|
-
if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { content = ""; }
|
|
6556
|
-
text[i] = content;
|
|
6557
|
-
if (++read == n) {
|
|
6597
|
+
var markAsReadAndPasteIfAllFilesAreRead = function () {
|
|
6598
|
+
if (++read == n) {
|
|
6599
|
+
operation(cm, function () {
|
|
6558
6600
|
pos = clipPos(cm.doc, pos);
|
|
6559
6601
|
var change = {from: pos, to: pos,
|
|
6560
|
-
text: cm.doc.splitLines(
|
|
6602
|
+
text: cm.doc.splitLines(
|
|
6603
|
+
text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),
|
|
6561
6604
|
origin: "paste"};
|
|
6562
6605
|
makeChange(cm.doc, change);
|
|
6563
|
-
setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));
|
|
6606
|
+
setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));
|
|
6607
|
+
})();
|
|
6608
|
+
}
|
|
6609
|
+
};
|
|
6610
|
+
var readTextFromFile = function (file, i) {
|
|
6611
|
+
if (cm.options.allowDropFileTypes &&
|
|
6612
|
+
indexOf(cm.options.allowDropFileTypes, file.type) == -1) {
|
|
6613
|
+
markAsReadAndPasteIfAllFilesAreRead();
|
|
6614
|
+
return
|
|
6615
|
+
}
|
|
6616
|
+
var reader = new FileReader;
|
|
6617
|
+
reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };
|
|
6618
|
+
reader.onload = function () {
|
|
6619
|
+
var content = reader.result;
|
|
6620
|
+
if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) {
|
|
6621
|
+
markAsReadAndPasteIfAllFilesAreRead();
|
|
6622
|
+
return
|
|
6564
6623
|
}
|
|
6565
|
-
|
|
6624
|
+
text[i] = content;
|
|
6625
|
+
markAsReadAndPasteIfAllFilesAreRead();
|
|
6626
|
+
};
|
|
6566
6627
|
reader.readAsText(file);
|
|
6567
6628
|
};
|
|
6568
|
-
for (var i = 0; i <
|
|
6629
|
+
for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }
|
|
6569
6630
|
} else { // Normal drop
|
|
6570
6631
|
// Don't do a replace if the drop happened inside of the selected text.
|
|
6571
6632
|
if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
|
|
@@ -6587,7 +6648,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6587
6648
|
cm.display.input.focus();
|
|
6588
6649
|
}
|
|
6589
6650
|
}
|
|
6590
|
-
catch(e){}
|
|
6651
|
+
catch(e$1){}
|
|
6591
6652
|
}
|
|
6592
6653
|
}
|
|
6593
6654
|
|
|
@@ -6683,7 +6744,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6683
6744
|
46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
|
|
6684
6745
|
106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
|
|
6685
6746
|
173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
|
6686
|
-
221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
|
6747
|
+
221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
|
|
6687
6748
|
63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
|
|
6688
6749
|
};
|
|
6689
6750
|
|
|
@@ -6720,10 +6781,9 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6720
6781
|
// Very basic readline/emacs-style bindings, which are standard on Mac.
|
|
6721
6782
|
keyMap.emacsy = {
|
|
6722
6783
|
"Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
|
|
6723
|
-
"
|
|
6724
|
-
"Ctrl-
|
|
6725
|
-
"
|
|
6726
|
-
"Ctrl-O": "openLine"
|
|
6784
|
+
"Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp",
|
|
6785
|
+
"Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine",
|
|
6786
|
+
"Ctrl-T": "transposeChars", "Ctrl-O": "openLine"
|
|
6727
6787
|
};
|
|
6728
6788
|
keyMap.macDefault = {
|
|
6729
6789
|
"Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
|
|
@@ -6818,7 +6878,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6818
6878
|
var base = name;
|
|
6819
6879
|
if (event.altKey && base != "Alt") { name = "Alt-" + name; }
|
|
6820
6880
|
if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
|
|
6821
|
-
if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "
|
|
6881
|
+
if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }
|
|
6822
6882
|
if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
|
|
6823
6883
|
return name
|
|
6824
6884
|
}
|
|
@@ -6875,6 +6935,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
6875
6935
|
|
|
6876
6936
|
function endOfLine(visually, cm, lineObj, lineNo, dir) {
|
|
6877
6937
|
if (visually) {
|
|
6938
|
+
if (cm.doc.direction == "rtl") { dir = -dir; }
|
|
6878
6939
|
var order = getOrder(lineObj, cm.doc.direction);
|
|
6879
6940
|
if (order) {
|
|
6880
6941
|
var part = dir < 0 ? lst(order) : order[0];
|
|
@@ -7043,7 +7104,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7043
7104
|
goGroupRight: function (cm) { return cm.moveH(1, "group"); },
|
|
7044
7105
|
goGroupLeft: function (cm) { return cm.moveH(-1, "group"); },
|
|
7045
7106
|
goWordRight: function (cm) { return cm.moveH(1, "word"); },
|
|
7046
|
-
delCharBefore: function (cm) { return cm.deleteH(-1, "
|
|
7107
|
+
delCharBefore: function (cm) { return cm.deleteH(-1, "codepoint"); },
|
|
7047
7108
|
delCharAfter: function (cm) { return cm.deleteH(1, "char"); },
|
|
7048
7109
|
delWordBefore: function (cm) { return cm.deleteH(-1, "word"); },
|
|
7049
7110
|
delWordAfter: function (cm) { return cm.deleteH(1, "word"); },
|
|
@@ -7129,7 +7190,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7129
7190
|
var line = getLine(cm.doc, start.line);
|
|
7130
7191
|
var order = getOrder(line, cm.doc.direction);
|
|
7131
7192
|
if (!order || order[0].level == 0) {
|
|
7132
|
-
var firstNonWS = Math.max(
|
|
7193
|
+
var firstNonWS = Math.max(start.ch, line.text.search(/\S/));
|
|
7133
7194
|
var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
|
|
7134
7195
|
return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
|
|
7135
7196
|
}
|
|
@@ -7232,6 +7293,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7232
7293
|
var lastStoppedKey = null;
|
|
7233
7294
|
function onKeyDown(e) {
|
|
7234
7295
|
var cm = this;
|
|
7296
|
+
if (e.target && e.target != cm.display.input.getField()) { return }
|
|
7235
7297
|
cm.curOp.focus = activeElt();
|
|
7236
7298
|
if (signalDOMEvent(cm, e)) { return }
|
|
7237
7299
|
// IE does strange things with escape.
|
|
@@ -7275,6 +7337,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7275
7337
|
|
|
7276
7338
|
function onKeyPress(e) {
|
|
7277
7339
|
var cm = this;
|
|
7340
|
+
if (e.target && e.target != cm.display.input.getField()) { return }
|
|
7278
7341
|
if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
|
|
7279
7342
|
var keyCode = e.keyCode, charCode = e.charCode;
|
|
7280
7343
|
if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
|
|
@@ -7414,6 +7477,10 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7414
7477
|
var dragEnd = operation(cm, function (e) {
|
|
7415
7478
|
if (webkit) { display.scroller.draggable = false; }
|
|
7416
7479
|
cm.state.draggingText = false;
|
|
7480
|
+
if (cm.state.delayingBlurEvent) {
|
|
7481
|
+
if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }
|
|
7482
|
+
else { delayBlurEvent(cm); }
|
|
7483
|
+
}
|
|
7417
7484
|
off(display.wrapper.ownerDocument, "mouseup", dragEnd);
|
|
7418
7485
|
off(display.wrapper.ownerDocument, "mousemove", mouseMove);
|
|
7419
7486
|
off(display.scroller, "dragstart", dragStart);
|
|
@@ -7423,8 +7490,8 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7423
7490
|
if (!behavior.addNew)
|
|
7424
7491
|
{ extendSelection(cm.doc, pos, null, null, behavior.extend); }
|
|
7425
7492
|
// Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
|
|
7426
|
-
if (webkit || ie && ie_version == 9)
|
|
7427
|
-
{ setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }
|
|
7493
|
+
if ((webkit && !safari) || ie && ie_version == 9)
|
|
7494
|
+
{ setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }
|
|
7428
7495
|
else
|
|
7429
7496
|
{ display.input.focus(); }
|
|
7430
7497
|
}
|
|
@@ -7437,15 +7504,15 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7437
7504
|
if (webkit) { display.scroller.draggable = true; }
|
|
7438
7505
|
cm.state.draggingText = dragEnd;
|
|
7439
7506
|
dragEnd.copy = !behavior.moveOnDrag;
|
|
7440
|
-
// IE's approach to draggable
|
|
7441
|
-
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
|
7442
7507
|
on(display.wrapper.ownerDocument, "mouseup", dragEnd);
|
|
7443
7508
|
on(display.wrapper.ownerDocument, "mousemove", mouseMove);
|
|
7444
7509
|
on(display.scroller, "dragstart", dragStart);
|
|
7445
7510
|
on(display.scroller, "drop", dragEnd);
|
|
7446
7511
|
|
|
7447
|
-
|
|
7512
|
+
cm.state.delayingBlurEvent = true;
|
|
7448
7513
|
setTimeout(function () { return display.input.focus(); }, 20);
|
|
7514
|
+
// IE's approach to draggable
|
|
7515
|
+
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
|
7449
7516
|
}
|
|
7450
7517
|
|
|
7451
7518
|
function rangeForUnit(cm, pos, unit) {
|
|
@@ -7458,6 +7525,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7458
7525
|
|
|
7459
7526
|
// Normal selection, as opposed to text dragging.
|
|
7460
7527
|
function leftButtonSelect(cm, event, start, behavior) {
|
|
7528
|
+
if (ie) { delayBlurEvent(cm); }
|
|
7461
7529
|
var display = cm.display, doc = cm.doc;
|
|
7462
7530
|
e_preventDefault(event);
|
|
7463
7531
|
|
|
@@ -7636,7 +7704,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7636
7704
|
mY = e.touches[0].clientY;
|
|
7637
7705
|
} else {
|
|
7638
7706
|
try { mX = e.clientX; mY = e.clientY; }
|
|
7639
|
-
catch(e) { return false }
|
|
7707
|
+
catch(e$1) { return false }
|
|
7640
7708
|
}
|
|
7641
7709
|
if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
|
|
7642
7710
|
if (prevent) { e_preventDefault(e); }
|
|
@@ -7736,7 +7804,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7736
7804
|
for (var i = newBreaks.length - 1; i >= 0; i--)
|
|
7737
7805
|
{ replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
|
|
7738
7806
|
});
|
|
7739
|
-
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b
|
|
7807
|
+
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
|
7740
7808
|
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
|
7741
7809
|
if (old != Init) { cm.refresh(); }
|
|
7742
7810
|
});
|
|
@@ -7800,6 +7868,12 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7800
7868
|
}
|
|
7801
7869
|
cm.display.input.readOnlyChanged(val);
|
|
7802
7870
|
});
|
|
7871
|
+
|
|
7872
|
+
option("screenReaderLabel", null, function (cm, val) {
|
|
7873
|
+
val = (val === '') ? null : val;
|
|
7874
|
+
cm.display.input.screenReaderLabelChanged(val);
|
|
7875
|
+
});
|
|
7876
|
+
|
|
7803
7877
|
option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);
|
|
7804
7878
|
option("dragDrop", true, dragDropChanged);
|
|
7805
7879
|
option("allowDropFileTypes", null);
|
|
@@ -7859,7 +7933,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7859
7933
|
// that user code is usually dealing with.
|
|
7860
7934
|
|
|
7861
7935
|
function CodeMirror(place, options) {
|
|
7862
|
-
var this$1 = this;
|
|
7936
|
+
var this$1$1 = this;
|
|
7863
7937
|
|
|
7864
7938
|
if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }
|
|
7865
7939
|
|
|
@@ -7900,7 +7974,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7900
7974
|
|
|
7901
7975
|
// Override magic textarea content restore that IE sometimes does
|
|
7902
7976
|
// on our hidden textarea on reload
|
|
7903
|
-
if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }
|
|
7977
|
+
if (ie && ie_version < 11) { setTimeout(function () { return this$1$1.display.input.reset(true); }, 20); }
|
|
7904
7978
|
|
|
7905
7979
|
registerEventHandlers(this);
|
|
7906
7980
|
ensureGlobalHandlers();
|
|
@@ -7910,7 +7984,9 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7910
7984
|
attachDoc(this, doc);
|
|
7911
7985
|
|
|
7912
7986
|
if ((options.autofocus && !mobile) || this.hasFocus())
|
|
7913
|
-
{ setTimeout(
|
|
7987
|
+
{ setTimeout(function () {
|
|
7988
|
+
if (this$1$1.hasFocus() && !this$1$1.state.focused) { onFocus(this$1$1); }
|
|
7989
|
+
}, 20); }
|
|
7914
7990
|
else
|
|
7915
7991
|
{ onBlur(this); }
|
|
7916
7992
|
|
|
@@ -7952,6 +8028,9 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
7952
8028
|
// which point we can't mess with it anymore. Context menu is
|
|
7953
8029
|
// handled in onMouseDown for these browsers.
|
|
7954
8030
|
on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); });
|
|
8031
|
+
on(d.input.getField(), "contextmenu", function (e) {
|
|
8032
|
+
if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }
|
|
8033
|
+
});
|
|
7955
8034
|
|
|
7956
8035
|
// Used to suppress mouse event handling when a touch happens
|
|
7957
8036
|
var touchFinished, prevTouch = {end: 0};
|
|
@@ -8147,7 +8226,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8147
8226
|
{ from = Pos(from.line, from.ch - deleted); }
|
|
8148
8227
|
else if (cm.state.overwrite && !paste) // Handle overwrite
|
|
8149
8228
|
{ to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
|
|
8150
|
-
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") ==
|
|
8229
|
+
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
|
|
8151
8230
|
{ from = to = Pos(from.line, 0); }
|
|
8152
8231
|
}
|
|
8153
8232
|
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
|
|
@@ -8216,7 +8295,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8216
8295
|
}
|
|
8217
8296
|
|
|
8218
8297
|
function hiddenTextarea() {
|
|
8219
|
-
var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
|
|
8298
|
+
var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");
|
|
8220
8299
|
var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
|
8221
8300
|
// The textarea is kept positioned near the cursor to prevent the
|
|
8222
8301
|
// fact that it'll be scrolled into view on input from scrolling
|
|
@@ -8487,11 +8566,11 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8487
8566
|
},
|
|
8488
8567
|
|
|
8489
8568
|
moveH: methodOp(function(dir, unit) {
|
|
8490
|
-
var this$1 = this;
|
|
8569
|
+
var this$1$1 = this;
|
|
8491
8570
|
|
|
8492
8571
|
this.extendSelectionsBy(function (range) {
|
|
8493
|
-
if (this$1.display.shift || this$1.doc.extend || range.empty())
|
|
8494
|
-
{ return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }
|
|
8572
|
+
if (this$1$1.display.shift || this$1$1.doc.extend || range.empty())
|
|
8573
|
+
{ return findPosH(this$1$1.doc, range.head, dir, unit, this$1$1.options.rtlMoveVisually) }
|
|
8495
8574
|
else
|
|
8496
8575
|
{ return dir < 0 ? range.from() : range.to() }
|
|
8497
8576
|
}, sel_move);
|
|
@@ -8523,19 +8602,19 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8523
8602
|
},
|
|
8524
8603
|
|
|
8525
8604
|
moveV: methodOp(function(dir, unit) {
|
|
8526
|
-
var this$1 = this;
|
|
8605
|
+
var this$1$1 = this;
|
|
8527
8606
|
|
|
8528
8607
|
var doc = this.doc, goals = [];
|
|
8529
8608
|
var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
|
|
8530
8609
|
doc.extendSelectionsBy(function (range) {
|
|
8531
8610
|
if (collapse)
|
|
8532
8611
|
{ return dir < 0 ? range.from() : range.to() }
|
|
8533
|
-
var headPos = cursorCoords(this$1, range.head, "div");
|
|
8612
|
+
var headPos = cursorCoords(this$1$1, range.head, "div");
|
|
8534
8613
|
if (range.goalColumn != null) { headPos.left = range.goalColumn; }
|
|
8535
8614
|
goals.push(headPos.left);
|
|
8536
|
-
var pos = findPosV(this$1, headPos, dir, unit);
|
|
8615
|
+
var pos = findPosV(this$1$1, headPos, dir, unit);
|
|
8537
8616
|
if (unit == "page" && range == doc.sel.primary())
|
|
8538
|
-
{ addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); }
|
|
8617
|
+
{ addToScrollTop(this$1$1, charCoords(this$1$1, pos, "div").top - headPos.top); }
|
|
8539
8618
|
return pos
|
|
8540
8619
|
}, sel_move);
|
|
8541
8620
|
if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
|
|
@@ -8601,7 +8680,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8601
8680
|
}),
|
|
8602
8681
|
|
|
8603
8682
|
setSize: methodOp(function(width, height) {
|
|
8604
|
-
var this$1 = this;
|
|
8683
|
+
var this$1$1 = this;
|
|
8605
8684
|
|
|
8606
8685
|
var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; };
|
|
8607
8686
|
if (width != null) { this.display.wrapper.style.width = interpret(width); }
|
|
@@ -8610,7 +8689,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8610
8689
|
var lineNo = this.display.viewFrom;
|
|
8611
8690
|
this.doc.iter(lineNo, this.display.viewTo, function (line) {
|
|
8612
8691
|
if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
|
|
8613
|
-
{ if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } }
|
|
8692
|
+
{ if (line.widgets[i].noHScroll) { regLineChange(this$1$1, lineNo, "widget"); break } } }
|
|
8614
8693
|
++lineNo;
|
|
8615
8694
|
});
|
|
8616
8695
|
this.curOp.forceUpdate = true;
|
|
@@ -8628,7 +8707,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8628
8707
|
clearCaches(this);
|
|
8629
8708
|
scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
|
|
8630
8709
|
updateGutterSpace(this.display);
|
|
8631
|
-
if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)
|
|
8710
|
+
if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)
|
|
8632
8711
|
{ estimateLineHeights(this); }
|
|
8633
8712
|
signal(this, "refresh", this);
|
|
8634
8713
|
}),
|
|
@@ -8670,34 +8749,43 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8670
8749
|
}
|
|
8671
8750
|
|
|
8672
8751
|
// Used for horizontal relative motion. Dir is -1 or 1 (left or
|
|
8673
|
-
// right), unit can be "char", "column" (like char, but
|
|
8674
|
-
// cross line boundaries), "word" (across next word), or
|
|
8675
|
-
// the start of next group of word or
|
|
8676
|
-
// chars). The visually param controls
|
|
8677
|
-
// text, direction 1 means to move towards
|
|
8678
|
-
// string, or towards the character to the right
|
|
8679
|
-
// position. The resulting position will have a
|
|
8680
|
-
// property if it reached the end of the document.
|
|
8752
|
+
// right), unit can be "codepoint", "char", "column" (like char, but
|
|
8753
|
+
// doesn't cross line boundaries), "word" (across next word), or
|
|
8754
|
+
// "group" (to the start of next group of word or
|
|
8755
|
+
// non-word-non-whitespace chars). The visually param controls
|
|
8756
|
+
// whether, in right-to-left text, direction 1 means to move towards
|
|
8757
|
+
// the next index in the string, or towards the character to the right
|
|
8758
|
+
// of the current position. The resulting position will have a
|
|
8759
|
+
// hitSide=true property if it reached the end of the document.
|
|
8681
8760
|
function findPosH(doc, pos, dir, unit, visually) {
|
|
8682
8761
|
var oldPos = pos;
|
|
8683
8762
|
var origDir = dir;
|
|
8684
8763
|
var lineObj = getLine(doc, pos.line);
|
|
8764
|
+
var lineDir = visually && doc.direction == "rtl" ? -dir : dir;
|
|
8685
8765
|
function findNextLine() {
|
|
8686
|
-
var l = pos.line +
|
|
8766
|
+
var l = pos.line + lineDir;
|
|
8687
8767
|
if (l < doc.first || l >= doc.first + doc.size) { return false }
|
|
8688
8768
|
pos = new Pos(l, pos.ch, pos.sticky);
|
|
8689
8769
|
return lineObj = getLine(doc, l)
|
|
8690
8770
|
}
|
|
8691
8771
|
function moveOnce(boundToLine) {
|
|
8692
8772
|
var next;
|
|
8693
|
-
if (
|
|
8773
|
+
if (unit == "codepoint") {
|
|
8774
|
+
var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));
|
|
8775
|
+
if (isNaN(ch)) {
|
|
8776
|
+
next = null;
|
|
8777
|
+
} else {
|
|
8778
|
+
var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;
|
|
8779
|
+
next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);
|
|
8780
|
+
}
|
|
8781
|
+
} else if (visually) {
|
|
8694
8782
|
next = moveVisually(doc.cm, lineObj, pos, dir);
|
|
8695
8783
|
} else {
|
|
8696
8784
|
next = moveLogically(lineObj, pos, dir);
|
|
8697
8785
|
}
|
|
8698
8786
|
if (next == null) {
|
|
8699
8787
|
if (!boundToLine && findNextLine())
|
|
8700
|
-
{ pos = endOfLine(visually, doc.cm, lineObj, pos.line,
|
|
8788
|
+
{ pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }
|
|
8701
8789
|
else
|
|
8702
8790
|
{ return false }
|
|
8703
8791
|
} else {
|
|
@@ -8706,7 +8794,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8706
8794
|
return true
|
|
8707
8795
|
}
|
|
8708
8796
|
|
|
8709
|
-
if (unit == "char") {
|
|
8797
|
+
if (unit == "char" || unit == "codepoint") {
|
|
8710
8798
|
moveOnce();
|
|
8711
8799
|
} else if (unit == "column") {
|
|
8712
8800
|
moveOnce(true);
|
|
@@ -8770,39 +8858,48 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8770
8858
|
};
|
|
8771
8859
|
|
|
8772
8860
|
ContentEditableInput.prototype.init = function (display) {
|
|
8773
|
-
var this$1 = this;
|
|
8861
|
+
var this$1$1 = this;
|
|
8774
8862
|
|
|
8775
8863
|
var input = this, cm = input.cm;
|
|
8776
8864
|
var div = input.div = display.lineDiv;
|
|
8865
|
+
div.contentEditable = true;
|
|
8777
8866
|
disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);
|
|
8778
8867
|
|
|
8868
|
+
function belongsToInput(e) {
|
|
8869
|
+
for (var t = e.target; t; t = t.parentNode) {
|
|
8870
|
+
if (t == div) { return true }
|
|
8871
|
+
if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) { break }
|
|
8872
|
+
}
|
|
8873
|
+
return false
|
|
8874
|
+
}
|
|
8875
|
+
|
|
8779
8876
|
on(div, "paste", function (e) {
|
|
8780
|
-
if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
|
|
8877
|
+
if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
|
|
8781
8878
|
// IE doesn't fire input events, so we schedule a read for the pasted content in this way
|
|
8782
|
-
if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }
|
|
8879
|
+
if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1$1.updateFromDOM(); }), 20); }
|
|
8783
8880
|
});
|
|
8784
8881
|
|
|
8785
8882
|
on(div, "compositionstart", function (e) {
|
|
8786
|
-
this$1.composing = {data: e.data, done: false};
|
|
8883
|
+
this$1$1.composing = {data: e.data, done: false};
|
|
8787
8884
|
});
|
|
8788
8885
|
on(div, "compositionupdate", function (e) {
|
|
8789
|
-
if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }
|
|
8886
|
+
if (!this$1$1.composing) { this$1$1.composing = {data: e.data, done: false}; }
|
|
8790
8887
|
});
|
|
8791
8888
|
on(div, "compositionend", function (e) {
|
|
8792
|
-
if (this$1.composing) {
|
|
8793
|
-
if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }
|
|
8794
|
-
this$1.composing.done = true;
|
|
8889
|
+
if (this$1$1.composing) {
|
|
8890
|
+
if (e.data != this$1$1.composing.data) { this$1$1.readFromDOMSoon(); }
|
|
8891
|
+
this$1$1.composing.done = true;
|
|
8795
8892
|
}
|
|
8796
8893
|
});
|
|
8797
8894
|
|
|
8798
8895
|
on(div, "touchstart", function () { return input.forceCompositionEnd(); });
|
|
8799
8896
|
|
|
8800
8897
|
on(div, "input", function () {
|
|
8801
|
-
if (!this$1.composing) { this$1.readFromDOMSoon(); }
|
|
8898
|
+
if (!this$1$1.composing) { this$1$1.readFromDOMSoon(); }
|
|
8802
8899
|
});
|
|
8803
8900
|
|
|
8804
8901
|
function onCopyCut(e) {
|
|
8805
|
-
if (signalDOMEvent(cm, e)) { return }
|
|
8902
|
+
if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }
|
|
8806
8903
|
if (cm.somethingSelected()) {
|
|
8807
8904
|
setLastCopied({lineWise: false, text: cm.getSelections()});
|
|
8808
8905
|
if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }
|
|
@@ -8832,7 +8929,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8832
8929
|
var kludge = hiddenTextarea(), te = kludge.firstChild;
|
|
8833
8930
|
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
|
|
8834
8931
|
te.value = lastCopied.text.join("\n");
|
|
8835
|
-
var hadFocus =
|
|
8932
|
+
var hadFocus = activeElt();
|
|
8836
8933
|
selectInput(te);
|
|
8837
8934
|
setTimeout(function () {
|
|
8838
8935
|
cm.display.lineSpace.removeChild(kludge);
|
|
@@ -8844,9 +8941,18 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8844
8941
|
on(div, "cut", onCopyCut);
|
|
8845
8942
|
};
|
|
8846
8943
|
|
|
8944
|
+
ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {
|
|
8945
|
+
// Label for screenreaders, accessibility
|
|
8946
|
+
if(label) {
|
|
8947
|
+
this.div.setAttribute('aria-label', label);
|
|
8948
|
+
} else {
|
|
8949
|
+
this.div.removeAttribute('aria-label');
|
|
8950
|
+
}
|
|
8951
|
+
};
|
|
8952
|
+
|
|
8847
8953
|
ContentEditableInput.prototype.prepareSelection = function () {
|
|
8848
8954
|
var result = prepareSelection(this.cm, false);
|
|
8849
|
-
result.focus = this.
|
|
8955
|
+
result.focus = activeElt() == this.div;
|
|
8850
8956
|
return result
|
|
8851
8957
|
};
|
|
8852
8958
|
|
|
@@ -8912,13 +9018,13 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8912
9018
|
};
|
|
8913
9019
|
|
|
8914
9020
|
ContentEditableInput.prototype.startGracePeriod = function () {
|
|
8915
|
-
var this$1 = this;
|
|
9021
|
+
var this$1$1 = this;
|
|
8916
9022
|
|
|
8917
9023
|
clearTimeout(this.gracePeriod);
|
|
8918
9024
|
this.gracePeriod = setTimeout(function () {
|
|
8919
|
-
this$1.gracePeriod = false;
|
|
8920
|
-
if (this$1.selectionChanged())
|
|
8921
|
-
{ this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }
|
|
9025
|
+
this$1$1.gracePeriod = false;
|
|
9026
|
+
if (this$1$1.selectionChanged())
|
|
9027
|
+
{ this$1$1.cm.operation(function () { return this$1$1.cm.curOp.selectionChanged = true; }); }
|
|
8922
9028
|
}, 20);
|
|
8923
9029
|
};
|
|
8924
9030
|
|
|
@@ -8942,7 +9048,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8942
9048
|
|
|
8943
9049
|
ContentEditableInput.prototype.focus = function () {
|
|
8944
9050
|
if (this.cm.options.readOnly != "nocursor") {
|
|
8945
|
-
if (!this.selectionInEditor())
|
|
9051
|
+
if (!this.selectionInEditor() || activeElt() != this.div)
|
|
8946
9052
|
{ this.showSelection(this.prepareSelection(), true); }
|
|
8947
9053
|
this.div.focus();
|
|
8948
9054
|
}
|
|
@@ -8953,9 +9059,11 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
8953
9059
|
ContentEditableInput.prototype.supportsTouch = function () { return true };
|
|
8954
9060
|
|
|
8955
9061
|
ContentEditableInput.prototype.receivedFocus = function () {
|
|
9062
|
+
var this$1$1 = this;
|
|
9063
|
+
|
|
8956
9064
|
var input = this;
|
|
8957
9065
|
if (this.selectionInEditor())
|
|
8958
|
-
{ this.pollSelection(); }
|
|
9066
|
+
{ setTimeout(function () { return this$1$1.pollSelection(); }, 20); }
|
|
8959
9067
|
else
|
|
8960
9068
|
{ runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }
|
|
8961
9069
|
|
|
@@ -9085,24 +9193,24 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9085
9193
|
this.div.focus();
|
|
9086
9194
|
};
|
|
9087
9195
|
ContentEditableInput.prototype.readFromDOMSoon = function () {
|
|
9088
|
-
var this$1 = this;
|
|
9196
|
+
var this$1$1 = this;
|
|
9089
9197
|
|
|
9090
9198
|
if (this.readDOMTimeout != null) { return }
|
|
9091
9199
|
this.readDOMTimeout = setTimeout(function () {
|
|
9092
|
-
this$1.readDOMTimeout = null;
|
|
9093
|
-
if (this$1.composing) {
|
|
9094
|
-
if (this$1.composing.done) { this$1.composing = null; }
|
|
9200
|
+
this$1$1.readDOMTimeout = null;
|
|
9201
|
+
if (this$1$1.composing) {
|
|
9202
|
+
if (this$1$1.composing.done) { this$1$1.composing = null; }
|
|
9095
9203
|
else { return }
|
|
9096
9204
|
}
|
|
9097
|
-
this$1.updateFromDOM();
|
|
9205
|
+
this$1$1.updateFromDOM();
|
|
9098
9206
|
}, 80);
|
|
9099
9207
|
};
|
|
9100
9208
|
|
|
9101
9209
|
ContentEditableInput.prototype.updateFromDOM = function () {
|
|
9102
|
-
var this$1 = this;
|
|
9210
|
+
var this$1$1 = this;
|
|
9103
9211
|
|
|
9104
9212
|
if (this.cm.isReadOnly() || !this.pollContent())
|
|
9105
|
-
{ runInOp(this.cm, function () { return regChange(this$1.cm); }); }
|
|
9213
|
+
{ runInOp(this.cm, function () { return regChange(this$1$1.cm); }); }
|
|
9106
9214
|
};
|
|
9107
9215
|
|
|
9108
9216
|
ContentEditableInput.prototype.setUneditable = function (node) {
|
|
@@ -9295,7 +9403,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9295
9403
|
};
|
|
9296
9404
|
|
|
9297
9405
|
TextareaInput.prototype.init = function (display) {
|
|
9298
|
-
var this$1 = this;
|
|
9406
|
+
var this$1$1 = this;
|
|
9299
9407
|
|
|
9300
9408
|
var input = this, cm = this.cm;
|
|
9301
9409
|
this.createField(display);
|
|
@@ -9307,7 +9415,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9307
9415
|
if (ios) { te.style.width = "0px"; }
|
|
9308
9416
|
|
|
9309
9417
|
on(te, "input", function () {
|
|
9310
|
-
if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }
|
|
9418
|
+
if (ie && ie_version >= 9 && this$1$1.hasSelection) { this$1$1.hasSelection = null; }
|
|
9311
9419
|
input.poll();
|
|
9312
9420
|
});
|
|
9313
9421
|
|
|
@@ -9384,6 +9492,15 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9384
9492
|
this.textarea = this.wrapper.firstChild;
|
|
9385
9493
|
};
|
|
9386
9494
|
|
|
9495
|
+
TextareaInput.prototype.screenReaderLabelChanged = function (label) {
|
|
9496
|
+
// Label for screenreaders, accessibility
|
|
9497
|
+
if(label) {
|
|
9498
|
+
this.textarea.setAttribute('aria-label', label);
|
|
9499
|
+
} else {
|
|
9500
|
+
this.textarea.removeAttribute('aria-label');
|
|
9501
|
+
}
|
|
9502
|
+
};
|
|
9503
|
+
|
|
9387
9504
|
TextareaInput.prototype.prepareSelection = function () {
|
|
9388
9505
|
// Redraw the selection and/or cursor
|
|
9389
9506
|
var cm = this.cm, display = cm.display, doc = cm.doc;
|
|
@@ -9451,12 +9568,12 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9451
9568
|
// Poll for input changes, using the normal rate of polling. This
|
|
9452
9569
|
// runs as long as the editor is focused.
|
|
9453
9570
|
TextareaInput.prototype.slowPoll = function () {
|
|
9454
|
-
var this$1 = this;
|
|
9571
|
+
var this$1$1 = this;
|
|
9455
9572
|
|
|
9456
9573
|
if (this.pollingFast) { return }
|
|
9457
9574
|
this.polling.set(this.cm.options.pollInterval, function () {
|
|
9458
|
-
this$1.poll();
|
|
9459
|
-
if (this$1.cm.state.focused) { this$1.slowPoll(); }
|
|
9575
|
+
this$1$1.poll();
|
|
9576
|
+
if (this$1$1.cm.state.focused) { this$1$1.slowPoll(); }
|
|
9460
9577
|
});
|
|
9461
9578
|
};
|
|
9462
9579
|
|
|
@@ -9481,7 +9598,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9481
9598
|
// seen text (can be empty), which is stored in prevInput (we must
|
|
9482
9599
|
// not reset the textarea when typing, because that breaks IME).
|
|
9483
9600
|
TextareaInput.prototype.poll = function () {
|
|
9484
|
-
var this$1 = this;
|
|
9601
|
+
var this$1$1 = this;
|
|
9485
9602
|
|
|
9486
9603
|
var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
|
|
9487
9604
|
// Since this is called a *lot*, try to bail out as cheaply as
|
|
@@ -9516,15 +9633,15 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9516
9633
|
|
|
9517
9634
|
runInOp(cm, function () {
|
|
9518
9635
|
applyTextInput(cm, text.slice(same), prevInput.length - same,
|
|
9519
|
-
null, this$1.composing ? "*compose" : null);
|
|
9636
|
+
null, this$1$1.composing ? "*compose" : null);
|
|
9520
9637
|
|
|
9521
9638
|
// Don't leave long text in the textarea, since it makes further polling slow
|
|
9522
|
-
if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; }
|
|
9523
|
-
else { this$1.prevInput = text; }
|
|
9639
|
+
if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1$1.prevInput = ""; }
|
|
9640
|
+
else { this$1$1.prevInput = text; }
|
|
9524
9641
|
|
|
9525
|
-
if (this$1.composing) {
|
|
9526
|
-
this$1.composing.range.clear();
|
|
9527
|
-
this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
|
|
9642
|
+
if (this$1$1.composing) {
|
|
9643
|
+
this$1$1.composing.range.clear();
|
|
9644
|
+
this$1$1.composing.range = cm.markText(this$1$1.composing.start, cm.getCursor("to"),
|
|
9528
9645
|
{className: "CodeMirror-composing"});
|
|
9529
9646
|
}
|
|
9530
9647
|
});
|
|
@@ -9624,6 +9741,7 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9624
9741
|
TextareaInput.prototype.readOnlyChanged = function (val) {
|
|
9625
9742
|
if (!val) { this.reset(); }
|
|
9626
9743
|
this.textarea.disabled = val == "nocursor";
|
|
9744
|
+
this.textarea.readOnly = !!val;
|
|
9627
9745
|
};
|
|
9628
9746
|
|
|
9629
9747
|
TextareaInput.prototype.setUneditable = function () {};
|
|
@@ -9774,19 +9892,21 @@ var codemirror = createCommonjsModule(function (module, exports) {
|
|
|
9774
9892
|
|
|
9775
9893
|
addLegacyProps(CodeMirror);
|
|
9776
9894
|
|
|
9777
|
-
CodeMirror.version = "5.
|
|
9895
|
+
CodeMirror.version = "5.65.0";
|
|
9778
9896
|
|
|
9779
9897
|
return CodeMirror;
|
|
9780
9898
|
|
|
9781
9899
|
})));
|
|
9782
|
-
});
|
|
9900
|
+
}(codemirror));
|
|
9783
9901
|
|
|
9784
|
-
var
|
|
9902
|
+
var CodeMirror = codemirror.exports;
|
|
9903
|
+
|
|
9904
|
+
(function (module, exports) {
|
|
9785
9905
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
9786
9906
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
9787
9907
|
|
|
9788
9908
|
(function(mod) {
|
|
9789
|
-
mod(codemirror);
|
|
9909
|
+
mod(codemirror.exports);
|
|
9790
9910
|
})(function(CodeMirror) {
|
|
9791
9911
|
|
|
9792
9912
|
CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
@@ -9807,7 +9927,8 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
9807
9927
|
valueKeywords = parserConfig.valueKeywords || {},
|
|
9808
9928
|
allowNested = parserConfig.allowNested,
|
|
9809
9929
|
lineComment = parserConfig.lineComment,
|
|
9810
|
-
supportsAtComponent = parserConfig.supportsAtComponent === true
|
|
9930
|
+
supportsAtComponent = parserConfig.supportsAtComponent === true,
|
|
9931
|
+
highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
|
|
9811
9932
|
|
|
9812
9933
|
var type, override;
|
|
9813
9934
|
function ret(style, tp) { type = tp; return style; }
|
|
@@ -9855,8 +9976,8 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
9855
9976
|
return ret("qualifier", "qualifier");
|
|
9856
9977
|
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
|
9857
9978
|
return ret(null, ch);
|
|
9858
|
-
} else if (stream.match(
|
|
9859
|
-
if (/^(url(-prefix)?|domain|regexp)
|
|
9979
|
+
} else if (stream.match(/^[\w-.]+(?=\()/)) {
|
|
9980
|
+
if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
|
|
9860
9981
|
state.tokenize = tokenParenthesized;
|
|
9861
9982
|
}
|
|
9862
9983
|
return ret("variable callee", "variable");
|
|
@@ -9885,7 +10006,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
9885
10006
|
|
|
9886
10007
|
function tokenParenthesized(stream, state) {
|
|
9887
10008
|
stream.next(); // Must be '('
|
|
9888
|
-
if (!stream.match(
|
|
10009
|
+
if (!stream.match(/^\s*[\"\')]/, false))
|
|
9889
10010
|
state.tokenize = tokenString(")");
|
|
9890
10011
|
else
|
|
9891
10012
|
state.tokenize = null;
|
|
@@ -9975,7 +10096,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
9975
10096
|
override = "property";
|
|
9976
10097
|
return "maybeprop";
|
|
9977
10098
|
} else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
|
|
9978
|
-
override = "string-2";
|
|
10099
|
+
override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
|
|
9979
10100
|
return "maybeprop";
|
|
9980
10101
|
} else if (allowNested) {
|
|
9981
10102
|
override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
|
|
@@ -10069,7 +10190,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10069
10190
|
else if (propertyKeywords.hasOwnProperty(word))
|
|
10070
10191
|
override = "property";
|
|
10071
10192
|
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
|
|
10072
|
-
override = "string-2";
|
|
10193
|
+
override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
|
|
10073
10194
|
else if (valueKeywords.hasOwnProperty(word))
|
|
10074
10195
|
override = "atom";
|
|
10075
10196
|
else if (colorKeywords.hasOwnProperty(word))
|
|
@@ -10220,117 +10341,151 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10220
10341
|
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
|
10221
10342
|
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
|
10222
10343
|
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
|
10223
|
-
"pointer", "any-pointer", "hover", "any-hover"
|
|
10344
|
+
"pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",
|
|
10345
|
+
"dynamic-range", "video-dynamic-range"
|
|
10224
10346
|
], mediaFeatures = keySet(mediaFeatures_);
|
|
10225
10347
|
|
|
10226
10348
|
var mediaValueKeywords_ = [
|
|
10227
10349
|
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
|
10228
|
-
"interlace", "progressive"
|
|
10350
|
+
"interlace", "progressive",
|
|
10351
|
+
"dark", "light",
|
|
10352
|
+
"standard", "high"
|
|
10229
10353
|
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
|
10230
10354
|
|
|
10231
10355
|
var propertyKeywords_ = [
|
|
10232
10356
|
"align-content", "align-items", "align-self", "alignment-adjust",
|
|
10233
|
-
"alignment-baseline", "anchor-point", "animation", "animation-delay",
|
|
10357
|
+
"alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
|
|
10234
10358
|
"animation-direction", "animation-duration", "animation-fill-mode",
|
|
10235
10359
|
"animation-iteration-count", "animation-name", "animation-play-state",
|
|
10236
|
-
"animation-timing-function", "appearance", "azimuth", "
|
|
10237
|
-
"
|
|
10238
|
-
"background-
|
|
10239
|
-
"background-
|
|
10240
|
-
"
|
|
10241
|
-
"
|
|
10242
|
-
"
|
|
10243
|
-
"border-bottom
|
|
10244
|
-
"border-
|
|
10360
|
+
"animation-timing-function", "appearance", "azimuth", "backdrop-filter",
|
|
10361
|
+
"backface-visibility", "background", "background-attachment",
|
|
10362
|
+
"background-blend-mode", "background-clip", "background-color",
|
|
10363
|
+
"background-image", "background-origin", "background-position",
|
|
10364
|
+
"background-position-x", "background-position-y", "background-repeat",
|
|
10365
|
+
"background-size", "baseline-shift", "binding", "bleed", "block-size",
|
|
10366
|
+
"bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
|
|
10367
|
+
"border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
|
|
10368
|
+
"border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
|
|
10369
|
+
"border-collapse", "border-color", "border-image", "border-image-outset",
|
|
10245
10370
|
"border-image-repeat", "border-image-slice", "border-image-source",
|
|
10246
|
-
"border-image-width", "border-left", "border-left-color",
|
|
10247
|
-
"border-left-
|
|
10248
|
-
"border-right-
|
|
10249
|
-
"border-
|
|
10250
|
-
"border-top-
|
|
10251
|
-
"border-
|
|
10252
|
-
"
|
|
10253
|
-
"
|
|
10254
|
-
"column-
|
|
10255
|
-
"column-rule-
|
|
10256
|
-
"
|
|
10257
|
-
"cue-
|
|
10258
|
-
"
|
|
10259
|
-
"drop-initial-
|
|
10260
|
-
"drop-initial-
|
|
10261
|
-
"
|
|
10262
|
-
"flex-
|
|
10263
|
-
"
|
|
10264
|
-
"font-
|
|
10265
|
-
"font-
|
|
10266
|
-
"font-variant
|
|
10267
|
-
"font-variant-
|
|
10268
|
-
"font-
|
|
10269
|
-
"grid-
|
|
10270
|
-
"grid-column
|
|
10271
|
-
"grid-row
|
|
10272
|
-
"grid-template
|
|
10273
|
-
"
|
|
10274
|
-
"
|
|
10275
|
-
"
|
|
10371
|
+
"border-image-width", "border-left", "border-left-color", "border-left-style",
|
|
10372
|
+
"border-left-width", "border-radius", "border-right", "border-right-color",
|
|
10373
|
+
"border-right-style", "border-right-width", "border-spacing", "border-style",
|
|
10374
|
+
"border-top", "border-top-color", "border-top-left-radius",
|
|
10375
|
+
"border-top-right-radius", "border-top-style", "border-top-width",
|
|
10376
|
+
"border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
|
|
10377
|
+
"break-after", "break-before", "break-inside", "caption-side", "caret-color",
|
|
10378
|
+
"clear", "clip", "color", "color-profile", "column-count", "column-fill",
|
|
10379
|
+
"column-gap", "column-rule", "column-rule-color", "column-rule-style",
|
|
10380
|
+
"column-rule-width", "column-span", "column-width", "columns", "contain",
|
|
10381
|
+
"content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
|
|
10382
|
+
"cue-before", "cursor", "direction", "display", "dominant-baseline",
|
|
10383
|
+
"drop-initial-after-adjust", "drop-initial-after-align",
|
|
10384
|
+
"drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
|
|
10385
|
+
"drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
|
|
10386
|
+
"flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
|
|
10387
|
+
"flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
|
|
10388
|
+
"font", "font-family", "font-feature-settings", "font-kerning",
|
|
10389
|
+
"font-language-override", "font-optical-sizing", "font-size",
|
|
10390
|
+
"font-size-adjust", "font-stretch", "font-style", "font-synthesis",
|
|
10391
|
+
"font-variant", "font-variant-alternates", "font-variant-caps",
|
|
10392
|
+
"font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
|
|
10393
|
+
"font-variant-position", "font-variation-settings", "font-weight", "gap",
|
|
10394
|
+
"grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
|
|
10395
|
+
"grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
|
|
10396
|
+
"grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
|
|
10397
|
+
"grid-template", "grid-template-areas", "grid-template-columns",
|
|
10398
|
+
"grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
|
|
10399
|
+
"image-orientation", "image-rendering", "image-resolution", "inline-box-align",
|
|
10400
|
+
"inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
|
|
10401
|
+
"inset-inline-end", "inset-inline-start", "isolation", "justify-content",
|
|
10402
|
+
"justify-items", "justify-self", "left", "letter-spacing", "line-break",
|
|
10403
|
+
"line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
|
|
10276
10404
|
"line-stacking-shift", "line-stacking-strategy", "list-style",
|
|
10277
10405
|
"list-style-image", "list-style-position", "list-style-type", "margin",
|
|
10278
|
-
"margin-bottom", "margin-left", "margin-right", "margin-top",
|
|
10279
|
-
"
|
|
10280
|
-
"marquee-
|
|
10281
|
-
"
|
|
10282
|
-
"
|
|
10283
|
-
"
|
|
10284
|
-
"
|
|
10285
|
-
"
|
|
10286
|
-
"
|
|
10287
|
-
"
|
|
10288
|
-
"
|
|
10289
|
-
"
|
|
10290
|
-
"
|
|
10291
|
-
"
|
|
10292
|
-
"
|
|
10293
|
-
"
|
|
10294
|
-
"
|
|
10295
|
-
"
|
|
10296
|
-
"
|
|
10297
|
-
"
|
|
10298
|
-
"
|
|
10406
|
+
"margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
|
|
10407
|
+
"marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
|
|
10408
|
+
"marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
|
|
10409
|
+
"mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
|
|
10410
|
+
"max-block-size", "max-height", "max-inline-size",
|
|
10411
|
+
"max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
|
|
10412
|
+
"mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
|
|
10413
|
+
"nav-up", "object-fit", "object-position", "offset", "offset-anchor",
|
|
10414
|
+
"offset-distance", "offset-path", "offset-position", "offset-rotate",
|
|
10415
|
+
"opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
|
|
10416
|
+
"outline-style", "outline-width", "overflow", "overflow-style",
|
|
10417
|
+
"overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
|
|
10418
|
+
"padding-left", "padding-right", "padding-top", "page", "page-break-after",
|
|
10419
|
+
"page-break-before", "page-break-inside", "page-policy", "pause",
|
|
10420
|
+
"pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
|
|
10421
|
+
"pitch-range", "place-content", "place-items", "place-self", "play-during",
|
|
10422
|
+
"position", "presentation-level", "punctuation-trim", "quotes",
|
|
10423
|
+
"region-break-after", "region-break-before", "region-break-inside",
|
|
10424
|
+
"region-fragment", "rendering-intent", "resize", "rest", "rest-after",
|
|
10425
|
+
"rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
|
|
10426
|
+
"row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
|
|
10427
|
+
"scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
|
|
10428
|
+
"scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
|
|
10429
|
+
"scroll-margin-inline", "scroll-margin-inline-end",
|
|
10430
|
+
"scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
|
|
10431
|
+
"scroll-margin-top", "scroll-padding", "scroll-padding-block",
|
|
10432
|
+
"scroll-padding-block-end", "scroll-padding-block-start",
|
|
10433
|
+
"scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
|
|
10434
|
+
"scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
|
|
10435
|
+
"scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
|
|
10436
|
+
"shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
|
|
10437
|
+
"size", "speak", "speak-as", "speak-header", "speak-numeral",
|
|
10438
|
+
"speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
|
|
10439
|
+
"table-layout", "target", "target-name", "target-new", "target-position",
|
|
10440
|
+
"text-align", "text-align-last", "text-combine-upright", "text-decoration",
|
|
10299
10441
|
"text-decoration-color", "text-decoration-line", "text-decoration-skip",
|
|
10300
|
-
"text-decoration-
|
|
10301
|
-
"text-emphasis-
|
|
10302
|
-
"text-
|
|
10303
|
-
"text-
|
|
10304
|
-
"text-
|
|
10305
|
-
"
|
|
10306
|
-
"
|
|
10307
|
-
"
|
|
10308
|
-
"
|
|
10309
|
-
"voice-
|
|
10310
|
-
"
|
|
10442
|
+
"text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
|
|
10443
|
+
"text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
|
|
10444
|
+
"text-height", "text-indent", "text-justify", "text-orientation",
|
|
10445
|
+
"text-outline", "text-overflow", "text-rendering", "text-shadow",
|
|
10446
|
+
"text-size-adjust", "text-space-collapse", "text-transform",
|
|
10447
|
+
"text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
|
|
10448
|
+
"transform-style", "transition", "transition-delay", "transition-duration",
|
|
10449
|
+
"transition-property", "transition-timing-function", "translate",
|
|
10450
|
+
"unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
|
|
10451
|
+
"voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
|
|
10452
|
+
"voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
|
|
10453
|
+
"will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
|
|
10311
10454
|
// SVG-specific
|
|
10312
10455
|
"clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
|
|
10313
10456
|
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
|
10314
10457
|
"color-interpolation", "color-interpolation-filters",
|
|
10315
10458
|
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
|
10316
|
-
"marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
|
|
10459
|
+
"marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
|
|
10317
10460
|
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
|
10318
10461
|
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
|
10319
10462
|
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
|
10320
|
-
"glyph-orientation-vertical", "text-anchor", "writing-mode"
|
|
10463
|
+
"glyph-orientation-vertical", "text-anchor", "writing-mode",
|
|
10321
10464
|
], propertyKeywords = keySet(propertyKeywords_);
|
|
10322
10465
|
|
|
10323
10466
|
var nonStandardPropertyKeywords_ = [
|
|
10467
|
+
"accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
|
|
10468
|
+
"border-block-end-color", "border-block-end-style", "border-block-end-width",
|
|
10469
|
+
"border-block-start", "border-block-start-color", "border-block-start-style",
|
|
10470
|
+
"border-block-start-width", "border-block-style", "border-block-width",
|
|
10471
|
+
"border-inline", "border-inline-color", "border-inline-end",
|
|
10472
|
+
"border-inline-end-color", "border-inline-end-style",
|
|
10473
|
+
"border-inline-end-width", "border-inline-start", "border-inline-start-color",
|
|
10474
|
+
"border-inline-start-style", "border-inline-start-width",
|
|
10475
|
+
"border-inline-style", "border-inline-width", "content-visibility", "margin-block",
|
|
10476
|
+
"margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
|
|
10477
|
+
"margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
|
|
10478
|
+
"padding-block-start", "padding-inline", "padding-inline-end",
|
|
10479
|
+
"padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
|
|
10324
10480
|
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
|
|
10325
10481
|
"scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
|
|
10326
|
-
"scrollbar-
|
|
10327
|
-
"searchfield-
|
|
10328
|
-
"searchfield-results-decoration", "zoom"
|
|
10482
|
+
"scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
|
|
10483
|
+
"searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
|
|
10329
10484
|
], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
|
|
10330
10485
|
|
|
10331
10486
|
var fontProperties_ = [
|
|
10332
|
-
"font-family", "src", "unicode-range", "font-variant",
|
|
10333
|
-
|
|
10487
|
+
"font-display", "font-family", "src", "unicode-range", "font-variant",
|
|
10488
|
+
"font-feature-settings", "font-stretch", "font-weight", "font-style"
|
|
10334
10489
|
], fontProperties = keySet(fontProperties_);
|
|
10335
10490
|
|
|
10336
10491
|
var counterDescriptors_ = [
|
|
@@ -10343,16 +10498,16 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10343
10498
|
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
|
|
10344
10499
|
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
|
|
10345
10500
|
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
|
|
10346
|
-
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
|
|
10501
|
+
"darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
|
|
10347
10502
|
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
|
|
10348
|
-
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
|
|
10349
|
-
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
|
|
10503
|
+
"darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
|
|
10504
|
+
"deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
|
|
10350
10505
|
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
|
|
10351
10506
|
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
|
|
10352
10507
|
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
|
|
10353
10508
|
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
|
|
10354
|
-
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
|
|
10355
|
-
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
|
|
10509
|
+
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
|
|
10510
|
+
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
|
|
10356
10511
|
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
|
|
10357
10512
|
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
|
|
10358
10513
|
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
|
|
@@ -10362,7 +10517,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10362
10517
|
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
|
|
10363
10518
|
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
|
|
10364
10519
|
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
|
|
10365
|
-
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
|
|
10520
|
+
"slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
|
|
10366
10521
|
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
|
|
10367
10522
|
"whitesmoke", "yellow", "yellowgreen"
|
|
10368
10523
|
], colorKeywords = keySet(colorKeywords_);
|
|
@@ -10372,22 +10527,22 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10372
10527
|
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
|
10373
10528
|
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
|
10374
10529
|
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
|
|
10375
|
-
"avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
|
10376
|
-
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
|
10377
|
-
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
|
10530
|
+
"avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
|
10531
|
+
"bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
|
|
10532
|
+
"both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button", "button-bevel",
|
|
10378
10533
|
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
|
10379
10534
|
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
|
|
10380
10535
|
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
|
|
10381
10536
|
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
|
|
10382
10537
|
"col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
|
|
10383
10538
|
"compact", "condensed", "contain", "content", "contents",
|
|
10384
|
-
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
|
|
10385
|
-
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
|
10539
|
+
"content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
|
|
10540
|
+
"cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
|
10386
10541
|
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
|
|
10387
10542
|
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
|
|
10388
10543
|
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
|
10389
10544
|
"dot-dash", "dot-dot-dash",
|
|
10390
|
-
"dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
|
|
10545
|
+
"dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
|
|
10391
10546
|
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
|
|
10392
10547
|
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
|
|
10393
10548
|
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
|
|
@@ -10396,11 +10551,11 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10396
10551
|
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
|
10397
10552
|
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
|
10398
10553
|
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
|
10399
|
-
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
|
10400
|
-
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
|
|
10554
|
+
"extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
|
10555
|
+
"forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
|
|
10401
10556
|
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
|
10402
10557
|
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
|
10403
|
-
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
|
|
10558
|
+
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
|
|
10404
10559
|
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
|
10405
10560
|
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
|
10406
10561
|
"inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
|
|
@@ -10411,7 +10566,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10411
10566
|
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
|
10412
10567
|
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
|
10413
10568
|
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
|
10414
|
-
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "match", "matrix", "matrix3d",
|
|
10569
|
+
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
|
|
10415
10570
|
"media-controls-background", "media-current-time-display",
|
|
10416
10571
|
"media-fullscreen-button", "media-mute-button", "media-play-button",
|
|
10417
10572
|
"media-return-to-realtime-button", "media-rewind-button",
|
|
@@ -10420,13 +10575,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10420
10575
|
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
|
|
10421
10576
|
"menu", "menulist", "menulist-button", "menulist-text",
|
|
10422
10577
|
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
|
|
10423
|
-
"mix", "mongolian", "monospace", "move", "multiple", "multiply", "myanmar", "n-resize",
|
|
10578
|
+
"mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
|
|
10424
10579
|
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
|
10425
10580
|
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
|
10426
10581
|
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
|
|
10427
10582
|
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
|
10428
10583
|
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
|
10429
|
-
"painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
|
|
10584
|
+
"painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
|
|
10430
10585
|
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
|
10431
10586
|
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
|
10432
10587
|
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
|
@@ -10434,18 +10589,18 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10434
10589
|
"repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
|
|
10435
10590
|
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
|
|
10436
10591
|
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
|
|
10437
|
-
"s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
|
|
10592
|
+
"s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
|
|
10438
10593
|
"scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
|
|
10439
10594
|
"searchfield-cancel-button", "searchfield-decoration",
|
|
10440
10595
|
"searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
|
|
10441
|
-
"semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
|
|
10596
|
+
"semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
|
|
10442
10597
|
"simp-chinese-formal", "simp-chinese-informal", "single",
|
|
10443
10598
|
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
|
|
10444
10599
|
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
|
10445
10600
|
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
|
|
10446
10601
|
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
|
|
10447
|
-
"square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
|
|
10448
|
-
"subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
|
|
10602
|
+
"square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
|
|
10603
|
+
"subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
|
|
10449
10604
|
"table-caption", "table-cell", "table-column", "table-column-group",
|
|
10450
10605
|
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
|
10451
10606
|
"tamil",
|
|
@@ -10455,10 +10610,10 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10455
10610
|
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
|
10456
10611
|
"trad-chinese-formal", "trad-chinese-informal", "transform",
|
|
10457
10612
|
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
|
10458
|
-
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unset", "up",
|
|
10613
|
+
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
|
|
10459
10614
|
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
|
10460
10615
|
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
|
10461
|
-
"var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
|
|
10616
|
+
"var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
|
|
10462
10617
|
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
|
10463
10618
|
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
|
10464
10619
|
"xx-large", "xx-small"
|
|
@@ -10526,7 +10681,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10526
10681
|
}
|
|
10527
10682
|
},
|
|
10528
10683
|
":": function(stream) {
|
|
10529
|
-
if (stream.match(
|
|
10684
|
+
if (stream.match(/^\s*\{/, false))
|
|
10530
10685
|
return [null, null]
|
|
10531
10686
|
return false;
|
|
10532
10687
|
},
|
|
@@ -10607,14 +10762,14 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
|
10607
10762
|
});
|
|
10608
10763
|
|
|
10609
10764
|
});
|
|
10610
|
-
});
|
|
10765
|
+
}());
|
|
10611
10766
|
|
|
10612
|
-
|
|
10767
|
+
(function (module, exports) {
|
|
10613
10768
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
10614
10769
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
10615
10770
|
|
|
10616
10771
|
(function(mod) {
|
|
10617
|
-
mod(codemirror);
|
|
10772
|
+
mod(codemirror.exports);
|
|
10618
10773
|
})(function(CodeMirror) {
|
|
10619
10774
|
|
|
10620
10775
|
CodeMirror.defineMode("ecl", function(config) {
|
|
@@ -10810,14 +10965,18 @@ CodeMirror.defineMode("ecl", function(config) {
|
|
|
10810
10965
|
CodeMirror.defineMIME("text/x-ecl", "ecl");
|
|
10811
10966
|
|
|
10812
10967
|
});
|
|
10813
|
-
});
|
|
10968
|
+
}());
|
|
10969
|
+
|
|
10970
|
+
var markdown = {exports: {}};
|
|
10971
|
+
|
|
10972
|
+
var xml = {exports: {}};
|
|
10814
10973
|
|
|
10815
|
-
|
|
10974
|
+
(function (module, exports) {
|
|
10816
10975
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
10817
10976
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
10818
10977
|
|
|
10819
10978
|
(function(mod) {
|
|
10820
|
-
mod(codemirror);
|
|
10979
|
+
mod(codemirror.exports);
|
|
10821
10980
|
})(function(CodeMirror) {
|
|
10822
10981
|
|
|
10823
10982
|
var htmlConfig = {
|
|
@@ -10996,9 +11155,13 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
10996
11155
|
};
|
|
10997
11156
|
}
|
|
10998
11157
|
|
|
11158
|
+
function lower(tagName) {
|
|
11159
|
+
return tagName && tagName.toLowerCase();
|
|
11160
|
+
}
|
|
11161
|
+
|
|
10999
11162
|
function Context(state, tagName, startOfLine) {
|
|
11000
11163
|
this.prev = state.context;
|
|
11001
|
-
this.tagName = tagName;
|
|
11164
|
+
this.tagName = tagName || "";
|
|
11002
11165
|
this.indent = state.indented;
|
|
11003
11166
|
this.startOfLine = startOfLine;
|
|
11004
11167
|
if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
|
|
@@ -11014,8 +11177,8 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
11014
11177
|
return;
|
|
11015
11178
|
}
|
|
11016
11179
|
parentTagName = state.context.tagName;
|
|
11017
|
-
if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
|
|
11018
|
-
!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
|
11180
|
+
if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||
|
|
11181
|
+
!config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {
|
|
11019
11182
|
return;
|
|
11020
11183
|
}
|
|
11021
11184
|
popContext(state);
|
|
@@ -11049,7 +11212,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
11049
11212
|
if (type == "word") {
|
|
11050
11213
|
var tagName = stream.current();
|
|
11051
11214
|
if (state.context && state.context.tagName != tagName &&
|
|
11052
|
-
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
|
11215
|
+
config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))
|
|
11053
11216
|
popContext(state);
|
|
11054
11217
|
if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
|
|
11055
11218
|
setStyle = "tag";
|
|
@@ -11088,7 +11251,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
11088
11251
|
var tagName = state.tagName, tagStart = state.tagStart;
|
|
11089
11252
|
state.tagName = state.tagStart = null;
|
|
11090
11253
|
if (type == "selfcloseTag" ||
|
|
11091
|
-
config.autoSelfClosers.hasOwnProperty(tagName)) {
|
|
11254
|
+
config.autoSelfClosers.hasOwnProperty(lower(tagName))) {
|
|
11092
11255
|
maybePopContext(state, tagName);
|
|
11093
11256
|
} else {
|
|
11094
11257
|
maybePopContext(state, tagName);
|
|
@@ -11168,7 +11331,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
11168
11331
|
if (context.tagName == tagAfter[2]) {
|
|
11169
11332
|
context = context.prev;
|
|
11170
11333
|
break;
|
|
11171
|
-
} else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
|
|
11334
|
+
} else if (config.implicitlyClosed.hasOwnProperty(lower(context.tagName))) {
|
|
11172
11335
|
context = context.prev;
|
|
11173
11336
|
} else {
|
|
11174
11337
|
break;
|
|
@@ -11176,8 +11339,8 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
11176
11339
|
}
|
|
11177
11340
|
} else if (tagAfter) { // Opening tag spotted
|
|
11178
11341
|
while (context) {
|
|
11179
|
-
var grabbers = config.contextGrabbers[context.tagName];
|
|
11180
|
-
if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
|
|
11342
|
+
var grabbers = config.contextGrabbers[lower(context.tagName)];
|
|
11343
|
+
if (grabbers && grabbers.hasOwnProperty(lower(tagAfter[2])))
|
|
11181
11344
|
context = context.prev;
|
|
11182
11345
|
else
|
|
11183
11346
|
break;
|
|
@@ -11208,7 +11371,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
|
|
11208
11371
|
xmlCurrentContext: function(state) {
|
|
11209
11372
|
var context = [];
|
|
11210
11373
|
for (var cx = state.context; cx; cx = cx.prev)
|
|
11211
|
-
|
|
11374
|
+
context.push(cx.tagName);
|
|
11212
11375
|
return context.reverse()
|
|
11213
11376
|
}
|
|
11214
11377
|
};
|
|
@@ -11220,14 +11383,16 @@ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
|
|
|
11220
11383
|
CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
|
|
11221
11384
|
|
|
11222
11385
|
});
|
|
11223
|
-
});
|
|
11386
|
+
}());
|
|
11387
|
+
|
|
11388
|
+
var meta = {exports: {}};
|
|
11224
11389
|
|
|
11225
|
-
|
|
11390
|
+
(function (module, exports) {
|
|
11226
11391
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11227
11392
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11228
11393
|
|
|
11229
11394
|
(function(mod) {
|
|
11230
|
-
mod(codemirror);
|
|
11395
|
+
mod(codemirror.exports);
|
|
11231
11396
|
})(function(CodeMirror) {
|
|
11232
11397
|
|
|
11233
11398
|
CodeMirror.modeInfo = [
|
|
@@ -11238,12 +11403,12 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11238
11403
|
{name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
|
|
11239
11404
|
{name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
|
|
11240
11405
|
{name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
|
|
11241
|
-
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
|
|
11406
|
+
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"]},
|
|
11242
11407
|
{name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},
|
|
11243
11408
|
{name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
|
|
11244
11409
|
{name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
|
|
11245
11410
|
{name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
|
|
11246
|
-
{name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists
|
|
11411
|
+
{name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/},
|
|
11247
11412
|
{name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
|
|
11248
11413
|
{name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
|
|
11249
11414
|
{name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
|
|
@@ -11263,7 +11428,7 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11263
11428
|
{name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
|
|
11264
11429
|
{name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
|
|
11265
11430
|
{name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
|
|
11266
|
-
{name: "Embedded
|
|
11431
|
+
{name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
|
|
11267
11432
|
{name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
|
|
11268
11433
|
{name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
|
|
11269
11434
|
{name: "Esper", mime: "text/x-esper", mode: "sql"},
|
|
@@ -11274,7 +11439,7 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11274
11439
|
{name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
|
|
11275
11440
|
{name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
|
|
11276
11441
|
{name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
|
|
11277
|
-
{name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)
|
|
11442
|
+
{name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i},
|
|
11278
11443
|
{name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
|
|
11279
11444
|
{name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/},
|
|
11280
11445
|
{name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
|
|
@@ -11295,7 +11460,7 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11295
11460
|
{name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
|
|
11296
11461
|
{name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
|
|
11297
11462
|
{name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},
|
|
11298
|
-
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
|
|
11463
|
+
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"]},
|
|
11299
11464
|
{name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
|
|
11300
11465
|
{name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
|
|
11301
11466
|
{name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
|
|
@@ -11363,7 +11528,7 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11363
11528
|
{name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]},
|
|
11364
11529
|
{name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
|
|
11365
11530
|
{name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
|
|
11366
|
-
{name: "TiddlyWiki
|
|
11531
|
+
{name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
|
|
11367
11532
|
{name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
|
|
11368
11533
|
{name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
|
|
11369
11534
|
{name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
|
|
@@ -11388,7 +11553,8 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11388
11553
|
{name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
|
|
11389
11554
|
{name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
|
|
11390
11555
|
{name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
|
|
11391
|
-
{name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]}
|
|
11556
|
+
{name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]},
|
|
11557
|
+
{name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]},
|
|
11392
11558
|
];
|
|
11393
11559
|
// Ensure all modes have a mime property for backwards compatibility
|
|
11394
11560
|
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
@@ -11437,14 +11603,14 @@ var meta = createCommonjsModule(function (module, exports) {
|
|
|
11437
11603
|
}
|
|
11438
11604
|
};
|
|
11439
11605
|
});
|
|
11440
|
-
});
|
|
11606
|
+
}());
|
|
11441
11607
|
|
|
11442
|
-
|
|
11608
|
+
(function (module, exports) {
|
|
11443
11609
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11444
11610
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11445
11611
|
|
|
11446
11612
|
(function(mod) {
|
|
11447
|
-
mod(codemirror, xml, meta);
|
|
11613
|
+
mod(codemirror.exports, xml.exports, meta.exports);
|
|
11448
11614
|
})(function(CodeMirror) {
|
|
11449
11615
|
|
|
11450
11616
|
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
@@ -11484,6 +11650,9 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
11484
11650
|
if (modeCfg.fencedCodeBlockHighlighting === undefined)
|
|
11485
11651
|
modeCfg.fencedCodeBlockHighlighting = true;
|
|
11486
11652
|
|
|
11653
|
+
if (modeCfg.fencedCodeBlockDefaultMode === undefined)
|
|
11654
|
+
modeCfg.fencedCodeBlockDefaultMode = 'text/plain';
|
|
11655
|
+
|
|
11487
11656
|
if (modeCfg.xml === undefined)
|
|
11488
11657
|
modeCfg.xml = true;
|
|
11489
11658
|
|
|
@@ -11523,9 +11692,9 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
11523
11692
|
, listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
|
|
11524
11693
|
, taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
|
|
11525
11694
|
, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
|
|
11526
|
-
, setextHeaderRE = /^
|
|
11695
|
+
, setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/
|
|
11527
11696
|
, textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
|
|
11528
|
-
, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w
|
|
11697
|
+
, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/
|
|
11529
11698
|
, linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
|
|
11530
11699
|
, punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
|
|
11531
11700
|
, expandedTab = " "; // CommonMark specifies tab as 4 spaces
|
|
@@ -11656,7 +11825,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
11656
11825
|
|
|
11657
11826
|
// Add this list item's content's indentation to the stack
|
|
11658
11827
|
state.listStack.push(state.indentation);
|
|
11659
|
-
// Reset inline styles which shouldn't propagate
|
|
11828
|
+
// Reset inline styles which shouldn't propagate across list items
|
|
11660
11829
|
state.em = false;
|
|
11661
11830
|
state.strong = false;
|
|
11662
11831
|
state.code = false;
|
|
@@ -11672,7 +11841,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
11672
11841
|
state.quote = 0;
|
|
11673
11842
|
state.fencedEndRE = new RegExp(match[1] + "+ *$");
|
|
11674
11843
|
// try switching mode
|
|
11675
|
-
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2]);
|
|
11844
|
+
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );
|
|
11676
11845
|
if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
|
|
11677
11846
|
state.f = state.block = local;
|
|
11678
11847
|
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
|
@@ -12045,7 +12214,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
12045
12214
|
return getType(state);
|
|
12046
12215
|
}
|
|
12047
12216
|
} else if (ch === ' ') {
|
|
12048
|
-
if (stream.match(
|
|
12217
|
+
if (stream.match('~~', true)) { // Probably surrounded by space
|
|
12049
12218
|
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
|
12050
12219
|
return getType(state);
|
|
12051
12220
|
} else { // Not surrounded by spaces, back up pointer
|
|
@@ -12144,7 +12313,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
12144
12313
|
}
|
|
12145
12314
|
|
|
12146
12315
|
function footnoteLinkInside(stream, state) {
|
|
12147
|
-
if (stream.match(
|
|
12316
|
+
if (stream.match(']:', true)) {
|
|
12148
12317
|
state.f = state.inline = footnoteUrl;
|
|
12149
12318
|
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
12150
12319
|
var returnType = getType(state);
|
|
@@ -12168,7 +12337,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
|
12168
12337
|
if (stream.peek() === undefined) { // End of line, set flag to check next line
|
|
12169
12338
|
state.linkTitle = true;
|
|
12170
12339
|
} else { // More content on line, check if link title
|
|
12171
|
-
stream.match(/^(?:\s+(?:"(?:[^"\\]
|
|
12340
|
+
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, true);
|
|
12172
12341
|
}
|
|
12173
12342
|
state.f = state.inline = inlineNormal;
|
|
12174
12343
|
return tokenTypes.linkHref + " url";
|
|
@@ -12317,9 +12486,11 @@ CodeMirror.defineMIME("text/markdown", "markdown");
|
|
|
12317
12486
|
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
|
12318
12487
|
|
|
12319
12488
|
});
|
|
12320
|
-
});
|
|
12489
|
+
}());
|
|
12490
|
+
|
|
12491
|
+
var overlay = {exports: {}};
|
|
12321
12492
|
|
|
12322
|
-
|
|
12493
|
+
(function (module, exports) {
|
|
12323
12494
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
12324
12495
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
12325
12496
|
|
|
@@ -12333,7 +12504,7 @@ var overlay = createCommonjsModule(function (module, exports) {
|
|
|
12333
12504
|
// combined.
|
|
12334
12505
|
|
|
12335
12506
|
(function(mod) {
|
|
12336
|
-
mod(codemirror);
|
|
12507
|
+
mod(codemirror.exports);
|
|
12337
12508
|
})(function(CodeMirror) {
|
|
12338
12509
|
|
|
12339
12510
|
CodeMirror.overlayMode = function(base, overlay, combine) {
|
|
@@ -12404,14 +12575,14 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|
|
12404
12575
|
};
|
|
12405
12576
|
|
|
12406
12577
|
});
|
|
12407
|
-
});
|
|
12578
|
+
}());
|
|
12408
12579
|
|
|
12409
|
-
|
|
12580
|
+
(function (module, exports) {
|
|
12410
12581
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
12411
12582
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
12412
12583
|
|
|
12413
12584
|
(function(mod) {
|
|
12414
|
-
mod(codemirror, markdown, overlay);
|
|
12585
|
+
mod(codemirror.exports, markdown.exports, overlay.exports);
|
|
12415
12586
|
})(function(CodeMirror) {
|
|
12416
12587
|
|
|
12417
12588
|
var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
@@ -12530,14 +12701,16 @@ CodeMirror.defineMode("gfm", function(config, modeConfig) {
|
|
|
12530
12701
|
|
|
12531
12702
|
CodeMirror.defineMIME("text/x-gfm", "gfm");
|
|
12532
12703
|
});
|
|
12533
|
-
});
|
|
12704
|
+
}());
|
|
12705
|
+
|
|
12706
|
+
var javascript = {exports: {}};
|
|
12534
12707
|
|
|
12535
|
-
|
|
12708
|
+
(function (module, exports) {
|
|
12536
12709
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
12537
12710
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
12538
12711
|
|
|
12539
12712
|
(function(mod) {
|
|
12540
|
-
mod(codemirror);
|
|
12713
|
+
mod(codemirror.exports);
|
|
12541
12714
|
})(function(CodeMirror) {
|
|
12542
12715
|
|
|
12543
12716
|
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
@@ -12545,6 +12718,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12545
12718
|
var statementIndent = parserConfig.statementIndent;
|
|
12546
12719
|
var jsonldMode = parserConfig.jsonld;
|
|
12547
12720
|
var jsonMode = parserConfig.json || jsonldMode;
|
|
12721
|
+
var trackScope = parserConfig.trackScope !== false;
|
|
12548
12722
|
var isTS = parserConfig.typescript;
|
|
12549
12723
|
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
|
|
12550
12724
|
|
|
@@ -12627,21 +12801,25 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12627
12801
|
} else if (ch == "`") {
|
|
12628
12802
|
state.tokenize = tokenQuasi;
|
|
12629
12803
|
return tokenQuasi(stream, state);
|
|
12630
|
-
} else if (ch == "#") {
|
|
12804
|
+
} else if (ch == "#" && stream.peek() == "!") {
|
|
12631
12805
|
stream.skipToEnd();
|
|
12632
|
-
return ret("
|
|
12633
|
-
} else if (ch == "
|
|
12806
|
+
return ret("meta", "meta");
|
|
12807
|
+
} else if (ch == "#" && stream.eatWhile(wordRE)) {
|
|
12808
|
+
return ret("variable", "property")
|
|
12809
|
+
} else if (ch == "<" && stream.match("!--") ||
|
|
12810
|
+
(ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
|
|
12634
12811
|
stream.skipToEnd();
|
|
12635
12812
|
return ret("comment", "comment")
|
|
12636
12813
|
} else if (isOperatorChar.test(ch)) {
|
|
12637
12814
|
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
|
|
12638
12815
|
if (stream.eat("=")) {
|
|
12639
12816
|
if (ch == "!" || ch == "=") stream.eat("=");
|
|
12640
|
-
} else if (/[
|
|
12817
|
+
} else if (/[<>*+\-|&?]/.test(ch)) {
|
|
12641
12818
|
stream.eat(ch);
|
|
12642
12819
|
if (ch == ">") stream.eat(ch);
|
|
12643
12820
|
}
|
|
12644
12821
|
}
|
|
12822
|
+
if (ch == "?" && stream.eat(".")) return ret(".")
|
|
12645
12823
|
return ret("operator", "operator", stream.current());
|
|
12646
12824
|
} else if (wordRE.test(ch)) {
|
|
12647
12825
|
stream.eatWhile(wordRE);
|
|
@@ -12651,7 +12829,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12651
12829
|
var kw = keywords[word];
|
|
12652
12830
|
return ret(kw.type, kw.style, word)
|
|
12653
12831
|
}
|
|
12654
|
-
if (word == "async" && stream.match(/^(\s
|
|
12832
|
+
if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
|
|
12655
12833
|
return ret("async", "keyword", word)
|
|
12656
12834
|
}
|
|
12657
12835
|
return ret("variable", "variable", word)
|
|
@@ -12743,7 +12921,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12743
12921
|
|
|
12744
12922
|
// Parser
|
|
12745
12923
|
|
|
12746
|
-
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,
|
|
12924
|
+
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,
|
|
12925
|
+
"regexp": true, "this": true, "import": true, "jsonld-keyword": true};
|
|
12747
12926
|
|
|
12748
12927
|
function JSLexical(indented, column, type, align, prev, info) {
|
|
12749
12928
|
this.indented = indented;
|
|
@@ -12755,6 +12934,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12755
12934
|
}
|
|
12756
12935
|
|
|
12757
12936
|
function inScope(state, varname) {
|
|
12937
|
+
if (!trackScope) return false
|
|
12758
12938
|
for (var v = state.localVars; v; v = v.next)
|
|
12759
12939
|
if (v.name == varname) return true;
|
|
12760
12940
|
for (var cx = state.context; cx; cx = cx.prev) {
|
|
@@ -12801,6 +12981,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12801
12981
|
function register(varname) {
|
|
12802
12982
|
var state = cx.state;
|
|
12803
12983
|
cx.marked = "def";
|
|
12984
|
+
if (!trackScope) return
|
|
12804
12985
|
if (state.context) {
|
|
12805
12986
|
if (state.lexical.info == "var" && state.context && state.context.block) {
|
|
12806
12987
|
// FIXME function decls are also not block scoped
|
|
@@ -12899,7 +13080,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12899
13080
|
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
|
|
12900
13081
|
}
|
|
12901
13082
|
if (type == "function") return cont(functiondef);
|
|
12902
|
-
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
|
13083
|
+
if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
|
|
12903
13084
|
if (type == "class" || (isTS && value == "interface")) {
|
|
12904
13085
|
cx.marked = "keyword";
|
|
12905
13086
|
return cont(pushlex("form", type == "class" ? type : value), className, poplex)
|
|
@@ -12945,7 +13126,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12945
13126
|
}
|
|
12946
13127
|
function parenExpr(type) {
|
|
12947
13128
|
if (type != "(") return pass()
|
|
12948
|
-
return cont(pushlex(")"),
|
|
13129
|
+
return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
|
|
12949
13130
|
}
|
|
12950
13131
|
function expressionInner(type, value, noComma) {
|
|
12951
13132
|
if (cx.state.fatArrowAt == cx.stream.start) {
|
|
@@ -12965,7 +13146,6 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12965
13146
|
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
|
12966
13147
|
if (type == "quasi") return pass(quasi, maybeop);
|
|
12967
13148
|
if (type == "new") return cont(maybeTarget(noComma));
|
|
12968
|
-
if (type == "import") return cont(expression);
|
|
12969
13149
|
return cont();
|
|
12970
13150
|
}
|
|
12971
13151
|
function maybeexpression(type) {
|
|
@@ -12974,7 +13154,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12974
13154
|
}
|
|
12975
13155
|
|
|
12976
13156
|
function maybeoperatorComma(type, value) {
|
|
12977
|
-
if (type == ",") return cont(
|
|
13157
|
+
if (type == ",") return cont(maybeexpression);
|
|
12978
13158
|
return maybeoperatorNoComma(type, value, false);
|
|
12979
13159
|
}
|
|
12980
13160
|
function maybeoperatorNoComma(type, value, noComma) {
|
|
@@ -12983,7 +13163,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
12983
13163
|
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
|
12984
13164
|
if (type == "operator") {
|
|
12985
13165
|
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
|
|
12986
|
-
if (isTS && value == "<" && cx.stream.match(/^([
|
|
13166
|
+
if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
|
|
12987
13167
|
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
|
|
12988
13168
|
if (value == "?") return cont(expression, expect(":"), expr);
|
|
12989
13169
|
return cont(expr);
|
|
@@ -13003,7 +13183,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13003
13183
|
function quasi(type, value) {
|
|
13004
13184
|
if (type != "quasi") return pass();
|
|
13005
13185
|
if (value.slice(value.length - 2) != "${") return cont(quasi);
|
|
13006
|
-
return cont(
|
|
13186
|
+
return cont(maybeexpression, continueQuasi);
|
|
13007
13187
|
}
|
|
13008
13188
|
function continueQuasi(type) {
|
|
13009
13189
|
if (type == "}") {
|
|
@@ -13129,7 +13309,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13129
13309
|
}
|
|
13130
13310
|
}
|
|
13131
13311
|
function typeexpr(type, value) {
|
|
13132
|
-
if (value == "keyof" || value == "typeof" || value == "infer") {
|
|
13312
|
+
if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
|
|
13133
13313
|
cx.marked = "keyword";
|
|
13134
13314
|
return cont(value == "typeof" ? expressionNoComma : typeexpr)
|
|
13135
13315
|
}
|
|
@@ -13140,13 +13320,19 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13140
13320
|
if (value == "|" || value == "&") return cont(typeexpr)
|
|
13141
13321
|
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
|
13142
13322
|
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
|
13143
|
-
if (type == "{") return cont(pushlex("}"),
|
|
13323
|
+
if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)
|
|
13144
13324
|
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
|
|
13145
13325
|
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
|
|
13326
|
+
if (type == "quasi") { return pass(quasiType, afterType); }
|
|
13146
13327
|
}
|
|
13147
13328
|
function maybeReturnType(type) {
|
|
13148
13329
|
if (type == "=>") return cont(typeexpr)
|
|
13149
13330
|
}
|
|
13331
|
+
function typeprops(type) {
|
|
13332
|
+
if (type.match(/[\}\)\]]/)) return cont()
|
|
13333
|
+
if (type == "," || type == ";") return cont(typeprops)
|
|
13334
|
+
return pass(typeprop, typeprops)
|
|
13335
|
+
}
|
|
13150
13336
|
function typeprop(type, value) {
|
|
13151
13337
|
if (type == "variable" || cx.style == "keyword") {
|
|
13152
13338
|
cx.marked = "property";
|
|
@@ -13159,6 +13345,20 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13159
13345
|
return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
|
|
13160
13346
|
} else if (type == "(") {
|
|
13161
13347
|
return pass(functiondecl, typeprop)
|
|
13348
|
+
} else if (!type.match(/[;\}\)\],]/)) {
|
|
13349
|
+
return cont()
|
|
13350
|
+
}
|
|
13351
|
+
}
|
|
13352
|
+
function quasiType(type, value) {
|
|
13353
|
+
if (type != "quasi") return pass();
|
|
13354
|
+
if (value.slice(value.length - 2) != "${") return cont(quasiType);
|
|
13355
|
+
return cont(typeexpr, continueQuasiType);
|
|
13356
|
+
}
|
|
13357
|
+
function continueQuasiType(type) {
|
|
13358
|
+
if (type == "}") {
|
|
13359
|
+
cx.marked = "string-2";
|
|
13360
|
+
cx.state.tokenize = tokenQuasi;
|
|
13361
|
+
return cont(quasiType);
|
|
13162
13362
|
}
|
|
13163
13363
|
}
|
|
13164
13364
|
function typearg(type, value) {
|
|
@@ -13285,11 +13485,11 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13285
13485
|
}
|
|
13286
13486
|
if (type == "variable" || cx.style == "keyword") {
|
|
13287
13487
|
cx.marked = "property";
|
|
13288
|
-
return cont(
|
|
13488
|
+
return cont(classfield, classBody);
|
|
13289
13489
|
}
|
|
13290
|
-
if (type == "number" || type == "string") return cont(
|
|
13490
|
+
if (type == "number" || type == "string") return cont(classfield, classBody);
|
|
13291
13491
|
if (type == "[")
|
|
13292
|
-
return cont(expression, maybetype, expect("]"),
|
|
13492
|
+
return cont(expression, maybetype, expect("]"), classfield, classBody)
|
|
13293
13493
|
if (value == "*") {
|
|
13294
13494
|
cx.marked = "keyword";
|
|
13295
13495
|
return cont(classBody);
|
|
@@ -13300,6 +13500,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13300
13500
|
if (value == "@") return cont(expression, classBody)
|
|
13301
13501
|
}
|
|
13302
13502
|
function classfield(type, value) {
|
|
13503
|
+
if (value == "!") return cont(classfield)
|
|
13303
13504
|
if (value == "?") return cont(classfield)
|
|
13304
13505
|
if (type == ":") return cont(typeexpr, maybeAssign)
|
|
13305
13506
|
if (value == "=") return cont(expressionNoComma)
|
|
@@ -13319,6 +13520,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13319
13520
|
function afterImport(type) {
|
|
13320
13521
|
if (type == "string") return cont();
|
|
13321
13522
|
if (type == "(") return pass(expression);
|
|
13523
|
+
if (type == ".") return pass(maybeoperatorComma);
|
|
13322
13524
|
return pass(importSpec, maybeMoreImports, maybeFrom);
|
|
13323
13525
|
}
|
|
13324
13526
|
function importSpec(type, value) {
|
|
@@ -13392,14 +13594,14 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13392
13594
|
},
|
|
13393
13595
|
|
|
13394
13596
|
indent: function(state, textAfter) {
|
|
13395
|
-
if (state.tokenize == tokenComment) return CodeMirror.Pass;
|
|
13597
|
+
if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
|
|
13396
13598
|
if (state.tokenize != tokenBase) return 0;
|
|
13397
13599
|
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top;
|
|
13398
13600
|
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
|
13399
13601
|
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
|
|
13400
13602
|
var c = state.cc[i];
|
|
13401
13603
|
if (c == poplex) lexical = lexical.prev;
|
|
13402
|
-
else if (c != maybeelse) break;
|
|
13604
|
+
else if (c != maybeelse && c != popcontext) break;
|
|
13403
13605
|
}
|
|
13404
13606
|
while ((lexical.type == "stat" || lexical.type == "form") &&
|
|
13405
13607
|
(firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
|
|
@@ -13436,8 +13638,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
13436
13638
|
expressionAllowed: expressionAllowed,
|
|
13437
13639
|
|
|
13438
13640
|
skipExpression: function(state) {
|
|
13439
|
-
|
|
13440
|
-
if (top == expression || top == expressionNoComma) state.cc.pop();
|
|
13641
|
+
parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null));
|
|
13441
13642
|
}
|
|
13442
13643
|
};
|
|
13443
13644
|
});
|
|
@@ -13449,21 +13650,22 @@ CodeMirror.defineMIME("text/ecmascript", "javascript");
|
|
|
13449
13650
|
CodeMirror.defineMIME("application/javascript", "javascript");
|
|
13450
13651
|
CodeMirror.defineMIME("application/x-javascript", "javascript");
|
|
13451
13652
|
CodeMirror.defineMIME("application/ecmascript", "javascript");
|
|
13452
|
-
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
|
|
13453
|
-
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
|
|
13454
|
-
CodeMirror.defineMIME("application/
|
|
13653
|
+
CodeMirror.defineMIME("application/json", { name: "javascript", json: true });
|
|
13654
|
+
CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true });
|
|
13655
|
+
CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true });
|
|
13656
|
+
CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true });
|
|
13455
13657
|
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
|
|
13456
13658
|
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
|
|
13457
13659
|
|
|
13458
13660
|
});
|
|
13459
|
-
});
|
|
13661
|
+
}());
|
|
13460
13662
|
|
|
13461
|
-
|
|
13663
|
+
(function (module, exports) {
|
|
13462
13664
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
13463
13665
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
13464
13666
|
|
|
13465
13667
|
(function(mod) {
|
|
13466
|
-
mod(codemirror, xml, javascript, css);
|
|
13668
|
+
mod(codemirror.exports, xml.exports, javascript.exports, css.exports);
|
|
13467
13669
|
})(function(CodeMirror) {
|
|
13468
13670
|
|
|
13469
13671
|
var defaultTags = {
|
|
@@ -13529,7 +13731,8 @@ var htmlmixed = createCommonjsModule(function (module, exports) {
|
|
|
13529
13731
|
name: "xml",
|
|
13530
13732
|
htmlMode: true,
|
|
13531
13733
|
multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
|
|
13532
|
-
multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag
|
|
13734
|
+
multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
|
|
13735
|
+
allowMissingTagName: parserConfig.allowMissingTagName,
|
|
13533
13736
|
});
|
|
13534
13737
|
|
|
13535
13738
|
var tags = {};
|
|
@@ -13604,10 +13807,10 @@ var htmlmixed = createCommonjsModule(function (module, exports) {
|
|
|
13604
13807
|
|
|
13605
13808
|
CodeMirror.defineMIME("text/html", "htmlmixed");
|
|
13606
13809
|
});
|
|
13607
|
-
});
|
|
13810
|
+
}());
|
|
13608
13811
|
|
|
13609
13812
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
13610
|
-
|
|
13813
|
+
CodeMirror.defineMode("dot", function (config) {
|
|
13611
13814
|
var ops = /--|->|=|;/;
|
|
13612
13815
|
var brackets = /[\[\]{}]/;
|
|
13613
13816
|
return {
|
|
@@ -13702,22 +13905,22 @@ codemirror.defineMode("dot", function (config) {
|
|
|
13702
13905
|
blockCommentEnd: "*/"
|
|
13703
13906
|
};
|
|
13704
13907
|
});
|
|
13705
|
-
|
|
13908
|
+
CodeMirror.defineMIME("text/x-dot", "dot");
|
|
13706
13909
|
|
|
13707
13910
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
13708
|
-
|
|
13709
|
-
var htmlMode =
|
|
13911
|
+
CodeMirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
13912
|
+
var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
|
|
13710
13913
|
var htmlModeMissing = htmlMode.name == "null";
|
|
13711
13914
|
if (modeCfg.defaultMode === undefined)
|
|
13712
13915
|
modeCfg.defaultMode = "";
|
|
13713
13916
|
function getMode(name) {
|
|
13714
13917
|
name = name === "" ? modeCfg.defaultMode : name;
|
|
13715
|
-
if (
|
|
13716
|
-
var found =
|
|
13918
|
+
if (CodeMirror.findModeByName) {
|
|
13919
|
+
var found = CodeMirror.findModeByName(name);
|
|
13717
13920
|
if (found)
|
|
13718
13921
|
name = found.mime || found.mimes[0];
|
|
13719
13922
|
}
|
|
13720
|
-
var mode =
|
|
13923
|
+
var mode = CodeMirror.getMode(cmCfg, name);
|
|
13721
13924
|
return mode.name == "null" ? null : mode;
|
|
13722
13925
|
}
|
|
13723
13926
|
// Should characters that affect highlighting be highlighted separate?
|
|
@@ -13802,7 +14005,7 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
13802
14005
|
if (state.f == htmlBlock) {
|
|
13803
14006
|
var exit = htmlModeMissing;
|
|
13804
14007
|
if (!exit) {
|
|
13805
|
-
var inner =
|
|
14008
|
+
var inner = CodeMirror.innerMode(htmlMode, state.htmlState);
|
|
13806
14009
|
exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
|
|
13807
14010
|
(!inner.state.context && inner.state.tokenize.isInText);
|
|
13808
14011
|
}
|
|
@@ -13910,7 +14113,7 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
13910
14113
|
// try switching mode
|
|
13911
14114
|
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2]);
|
|
13912
14115
|
if (state.localMode)
|
|
13913
|
-
state.localState =
|
|
14116
|
+
state.localState = CodeMirror.startState(state.localMode);
|
|
13914
14117
|
state.f = state.block = local;
|
|
13915
14118
|
if (modeCfg.highlightFormatting)
|
|
13916
14119
|
state.formatting = "code-block";
|
|
@@ -13956,7 +14159,7 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
13956
14159
|
function htmlBlock(stream, state) {
|
|
13957
14160
|
var style = htmlMode.token(stream, state.htmlState);
|
|
13958
14161
|
if (!htmlModeMissing) {
|
|
13959
|
-
var inner =
|
|
14162
|
+
var inner = CodeMirror.innerMode(htmlMode, state.htmlState);
|
|
13960
14163
|
if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
|
|
13961
14164
|
(!inner.state.context && inner.state.tokenize.isInText)) ||
|
|
13962
14165
|
(state.md_inside && stream.current().indexOf(">") > -1)) {
|
|
@@ -14243,7 +14446,7 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
14243
14446
|
state.md_inside = true;
|
|
14244
14447
|
}
|
|
14245
14448
|
stream.backUp(1);
|
|
14246
|
-
state.htmlState =
|
|
14449
|
+
state.htmlState = CodeMirror.startState(htmlMode);
|
|
14247
14450
|
return switchBlock(stream, state, htmlBlock);
|
|
14248
14451
|
}
|
|
14249
14452
|
if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
|
|
@@ -14472,10 +14675,10 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
14472
14675
|
prevLine: s.prevLine,
|
|
14473
14676
|
thisLine: s.thisLine,
|
|
14474
14677
|
block: s.block,
|
|
14475
|
-
htmlState: s.htmlState &&
|
|
14678
|
+
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
|
14476
14679
|
indentation: s.indentation,
|
|
14477
14680
|
localMode: s.localMode,
|
|
14478
|
-
localState: s.localMode ?
|
|
14681
|
+
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
|
|
14479
14682
|
inline: s.inline,
|
|
14480
14683
|
text: s.text,
|
|
14481
14684
|
formatting: false,
|
|
@@ -14543,7 +14746,7 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
14543
14746
|
return htmlMode.indent(state.htmlState, textAfter, line);
|
|
14544
14747
|
if (state.localState && state.localMode.indent)
|
|
14545
14748
|
return state.localMode.indent(state.localState, textAfter, line);
|
|
14546
|
-
return
|
|
14749
|
+
return CodeMirror.Pass;
|
|
14547
14750
|
},
|
|
14548
14751
|
blankLine: blankLine,
|
|
14549
14752
|
getType: getType,
|
|
@@ -14554,10 +14757,10 @@ codemirror.defineMode("markdown", function (cmCfg, modeCfg) {
|
|
|
14554
14757
|
};
|
|
14555
14758
|
return mode;
|
|
14556
14759
|
}, "xml");
|
|
14557
|
-
|
|
14558
|
-
|
|
14760
|
+
CodeMirror.defineMIME("text/markdown", "markdown");
|
|
14761
|
+
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
|
14559
14762
|
|
|
14560
|
-
function styleInject(css, ref) {
|
|
14763
|
+
function styleInject$1(css, ref) {
|
|
14561
14764
|
if ( ref === void 0 ) ref = {};
|
|
14562
14765
|
var insertAt = ref.insertAt;
|
|
14563
14766
|
|
|
@@ -14584,22 +14787,22 @@ function styleInject(css, ref) {
|
|
|
14584
14787
|
}
|
|
14585
14788
|
}
|
|
14586
14789
|
|
|
14587
|
-
var css_248z = ".CodeMirror{font-family:monospace;height:300px
|
|
14588
|
-
styleInject(css_248z);
|
|
14790
|
+
var css_248z$2 = ".CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;border:0!important;width:auto}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:-50px}.CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-50px;margin-right:-50px;outline:none;overflow:scroll!important;padding-bottom:50px;position:relative}.CodeMirror-sizer{border-right:50px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;outline:none;position:absolute;z-index:6}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-50px;vertical-align:top;white-space:normal}.CodeMirror-gutter-wrapper{background:none!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{word-wrap:normal;-webkit-tap-highlight-color:transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;z-index:2}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\"\"}span.CodeMirror-selectedtext{background:none}";
|
|
14791
|
+
styleInject$1(css_248z$2);
|
|
14589
14792
|
|
|
14590
|
-
|
|
14793
|
+
(function (module, exports) {
|
|
14591
14794
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
14592
14795
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
14593
14796
|
|
|
14594
14797
|
(function(mod) {
|
|
14595
|
-
mod(codemirror);
|
|
14798
|
+
mod(codemirror.exports);
|
|
14596
14799
|
})(function(CodeMirror) {
|
|
14597
14800
|
|
|
14598
14801
|
CodeMirror.registerHelper("fold", "brace", function(cm, start) {
|
|
14599
14802
|
var line = start.line, lineText = cm.getLine(line);
|
|
14600
|
-
var tokenType;
|
|
14601
14803
|
|
|
14602
14804
|
function findOpening(openCh) {
|
|
14805
|
+
var tokenType;
|
|
14603
14806
|
for (var at = start.ch, pass = 0;;) {
|
|
14604
14807
|
var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);
|
|
14605
14808
|
if (found == -1) {
|
|
@@ -14610,37 +14813,42 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) {
|
|
|
14610
14813
|
}
|
|
14611
14814
|
if (pass == 1 && found < start.ch) break;
|
|
14612
14815
|
tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
|
|
14613
|
-
if (!/^(comment|string)/.test(tokenType)) return found + 1;
|
|
14816
|
+
if (!/^(comment|string)/.test(tokenType)) return {ch: found + 1, tokenType: tokenType};
|
|
14614
14817
|
at = found - 1;
|
|
14615
14818
|
}
|
|
14616
14819
|
}
|
|
14617
14820
|
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
if (pos == text.length) break;
|
|
14634
|
-
if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {
|
|
14635
|
-
if (pos == nextOpen) ++count;
|
|
14636
|
-
else if (!--count) { end = i; endCh = pos; break outer; }
|
|
14821
|
+
function findRange(startToken, endToken, found) {
|
|
14822
|
+
var count = 1, lastLine = cm.lastLine(), end, startCh = found.ch, endCh;
|
|
14823
|
+
outer: for (var i = line; i <= lastLine; ++i) {
|
|
14824
|
+
var text = cm.getLine(i), pos = i == line ? startCh : 0;
|
|
14825
|
+
for (;;) {
|
|
14826
|
+
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
|
|
14827
|
+
if (nextOpen < 0) nextOpen = text.length;
|
|
14828
|
+
if (nextClose < 0) nextClose = text.length;
|
|
14829
|
+
pos = Math.min(nextOpen, nextClose);
|
|
14830
|
+
if (pos == text.length) break;
|
|
14831
|
+
if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == found.tokenType) {
|
|
14832
|
+
if (pos == nextOpen) ++count;
|
|
14833
|
+
else if (!--count) { end = i; endCh = pos; break outer; }
|
|
14834
|
+
}
|
|
14835
|
+
++pos;
|
|
14637
14836
|
}
|
|
14638
|
-
++pos;
|
|
14639
14837
|
}
|
|
14838
|
+
|
|
14839
|
+
if (end == null || line == end) return null
|
|
14840
|
+
return {from: CodeMirror.Pos(line, startCh),
|
|
14841
|
+
to: CodeMirror.Pos(end, endCh)};
|
|
14842
|
+
}
|
|
14843
|
+
|
|
14844
|
+
var startBrace = findOpening("{"), startBracket = findOpening("[");
|
|
14845
|
+
if (startBrace && (!startBracket || startBracket.ch > startBrace.ch)) {
|
|
14846
|
+
return findRange("{", "}", startBrace) || (startBracket && findRange("[", "]", startBracket))
|
|
14847
|
+
} else if (startBracket) {
|
|
14848
|
+
return findRange("[", "]", startBracket) || (startBrace && findRange("{", "}", startBrace))
|
|
14849
|
+
} else {
|
|
14850
|
+
return null
|
|
14640
14851
|
}
|
|
14641
|
-
if (end == null || line == end) return;
|
|
14642
|
-
return {from: CodeMirror.Pos(line, startCh),
|
|
14643
|
-
to: CodeMirror.Pos(end, endCh)};
|
|
14644
14852
|
});
|
|
14645
14853
|
|
|
14646
14854
|
CodeMirror.registerHelper("fold", "import", function(cm, start) {
|
|
@@ -14687,14 +14895,14 @@ CodeMirror.registerHelper("fold", "include", function(cm, start) {
|
|
|
14687
14895
|
});
|
|
14688
14896
|
|
|
14689
14897
|
});
|
|
14690
|
-
});
|
|
14898
|
+
}());
|
|
14691
14899
|
|
|
14692
|
-
|
|
14900
|
+
(function (module, exports) {
|
|
14693
14901
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
14694
14902
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
14695
14903
|
|
|
14696
14904
|
(function(mod) {
|
|
14697
|
-
mod(codemirror);
|
|
14905
|
+
mod(codemirror.exports);
|
|
14698
14906
|
})(function(CodeMirror) {
|
|
14699
14907
|
|
|
14700
14908
|
CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {
|
|
@@ -14743,14 +14951,16 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {
|
|
|
14743
14951
|
});
|
|
14744
14952
|
|
|
14745
14953
|
});
|
|
14746
|
-
});
|
|
14954
|
+
}());
|
|
14747
14955
|
|
|
14748
|
-
var foldcode =
|
|
14956
|
+
var foldcode = {exports: {}};
|
|
14957
|
+
|
|
14958
|
+
(function (module, exports) {
|
|
14749
14959
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
14750
14960
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
14751
14961
|
|
|
14752
14962
|
(function(mod) {
|
|
14753
|
-
mod(codemirror);
|
|
14963
|
+
mod(codemirror.exports);
|
|
14754
14964
|
})(function(CodeMirror) {
|
|
14755
14965
|
|
|
14756
14966
|
function doFold(cm, pos, options, force) {
|
|
@@ -14766,9 +14976,11 @@ var foldcode = createCommonjsModule(function (module, exports) {
|
|
|
14766
14976
|
function getRange(allowFolded) {
|
|
14767
14977
|
var range = finder(cm, pos);
|
|
14768
14978
|
if (!range || range.to.line - range.from.line < minSize) return null;
|
|
14979
|
+
if (force === "fold") return range;
|
|
14980
|
+
|
|
14769
14981
|
var marks = cm.findMarksAt(range.from);
|
|
14770
14982
|
for (var i = 0; i < marks.length; ++i) {
|
|
14771
|
-
if (marks[i].__isFold
|
|
14983
|
+
if (marks[i].__isFold) {
|
|
14772
14984
|
if (!allowFolded) return null;
|
|
14773
14985
|
range.cleared = true;
|
|
14774
14986
|
marks[i].clear();
|
|
@@ -14841,18 +15053,18 @@ var foldcode = createCommonjsModule(function (module, exports) {
|
|
|
14841
15053
|
cm.foldCode(cm.getCursor(), null, "fold");
|
|
14842
15054
|
};
|
|
14843
15055
|
CodeMirror.commands.unfold = function(cm) {
|
|
14844
|
-
cm.foldCode(cm.getCursor(),
|
|
15056
|
+
cm.foldCode(cm.getCursor(), { scanUp: false }, "unfold");
|
|
14845
15057
|
};
|
|
14846
15058
|
CodeMirror.commands.foldAll = function(cm) {
|
|
14847
15059
|
cm.operation(function() {
|
|
14848
15060
|
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
|
|
14849
|
-
cm.foldCode(CodeMirror.Pos(i, 0),
|
|
15061
|
+
cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, "fold");
|
|
14850
15062
|
});
|
|
14851
15063
|
};
|
|
14852
15064
|
CodeMirror.commands.unfoldAll = function(cm) {
|
|
14853
15065
|
cm.operation(function() {
|
|
14854
15066
|
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
|
|
14855
|
-
cm.foldCode(CodeMirror.Pos(i, 0),
|
|
15067
|
+
cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, "unfold");
|
|
14856
15068
|
});
|
|
14857
15069
|
};
|
|
14858
15070
|
|
|
@@ -14897,14 +15109,14 @@ var foldcode = createCommonjsModule(function (module, exports) {
|
|
|
14897
15109
|
return getOption(this, options, name);
|
|
14898
15110
|
});
|
|
14899
15111
|
});
|
|
14900
|
-
});
|
|
15112
|
+
}());
|
|
14901
15113
|
|
|
14902
|
-
|
|
15114
|
+
(function (module, exports) {
|
|
14903
15115
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
14904
15116
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
14905
15117
|
|
|
14906
15118
|
(function(mod) {
|
|
14907
|
-
mod(codemirror, foldcode);
|
|
15119
|
+
mod(codemirror.exports, foldcode.exports);
|
|
14908
15120
|
})(function(CodeMirror) {
|
|
14909
15121
|
|
|
14910
15122
|
CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {
|
|
@@ -15057,14 +15269,14 @@ var foldgutter = createCommonjsModule(function (module, exports) {
|
|
|
15057
15269
|
updateFoldInfo(cm, line, line + 1);
|
|
15058
15270
|
}
|
|
15059
15271
|
});
|
|
15060
|
-
});
|
|
15272
|
+
}());
|
|
15061
15273
|
|
|
15062
|
-
|
|
15274
|
+
(function (module, exports) {
|
|
15063
15275
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
15064
15276
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
15065
15277
|
|
|
15066
15278
|
(function(mod) {
|
|
15067
|
-
mod(codemirror);
|
|
15279
|
+
mod(codemirror.exports);
|
|
15068
15280
|
})(function(CodeMirror) {
|
|
15069
15281
|
|
|
15070
15282
|
function lineIndent(cm, lineNo) {
|
|
@@ -15101,14 +15313,14 @@ CodeMirror.registerHelper("fold", "indent", function(cm, start) {
|
|
|
15101
15313
|
});
|
|
15102
15314
|
|
|
15103
15315
|
});
|
|
15104
|
-
});
|
|
15316
|
+
}());
|
|
15105
15317
|
|
|
15106
|
-
|
|
15318
|
+
(function (module, exports) {
|
|
15107
15319
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
15108
15320
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
15109
15321
|
|
|
15110
15322
|
(function(mod) {
|
|
15111
|
-
mod(codemirror);
|
|
15323
|
+
mod(codemirror.exports);
|
|
15112
15324
|
})(function(CodeMirror) {
|
|
15113
15325
|
|
|
15114
15326
|
var Pos = CodeMirror.Pos;
|
|
@@ -15282,19 +15494,21 @@ var xmlFold = createCommonjsModule(function (module, exports) {
|
|
|
15282
15494
|
return findMatchingClose(iter, name);
|
|
15283
15495
|
};
|
|
15284
15496
|
});
|
|
15285
|
-
});
|
|
15497
|
+
}());
|
|
15286
15498
|
|
|
15287
|
-
var css_248z$1 = ".CodeMirror-foldmarker{color
|
|
15288
|
-
styleInject(css_248z$1);
|
|
15499
|
+
var css_248z$1$1 = ".CodeMirror-foldmarker{color:blue;cursor:pointer;font-family:arial;line-height:.3;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:\"\\25BE\"}.CodeMirror-foldgutter-folded:after{content:\"\\25B8\"}";
|
|
15500
|
+
styleInject$1(css_248z$1$1);
|
|
15289
15501
|
|
|
15290
|
-
var dialog =
|
|
15502
|
+
var dialog = {exports: {}};
|
|
15503
|
+
|
|
15504
|
+
(function (module, exports) {
|
|
15291
15505
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
15292
15506
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
15293
15507
|
|
|
15294
15508
|
// Open simple dialogs on top of an editor. Relies on dialog.css.
|
|
15295
15509
|
|
|
15296
15510
|
(function(mod) {
|
|
15297
|
-
mod(codemirror);
|
|
15511
|
+
mod(codemirror.exports);
|
|
15298
15512
|
})(function(CodeMirror) {
|
|
15299
15513
|
function dialogDiv(cm, template, bottom) {
|
|
15300
15514
|
var wrap = cm.getWrapperElement();
|
|
@@ -15367,7 +15581,9 @@ var dialog = createCommonjsModule(function (module, exports) {
|
|
|
15367
15581
|
if (e.keyCode == 13) callback(inp.value, e);
|
|
15368
15582
|
});
|
|
15369
15583
|
|
|
15370
|
-
if (options.closeOnBlur !== false) CodeMirror.on(
|
|
15584
|
+
if (options.closeOnBlur !== false) CodeMirror.on(dialog, "focusout", function (evt) {
|
|
15585
|
+
if (evt.relatedTarget !== null) close();
|
|
15586
|
+
});
|
|
15371
15587
|
} else if (button = dialog.getElementsByTagName("button")[0]) {
|
|
15372
15588
|
CodeMirror.on(button, "click", function() {
|
|
15373
15589
|
close();
|
|
@@ -15444,20 +15660,23 @@ var dialog = createCommonjsModule(function (module, exports) {
|
|
|
15444
15660
|
return close;
|
|
15445
15661
|
});
|
|
15446
15662
|
});
|
|
15447
|
-
});
|
|
15663
|
+
}());
|
|
15448
15664
|
|
|
15449
|
-
|
|
15665
|
+
(function (module, exports) {
|
|
15450
15666
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
15451
15667
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
15452
15668
|
|
|
15453
15669
|
// Defines jumpToLine command. Uses dialog.js if present.
|
|
15454
15670
|
|
|
15455
15671
|
(function(mod) {
|
|
15456
|
-
mod(codemirror, dialog);
|
|
15672
|
+
mod(codemirror.exports, dialog.exports);
|
|
15457
15673
|
})(function(CodeMirror) {
|
|
15458
15674
|
|
|
15675
|
+
// default search panel location
|
|
15676
|
+
CodeMirror.defineOption("search", {bottom: false});
|
|
15677
|
+
|
|
15459
15678
|
function dialog(cm, text, shortText, deflt, f) {
|
|
15460
|
-
if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
|
|
15679
|
+
if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true, bottom: cm.options.search.bottom});
|
|
15461
15680
|
else f(prompt(shortText, deflt));
|
|
15462
15681
|
}
|
|
15463
15682
|
|
|
@@ -15491,14 +15710,16 @@ var jumpToLine = createCommonjsModule(function (module, exports) {
|
|
|
15491
15710
|
|
|
15492
15711
|
CodeMirror.keyMap["default"]["Alt-G"] = "jumpToLine";
|
|
15493
15712
|
});
|
|
15494
|
-
});
|
|
15713
|
+
}());
|
|
15714
|
+
|
|
15715
|
+
var searchcursor = {exports: {}};
|
|
15495
15716
|
|
|
15496
|
-
|
|
15717
|
+
(function (module, exports) {
|
|
15497
15718
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
15498
15719
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
15499
15720
|
|
|
15500
15721
|
(function(mod) {
|
|
15501
|
-
mod(codemirror);
|
|
15722
|
+
mod(codemirror.exports);
|
|
15502
15723
|
})(function(CodeMirror) {
|
|
15503
15724
|
var Pos = CodeMirror.Pos;
|
|
15504
15725
|
|
|
@@ -15692,6 +15913,7 @@ var searchcursor = createCommonjsModule(function (module, exports) {
|
|
|
15692
15913
|
|
|
15693
15914
|
function SearchCursor(doc, query, pos, options) {
|
|
15694
15915
|
this.atOccurrence = false;
|
|
15916
|
+
this.afterEmptyMatch = false;
|
|
15695
15917
|
this.doc = doc;
|
|
15696
15918
|
pos = pos ? doc.clipPos(pos) : Pos(0, 0);
|
|
15697
15919
|
this.pos = {from: pos, to: pos};
|
|
@@ -15727,21 +15949,29 @@ var searchcursor = createCommonjsModule(function (module, exports) {
|
|
|
15727
15949
|
findPrevious: function() {return this.find(true)},
|
|
15728
15950
|
|
|
15729
15951
|
find: function(reverse) {
|
|
15730
|
-
var
|
|
15731
|
-
|
|
15732
|
-
|
|
15733
|
-
|
|
15734
|
-
while (result && CodeMirror.cmpPos(result.from, result.to) == 0) {
|
|
15952
|
+
var head = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);
|
|
15953
|
+
if (this.afterEmptyMatch && this.atOccurrence) {
|
|
15954
|
+
// do not return the same 0 width match twice
|
|
15955
|
+
head = Pos(head.line, head.ch);
|
|
15735
15956
|
if (reverse) {
|
|
15736
|
-
|
|
15737
|
-
|
|
15738
|
-
|
|
15957
|
+
head.ch--;
|
|
15958
|
+
if (head.ch < 0) {
|
|
15959
|
+
head.line--;
|
|
15960
|
+
head.ch = (this.doc.getLine(head.line) || "").length;
|
|
15961
|
+
}
|
|
15739
15962
|
} else {
|
|
15740
|
-
|
|
15741
|
-
|
|
15742
|
-
|
|
15963
|
+
head.ch++;
|
|
15964
|
+
if (head.ch > (this.doc.getLine(head.line) || "").length) {
|
|
15965
|
+
head.ch = 0;
|
|
15966
|
+
head.line++;
|
|
15967
|
+
}
|
|
15968
|
+
}
|
|
15969
|
+
if (CodeMirror.cmpPos(head, this.doc.clipPos(head)) != 0) {
|
|
15970
|
+
return this.atOccurrence = false
|
|
15743
15971
|
}
|
|
15744
15972
|
}
|
|
15973
|
+
var result = this.matches(reverse, head);
|
|
15974
|
+
this.afterEmptyMatch = result && CodeMirror.cmpPos(result.from, result.to) == 0;
|
|
15745
15975
|
|
|
15746
15976
|
if (result) {
|
|
15747
15977
|
this.pos = result;
|
|
@@ -15784,9 +16014,9 @@ var searchcursor = createCommonjsModule(function (module, exports) {
|
|
|
15784
16014
|
this.setSelections(ranges, 0);
|
|
15785
16015
|
});
|
|
15786
16016
|
});
|
|
15787
|
-
});
|
|
16017
|
+
}());
|
|
15788
16018
|
|
|
15789
|
-
|
|
16019
|
+
(function (module, exports) {
|
|
15790
16020
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
15791
16021
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
15792
16022
|
|
|
@@ -15799,9 +16029,12 @@ var search = createCommonjsModule(function (module, exports) {
|
|
|
15799
16029
|
// Ctrl-G.
|
|
15800
16030
|
|
|
15801
16031
|
(function(mod) {
|
|
15802
|
-
mod(codemirror, searchcursor, dialog);
|
|
16032
|
+
mod(codemirror.exports, searchcursor.exports, dialog.exports);
|
|
15803
16033
|
})(function(CodeMirror) {
|
|
15804
16034
|
|
|
16035
|
+
// default search panel location
|
|
16036
|
+
CodeMirror.defineOption("search", {bottom: false});
|
|
16037
|
+
|
|
15805
16038
|
function searchOverlay(query, caseInsensitive) {
|
|
15806
16039
|
if (typeof query == "string")
|
|
15807
16040
|
query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
|
|
@@ -15846,12 +16079,13 @@ var search = createCommonjsModule(function (module, exports) {
|
|
|
15846
16079
|
selectValueOnOpen: true,
|
|
15847
16080
|
closeOnEnter: false,
|
|
15848
16081
|
onClose: function() { clearSearch(cm); },
|
|
15849
|
-
onKeyDown: onKeyDown
|
|
16082
|
+
onKeyDown: onKeyDown,
|
|
16083
|
+
bottom: cm.options.search.bottom
|
|
15850
16084
|
});
|
|
15851
16085
|
}
|
|
15852
16086
|
|
|
15853
16087
|
function dialog(cm, text, shortText, deflt, f) {
|
|
15854
|
-
if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
|
|
16088
|
+
if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true, bottom: cm.options.search.bottom});
|
|
15855
16089
|
else f(prompt(shortText, deflt));
|
|
15856
16090
|
}
|
|
15857
16091
|
|
|
@@ -15968,18 +16202,43 @@ var search = createCommonjsModule(function (module, exports) {
|
|
|
15968
16202
|
if (state.annotate) { state.annotate.clear(); state.annotate = null; }
|
|
15969
16203
|
});}
|
|
15970
16204
|
|
|
16205
|
+
function el(tag, attrs) {
|
|
16206
|
+
var element = tag ? document.createElement(tag) : document.createDocumentFragment();
|
|
16207
|
+
for (var key in attrs) {
|
|
16208
|
+
element[key] = attrs[key];
|
|
16209
|
+
}
|
|
16210
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
16211
|
+
var child = arguments[i];
|
|
16212
|
+
element.appendChild(typeof child == "string" ? document.createTextNode(child) : child);
|
|
16213
|
+
}
|
|
16214
|
+
return element;
|
|
16215
|
+
}
|
|
15971
16216
|
|
|
15972
16217
|
function getQueryDialog(cm) {
|
|
15973
|
-
return
|
|
16218
|
+
return el("", null,
|
|
16219
|
+
el("span", {className: "CodeMirror-search-label"}, cm.phrase("Search:")), " ",
|
|
16220
|
+
el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}), " ",
|
|
16221
|
+
el("span", {style: "color: #888", className: "CodeMirror-search-hint"},
|
|
16222
|
+
cm.phrase("(Use /re/ syntax for regexp search)")));
|
|
15974
16223
|
}
|
|
15975
16224
|
function getReplaceQueryDialog(cm) {
|
|
15976
|
-
return
|
|
16225
|
+
return el("", null, " ",
|
|
16226
|
+
el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}), " ",
|
|
16227
|
+
el("span", {style: "color: #888", className: "CodeMirror-search-hint"},
|
|
16228
|
+
cm.phrase("(Use /re/ syntax for regexp search)")));
|
|
15977
16229
|
}
|
|
15978
16230
|
function getReplacementQueryDialog(cm) {
|
|
15979
|
-
return
|
|
16231
|
+
return el("", null,
|
|
16232
|
+
el("span", {className: "CodeMirror-search-label"}, cm.phrase("With:")), " ",
|
|
16233
|
+
el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}));
|
|
15980
16234
|
}
|
|
15981
16235
|
function getDoReplaceConfirm(cm) {
|
|
15982
|
-
return
|
|
16236
|
+
return el("", null,
|
|
16237
|
+
el("span", {className: "CodeMirror-search-label"}, cm.phrase("Replace?")), " ",
|
|
16238
|
+
el("button", {}, cm.phrase("Yes")), " ",
|
|
16239
|
+
el("button", {}, cm.phrase("No")), " ",
|
|
16240
|
+
el("button", {}, cm.phrase("All")), " ",
|
|
16241
|
+
el("button", {}, cm.phrase("Stop")));
|
|
15983
16242
|
}
|
|
15984
16243
|
|
|
15985
16244
|
function replaceAll(cm, query, text) {
|
|
@@ -15996,8 +16255,11 @@ var search = createCommonjsModule(function (module, exports) {
|
|
|
15996
16255
|
function replace(cm, all) {
|
|
15997
16256
|
if (cm.getOption("readOnly")) return;
|
|
15998
16257
|
var query = cm.getSelection() || getSearchState(cm).lastQuery;
|
|
15999
|
-
var dialogText =
|
|
16000
|
-
|
|
16258
|
+
var dialogText = all ? cm.phrase("Replace all:") : cm.phrase("Replace:");
|
|
16259
|
+
var fragment = el("", null,
|
|
16260
|
+
el("span", {className: "CodeMirror-search-label"}, dialogText),
|
|
16261
|
+
getReplaceQueryDialog(cm));
|
|
16262
|
+
dialog(cm, fragment, dialogText, query, function(query) {
|
|
16001
16263
|
if (!query) return;
|
|
16002
16264
|
query = parseQuery(query);
|
|
16003
16265
|
dialog(cm, getReplacementQueryDialog(cm), cm.phrase("Replace with:"), "", function(text) {
|
|
@@ -16041,12 +16303,12 @@ var search = createCommonjsModule(function (module, exports) {
|
|
|
16041
16303
|
CodeMirror.commands.replace = replace;
|
|
16042
16304
|
CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
|
|
16043
16305
|
});
|
|
16044
|
-
});
|
|
16306
|
+
}());
|
|
16045
16307
|
|
|
16046
|
-
var css_248z$
|
|
16047
|
-
styleInject(css_248z$
|
|
16308
|
+
var css_248z$3 = ".CodeMirror-dialog{background:inherit;color:inherit;left:0;overflow:hidden;padding:.1em .8em;position:absolute;right:0;z-index:15}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{background:transparent;border:none;color:inherit;font-family:monospace;outline:none;width:20em}.CodeMirror-dialog button{font-size:70%}";
|
|
16309
|
+
styleInject$1(css_248z$3);
|
|
16048
16310
|
|
|
16049
|
-
function styleInject
|
|
16311
|
+
function styleInject(css, ref) {
|
|
16050
16312
|
if ( ref === void 0 ) ref = {};
|
|
16051
16313
|
var insertAt = ref.insertAt;
|
|
16052
16314
|
|
|
@@ -16073,8 +16335,8 @@ function styleInject$1(css, ref) {
|
|
|
16073
16335
|
}
|
|
16074
16336
|
}
|
|
16075
16337
|
|
|
16076
|
-
var css_248z$
|
|
16077
|
-
styleInject
|
|
16338
|
+
var css_248z$1 = ".codemirror_Editor{border:1px solid #d3d3d3}.codemirror_Editor .cm-marked-text{background-color:#ff0}.codemirror_Editor .cm-marked-error,.codemirror_Editor .cm-marked-info,.codemirror_Editor .cm-marked-warning{background-position:0 100%;background-repeat:repeat-x;display:inline-block;position:relative}.codemirror_Editor .cm-marked-info{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHElEQVQYV2NkgIP//xkYGBkZIXwIB0SDCQgHAgDEXAgCKU2DPwAAAABJRU5ErkJggg==\")}.codemirror_Editor .cm-marked-error{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHUlEQVQYV2NkgIL/DAz/GRkYGBlBfBgHTMM4MJUAzFoIAuwf4BEAAAAASUVORK5CYII=\")}.codemirror_Editor .cm-marked-warning{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAHUlEQVQYV2NkgIL/Sxn+M0YzMDKC+DAOmIZxYCoBKQkLp8ga+UwAAAAASUVORK5CYII=\")}";
|
|
16339
|
+
styleInject(css_248z$1);
|
|
16078
16340
|
|
|
16079
16341
|
var Editor = /** @class */ (function (_super) {
|
|
16080
16342
|
__extends(Editor, _super);
|
|
@@ -16097,7 +16359,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
16097
16359
|
if (this.gutterMarkerWidth() > 0) {
|
|
16098
16360
|
gutters.unshift({
|
|
16099
16361
|
className: "CodeMirror-guttermarker",
|
|
16100
|
-
style: "width:"
|
|
16362
|
+
style: "width:".concat(this.gutterMarkerWidth(), "px;")
|
|
16101
16363
|
});
|
|
16102
16364
|
}
|
|
16103
16365
|
return gutters;
|
|
@@ -16209,7 +16471,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
16209
16471
|
Editor.prototype.enter = function (domNode, element) {
|
|
16210
16472
|
var _this = this;
|
|
16211
16473
|
_super.prototype.enter.call(this, domNode, element);
|
|
16212
|
-
this._codemirror =
|
|
16474
|
+
this._codemirror = CodeMirror.fromTextArea(element.append("textarea").node(), this.options());
|
|
16213
16475
|
this._codemirror.on("changes", function (cm, changes) {
|
|
16214
16476
|
_this.changes(changes);
|
|
16215
16477
|
});
|
|
@@ -16271,8 +16533,8 @@ var DOTEditor = /** @class */ (function (_super) {
|
|
|
16271
16533
|
}(Editor));
|
|
16272
16534
|
DOTEditor.prototype._class += " codemirror_JSEditor";
|
|
16273
16535
|
|
|
16274
|
-
var css_248z
|
|
16275
|
-
styleInject
|
|
16536
|
+
var css_248z = ".codemirror_ECLEditor .cm-s-default span.cm-comment{color:green}.codemirror_ECLEditor .cm-s-default span.cm-keyword{color:#00f}.codemirror_ECLEditor .cm-s-default span.cm-variable{color:navy;font-weight:700}.codemirror_ECLEditor .cm-s-default span.cm-variable-2,.codemirror_ECLEditor .cm-s-default span.cm-variable-3{color:maroon}.codemirror_ECLEditor .cm-s-default span.cm-builtin{color:purple}.codemirror_ECLEditor .cm-s-default span.cm-string{color:grey}.cm-s-default span.cm-atom,.codemirror_ECLEditor .cm-s-default span.cm-number{color:#000}.codemirror_ECLEditor .cm-s-default span.cm-meta{color:#004080}.codemirror_ECLEditor .ErrorLine{background:#c00!important;color:#fff!important}.codemirror_ECLEditor .WarningLine{background:#ff9!important}.codemirror_ECLEditor .highlightline{background:#e8f2ff!important}";
|
|
16537
|
+
styleInject(css_248z);
|
|
16276
16538
|
|
|
16277
16539
|
var ECLEditor = /** @class */ (function (_super) {
|
|
16278
16540
|
__extends(ECLEditor, _super);
|