@hpcc-js/codemirror 2.60.5 → 2.60.7

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 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.60.5";
5
- var BUILD_VERSION = "2.104.11";
4
+ var PKG_VERSION = "2.60.7";
5
+ var BUILD_VERSION = "2.104.14";
6
6
 
7
7
  /******************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -4467,6 +4467,8 @@ var codemirror = {exports: {}};
4467
4467
  d.scroller.setAttribute("tabIndex", "-1");
4468
4468
  // The element in which the editor lives.
4469
4469
  d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
4470
+ // See #6982. FIXME remove when this has been fixed for a while in Chrome
4471
+ if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = "inset(0px)"; }
4470
4472
 
4471
4473
  // This attribute is respected by automatic translation systems such as Google Translate,
4472
4474
  // and may also be respected by tools used by human translators.
@@ -7824,7 +7826,7 @@ var codemirror = {exports: {}};
7824
7826
  for (var i = newBreaks.length - 1; i >= 0; i--)
7825
7827
  { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
7826
7828
  });
7827
- option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
7829
+ option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
7828
7830
  cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
7829
7831
  if (old != Init) { cm.refresh(); }
7830
7832
  });
@@ -9420,6 +9422,7 @@ var codemirror = {exports: {}};
9420
9422
  // Used to work around IE issue with selection being forgotten when focus moves away from textarea
9421
9423
  this.hasSelection = false;
9422
9424
  this.composing = null;
9425
+ this.resetting = false;
9423
9426
  };
9424
9427
 
9425
9428
  TextareaInput.prototype.init = function (display) {
@@ -9552,8 +9555,9 @@ var codemirror = {exports: {}};
9552
9555
  // Reset the input to correspond to the selection (or to be empty,
9553
9556
  // when not typing and nothing is selected)
9554
9557
  TextareaInput.prototype.reset = function (typing) {
9555
- if (this.contextMenuPending || this.composing) { return }
9558
+ if (this.contextMenuPending || this.composing && typing) { return }
9556
9559
  var cm = this.cm;
9560
+ this.resetting = true;
9557
9561
  if (cm.somethingSelected()) {
9558
9562
  this.prevInput = "";
9559
9563
  var content = cm.getSelection();
@@ -9564,6 +9568,7 @@ var codemirror = {exports: {}};
9564
9568
  this.prevInput = this.textarea.value = "";
9565
9569
  if (ie && ie_version >= 9) { this.hasSelection = null; }
9566
9570
  }
9571
+ this.resetting = false;
9567
9572
  };
9568
9573
 
9569
9574
  TextareaInput.prototype.getField = function () { return this.textarea };
@@ -9625,7 +9630,7 @@ var codemirror = {exports: {}};
9625
9630
  // possible when it is clear that nothing happened. hasSelection
9626
9631
  // will be the case when there is a lot of text in the textarea,
9627
9632
  // in which case reading its value would be expensive.
9628
- if (this.contextMenuPending || !cm.state.focused ||
9633
+ if (this.contextMenuPending || this.resetting || !cm.state.focused ||
9629
9634
  (hasSelection(input) && !prevInput && !this.composing) ||
9630
9635
  cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
9631
9636
  { return false }
@@ -9912,7 +9917,7 @@ var codemirror = {exports: {}};
9912
9917
 
9913
9918
  addLegacyProps(CodeMirror);
9914
9919
 
9915
- CodeMirror.version = "5.65.7";
9920
+ CodeMirror.version = "5.65.9";
9916
9921
 
9917
9922
  return CodeMirror;
9918
9923
 
@@ -15155,6 +15160,7 @@ var foldcode = {exports: {}};
15155
15160
  cm.off("fold", onFold);
15156
15161
  cm.off("unfold", onFold);
15157
15162
  cm.off("swapDoc", onChange);
15163
+ cm.off("optionChange", optionChange);
15158
15164
  }
15159
15165
  if (val) {
15160
15166
  cm.state.foldGutter = new State(parseOptions(val));
@@ -15165,6 +15171,7 @@ var foldcode = {exports: {}};
15165
15171
  cm.on("fold", onFold);
15166
15172
  cm.on("unfold", onFold);
15167
15173
  cm.on("swapDoc", onChange);
15174
+ cm.on("optionChange", optionChange);
15168
15175
  }
15169
15176
  });
15170
15177
 
@@ -15254,6 +15261,10 @@ var foldcode = {exports: {}};
15254
15261
  else cm.foldCode(Pos(line, 0), opts);
15255
15262
  }
15256
15263
 
15264
+ function optionChange(cm, option) {
15265
+ if (option == "mode") onChange(cm);
15266
+ }
15267
+
15257
15268
  function onChange(cm) {
15258
15269
  var state = cm.state.foldGutter;
15259
15270
  if (!state) return;