@rnacanvas/copy-interface 1.0.0 → 1.1.0
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/App.d.ts +14 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/CopyHandler.d.ts +13 -0
- package/dist/CopyHandler.d.ts.map +1 -0
- package/dist/Nucleobase.d.ts +4 -0
- package/dist/Nucleobase.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Nucleobase } from './Nucleobase';
|
|
2
|
+
export interface App {
|
|
3
|
+
readonly drawing: {
|
|
4
|
+
/**
|
|
5
|
+
* Defines the order of bases in the drawing.
|
|
6
|
+
*/
|
|
7
|
+
readonly bases: Iterable<Nucleobase>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Not necessarily in the same order as in the drawing of the app.
|
|
11
|
+
*/
|
|
12
|
+
readonly selectedBases: Iterable<Nucleobase>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=App.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,OAAO,EAAE;QAChB;;WAEG;QACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;KACtC,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { App } from './App';
|
|
2
|
+
/**
|
|
3
|
+
* Handles copy events for a target app.
|
|
4
|
+
*/
|
|
5
|
+
export declare class CopyHandler {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(targetApp: App);
|
|
8
|
+
/**
|
|
9
|
+
* Handles the input copy event.
|
|
10
|
+
*/
|
|
11
|
+
handle(event: ClipboardEvent): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=CopyHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyHandler.d.ts","sourceRoot":"","sources":["../src/CopyHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;GAEG;AACH,qBAAa,WAAW;;gBAGV,SAAS,EAAE,GAAG;IAI1B;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,cAAc;CAkB7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Nucleobase.d.ts","sourceRoot":"","sources":["../src/Nucleobase.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.copyInterface=t():e.copyInterface=t()}(this,()=>(()=>{"use strict";return{}})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.copyInterface=t():e.copyInterface=t()}(this,()=>(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{CopyHandler:()=>a});var r,o=function(e,t,r,o){if("a"===r&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?o:"a"===r?o.call(e):o?o.value:t.get(e)};class a{constructor(e){r.set(this,void 0),function(e,t,r,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===o?a.call(e,r):a?a.value=r:t.set(e,r)}(this,r,e,"f")}handle(e){var t;let a=new Set(o(this,r,"f").selectedBases);if(0==a.size)return;e.preventDefault();let n=[...o(this,r,"f").drawing.bases].filter(e=>a.has(e)).map(e=>e.textContent).join("");null===(t=e.clipboardData)||void 0===t||t.setData("text/plain",n)}}return r=new WeakMap,t})());
|