@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/html2canvas.esm-388ff992.js +7891 -0
- package/html2canvas.esm-65f48ee4.mjs +7891 -0
- package/index.cjs.js +1575 -9418
- package/index.es.js +1575 -9418
- package/index.umd.js +11163 -11152
- package/package.json +3 -4
- package/src/DigestTool/Ladder.js +12 -12
- package/src/index.js +0 -1
- package/src/style.css +2 -2
- package/src/withEditorInteractions/index.js +4 -1
- package/src/withEditorProps/index.js +8 -2
- package/style.css +3 -57
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@teselagen/ove",
         | 
| 3 | 
            -
              "version": "0.3. | 
| 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. | 
| 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. | 
| 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",
         | 
    
        package/src/DigestTool/Ladder.js
    CHANGED
    
    | @@ -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 | 
            -
             | 
| 130 | 
            -
             | 
| 131 | 
            -
             | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 134 | 
            -
             | 
| 135 | 
            -
             | 
| 136 | 
            -
             | 
| 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
    
    
    
        package/src/style.css
    CHANGED
    
    
| @@ -314,7 +314,10 @@ function VectorInteractionHOC(Component /* options */) { | |
| 314 314 | 
             
                    this.handleDnaDelete(false);
         | 
| 315 315 | 
             
                    onCut(
         | 
| 316 316 | 
             
                      e,
         | 
| 317 | 
            -
                      tidyUpSequenceData(seqData, { | 
| 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, { | 
| 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, { | 
| 875 | 
            +
                    tidyUpSequenceData(incomingJson, {
         | 
| 876 | 
            +
                      doNotRemoveInvalidChars: true,
         | 
| 877 | 
            +
                      annotationsAsObjects: false
         | 
| 878 | 
            +
                    })
         | 
| 873 879 | 
             
                  ),
         | 
| 874 880 | 
             
                  [
         | 
| 875 881 | 
             
                    "sequenceFragments",
         |