neutronium 3.3.9 → 3.4.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.
Files changed (3) hide show
  1. package/README.md +74 -39
  2. package/package.json +1 -1
  3. package/sandbox.mjs +1 -1
package/README.md CHANGED
@@ -1,65 +1,75 @@
1
- # ⚛️ Neutronium v3.3.8
1
+ # ⚛️ Neutronium v3.4.0
2
2
 
3
3
  **Ultra-dense JavaScript framework – maximum performance, minimal overhead**
4
4
 
5
- [![npm](https://img.shields.io/badge/Downloads-3.2k-CB3837?logo=npm&logoColor=CB3837&style=flat-square)](https://www.npmjs.com/package/neutronium)
6
- [![License: MIT](https://img.shields.io/npm/l/neutronium?style=flat-square)](https://opensource.org/licenses/MIT)
5
+ [![npm](https://img.shields.io/npm/dw/neutronium?style=flat-square&logo=npm)](https://www.npmjs.com/package/neutronium)
7
6
  [![Version](https://img.shields.io/npm/v/neutronium?style=flat-square)](https://www.npmjs.com/package/neutronium)
8
- [![Website](https://img.shields.io/badge/Neutronium_Website-online-0bff03?logo=GoogleChrome&logoColor=d4d2d2&style=flat-square)](https://neutronium-website.onrender.com)
9
- [![Playground](https://img.shields.io/badge/Online_Playground-0368ff?logo=stackblitz&style=flat-square)](https://neutronium-website.onrender.com/Playground/)
10
- [![Documentation](https://img.shields.io/badge/Documentation-3d3c3b?logo=readthedocs&style=flat-square)](https://neutronium-website.onrender.com/Docuemntation/)
7
+ [![License](https://img.shields.io/npm/l/neutronium?style=flat-square)](https://opensource.org/licenses/MIT)
8
+ [![Website](https://img.shields.io/badge/Website-Online-0bff03?logo=googlechrome&style=flat-square&logoColor=d4d2d2)](https://neutronium-website.onrender.com)
9
+ [![Playground](https://img.shields.io/badge/Playground-Online-0368ff?logo=stackblitz&style=flat-square)](https://neutronium-website.onrender.com/Playground/)
10
+ [![Documentation](https://img.shields.io/badge/Documentation-3d3c3b?logo=readthedocs&style=flat-square)](https://neutronium-website.onrender.com/Documentation/)
11
+
11
12
  ---
12
13
 
13
- ## 🎉 What's new?
14
- - ⚡ Faster compilation for complex projects
15
- - useState, and useEffect
16
- - ⚛️ React like syntax for easier switching
17
- - 🌐 browser-safe Neutronium code compilation using /sandbox.mjs
18
- - 🖼️ Apply favicon to your site
14
+ ## 🎉 Whats new in v3.4.0
15
+
16
+ - Faster compilation for complex projects
17
+ - `useState` and `useEffect` hooks
18
+ - ⚛️ React-like JSX syntax for easier switching
19
+ - 🌐 **Browser-safe compilation** via `/sandbox.mjs`
20
+ - 🖼️ Apply favicon programmatically
21
+ - 📦 Massive package size reduction using `.npmignore`
22
+
19
23
  ---
20
24
 
21
25
  ## ℹ️ About
22
26
 
23
- **Neutronium** is a lightweight, efficient JavaScript framework designed for building modern web applications with **React-like simplicity** but **minimal overhead**.
27
+ **Neutronium** is a lightweight, high-performance JavaScript framework built for developers who want **explicit control**, **predictable behavior**, and **zero unnecessary abstractions**.
24
28
 
25
- > Ultra-fast ⚡️. Tiny footprint 📦. No build tools 🛠️. Pure JavaScript ✨.
29
+ It offers **React-like ergonomics** without a virtual DOM, build step, or heavy runtime.
30
+
31
+ > Ultra-fast ⚡ · Tiny footprint 📦 · No build tools 🛠️ · Pure JavaScript ✨
26
32
 
27
33
  ---
28
34
 
29
35
  ## ✨ Features
30
36
 
31
- - ⚡️ **Blazing fast rendering**
32
- - 🧠 **Simple component logic**
33
- - 🔌 **No dependencies or virtual DOM**
34
- - 📦 **Small size (~184kB unpacked)**
35
- - 🛠️ **Works out of the box**
36
- - 🔁 **Easy JSX-style structure**
37
+ - **Blazing fast rendering**
38
+ - 🧠 **Simple, predictable component logic**
39
+ - 🔌 **No dependencies and no virtual DOM**
40
+ - 📦 **Tiny footprint (~57.7 kB unpacked)**
41
+ - 🧩 **TypeScript types (~4.35 kB)**
42
+ - 🛠️ **Works directly in the browser**
43
+ - 🔁 **JSX-style component structure**
44
+ - 🌐 **Sandboxed browser compiler**
37
45
 
38
46
  ---
39
47
 
40
48
  ## 📦 Installation
41
49
 
50
+ Install the Neutronium runtime:
51
+
42
52
  ```bash
43
- npm i neutronium@latest -g
53
+ npm install neutronium
44
54
  ```
45
-
46
- ---
47
-
48
- ## 🛠️ Setup
49
-
55
+ Install the CLI globally(optional, recommended):
56
+ ```bash
57
+ npm install neutronium -g
50
58
  ```
59
+ ---
60
+ ## 🛠️ Create a Project
61
+ ```bash
51
62
  neu-cli create-app my-app
63
+ cd my-app
52
64
  ```
53
-
54
65
  ---
55
-
56
- ## Usage Example
66
+ ## 🚀 Usage Example
57
67
  ```jsx
58
68
  // App.js
59
- import { createApp } from 'neutronium' // or ts-neutronium for ts devs
69
+ import { createApp } from 'neutronium' // or ts-neutronium for TypeScript
60
70
 
61
- function Greeting(props) {
62
- return <h2>Hello, {props.name}!</h2>;
71
+ function Greeting({ name }) {
72
+ return <h2>Hello, {name}!</h2>;
63
73
  }
64
74
 
65
75
  export default function App() {
@@ -74,16 +84,41 @@ export default function App() {
74
84
  createApp(App).mount('body');
75
85
  ```
76
86
 
77
- ## Result:
78
- ![Results](https://raw.githubusercontent.com/PFMCODES/neutronium/main/results.png)
87
+ ---
88
+
89
+ ## 🧪 Result
90
+ ![Result](https://raw.githubusercontent.com/PFMCODES/neutronium/main/results.png)
91
+
92
+ ## Browser Sandbox
93
+ Neutronium provides a **browser-safe compiler** for live environments such as playgrounds:
94
+ ```javascript
95
+ import { compile } from "neutronium/sandbox.mjs";
96
+
97
+ const result = compile(code);
98
+ ```
99
+ This allows Neutronium code to be compiled without Node.js, making it ideal for online editors and sandboxes.
100
+
101
+ ---
102
+
103
+ ## 📚 Documentation & Links
104
+ - 🌐 Website: https://neutronium-website.onrender.com/
105
+ - 📖 Docs: https://neutronium-website.onrender.com/Documentation/
106
+ - 🧪 Playground: https://neutronium-website.onrender.com/Playground/
107
+ - 🧠 GitHub: https://github.com/PFMCODES/neutronium
108
+ - 📦 NPM: https://www.npmjs.com/package/neutronium
79
109
 
80
110
  ---
81
111
 
82
- ## NPM Packages using Neutronium
83
- ### [@neuhq/alert](https://www.npmjs.com/package/@neuhq/alert)
84
- ### [neutronium-alert](https://npmjs.org/package/neutronium-alert)
112
+ ## 📦 Packages Built with Neutronium
113
+ - [@neuhq/alert](https://www.npmjs.com/package/@neuhq/alert)
114
+ - [neutronium-alert](https://www.npmjs.com/package/neutronium-alert)
85
115
 
86
116
  ---
87
117
 
88
- ## Found a bug or a problem?
89
- ### Report [here.](https://github.com/PFMCODES/neutronium/issues/new)
118
+ ## 🐞 Found a Bug or Issue?
119
+ Please report it here:
120
+ 👉 https://github.com/PFMCODES/neutronium/issues/new
121
+
122
+ ---
123
+ ## License
124
+ MIT © PFMCODES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neutronium",
3
- "version": "3.3.9",
3
+ "version": "3.4.0",
4
4
  "description": "Ultra-dense JavaScript framework – maximum performance, minimal overhead",
5
5
  "main": "src/index.js",
6
6
  "type": "commonjs",
package/sandbox.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as Babel from "https://esm.sh/@babel/standalone@7.28.6/es2022/standalone.mjs";
2
2
  import { basehtml } from "./template.js";
3
3
 
4
- export function compileAndReturnOutput(source) {
4
+ export function compile(source) {
5
5
  try {
6
6
  console.log("⚙️ Babel transforming");
7
7