codemirror 5.63.1
This commit is contained in:
parent
eaef854bcf
commit
dc18320b60
18
package-lock.json
generated
18
package-lock.json
generated
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"name": "Stylus",
|
||||
"version": "1.5.20",
|
||||
"version": "1.5.22",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "Stylus",
|
||||
"version": "1.5.20",
|
||||
"version": "1.5.22",
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"codemirror": "5.62.3",
|
||||
"codemirror": "5.63.1",
|
||||
"db-to-cloud": "^0.6.0",
|
||||
"jsonlint": "^1.6.3",
|
||||
"less-bundle": "github:openstyles/less-bundle#v0.1.0",
|
||||
|
@ -2365,9 +2365,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/codemirror": {
|
||||
"version": "5.62.3",
|
||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.3.tgz",
|
||||
"integrity": "sha512-zZAyOfN8TU67ngqrxhOgtkSAGV9jSpN1snbl8elPtnh9Z5A11daR405+dhLzLnuXrwX0WCShWlybxPN3QC/9Pg=="
|
||||
"version": "5.63.1",
|
||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.1.tgz",
|
||||
"integrity": "sha512-baivaNZreZOGh1/tYyTvCupC9NeWk7qlZeGUDi4nFKj/J0JU8FYKZND4QqLw70P7HOttlCt4JJAOj9GoIhHEkA=="
|
||||
},
|
||||
"node_modules/collection-visit": {
|
||||
"version": "1.0.0",
|
||||
|
@ -13938,9 +13938,9 @@
|
|||
}
|
||||
},
|
||||
"codemirror": {
|
||||
"version": "5.62.3",
|
||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.3.tgz",
|
||||
"integrity": "sha512-zZAyOfN8TU67ngqrxhOgtkSAGV9jSpN1snbl8elPtnh9Z5A11daR405+dhLzLnuXrwX0WCShWlybxPN3QC/9Pg=="
|
||||
"version": "5.63.1",
|
||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.1.tgz",
|
||||
"integrity": "sha512-baivaNZreZOGh1/tYyTvCupC9NeWk7qlZeGUDi4nFKj/J0JU8FYKZND4QqLw70P7HOttlCt4JJAOj9GoIhHEkA=="
|
||||
},
|
||||
"collection-visit": {
|
||||
"version": "1.0.0",
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"codemirror": "WARNING! Always use an exact version and test it for a while before releasing"
|
||||
},
|
||||
"dependencies": {
|
||||
"codemirror": "5.62.3",
|
||||
"codemirror": "5.63.1",
|
||||
"db-to-cloud": "^0.6.0",
|
||||
"jsonlint": "^1.6.3",
|
||||
"less-bundle": "github:openstyles/less-bundle#v0.1.0",
|
||||
|
|
3
vendor/codemirror/README.md
vendored
3
vendor/codemirror/README.md
vendored
|
@ -1,4 +1,4 @@
|
|||
## codemirror v5.62.3
|
||||
## codemirror v5.63.1
|
||||
|
||||
Following files are copied from npm (node_modules):
|
||||
|
||||
|
@ -27,6 +27,7 @@ Following files are copied from npm (node_modules):
|
|||
* keymap\emacs.js
|
||||
* keymap\sublime.js
|
||||
* keymap\vim.js
|
||||
* lib\#codemirror.js#
|
||||
* lib\codemirror.css
|
||||
* lib\codemirror.js
|
||||
* mode\css
|
||||
|
|
8
vendor/codemirror/keymap/emacs.js
vendored
8
vendor/codemirror/keymap/emacs.js
vendored
|
@ -330,9 +330,9 @@
|
|||
|
||||
cmds.previousLine = move(byLine, -1);
|
||||
|
||||
cmds.scrollDownCommand = move(byPage, 1);
|
||||
cmds.scrollDownCommand = move(byPage, -1);
|
||||
|
||||
cmds.scrollUpCommand = move(byPage, -1);
|
||||
cmds.scrollUpCommand = move(byPage, 1);
|
||||
|
||||
cmds.backwardParagraph = move(byParagraph, -1);
|
||||
|
||||
|
@ -480,8 +480,8 @@
|
|||
"Home": "goLineStart",
|
||||
"Alt-V": "scrollDownCommand",
|
||||
"Ctrl-V": "scrollUpCommand",
|
||||
"PageUp": "scrollUpCommand",
|
||||
"PageDown": "scrollDownCommand",
|
||||
"PageUp": "scrollDownCommand",
|
||||
"PageDown": "scrollUpCommand",
|
||||
"Ctrl-Up": "backwardParagraph",
|
||||
"Ctrl-Down": "forwardParagraph",
|
||||
"Alt-{": "backwardParagraph",
|
||||
|
|
10
vendor/codemirror/keymap/vim.js
vendored
10
vendor/codemirror/keymap/vim.js
vendored
|
@ -951,7 +951,12 @@
|
|||
if (!keysMatcher) { clearInputState(cm); return false; }
|
||||
var context = vim.visualMode ? 'visual' :
|
||||
'normal';
|
||||
var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context);
|
||||
var mainKey = keysMatcher[2] || keysMatcher[1];
|
||||
if (vim.inputState.operatorShortcut && vim.inputState.operatorShortcut.slice(-1) == mainKey) {
|
||||
// multikey operators act linewise by repeating only the last character
|
||||
mainKey = vim.inputState.operatorShortcut;
|
||||
}
|
||||
var match = commandDispatcher.matchCommand(mainKey, defaultKeymap, vim.inputState, context);
|
||||
if (match.type == 'none') { clearInputState(cm); return false; }
|
||||
else if (match.type == 'partial') { return true; }
|
||||
|
||||
|
@ -1311,6 +1316,9 @@
|
|||
}
|
||||
inputState.operator = command.operator;
|
||||
inputState.operatorArgs = copyArgs(command.operatorArgs);
|
||||
if (command.keys.length > 1) {
|
||||
inputState.operatorShortcut = command.keys;
|
||||
}
|
||||
if (command.exitVisualBlock) {
|
||||
vim.visualBlock = false;
|
||||
updateCmSelection(cm);
|
||||
|
|
34
vendor/codemirror/lib/codemirror.js
vendored
34
vendor/codemirror/lib/codemirror.js
vendored
|
@ -3174,7 +3174,9 @@
|
|||
|
||||
if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) {
|
||||
var charPos = charCoords(cm, head, "div", null, null);
|
||||
cursor.style.width = Math.max(0, charPos.right - charPos.left) + "px";
|
||||
if (charPos.right - charPos.left > 0) {
|
||||
cursor.style.width = (charPos.right - charPos.left) + "px";
|
||||
}
|
||||
}
|
||||
|
||||
if (pos.other) {
|
||||
|
@ -3349,10 +3351,14 @@
|
|||
function updateHeightsInViewport(cm) {
|
||||
var display = cm.display;
|
||||
var prevBottom = display.lineDiv.offsetTop;
|
||||
var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);
|
||||
var oldHeight = display.lineDiv.getBoundingClientRect().top;
|
||||
var mustScroll = 0;
|
||||
for (var i = 0; i < display.view.length; i++) {
|
||||
var cur = display.view[i], wrapping = cm.options.lineWrapping;
|
||||
var height = (void 0), width = 0;
|
||||
if (cur.hidden) { continue }
|
||||
oldHeight += cur.line.height;
|
||||
if (ie && ie_version < 8) {
|
||||
var bot = cur.node.offsetTop + cur.node.offsetHeight;
|
||||
height = bot - prevBottom;
|
||||
|
@ -3367,6 +3373,7 @@
|
|||
}
|
||||
var diff = cur.line.height - height;
|
||||
if (diff > .005 || diff < -.005) {
|
||||
if (oldHeight < viewTop) { mustScroll -= diff; }
|
||||
updateLineHeight(cur.line, height);
|
||||
updateWidgetHeight(cur.line);
|
||||
if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
|
||||
|
@ -3381,6 +3388,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }
|
||||
}
|
||||
|
||||
// Read and store the height of line widgets associated with the
|
||||
|
@ -4492,6 +4500,12 @@
|
|||
|
||||
function onScrollWheel(cm, e) {
|
||||
var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
|
||||
var pixelsPerUnit = wheelPixelsPerUnit;
|
||||
if (event.deltaMode === 0) {
|
||||
dx = e.deltaX;
|
||||
dy = e.deltaY;
|
||||
pixelsPerUnit = 1;
|
||||
}
|
||||
|
||||
var display = cm.display, scroll = display.scroller;
|
||||
// Quit if there's nothing to scroll here
|
||||
|
@ -4520,10 +4534,10 @@
|
|||
// estimated pixels/delta value, we just handle horizontal
|
||||
// scrolling entirely here. It'll be slightly off from native, but
|
||||
// better than glitching out.
|
||||
if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
|
||||
if (dx && !gecko && !presto && pixelsPerUnit != null) {
|
||||
if (dy && canScrollY)
|
||||
{ updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }
|
||||
setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));
|
||||
{ updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }
|
||||
setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));
|
||||
// Only prevent default scrolling if vertical scrolling is
|
||||
// actually possible. Otherwise, it causes vertical scroll
|
||||
// jitter on OSX trackpads when deltaX is small and deltaY
|
||||
|
@ -4536,15 +4550,15 @@
|
|||
|
||||
// 'Project' the visible viewport to cover the area that is being
|
||||
// scrolled into view (if we know enough to estimate it).
|
||||
if (dy && wheelPixelsPerUnit != null) {
|
||||
var pixels = dy * wheelPixelsPerUnit;
|
||||
if (dy && pixelsPerUnit != null) {
|
||||
var pixels = dy * pixelsPerUnit;
|
||||
var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
|
||||
if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
|
||||
else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
|
||||
updateDisplaySimple(cm, {top: top, bottom: bot});
|
||||
}
|
||||
|
||||
if (wheelSamples < 20) {
|
||||
if (wheelSamples < 20 && e.deltaMode !== 0) {
|
||||
if (display.wheelStartX == null) {
|
||||
display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
|
||||
display.wheelDX = dx; display.wheelDY = dy;
|
||||
|
@ -8985,9 +8999,11 @@
|
|||
ContentEditableInput.prototype.supportsTouch = function () { return true };
|
||||
|
||||
ContentEditableInput.prototype.receivedFocus = function () {
|
||||
var this$1 = this;
|
||||
|
||||
var input = this;
|
||||
if (this.selectionInEditor())
|
||||
{ this.pollSelection(); }
|
||||
{ setTimeout(function () { return this$1.pollSelection(); }, 20); }
|
||||
else
|
||||
{ runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }
|
||||
|
||||
|
@ -9816,7 +9832,7 @@
|
|||
|
||||
addLegacyProps(CodeMirror);
|
||||
|
||||
CodeMirror.version = "5.62.3";
|
||||
CodeMirror.version = "5.63.1";
|
||||
|
||||
return CodeMirror;
|
||||
|
||||
|
|
3
vendor/codemirror/theme/solarized.css
vendored
3
vendor/codemirror/theme/solarized.css
vendored
|
@ -35,12 +35,10 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
|
|||
.cm-s-solarized.cm-s-dark {
|
||||
color: #839496;
|
||||
background-color: #002b36;
|
||||
text-shadow: #002b36 0 1px;
|
||||
}
|
||||
.cm-s-solarized.cm-s-light {
|
||||
background-color: #fdf6e3;
|
||||
color: #657b83;
|
||||
text-shadow: #eee8d5 0 1px;
|
||||
}
|
||||
|
||||
.cm-s-solarized .CodeMirror-widget {
|
||||
|
@ -126,7 +124,6 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
|
|||
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
|
||||
color: #586e75;
|
||||
text-shadow: #021014 0 -1px;
|
||||
}
|
||||
|
||||
/* Light */
|
||||
|
|
Loading…
Reference in New Issue
Block a user