@teselagen/ove 0.3.51 → 0.3.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.3.51",
3
+ "version": "0.3.52",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@teselagen/sequence-utils": "0.3.12",
17
17
  "@teselagen/range-utils": "0.3.7",
18
- "@teselagen/ui": "0.3.38",
18
+ "@teselagen/ui": "0.3.41",
19
19
  "@teselagen/file-utils": "0.3.9",
20
20
  "@teselagen/bounce-loader": "0.3.11",
21
21
  "@teselagen/bio-parsers": "0.4.5",
@@ -23,11 +23,10 @@
23
23
  "@blueprintjs/datetime": "3.23.19",
24
24
  "@blueprintjs/icons": "3.33.0",
25
25
  "@blueprintjs/select": "3.18.11",
26
- "@fontsource/ubuntu-mono": "^4.5.11",
27
26
  "@hello-pangea/dnd": "16.2.0",
28
27
  "@risingstack/react-easy-state": "^6.3.0",
29
28
  "@teselagen/react-list": "0.8.18",
30
- "@teselagen/react-table": "6.10.13",
29
+ "@teselagen/react-table": "6.10.16",
31
30
  "@use-gesture/react": "^10.2.23",
32
31
  "axios": "^0.21.1",
33
32
  "bluebird": "3.7.2",
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable react/jsx-no-bind */
2
2
  import React, { useState } from "react";
3
3
  import { showConfirmationDialog, TgSelect } from "@teselagen/ui";
4
- import html2canvas from "html2canvas";
5
4
 
6
5
  import "./Ladder.css";
7
6
  import { Button, Tooltip } from "@blueprintjs/core";
@@ -123,18 +122,19 @@ export default function Ladder({
123
122
  icon="duplicate"
124
123
  minimal
125
124
  style={{ position: "absolute", top: 5, right: 5, color: "white" }}
126
- onClick={() => {
125
+ onClick={async () => {
127
126
  try {
128
- html2canvas(
129
- document.querySelector(".ve-digest-container")
130
- ).then(canvas => {
131
- canvas.toBlob(blob =>
132
- navigator.clipboard.write([
133
- new window.ClipboardItem({ "image/png": blob })
134
- ])
135
- );
136
- window.toastr.success("Image copied to clipboard!");
137
- });
127
+ const canvas = await import("html2canvas");
128
+ canvas.default(document.querySelector(".ve-digest-container")).then(
129
+ canvas => {
130
+ canvas.toBlob(blob =>
131
+ navigator.clipboard.write([
132
+ new window.ClipboardItem({ "image/png": blob })
133
+ ])
134
+ );
135
+ window.toastr.success("Image copied to clipboard!");
136
+ }
137
+ );
138
138
  } catch (e) {
139
139
  window.toastr.error(
140
140
  "Error copying the image, try just taking a screenshot instead ;)"
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "@fontsource/ubuntu-mono";
2
1
  import { FocusStyleManager } from "@blueprintjs/core";
3
2
  import { showContextMenu } from "@teselagen/ui";
4
3
  import "./createVectorEditor";
package/src/style.css CHANGED
@@ -1,6 +1,6 @@
1
1
  .ve-monospace-font {
2
- font-family: "Ubuntu Mono", "Lucida Console", Monaco, monospace;
3
- font-size: 12px;
2
+ font-family: Monaco, monospace;
3
+ font-size: 11px;
4
4
  }
5
5
  .rowViewTextContainer text {
6
6
  user-select: none;
@@ -314,7 +314,10 @@ function VectorInteractionHOC(Component /* options */) {
314
314
  this.handleDnaDelete(false);
315
315
  onCut(
316
316
  e,
317
- tidyUpSequenceData(seqData, { doNotRemoveInvalidChars: true,annotationsAsObjects: true }),
317
+ tidyUpSequenceData(seqData, {
318
+ doNotRemoveInvalidChars: true,
319
+ annotationsAsObjects: true
320
+ }),
318
321
  this.props
319
322
  );
320
323
  document.body.removeEventListener("cut", this.handleCut);
@@ -160,7 +160,10 @@ export const handleSave =
160
160
  saveHandler &&
161
161
  saveHandler(
162
162
  opts,
163
- tidyUpSequenceData(sequenceData, { doNotRemoveInvalidChars: true,annotationsAsObjects: true }),
163
+ tidyUpSequenceData(sequenceData, {
164
+ doNotRemoveInvalidChars: true,
165
+ annotationsAsObjects: true
166
+ }),
164
167
  props,
165
168
  updateLastSavedIdToCurrent
166
169
  );
@@ -869,7 +872,10 @@ function jsonToJson(incomingJson) {
869
872
  return JSON.stringify(
870
873
  omit(
871
874
  cleanUpTeselagenJsonForExport(
872
- tidyUpSequenceData(incomingJson, { doNotRemoveInvalidChars: true,annotationsAsObjects: false })
875
+ tidyUpSequenceData(incomingJson, {
876
+ doNotRemoveInvalidChars: true,
877
+ annotationsAsObjects: false
878
+ })
873
879
  ),
874
880
  [
875
881
  "sequenceFragments",