@chemistry/molecule 3.0.1 → 3.0.3
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.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/molecule.d.ts +4 -4
- package/dist/molecule.d.ts.map +1 -1
- package/dist/molecule.js +4 -3
- package/dist/molecule.js.map +1 -1
- package/dist/store/actions.d.ts +2 -2
- package/dist/store/actions.d.ts.map +1 -1
- package/dist/store/actions.js +1 -1
- package/dist/store/actions.js.map +1 -1
- package/dist/store/helpers/index.d.ts +1 -1
- package/dist/store/helpers/index.d.ts.map +1 -1
- package/dist/store/helpers/index.js +1 -1
- package/dist/store/helpers/index.js.map +1 -1
- package/dist/store/index.d.ts +3 -3
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +3 -3
- package/dist/store/index.js.map +1 -1
- package/dist/store/reducer.d.ts +1 -1
- package/dist/store/reducer.d.ts.map +1 -1
- package/dist/store/reducer.js +3 -3
- package/dist/store/reducer.js.map +1 -1
- package/dist/store/selectors.d.ts +1 -4
- package/dist/store/selectors.d.ts.map +1 -1
- package/dist/store/selectors.js +0 -11
- package/dist/store/selectors.js.map +1 -1
- package/dist/store/services/export-to-svg.service.d.ts +2 -2
- package/dist/store/services/export-to-svg.service.d.ts.map +1 -1
- package/dist/store/services/index.d.ts +2 -2
- package/dist/store/services/index.d.ts.map +1 -1
- package/dist/store/services/index.js +2 -2
- package/dist/store/services/index.js.map +1 -1
- package/dist/store/services/projection.service.d.ts +1 -1
- package/dist/store/services/projection.service.d.ts.map +1 -1
- package/dist/store/svg-export.d.ts +5 -0
- package/dist/store/svg-export.d.ts.map +1 -0
- package/dist/store/svg-export.js +12 -0
- package/dist/store/svg-export.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './molecule';
|
|
2
|
-
export * from './models';
|
|
1
|
+
export * from './molecule.js';
|
|
2
|
+
export * from './models.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './molecule';
|
|
2
|
-
export * from './models';
|
|
1
|
+
export * from './molecule.js';
|
|
2
|
+
export * from './models.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/dist/molecule.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { MoleculeDataFormat } from './models';
|
|
3
|
-
import type { SvgExportOptions } from './models';
|
|
4
|
-
import { type IMoleculeState } from './store';
|
|
2
|
+
import { MoleculeDataFormat } from './models.js';
|
|
3
|
+
import type { SvgExportOptions } from './models.js';
|
|
4
|
+
import { type IMoleculeState } from './store/index.js';
|
|
5
5
|
export declare class Molecule {
|
|
6
6
|
private store;
|
|
7
7
|
private get state();
|
|
@@ -9,6 +9,6 @@ export declare class Molecule {
|
|
|
9
9
|
getBondCount(): number;
|
|
10
10
|
load(data: unknown, format?: MoleculeDataFormat): void;
|
|
11
11
|
export(format?: MoleculeDataFormat): IMoleculeState;
|
|
12
|
-
toSVG(options: SvgExportOptions): React.JSX.Element
|
|
12
|
+
toSVG(options: SvgExportOptions): Promise<React.JSX.Element>;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=molecule.d.ts.map
|
package/dist/molecule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"molecule.d.ts","sourceRoot":"","sources":["../src/molecule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"molecule.d.ts","sourceRoot":"","sources":["../src/molecule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAkB,KAAK,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAE9F,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAwB;IAErC,OAAO,KAAK,KAAK,GAEhB;IAEM,YAAY,IAAI,MAAM;IAItB,YAAY,IAAI,MAAM;IAItB,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,GAAE,kBAA6C,GAAG,IAAI;IAIhF,MAAM,CAAC,MAAM,GAAE,kBAA6C,GAAG,cAAc;IAIvE,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;CAI1E"}
|
package/dist/molecule.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { legacy_createStore as createStore } from 'redux';
|
|
2
|
-
import { MoleculeDataFormat } from './models';
|
|
3
|
-
import { exportMolecule,
|
|
2
|
+
import { MoleculeDataFormat } from './models.js';
|
|
3
|
+
import { exportMolecule, loadMolecule, reducer } from './store/index.js';
|
|
4
4
|
export class Molecule {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.store = createStore(reducer);
|
|
@@ -20,7 +20,8 @@ export class Molecule {
|
|
|
20
20
|
export(format = MoleculeDataFormat.jnmol) {
|
|
21
21
|
return exportMolecule(this.state, format);
|
|
22
22
|
}
|
|
23
|
-
toSVG(options) {
|
|
23
|
+
async toSVG(options) {
|
|
24
|
+
const { exportToSVG } = await import('./store/svg-export.js');
|
|
24
25
|
return exportToSVG(this.state, options);
|
|
25
26
|
}
|
|
26
27
|
}
|
package/dist/molecule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"molecule.js","sourceRoot":"","sources":["../src/molecule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"molecule.js","sourceRoot":"","sources":["../src/molecule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAuB,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE9F,MAAM,OAAO,QAAQ;IAArB;QACU,UAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IA0BvC,CAAC;IAxBC,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAEM,YAAY;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC9C,CAAC;IAEM,YAAY;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC9C,CAAC;IAEM,IAAI,CAAC,IAAa,EAAE,SAA6B,kBAAkB,CAAC,KAAK;QAC9E,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAEM,MAAM,CAAC,SAA6B,kBAAkB,CAAC,KAAK;QACjE,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,OAAyB;QAC1C,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC9D,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF"}
|
package/dist/store/actions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MoleculeDataFormat } from '../models';
|
|
2
|
-
import { ActionTypes } from './constants';
|
|
1
|
+
import type { MoleculeDataFormat } from '../models.js';
|
|
2
|
+
import { ActionTypes } from './constants.js';
|
|
3
3
|
export declare function loadMolecule(data: unknown, format: MoleculeDataFormat): LoadAction;
|
|
4
4
|
export interface LoadAction {
|
|
5
5
|
type: ActionTypes.MOLECULE_LOAD;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,GAAG,UAAU,CAKlF;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,WAAW,CAAC,aAAa,CAAC;IAChC,OAAO,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC"}
|
package/dist/store/actions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/store/actions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/store/actions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,MAA0B;IACpE,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,aAAa;QAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './molecule-io-helpers';
|
|
1
|
+
export * from './molecule-io-helpers.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './molecule-io-helpers';
|
|
1
|
+
export * from './molecule-io-helpers.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './reducer';
|
|
2
|
-
export * from './actions';
|
|
3
|
-
export * from './selectors';
|
|
1
|
+
export * from './reducer.js';
|
|
2
|
+
export * from './actions.js';
|
|
3
|
+
export * from './selectors.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
package/dist/store/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './reducer';
|
|
2
|
-
export * from './actions';
|
|
3
|
-
export * from './selectors';
|
|
1
|
+
export * from './reducer.js';
|
|
2
|
+
export * from './actions.js';
|
|
3
|
+
export * from './selectors.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/store/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
package/dist/store/reducer.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,MAAM,WAAW,cAAe,SAAQ,KAAK;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QACL,CAAC,EAAE,EAAE,MAAM,GAAG;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KACjE,CAAC;IACF,KAAK,EAAE;QACL,CAAC,EAAE,EAAE,MAAM,GAAG;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAC/D,CAAC;CACH;AASD,eAAO,MAAM,OAAO,GAClB,OAAO,cAAc,YAAe,EACpC,QAAQ,cAAc,KACrB,cAgBF,CAAC"}
|
package/dist/store/reducer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MoleculeDataFormat } from '../models';
|
|
2
|
-
import { ActionTypes } from './constants';
|
|
3
|
-
import { isValidJnmol } from './helpers';
|
|
1
|
+
import { MoleculeDataFormat } from '../models.js';
|
|
2
|
+
import { ActionTypes } from './constants.js';
|
|
3
|
+
import { isValidJnmol } from './helpers/index.js';
|
|
4
4
|
const initialState = {
|
|
5
5
|
id: '',
|
|
6
6
|
title: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/store/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/store/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAalD,MAAM,YAAY,GAAmB;IACnC,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,QAAwB,YAAY,EACpC,MAAsB,EACN,EAAE;IAClB,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;YAC/B,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;YACxC,IAAI,MAAM,KAAK,kBAAkB,CAAC,KAAK,EAAE,CAAC;gBACxC,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvB,OAAO,IAAsB,CAAC;gBAChC,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;YACjD,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,MAAM,GAAG,mBAAmB,CAAC,CAAC;QAChD,CAAC;QAED;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type SvgExportOptions } from '../models';
|
|
3
|
-
import type { IMoleculeState } from './reducer';
|
|
1
|
+
import type { IMoleculeState } from './reducer.js';
|
|
4
2
|
export declare const exportMolecule: (molecule: IMoleculeState, _format: string) => IMoleculeState;
|
|
5
|
-
export declare const exportToSVG: (molecule: IMoleculeState, drawOptions: SvgExportOptions) => React.JSX.Element;
|
|
6
3
|
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,eAAO,MAAM,cAAc,GAAI,UAAU,cAAc,EAAE,SAAS,MAAM,KAAG,cAE1E,CAAC"}
|
package/dist/store/selectors.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import { defaultSvgOptions } from '../models';
|
|
2
|
-
import { exportMoleculeToSVG, getDefaultMoleculeCamera, projectMolecule } from './services';
|
|
3
1
|
export const exportMolecule = (molecule, _format) => {
|
|
4
2
|
return molecule;
|
|
5
3
|
};
|
|
6
|
-
export const exportToSVG = (molecule, drawOptions) => {
|
|
7
|
-
const options = {
|
|
8
|
-
...defaultSvgOptions,
|
|
9
|
-
...drawOptions,
|
|
10
|
-
};
|
|
11
|
-
const camera = getDefaultMoleculeCamera();
|
|
12
|
-
const mol = projectMolecule({ molecule, camera });
|
|
13
|
-
return exportMoleculeToSVG({ molecule: mol, options });
|
|
14
|
-
};
|
|
15
4
|
//# sourceMappingURL=selectors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../src/store/selectors.
|
|
1
|
+
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../src/store/selectors.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAwB,EAAE,OAAe,EAAkB,EAAE;IAC1F,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { SvgExportOptions } from '../../models';
|
|
3
|
-
import type { IMoleculeState } from '../reducer';
|
|
2
|
+
import type { SvgExportOptions } from '../../models.js';
|
|
3
|
+
import type { IMoleculeState } from '../reducer.js';
|
|
4
4
|
export declare const exportMoleculeToSVG: ({ molecule, options, }: {
|
|
5
5
|
molecule: IMoleculeState;
|
|
6
6
|
options: SvgExportOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-to-svg.service.d.ts","sourceRoot":"","sources":["../../../src/store/services/export-to-svg.service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"export-to-svg.service.d.ts","sourceRoot":"","sources":["../../../src/store/services/export-to-svg.service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAqCpD,eAAO,MAAM,mBAAmB,GAAI,wBAGjC;IACD,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC;CAC3B,KAAG,KAAK,CAAC,GAAG,CAAC,OAOb,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './projection.service';
|
|
2
|
-
export * from './export-to-svg.service';
|
|
1
|
+
export * from './projection.service.js';
|
|
2
|
+
export * from './export-to-svg.service.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './projection.service';
|
|
2
|
-
export * from './export-to-svg.service';
|
|
1
|
+
export * from './projection.service.js';
|
|
2
|
+
export * from './export-to-svg.service.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.service.d.ts","sourceRoot":"","sources":["../../../src/store/services/projection.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"projection.service.d.ts","sourceRoot":"","sources":["../../../src/store/services/projection.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAS/C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE;QACX,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;CACH;AAYD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,WAAW,CAAC;CACrB,GAAG,cAAc,CAejB;AAED,wBAAgB,wBAAwB,IAAI,WAAW,CAQtD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type SvgExportOptions } from '../models.js';
|
|
3
|
+
import type { IMoleculeState } from './reducer.js';
|
|
4
|
+
export declare const exportToSVG: (molecule: IMoleculeState, drawOptions: SvgExportOptions) => React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=svg-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-export.d.ts","sourceRoot":"","sources":["../../src/store/svg-export.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAOnD,eAAO,MAAM,WAAW,GACtB,UAAU,cAAc,EACxB,aAAa,gBAAgB,KAC5B,KAAK,CAAC,GAAG,CAAC,OAQZ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defaultSvgOptions } from '../models.js';
|
|
2
|
+
import { exportMoleculeToSVG, getDefaultMoleculeCamera, projectMolecule, } from './services/index.js';
|
|
3
|
+
export const exportToSVG = (molecule, drawOptions) => {
|
|
4
|
+
const options = {
|
|
5
|
+
...defaultSvgOptions,
|
|
6
|
+
...drawOptions,
|
|
7
|
+
};
|
|
8
|
+
const camera = getDefaultMoleculeCamera();
|
|
9
|
+
const mol = projectMolecule({ molecule, camera });
|
|
10
|
+
return exportMoleculeToSVG({ molecule: mol, options });
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=svg-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-export.js","sourceRoot":"","sources":["../../src/store/svg-export.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,cAAc,CAAC;AAExE,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAAwB,EACxB,WAA6B,EACV,EAAE;IACrB,MAAM,OAAO,GAAG;QACd,GAAG,iBAAiB;QACpB,GAAG,WAAW;KACf,CAAC;IACF,MAAM,MAAM,GAAG,wBAAwB,EAAE,CAAC;IAC1C,MAAM,GAAG,GAAG,eAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAClD,OAAO,mBAAmB,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACzD,CAAC,CAAC"}
|