@stem_dev/periodic-table 1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 apatel401
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # @stem_dev/periodic-table
2
+
3
+ A modern, interactive periodic table library for React and standalone web applications.
4
+
5
+ ## Features
6
+ - **Interactive 3D Visualization**: Explore atomic structures and properties.
7
+ - **Responsive Design**: Optimized for both desktop and mobile layouts.
8
+ - **Dark Mode Support**: Built-in dark mode with easy toggling.
9
+ - **Library Mode**: Can be used as a React component or a standalone library.
10
+ - **TypeScript Support**: Full type definitions included.
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @stem_dev/periodic-table
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ### React
21
+
22
+ Import the `PeriodicTable` component and its styles into your React application.
23
+
24
+ ```tsx
25
+ import { PeriodicTable } from '@stem_dev/periodic-table';
26
+ import '@stem_dev/periodic-table/style.css';
27
+
28
+ function App() {
29
+ return (
30
+ <div className="app">
31
+ <PeriodicTable darkMode={true} />
32
+ </div>
33
+ );
34
+ }
35
+ ```
36
+
37
+ ### Standalone (Non-React)
38
+
39
+ You can use the `init` function to render the periodic table into any DOM element.
40
+
41
+ ```html
42
+ <!DOCTYPE html>
43
+ <html lang="en">
44
+ <head>
45
+ <meta charset="UTF-8">
46
+ <title>Periodic Table Standalone</title>
47
+ <link rel="stylesheet" href="node_modules/@stem_dev/periodic-table/dist/style.css">
48
+ </head>
49
+ <body>
50
+ <div id="periodic-table-container"></div>
51
+
52
+ <script type="module">
53
+ import { init } from '@stem_dev/periodic-table';
54
+
55
+ const container = document.getElementById('periodic-table-container');
56
+ init(container, { darkMode: false });
57
+ </script>
58
+ </body>
59
+ </html>
60
+ ```
61
+
62
+ ## Props
63
+
64
+ | Prop | Type | Default | Description |
65
+ | :--- | :--- | :--- | :--- |
66
+ | `darkMode` | `boolean` | `false` | Enables or disables dark mode. |
67
+ | `showSpectrum` | `boolean` | `true` | Show/hide the emission spectrum in the element modal. |
68
+ | `showBohrModel` | `boolean` | `true` | Show/hide the 3D Bohr model in the element modal. |
69
+
70
+ ## Styling
71
+
72
+ The library uses **Tailwind CSS** for its internal styling. The pre-built CSS file (`@stem_dev/periodic-table/style.css`) includes all the necessary styles.
73
+
74
+ ## License
75
+ MIT