@chemistry/elements 2.7.0 → 3.0.1
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/README.md +52 -49
- package/dist/chem-elements-data.d.ts +48 -47
- package/dist/chem-elements-data.d.ts.map +1 -0
- package/dist/chem-elements-data.js +1485 -0
- package/dist/chem-elements-data.js.map +1 -0
- package/dist/chem-elements.d.ts +8 -7
- package/dist/chem-elements.d.ts.map +1 -0
- package/dist/chem-elements.js +31 -1
- package/dist/chem-elements.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +21 -10
- package/LICENSE.md +0 -22
- package/package-lock.json +0 -5
package/README.md
CHANGED
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
# @chemistry/elements
|
|
2
|
-
|
|
3
|
-
[](https://badge.fury.io/js/%40chemistry%2Felements)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Library that contains information about elements In periodic table: Number, Symbol, Name, Mass, max Bonds Count, Covalent & van der Waals Radius, typical color;
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @chemistry/elements
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Getting started:
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
import { ChemElement, ChemElementData } from '@chemistry/elements';
|
|
18
|
+
|
|
19
|
+
const hydrogen = ChemElement.getById(1);
|
|
20
|
+
console.log(hydrogen);
|
|
21
|
+
// { id: 1, symbol: "H", RCow: 0.37, RVdW: 1.2, maxBonds: 1, mass: 1.00794, name: "Hydrogen", posX: 1, posY: 1, color: "#FFFFFF", color2: "#808080" }
|
|
22
|
+
|
|
23
|
+
const carbon = ChemElement.getBySymbol('C');
|
|
24
|
+
console.log(carbon);
|
|
25
|
+
// { id: 6, symbol: "C", RCow: 0.77, RVdW: 1.7, maxBonds: 4, mass: 12.0107, name: "Carbon", posX: 2, posY: 14, color: "#909090", color2: "#000000" }
|
|
26
|
+
|
|
27
|
+
const elementsList = ChemElement.getAllSymbols();
|
|
28
|
+
console.log(elementsList);
|
|
29
|
+
// [H, He, Li, Be, B, C, N, O, F, Ne, .... ]
|
|
30
|
+
|
|
31
|
+
// Print out all list of elements
|
|
32
|
+
console.log(ChemElementData[9]);
|
|
33
|
+
// { id: 7, symbol: "N", RCow: 0.75, RVdW: 1.6, maxBonds: 4, mass: 14.0067, name: "Nitrogen", posX: 2, posY: 15, color: "#3050F8", color2: "#304FF7" }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Contain following info about Carbon:
|
|
37
|
+
|
|
38
|
+
- Number in periodic table: 6
|
|
39
|
+
- Symbol of Element: C
|
|
40
|
+
- Element name: Carbon
|
|
41
|
+
- Element mass: 12.0107
|
|
42
|
+
- Covalent Radius of element: 0.77
|
|
43
|
+
- van der Waals radius of the element: 1.7
|
|
44
|
+
- Element max Bonds: 4
|
|
45
|
+
- Element color: 909090
|
|
46
|
+
- Element color dark: 000000
|
|
47
|
+
- Position X in periodic Table: 2
|
|
48
|
+
- Position Y in periodic Table: 14
|
|
49
|
+
|
|
50
|
+
## Commands:
|
|
51
|
+
|
|
52
|
+
- Build project: `npm run build`
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
export interface ChemElementInfo {
|
|
2
|
-
/**
|
|
3
|
-
* Number in periodic table
|
|
4
|
-
*/
|
|
5
|
-
id: number;
|
|
6
|
-
/**
|
|
7
|
-
* Symbol of Element
|
|
8
|
-
*/
|
|
9
|
-
symbol: string;
|
|
10
|
-
/**
|
|
11
|
-
* Element name
|
|
12
|
-
*/
|
|
13
|
-
name: string;
|
|
14
|
-
/**
|
|
15
|
-
* Element mass
|
|
16
|
-
*/
|
|
17
|
-
mass: number;
|
|
18
|
-
/**
|
|
19
|
-
* Covalent Radius of element
|
|
20
|
-
*/
|
|
21
|
-
RCow: number;
|
|
22
|
-
/**
|
|
23
|
-
* van der Waals radius of the element
|
|
24
|
-
*/
|
|
25
|
-
RVdW: number;
|
|
26
|
-
/**
|
|
27
|
-
* Element max Bonds
|
|
28
|
-
*/
|
|
29
|
-
maxBonds: number;
|
|
30
|
-
/**
|
|
31
|
-
* Element representation color e.g. "#3050F8"
|
|
32
|
-
*/
|
|
33
|
-
color: string;
|
|
34
|
-
/**
|
|
35
|
-
* Element darc color representation
|
|
36
|
-
*/
|
|
37
|
-
color2: string;
|
|
38
|
-
/**
|
|
39
|
-
* Position X in periodic Table
|
|
40
|
-
*/
|
|
41
|
-
posX: number;
|
|
42
|
-
/**
|
|
43
|
-
* Position Y in periodic Table
|
|
44
|
-
*/
|
|
45
|
-
posY: number;
|
|
46
|
-
}
|
|
47
|
-
export declare const ChemElementData: ChemElementInfo[];
|
|
1
|
+
export interface ChemElementInfo {
|
|
2
|
+
/**
|
|
3
|
+
* Number in periodic table
|
|
4
|
+
*/
|
|
5
|
+
id: number;
|
|
6
|
+
/**
|
|
7
|
+
* Symbol of Element
|
|
8
|
+
*/
|
|
9
|
+
symbol: string;
|
|
10
|
+
/**
|
|
11
|
+
* Element name
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Element mass
|
|
16
|
+
*/
|
|
17
|
+
mass: number;
|
|
18
|
+
/**
|
|
19
|
+
* Covalent Radius of element
|
|
20
|
+
*/
|
|
21
|
+
RCow: number;
|
|
22
|
+
/**
|
|
23
|
+
* van der Waals radius of the element
|
|
24
|
+
*/
|
|
25
|
+
RVdW: number;
|
|
26
|
+
/**
|
|
27
|
+
* Element max Bonds
|
|
28
|
+
*/
|
|
29
|
+
maxBonds: number;
|
|
30
|
+
/**
|
|
31
|
+
* Element representation color e.g. "#3050F8"
|
|
32
|
+
*/
|
|
33
|
+
color: string;
|
|
34
|
+
/**
|
|
35
|
+
* Element darc color representation
|
|
36
|
+
*/
|
|
37
|
+
color2: string;
|
|
38
|
+
/**
|
|
39
|
+
* Position X in periodic Table
|
|
40
|
+
*/
|
|
41
|
+
posX: number;
|
|
42
|
+
/**
|
|
43
|
+
* Position Y in periodic Table
|
|
44
|
+
*/
|
|
45
|
+
posY: number;
|
|
46
|
+
}
|
|
47
|
+
export declare const ChemElementData: ChemElementInfo[];
|
|
48
|
+
//# sourceMappingURL=chem-elements-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chem-elements-data.d.ts","sourceRoot":"","sources":["../src/chem-elements-data.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,EA28C5C,CAAC"}
|