@teselagen/ove 0.8.30 → 0.8.32

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/index.cjs.js CHANGED
@@ -2924,6 +2924,13 @@ document.addEventListener("mouseup", () => {
2924
2924
  isDragging$1 = false;
2925
2925
  });
2926
2926
  let tippys = [];
2927
+ function isInAllowedContainer(element2) {
2928
+ if (window.onlyAllowTooltipsInVeEditor) {
2929
+ return element2.closest(".veEditor") !== null;
2930
+ }
2931
+ return true;
2932
+ }
2933
+ __name(isInAllowedContainer, "isInAllowedContainer");
2927
2934
  let recentlyHidden = false;
2928
2935
  let clearMe;
2929
2936
  (function() {
@@ -2931,6 +2938,9 @@ let clearMe;
2931
2938
  document.addEventListener("mouseover", function(event) {
2932
2939
  var _a2, _b2;
2933
2940
  const element2 = event.target;
2941
+ if (!isInAllowedContainer(element2)) {
2942
+ return;
2943
+ }
2934
2944
  if (element2 instanceof Element && element2 !== lastMouseOverElement) {
2935
2945
  let clearOldTippys = /* @__PURE__ */ __name(function(maybeInst) {
2936
2946
  tippys = tippys.filter((t2) => {
@@ -85578,8 +85588,9 @@ function genbankToJson(string2, options = {}) {
85578
85588
  if (line === null) {
85579
85589
  return true;
85580
85590
  }
85581
- const key = getLineKey(line);
85582
- const val2 = getLineVal(line);
85591
+ const shouldUseSpaceAsDelimiter = !line.trim().startsWith("/");
85592
+ const key = getLineKey(line, shouldUseSpaceAsDelimiter);
85593
+ const val2 = getLineVal(line, shouldUseSpaceAsDelimiter);
85583
85594
  const isKeyRunon = isKeywordRunon(line);
85584
85595
  const isSubKey = isSubKeyword(line);
85585
85596
  const isKey2 = isKeyword(line);
@@ -85950,10 +85961,10 @@ function genbankToJson(string2, options = {}) {
85950
85961
  currentFeatureNote = currentNotes[key];
85951
85962
  }
85952
85963
  __name(parseFeatureNote, "parseFeatureNote");
85953
- function getLineKey(line) {
85964
+ function getLineKey(line, shouldUseSpaceAsDelimiter) {
85954
85965
  let arr;
85955
85966
  line = line.replace(/^[\s]*/, "");
85956
- if (line.indexOf("=") < 0) {
85967
+ if (line.indexOf("=") < 0 || shouldUseSpaceAsDelimiter) {
85957
85968
  arr = line.split(/[\s]+/);
85958
85969
  } else {
85959
85970
  arr = line.split(/=/);
@@ -85961,9 +85972,9 @@ function genbankToJson(string2, options = {}) {
85961
85972
  return arr[0];
85962
85973
  }
85963
85974
  __name(getLineKey, "getLineKey");
85964
- function getLineVal(line) {
85975
+ function getLineVal(line, shouldUseSpaceAsDelimiter) {
85965
85976
  let arr;
85966
- if (line.indexOf("=") < 0) {
85977
+ if (line.indexOf("=") < 0 || shouldUseSpaceAsDelimiter) {
85967
85978
  line = line.replace(/^[\s]*[\S]+[\s]+|[\s]+$/, "");
85968
85979
  line = line.trim();
85969
85980
  return line;
@@ -110187,7 +110198,8 @@ function getAnnotationNameAndStartStopString({
110187
110198
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110188
110199
  click → top cut position
110189
110200
  alt/option+click → bottom cut position
110190
- cmd/ctrl+click → recognition range` : `
110201
+ cmd/ctrl+click → recognition range
110202
+ double click → show info` : `
110191
110203
 
110192
110204
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110193
110205
  INTERACTIONS:
@@ -117131,7 +117143,7 @@ function showFileDialog({ multiple = false, onSelect }) {
117131
117143
  input.click();
117132
117144
  }
117133
117145
  __name(showFileDialog, "showFileDialog");
117134
- const version = "0.8.30";
117146
+ const version = "0.8.32";
117135
117147
  const packageJson = {
117136
117148
  version
117137
117149
  };
package/index.es.js CHANGED
@@ -2906,6 +2906,13 @@ document.addEventListener("mouseup", () => {
2906
2906
  isDragging$1 = false;
2907
2907
  });
2908
2908
  let tippys = [];
2909
+ function isInAllowedContainer(element2) {
2910
+ if (window.onlyAllowTooltipsInVeEditor) {
2911
+ return element2.closest(".veEditor") !== null;
2912
+ }
2913
+ return true;
2914
+ }
2915
+ __name(isInAllowedContainer, "isInAllowedContainer");
2909
2916
  let recentlyHidden = false;
2910
2917
  let clearMe;
2911
2918
  (function() {
@@ -2913,6 +2920,9 @@ let clearMe;
2913
2920
  document.addEventListener("mouseover", function(event) {
2914
2921
  var _a2, _b2;
2915
2922
  const element2 = event.target;
2923
+ if (!isInAllowedContainer(element2)) {
2924
+ return;
2925
+ }
2916
2926
  if (element2 instanceof Element && element2 !== lastMouseOverElement) {
2917
2927
  let clearOldTippys = /* @__PURE__ */ __name(function(maybeInst) {
2918
2928
  tippys = tippys.filter((t2) => {
@@ -85560,8 +85570,9 @@ function genbankToJson(string2, options = {}) {
85560
85570
  if (line === null) {
85561
85571
  return true;
85562
85572
  }
85563
- const key = getLineKey(line);
85564
- const val2 = getLineVal(line);
85573
+ const shouldUseSpaceAsDelimiter = !line.trim().startsWith("/");
85574
+ const key = getLineKey(line, shouldUseSpaceAsDelimiter);
85575
+ const val2 = getLineVal(line, shouldUseSpaceAsDelimiter);
85565
85576
  const isKeyRunon = isKeywordRunon(line);
85566
85577
  const isSubKey = isSubKeyword(line);
85567
85578
  const isKey2 = isKeyword(line);
@@ -85932,10 +85943,10 @@ function genbankToJson(string2, options = {}) {
85932
85943
  currentFeatureNote = currentNotes[key];
85933
85944
  }
85934
85945
  __name(parseFeatureNote, "parseFeatureNote");
85935
- function getLineKey(line) {
85946
+ function getLineKey(line, shouldUseSpaceAsDelimiter) {
85936
85947
  let arr;
85937
85948
  line = line.replace(/^[\s]*/, "");
85938
- if (line.indexOf("=") < 0) {
85949
+ if (line.indexOf("=") < 0 || shouldUseSpaceAsDelimiter) {
85939
85950
  arr = line.split(/[\s]+/);
85940
85951
  } else {
85941
85952
  arr = line.split(/=/);
@@ -85943,9 +85954,9 @@ function genbankToJson(string2, options = {}) {
85943
85954
  return arr[0];
85944
85955
  }
85945
85956
  __name(getLineKey, "getLineKey");
85946
- function getLineVal(line) {
85957
+ function getLineVal(line, shouldUseSpaceAsDelimiter) {
85947
85958
  let arr;
85948
- if (line.indexOf("=") < 0) {
85959
+ if (line.indexOf("=") < 0 || shouldUseSpaceAsDelimiter) {
85949
85960
  line = line.replace(/^[\s]*[\S]+[\s]+|[\s]+$/, "");
85950
85961
  line = line.trim();
85951
85962
  return line;
@@ -110169,7 +110180,8 @@ function getAnnotationNameAndStartStopString({
110169
110180
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110170
110181
  click → top cut position
110171
110182
  alt/option+click → bottom cut position
110172
- cmd/ctrl+click → recognition range` : `
110183
+ cmd/ctrl+click → recognition range
110184
+ double click → show info` : `
110173
110185
 
110174
110186
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110175
110187
  INTERACTIONS:
@@ -117113,7 +117125,7 @@ function showFileDialog({ multiple = false, onSelect }) {
117113
117125
  input.click();
117114
117126
  }
117115
117127
  __name(showFileDialog, "showFileDialog");
117116
- const version = "0.8.30";
117128
+ const version = "0.8.32";
117117
117129
  const packageJson = {
117118
117130
  version
117119
117131
  };
package/index.umd.js CHANGED
@@ -22537,6 +22537,13 @@ var __async = (__this, __arguments, generator) => {
22537
22537
  isDragging$1 = false;
22538
22538
  });
22539
22539
  let tippys = [];
22540
+ function isInAllowedContainer(element2) {
22541
+ if (window.onlyAllowTooltipsInVeEditor) {
22542
+ return element2.closest(".veEditor") !== null;
22543
+ }
22544
+ return true;
22545
+ }
22546
+ __name(isInAllowedContainer, "isInAllowedContainer");
22540
22547
  let recentlyHidden = false;
22541
22548
  let clearMe;
22542
22549
  (function() {
@@ -22544,6 +22551,9 @@ var __async = (__this, __arguments, generator) => {
22544
22551
  document.addEventListener("mouseover", function(event) {
22545
22552
  var _a2, _b2;
22546
22553
  const element2 = event.target;
22554
+ if (!isInAllowedContainer(element2)) {
22555
+ return;
22556
+ }
22547
22557
  if (element2 instanceof Element && element2 !== lastMouseOverElement) {
22548
22558
  let clearOldTippys = /* @__PURE__ */ __name(function(maybeInst) {
22549
22559
  tippys = tippys.filter((t2) => {
@@ -114481,8 +114491,9 @@ ${latestSubscriptionCallbackError.current.stack}
114481
114491
  if (line === null) {
114482
114492
  return true;
114483
114493
  }
114484
- const key = getLineKey(line);
114485
- const val2 = getLineVal(line);
114494
+ const shouldUseSpaceAsDelimiter = !line.trim().startsWith("/");
114495
+ const key = getLineKey(line, shouldUseSpaceAsDelimiter);
114496
+ const val2 = getLineVal(line, shouldUseSpaceAsDelimiter);
114486
114497
  const isKeyRunon = isKeywordRunon(line);
114487
114498
  const isSubKey = isSubKeyword(line);
114488
114499
  const isKey2 = isKeyword(line);
@@ -114853,10 +114864,10 @@ ${latestSubscriptionCallbackError.current.stack}
114853
114864
  currentFeatureNote = currentNotes[key];
114854
114865
  }
114855
114866
  __name(parseFeatureNote, "parseFeatureNote");
114856
- function getLineKey(line) {
114867
+ function getLineKey(line, shouldUseSpaceAsDelimiter) {
114857
114868
  let arr;
114858
114869
  line = line.replace(/^[\s]*/, "");
114859
- if (line.indexOf("=") < 0) {
114870
+ if (line.indexOf("=") < 0 || shouldUseSpaceAsDelimiter) {
114860
114871
  arr = line.split(/[\s]+/);
114861
114872
  } else {
114862
114873
  arr = line.split(/=/);
@@ -114864,9 +114875,9 @@ ${latestSubscriptionCallbackError.current.stack}
114864
114875
  return arr[0];
114865
114876
  }
114866
114877
  __name(getLineKey, "getLineKey");
114867
- function getLineVal(line) {
114878
+ function getLineVal(line, shouldUseSpaceAsDelimiter) {
114868
114879
  let arr;
114869
- if (line.indexOf("=") < 0) {
114880
+ if (line.indexOf("=") < 0 || shouldUseSpaceAsDelimiter) {
114870
114881
  line = line.replace(/^[\s]*[\S]+[\s]+|[\s]+$/, "");
114871
114882
  line = line.trim();
114872
114883
  return line;
@@ -138335,7 +138346,8 @@ ${seq.sequence}
138335
138346
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
138336
138347
  click → top cut position
138337
138348
  alt/option+click → bottom cut position
138338
- cmd/ctrl+click → recognition range` : `
138349
+ cmd/ctrl+click → recognition range
138350
+ double click → show info` : `
138339
138351
 
138340
138352
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
138341
138353
  INTERACTIONS:
@@ -145229,7 +145241,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
145229
145241
  input.click();
145230
145242
  }
145231
145243
  __name(showFileDialog, "showFileDialog");
145232
- const version = "0.8.30";
145244
+ const version = "0.8.32";
145233
145245
  const packageJson = {
145234
145246
  version
145235
145247
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.8.30",
3
+ "version": "0.8.32",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/TeselaGen/tg-oss",
@@ -15,12 +15,12 @@
15
15
  "@blueprintjs/core": "3.54.0",
16
16
  "@hello-pangea/dnd": "16.2.0",
17
17
  "@risingstack/react-easy-state": "^6.3.0",
18
- "@teselagen/bio-parsers": "0.4.33",
18
+ "@teselagen/bio-parsers": "0.4.34",
19
19
  "@teselagen/file-utils": "0.3.23",
20
20
  "@teselagen/range-utils": "0.3.20",
21
21
  "@teselagen/react-list": "0.8.18",
22
22
  "@teselagen/sequence-utils": "0.3.42",
23
- "@teselagen/ui": "0.10.18",
23
+ "@teselagen/ui": "0.10.19",
24
24
  "@use-gesture/react": "10.3.0",
25
25
  "biomsa": "^0.2.4",
26
26
  "classnames": "^2.3.2",
@@ -44,7 +44,7 @@ export default function getAnnotationNameAndStartStopString(
44
44
  const interactionInstructions = readOnly
45
45
  ? ""
46
46
  : annotationTypePlural === "cutsites"
47
- ? `\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n INTERACTIONS:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n click → top cut position\n alt/option+click → bottom cut position\n cmd/ctrl+click → recognition range`
47
+ ? `\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n INTERACTIONS:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n click → top cut position\n alt/option+click → bottom cut position\n cmd/ctrl+click → recognition range\n double click → show info`
48
48
  : `\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n INTERACTIONS:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n alt/option+click → jump row view to start/end\n double click → edit`;
49
49
 
50
50
  return `${startText ? startText : ""} ${typeToUse ? typeToUse + " -" : ""} ${