nuclie 1.0.4 → 1.0.7
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/create-nuclie/templates.d.ts +1 -1
- package/dist/create-nuclie/templates.js +209 -18
- package/native/README.md +10 -0
- package/native/index.cjs +117 -0
- package/native/index.d.ts +232 -0
- package/native/index.js +594 -0
- package/native/nuclie_native.linux-x64-gnu.node +0 -0
- package/native/package.json +7 -0
- package/package.json +6 -1
|
@@ -1,8 +1,69 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Nuclie Template Definitions
|
|
3
3
|
* Defines the file structure for 12 supported frameworks.
|
|
4
|
-
*
|
|
4
|
+
* Optimized for Premium Branding & Unified Design.
|
|
5
5
|
*/
|
|
6
|
+
// SHARED PREMIUM CSS SYSTEM
|
|
7
|
+
const PREMIUM_CSS = `:root {
|
|
8
|
+
--primary: #00e5ff;
|
|
9
|
+
--primary-glow: rgba(0, 229, 255, 0.4);
|
|
10
|
+
--bg: #030712;
|
|
11
|
+
--card-bg: rgba(255, 255, 255, 0.03);
|
|
12
|
+
--card-border: rgba(255, 255, 255, 0.1);
|
|
13
|
+
--text: #f9fafb;
|
|
14
|
+
--text-muted: #9ca3af;
|
|
15
|
+
|
|
16
|
+
font-family: 'Outfit', Inter, system-ui, sans-serif;
|
|
17
|
+
background-color: var(--bg);
|
|
18
|
+
color: var(--text);
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
23
|
+
body { overflow-x: hidden; min-height: 100vh; }
|
|
24
|
+
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
|
|
25
|
+
|
|
26
|
+
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: 0.3s; padding: 1.5rem 0; }
|
|
27
|
+
.nav.scrolled { background: rgba(3, 7, 18, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--card-border); padding: 1rem 0; }
|
|
28
|
+
.nav-content { max-width: 1100px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }
|
|
29
|
+
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
|
|
30
|
+
.nav-links { display: flex; gap: 2rem; align-items: center; }
|
|
31
|
+
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: 0.2s; }
|
|
32
|
+
.nav-links a:hover { color: var(--primary); }
|
|
33
|
+
|
|
34
|
+
.gradient-text { background: linear-gradient(135deg, #fff 0%, var(--primary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
|
|
35
|
+
|
|
36
|
+
.btn-primary {
|
|
37
|
+
background: var(--primary); color: #000; border: none; padding: 0.8rem 2rem;
|
|
38
|
+
border-radius: 99px; font-weight: 600; cursor: pointer; transition: 0.3s;
|
|
39
|
+
box-shadow: 0 4px 20px var(--primary-glow); border: 1px solid transparent;
|
|
40
|
+
}
|
|
41
|
+
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--primary-glow); }
|
|
42
|
+
.btn-primary-sm { background: var(--primary); color: #000; border: none; padding: 0.5rem 1.2rem; border-radius: 99px; font-weight: 600; cursor: pointer; font-size: 0.8rem; }
|
|
43
|
+
.btn-secondary { background: transparent; color: #fff; border: 1px solid var(--card-border); padding: 0.8rem 2rem; border-radius: 99px; font-weight: 500; cursor: pointer; transition: 0.2s; }
|
|
44
|
+
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); }
|
|
45
|
+
|
|
46
|
+
.hero { padding: 10rem 0 5rem; position: relative; text-align: center; }
|
|
47
|
+
.hero-glow { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 600px; background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%); filter: blur(80px); z-index: -1; opacity: 0.6; }
|
|
48
|
+
.badge { display: inline-block; padding: 0.4rem 1rem; background: rgba(0, 229, 255, 0.1); border: 1px solid rgba(0, 229, 255, 0.2); border-radius: 30px; color: var(--primary); font-size: 0.8rem; font-weight: 600; margin-bottom: 2rem; }
|
|
49
|
+
.hero-title { font-size: clamp(3rem, 8vw, 5rem); line-height: 1.1; letter-spacing: -2px; margin-bottom: 1.5rem; }
|
|
50
|
+
.hero-subtitle { color: var(--text-muted); font-size: 1.2rem; line-height: 1.6; margin-bottom: 3rem; }
|
|
51
|
+
.hero-actions { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 5rem; }
|
|
52
|
+
|
|
53
|
+
.glass-card { background: var(--card-bg); backdrop-filter: blur(20px); border: 1px solid var(--card-border); padding: 1.5rem; border-radius: 12px; width: 100%; max-width: 600px; text-align: left; margin: 0 auto; }
|
|
54
|
+
.card-header { display: flex; gap: 6px; margin-bottom: 1.5rem; }
|
|
55
|
+
.dot { width: 10px; height: 10px; border-radius: 50%; }
|
|
56
|
+
.dot.red { background: #ff5f56; }
|
|
57
|
+
.dot.yellow { background: #ffbd2e; }
|
|
58
|
+
.dot.green { background: #27c93f; }
|
|
59
|
+
|
|
60
|
+
code { font-family: 'Fira Code', monospace; font-size: 0.9rem; color: #d1d5db; }
|
|
61
|
+
.keyword { color: #f472b6; }
|
|
62
|
+
.comment { color: #6b7280; }
|
|
63
|
+
.success { color: #34d399; }
|
|
64
|
+
|
|
65
|
+
.footer { padding: 4rem 0; text-align: center; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.9rem; }
|
|
66
|
+
`;
|
|
6
67
|
const COMMON_FILES = [
|
|
7
68
|
{
|
|
8
69
|
path: 'nuclie.config.ts',
|
|
@@ -21,15 +82,15 @@ export const TEMPLATES = {
|
|
|
21
82
|
files: [
|
|
22
83
|
...COMMON_FILES,
|
|
23
84
|
{ path: '.gitignore', content: 'node_modules\ndist\n.DS_Store\n*.local\n.nuclie\n' },
|
|
24
|
-
{ path: 'README.md', content: '# Nuclie React App\n\nGenerated with Nuclie Forge.\n
|
|
85
|
+
{ path: 'README.md', content: '# Nuclie React App\n\nGenerated with Nuclie Forge.\n' },
|
|
25
86
|
{ path: 'index.html', content: `<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" />\n <link rel="icon" type="image/svg+xml" href="/favicon.svg" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Modern App</title>\n </head>\n <body>\n <div id="root"></div>\n <script type="module" src="/src/main.tsx"></script>\n </body>\n</html>` },
|
|
26
87
|
{ path: 'public/favicon.svg', content: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#00e5ff" opacity="0.3"/><circle cx="50" cy="50" r="20" fill="#00e5ff"/></svg>` },
|
|
27
88
|
{ path: 'src/main.tsx', content: `import { StrictMode } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport './styles/global.css';\nimport App from './App.tsx';\n\nconst root = document.getElementById('root');\nif (root) {\n createRoot(root).render(\n <StrictMode>\n <App />\n </StrictMode>,\n );\n}` },
|
|
28
89
|
{ path: 'src/App.tsx', content: `import Landing from './pages/Landing';\n\nfunction App() {\n return (\n <div className="app-shell">\n <Landing />\n </div>\n );\n}\n\nexport default App;\n` },
|
|
29
90
|
{ path: 'src/pages/Landing.tsx', content: `import { useState } from 'react';\nimport Navbar from '../components/Navbar';\nimport Hero from '../components/Hero';\n\nexport default function Landing() {\n const [count, setCount] = useState(0);\n\n return (\n <div className="landing-page">\n <Navbar />\n <Hero count={count} onIncrement={() => setCount(c => c + 1)} />\n <footer className="footer">\n <p>© 2026 Nuclie Forge. Built with passion for developers.</p>\n </footer>\n </div>\n );\n}` },
|
|
30
91
|
{ path: 'src/components/Navbar.tsx', content: `import { useState, useEffect } from 'react';\n\nexport default function Navbar() {\n const [scrolled, setScrolled] = useState(false);\n\n useEffect(() => {\n const handleScroll = () => setScrolled(window.scrollY > 50);\n window.addEventListener('scroll', handleScroll);\n return () => window.removeEventListener('scroll', handleScroll);\n }, []);\n\n return (\n <nav className={scrolled ? 'nav scrolled' : 'nav'}>\n <div className="nav-content">\n <div className="logo-text">NUCLIE</div>\n <div className="nav-links">\n <a href="#features">Features</a>\n <a href="#docs">Docs</a>\n <button className="btn-primary-sm">Get Started</button>\n </div>\n </div>\n </nav>\n );\n}` },
|
|
31
|
-
{ path: 'src/components/Hero.tsx', content: `export default function Hero({ count, onIncrement }: { count: number, onIncrement: () => void }) {\n return (\n <main className="hero">\n <div className="hero-glow"></div>\n <div className="container">\n <div className="badge">Engine v1.0.
|
|
32
|
-
{ path: 'src/styles/global.css', content:
|
|
92
|
+
{ path: 'src/components/Hero.tsx', content: `export default function Hero({ count, onIncrement }: { count: number, onIncrement: () => void }) {\n return (\n <main className="hero">\n <div className="hero-glow"></div>\n <div className="container">\n <div className="badge">Engine v1.0.4 Ready</div>\n <h1 className="hero-title">\n The Nucleus for <br />\n <span className="gradient-text">Stunning Web Apps</span>\n </h1>\n <p className="hero-subtitle">\n Experience the next generation of build speed with Nuclie. <br />\n Unified design across all frameworks, powered by native Rust.\n </p>\n \n <div className="hero-actions">\n <button className="btn-primary" onClick={onIncrement}>\n Interactions: {count}\n </button>\n <button className="btn-secondary">Read Documentation</button>\n </div>\n\n <div className="hero-visual">\n <div className="glass-card">\n <div className="card-header">\n <div className="dot red"></div>\n <div className="dot yellow"></div>\n <div className="dot green"></div>\n </div>\n <code>\n <span className="comment">// Initializing the nucleus...</span><br />\n <span className="keyword">npm</span> install nuclie<br />\n <span className="keyword">npm</span> run dev<br />\n <br />\n <span className="success">✔ Core Ready in 3.15ms</span>\n </code>\n </div>\n </div>\n </div>\n </main>\n );\n}` },
|
|
93
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS },
|
|
33
94
|
{ path: 'src/utils/helpers.ts', content: `export const formatTime = (ms: number) => (ms / 1000).toFixed(2) + 's';\n` }
|
|
34
95
|
],
|
|
35
96
|
dependencies: { "react": "latest", "react-dom": "latest" },
|
|
@@ -42,12 +103,15 @@ export const TEMPLATES = {
|
|
|
42
103
|
files: [
|
|
43
104
|
...COMMON_FILES,
|
|
44
105
|
{ path: '.gitignore', content: 'node_modules\ndist\n.DS_Store\n' },
|
|
106
|
+
{ path: 'README.md', content: '# Nuclie Vue App\n' },
|
|
45
107
|
{ path: 'index.html', content: `<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" />\n <link rel="icon" type="image/svg+xml" href="/favicon.svg" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Modern Vue</title>\n </head>\n <body>\n <div id="app"></div>\n <script type="module" src="/src/main.ts"></script>\n </body>\n</html>` },
|
|
46
108
|
{ path: 'public/favicon.svg', content: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#42b883" opacity="0.3"/><circle cx="50" cy="50" r="20" fill="#42b883"/></svg>` },
|
|
47
109
|
{ path: 'src/main.ts', content: `import { createApp } from 'vue';\nimport App from './App.vue';\nimport './styles/global.css';\n\ncreateApp(App).mount('#app');` },
|
|
48
|
-
{ path: 'src/App.vue', content: `<script setup lang="ts">\nimport
|
|
49
|
-
{ path: 'src/pages/
|
|
50
|
-
{ path: 'src/
|
|
110
|
+
{ path: 'src/App.vue', content: `<script setup lang="ts">\nimport Landing from './pages/Landing.vue';\n</script>\n<template>\n <Landing />\n</template>` },
|
|
111
|
+
{ path: 'src/pages/Landing.vue', content: `<script setup lang="ts">\nimport Navbar from '../components/Navbar.vue';\nimport Hero from '../components/Hero.vue';\n</script>\n<template>\n <div class="landing-page">\n <Navbar />\n <Hero />\n <footer class="footer">\n <p>© 2026 Nuclie Forge. Built with passion for developers.</p>\n </footer>\n </div>\n</template>` },
|
|
112
|
+
{ path: 'src/components/Navbar.vue', content: `<script setup lang="ts">\nimport { ref, onMounted, onUnmounted } from 'vue';\nconst scrolled = ref(false);\nconst handleScroll = () => scrolled.value = window.scrollY > 50;\nonMounted(() => window.addEventListener('scroll', handleScroll));\nonUnmounted(() => window.removeEventListener('scroll', handleScroll));\n</script>\n<template>\n <nav :class="scrolled ? 'nav scrolled' : 'nav'">\n <div class="nav-content">\n <div class="logo-text">NUCLIE</div>\n <div class="nav-links">\n <a href="#features">Features</a>\n <a href="#docs">Docs</a>\n <button class="btn-primary-sm">Get Started</button>\n </div>\n </div>\n </nav>\n</template>` },
|
|
113
|
+
{ path: 'src/components/Hero.vue', content: `<script setup lang="ts">\nimport { ref } from 'vue';\nconst count = ref(0);\n</script>\n<template>\n <main class="hero">\n <div class="hero-glow"></div>\n <div class="container">\n <div class="badge">Engine v1.0.4 Ready</div>\n <h1 class="hero-title">\n The Nucleus for <br />\n <span class="gradient-text">Stunning Web Apps</span>\n </h1>\n <p class="hero-subtitle">\n Experience the next generation of build speed with Nuclie. <br />\n Unified design across all frameworks, powered by native Rust.\n </p>\n <div class="hero-actions">\n <button class="btn-primary" @click="count++">Interactions: {{ count }}</button>\n <button class="btn-secondary">Read Documentation</button>\n </div>\n <div class="hero-visual">\n <div class="glass-card">\n <div class="card-header"><div class="dot red"></div><div class="dot yellow"></div><div class="dot green"></div></div>\n <code><span class="comment">// Initializing the nucleus...</span><br /><span class="keyword">npm</span> install nuclie<br /><span class="keyword">npm</span> run dev<br /><br /><span class="success">✔ Core Ready in 3.15ms</span></code>\n </div>\n </div>\n </div>\n </main>\n</template>` },
|
|
114
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #42b883;').replace('--primary-glow: rgba(0, 229, 255, 0.4);', '--primary-glow: rgba(66, 184, 131, 0.3);') }
|
|
51
115
|
],
|
|
52
116
|
dependencies: { "vue": "latest" },
|
|
53
117
|
devDependencies: { "@vue/compiler-sfc": "latest" }
|
|
@@ -55,18 +119,145 @@ export const TEMPLATES = {
|
|
|
55
119
|
'svelte': {
|
|
56
120
|
id: 'svelte',
|
|
57
121
|
name: 'Svelte',
|
|
58
|
-
description: 'Svelte
|
|
59
|
-
files: [
|
|
122
|
+
description: 'Svelte 5 + modern Architecture + Premium UI',
|
|
123
|
+
files: [
|
|
124
|
+
...COMMON_FILES,
|
|
125
|
+
{ path: '.gitignore', content: 'node_modules\ndist\n.DS_Store\n' },
|
|
126
|
+
{ path: 'index.html', content: `<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Modern Svelte</title>\n </head>\n <body>\n <div id="app"></div>\n <script type="module" src="/src/main.ts"></script>\n </body>\n</html>` },
|
|
127
|
+
{ path: 'public/favicon.svg', content: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#ff3e00" opacity="0.3"/><circle cx="50" cy="50" r="20" fill="#ff3e00"/></svg>` },
|
|
128
|
+
{ path: 'src/main.ts', content: `import { mount } from 'svelte';\nimport App from './App.svelte';\nimport './styles/global.css';\n\nmount(App, { target: document.getElementById('app')! });` },
|
|
129
|
+
{ path: 'src/App.svelte', content: `<script lang="ts">\n import Navbar from './components/Navbar.svelte';\n import Hero from './components/Hero.svelte';\n</script>\n<div class="landing-page">\n <Navbar />\n <Hero />\n <footer class="footer">\n <p>© 2026 Nuclie Forge. Built with passion for developers.</p>\n </footer>\n</div>` },
|
|
130
|
+
{ path: 'src/components/Navbar.svelte', content: `<script lang="ts">\n let scrolled = $state(false);\n if (typeof window !== 'undefined') {\n window.addEventListener('scroll', () => scrolled = window.scrollY > 50);\n }\n</script>\n<nav class={scrolled ? 'nav scrolled' : 'nav'}>\n <div class="nav-content">\n <div class="logo-text">NUCLIE</div>\n <div class="nav-links">\n <a href="#features">Features</a>\n <a href="#docs">Docs</a>\n <button class="btn-primary-sm">Get Started</button>\n </div>\n </div>\n</nav>` },
|
|
131
|
+
{ path: 'src/components/Hero.svelte', content: `<script lang="ts">\n let count = $state(0);\n</script>\n<main class="hero">\n <div class="hero-glow"></div>\n <div class="container">\n <div class="badge">Engine v1.0.4 Ready</div>\n <h1 class="hero-title">The Nucleus for <br /><span class="gradient-text">Stunning Web Apps</span></h1>\n <p class="hero-subtitle">Experience the next generation of build speed with Nuclie. <br />Unified design across all frameworks, powered by native Rust.</p>\n <div class="hero-actions">\n <button class="btn-primary" onclick={() => count++}>Interactions: {count}</button>\n <button class="btn-secondary">Read Documentation</button>\n </div>\n <div class="hero-visual">\n <div class="glass-card">\n <div class="card-header"><div class="dot red"></div><div class="dot yellow"></div><div class="dot green"></div></div>\n <code><span class="comment">// Initializing the nucleus...</span><br /><span class="keyword">npm</span> install nuclie<br /><span class="keyword">npm</span> run dev<br /><br /><span class="success">✔ Core Ready in 3.15ms</span></code>\n </div>\n </div>\n </div>\n</main>` },
|
|
132
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #ff3e00;').replace('--primary-glow: rgba(0, 229, 255, 0.4);', '--primary-glow: rgba(255, 62, 0, 0.3);') }
|
|
133
|
+
],
|
|
60
134
|
dependencies: { "svelte": "latest" },
|
|
135
|
+
devDependencies: { "svelte-preprocess": "latest" }
|
|
136
|
+
},
|
|
137
|
+
'solid': {
|
|
138
|
+
id: 'solid',
|
|
139
|
+
name: 'Solid',
|
|
140
|
+
description: 'SolidJS + modern Architecture + Premium UI',
|
|
141
|
+
files: [
|
|
142
|
+
...COMMON_FILES,
|
|
143
|
+
{ path: '.gitignore', content: 'node_modules\ndist\n.DS_Store\n' },
|
|
144
|
+
{ path: 'index.html', content: `<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Modern Solid</title>\n </head>\n <body>\n <div id="app"></div>\n <script type="module" src="/src/main.tsx"></script>\n </body>\n</html>` },
|
|
145
|
+
{ path: 'public/favicon.svg', content: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#2c4f7c" opacity="0.3"/><circle cx="50" cy="50" r="20" fill="#2c4f7c"/></svg>` },
|
|
146
|
+
{ path: 'src/main.tsx', content: `import { render } from 'solid-js/web';\nimport App from './App';\nimport './styles/global.css';\n\nrender(() => <App />, document.getElementById('app')!);` },
|
|
147
|
+
{ path: 'src/App.tsx', content: `import { createSignal, onMount, onCleanup } from 'solid-js';\n\nfunction App() {\n const [count, setCount] = createSignal(0);\n const [scrolled, setScrolled] = createSignal(false);\n onMount(() => window.addEventListener('scroll', () => setScrolled(window.scrollY > 50)));\n return (\n <div class="landing-page">\n <nav class={scrolled() ? 'nav scrolled' : 'nav'}><div class="nav-content"><div class="logo-text">NUCLIE</div><div class="nav-links"><a>Features</a><a>Docs</a><button class="btn-primary-sm">Get Started</button></div></div></nav>\n <main class="hero"><div class="hero-glow"></div><div class="container"><div class="badge">Engine v1.0.4 Ready</div><h1 class="hero-title">The Nucleus for <br /><span class="gradient-text">Stunning Web Apps</span></h1><p class="hero-subtitle">Experience building at light speed.</p><div class="hero-actions"><button class="btn-primary" onClick={() => setCount(c => c + 1)}>Interactions: {count()}</button></div><div class="hero-visual"><div class="glass-card"><code><span class="keyword">npm</span> install nuclie</code></div></div></div></main>\n <footer class="footer"><p>© 2026 Nuclie Forge.</p></footer>\n </div>\n );\n}\nexport default App;` },
|
|
148
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #2c4f7c;').replace('--primary-glow: rgba(0, 229, 255, 0.4);', '--primary-glow: rgba(44, 79, 124, 0.3);') }
|
|
149
|
+
],
|
|
150
|
+
dependencies: { "solid-js": "latest" },
|
|
151
|
+
devDependencies: { "babel-preset-solid": "latest" }
|
|
152
|
+
},
|
|
153
|
+
'preact': {
|
|
154
|
+
id: 'preact',
|
|
155
|
+
name: 'Preact',
|
|
156
|
+
description: 'Preact + modern Architecture + Premium UI',
|
|
157
|
+
files: [
|
|
158
|
+
...COMMON_FILES,
|
|
159
|
+
{ path: '.gitignore', content: 'node_modules\ndist\n.DS_Store\n' },
|
|
160
|
+
{ path: 'index.html', content: `<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Modern Preact</title>\n </head>\n <body>\n <div id="app"></div>\n <script type="module" src="/src/main.tsx"></script>\n </body>\n</html>` },
|
|
161
|
+
{ path: 'public/favicon.svg', content: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#673ab8" opacity="0.3"/><circle cx="50" cy="50" r="20" fill="#673ab8"/></svg>` },
|
|
162
|
+
{ path: 'src/main.tsx', content: `import { render } from 'preact';\nimport App from './App';\nimport './styles/global.css';\n\nrender(<App />, document.getElementById('app')!);` },
|
|
163
|
+
{ path: 'src/App.tsx', content: `import { useState } from 'preact/hooks';\nexport default function App() {\n const [count, setCount] = useState(0);\n return (\n <main class="hero"><div class="hero-glow"></div><div class="container"><div class="badge">Engine v1.0.4 Ready</div><h1 class="hero-title">Nuclie x <span class="gradient-text">Preact</span></h1><button onClick={() => setCount(c => c + 1)} class="btn-primary">Interactions: {count}</button></div></main>\n );\n}` },
|
|
164
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #673ab8;').replace('--primary-glow: rgba(0, 229, 255, 0.4);', '--primary-glow: rgba(103, 58, 184, 0.3);') }
|
|
165
|
+
],
|
|
166
|
+
dependencies: { "preact": "latest" },
|
|
61
167
|
devDependencies: {}
|
|
62
168
|
},
|
|
63
|
-
'
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
169
|
+
'lit': {
|
|
170
|
+
id: 'lit',
|
|
171
|
+
name: 'Lit',
|
|
172
|
+
description: 'Lit + Web Components + Premium UI',
|
|
173
|
+
files: [
|
|
174
|
+
...COMMON_FILES,
|
|
175
|
+
{ path: 'index.html', content: `<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" />\n <link rel="icon" type="image/svg+xml" href="/favicon.svg" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Modern Lit</title>\n </head>\n <body>\n <my-app></my-app>\n <script type="module" src="/src/main.ts"></script>\n </body>\n</html>` },
|
|
176
|
+
{ path: 'src/main.ts', content: `import { LitElement, html, css } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport './styles/global.css';\n\n@customElement('my-app')\nexport class MyApp extends LitElement {\n @state() count = 0;\n render() {\n return html\`\n <main class="hero">\n <div class="hero-glow"></div>\n <div class="container">\n <div class="badge">Engine v1.0.4 Ready</div>\n <h1 class="hero-title">Nuclie x <span class="gradient-text">Lit</span></h1>\n <p class="hero-subtitle">Web Components with native Nuclie speed.</p>\n <div class="hero-actions">\n <button class="btn-primary" @click=\${() => this.count++}>Interactions: \${this.count}</button>\n </div>\n </div>\n </main>\n \`;\n }\n createRenderRoot() { return this; }\n}` },
|
|
177
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #00e5ff;') }
|
|
178
|
+
],
|
|
179
|
+
dependencies: { "lit": "latest" },
|
|
180
|
+
devDependencies: {}
|
|
181
|
+
},
|
|
182
|
+
'angular': {
|
|
183
|
+
id: 'angular',
|
|
184
|
+
name: 'Angular',
|
|
185
|
+
description: 'Angular + Ivy + Premium UI',
|
|
186
|
+
files: [
|
|
187
|
+
...COMMON_FILES,
|
|
188
|
+
{ path: 'src/index.html', content: `<!DOCTYPE html>\n<html>\n<head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">\n <title>Nuclie Angular</title>\n</head>\n<body>\n <app-root></app-root>\n</body>\n</html>` },
|
|
189
|
+
{ path: 'src/main.ts', content: `import { bootstrapApplication } from '@angular/platform-browser';\nimport { AppComponent } from './app/app.component';\nimport './styles.css';\nbootstrapApplication(AppComponent);` },
|
|
190
|
+
{ path: 'src/app/app.component.ts', content: `import { Component } from '@angular/core';\n@Component({\n selector: 'app-root',\n standalone: true,\n template: \`\n <main class="hero">\n <div class="hero-glow"></div>\n <div class="container">\n <div class="badge">Engine v1.0.4 Ready</div>\n <h1 class="hero-title">Nuclie x <span class="gradient-text">Angular</span></h1>\n <p class="hero-subtitle">Scaling web apps with ease.</p>\n <button class="btn-primary" (click)="count = count + 1">Interactions: {{count}}</button>\n </div>\n </main>\n \`\n})\nexport class AppComponent { count = 0; }` },
|
|
191
|
+
{ path: 'src/styles.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #dd0031;') }
|
|
192
|
+
],
|
|
193
|
+
dependencies: { "@angular/core": "latest", "@angular/platform-browser": "latest" },
|
|
194
|
+
devDependencies: {}
|
|
195
|
+
},
|
|
196
|
+
'qwik': {
|
|
197
|
+
id: 'qwik',
|
|
198
|
+
name: 'Qwik',
|
|
199
|
+
description: 'Qwik + Resumable + Premium UI',
|
|
200
|
+
files: [
|
|
201
|
+
...COMMON_FILES,
|
|
202
|
+
{ path: 'index.html', content: `<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet"></head><body><div id="app"></div><script type="module" src="/src/main.tsx"></script></body></html>` },
|
|
203
|
+
{ path: 'src/main.tsx', content: `import { render } from '@builder.io/qwik';\nimport { App } from './app';\nimport './styles/global.css';\nrender(document.getElementById('app')!, <App />);` },
|
|
204
|
+
{ path: 'src/app.tsx', content: `import { component$, useStore } from '@builder.io/qwik';\nexport const App = component$(() => {\n const state = useStore({ count: 0 });\n return (<main class="hero"><div class="hero-glow"></div><div class="container"><div class="badge">Engine v1.0.4 Ready</div><h1 class="hero-title">Nuclie x <span class="gradient-text">Qwik</span></h1><button class="btn-primary" onClick$={() => state.count++}>Interactions: {state.count}</button></div></main>);\n});` },
|
|
205
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #ac7ff4;') }
|
|
206
|
+
],
|
|
207
|
+
dependencies: { "@builder.io/qwik": "latest" },
|
|
208
|
+
devDependencies: {}
|
|
209
|
+
},
|
|
210
|
+
'astro': {
|
|
211
|
+
id: 'astro',
|
|
212
|
+
name: 'Astro',
|
|
213
|
+
description: 'Astro + Content + Premium UI',
|
|
214
|
+
files: [
|
|
215
|
+
...COMMON_FILES,
|
|
216
|
+
{ path: 'src/pages/index.astro', content: `--- \nimport '../styles/global.css';\n---\n<html lang="en"><body><main class="hero"><div class="hero-glow"></div><div class="container"><h1 class="hero-title">Nuclie x <span class="gradient-text">Astro</span></h1><button class="btn-primary">Ships Fast</button></div></main></body></html>` },
|
|
217
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #ff5d01;') }
|
|
218
|
+
],
|
|
219
|
+
dependencies: { "astro": "latest" },
|
|
220
|
+
devDependencies: {}
|
|
221
|
+
},
|
|
222
|
+
'next': {
|
|
223
|
+
id: 'next',
|
|
224
|
+
name: 'Next-like',
|
|
225
|
+
description: 'React SSR Routing + Premium UI',
|
|
226
|
+
files: [
|
|
227
|
+
...COMMON_FILES,
|
|
228
|
+
{ path: 'index.html', content: `<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet"></head><body><div id="root"></div><script type="module" src="/src/main.tsx"></script></body></html>` },
|
|
229
|
+
{ path: 'src/main.tsx', content: `import React, { useState } from 'react';\nimport ReactDOM from 'react-dom/client';\nimport './styles/global.css';\nfunction App() {\n const [count, setCount] = useState(0);\n return (<main class="hero"><div class="hero-glow"></div><div class="container"><div class="badge">Engine v1.0.4 Ready</div><h1 class="hero-title">Nuclie x <span class="gradient-text">Next-like</span></h1><button class="btn-primary" onClick={() => setCount(c => c+1)}>Interactions: {count}</button></div></main>);\n}\nReactDOM.createRoot(document.getElementById('root')!).render(<App />);` },
|
|
230
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS }
|
|
231
|
+
],
|
|
232
|
+
dependencies: { "react": "latest", "react-dom": "latest", "wouter": "latest" },
|
|
233
|
+
devDependencies: { "@types/react": "latest", "@types/react-dom": "latest" }
|
|
234
|
+
},
|
|
235
|
+
'nuxt': {
|
|
236
|
+
id: 'nuxt',
|
|
237
|
+
name: 'Nuxt-like',
|
|
238
|
+
description: 'Vue Meta Framework + Premium UI',
|
|
239
|
+
files: [
|
|
240
|
+
...COMMON_FILES,
|
|
241
|
+
{ path: 'index.html', content: `<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet"></head><body><div id="app"></div><script type="module" src="/src/main.ts"></script></body></html>` },
|
|
242
|
+
{ path: 'src/main.ts', content: `import { createApp } from 'vue';\nimport App from './App.vue';\nimport './styles/global.css';\ncreateApp(App).mount('#app');` },
|
|
243
|
+
{ path: 'src/App.vue', content: `<script setup>\nimport { ref } from 'vue';\nconst count = ref(0);\n</script>\n<template><main class="hero"><div class="hero-glow"></div><div class="container"><div class="badge">Engine v1.0.4 Ready</div><h1 class="hero-title">Nuclie x <span class="gradient-text">Nuxt-like</span></h1><button class="btn-primary" @click="count++">Interactions: {{count}}</button></div></main></template>` },
|
|
244
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #00dc82;') }
|
|
245
|
+
],
|
|
246
|
+
dependencies: { "vue": "latest" },
|
|
247
|
+
devDependencies: {}
|
|
248
|
+
},
|
|
249
|
+
'sveltekit': {
|
|
250
|
+
id: 'sveltekit',
|
|
251
|
+
name: 'SvelteKit-like',
|
|
252
|
+
description: 'Svelte Fullstack + Premium UI',
|
|
253
|
+
files: [
|
|
254
|
+
...COMMON_FILES,
|
|
255
|
+
{ path: 'index.html', content: `<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet"></head><body><div id="app"></div><script type="module" src="/src/main.ts"></script></body></html>` },
|
|
256
|
+
{ path: 'src/main.ts', content: `import { mount } from 'svelte';\nimport App from './App.svelte';\nimport './styles/global.css';\nmount(App, { target: document.getElementById('app')! });` },
|
|
257
|
+
{ path: 'src/App.svelte', content: `<script>\n let count = $state(0);\n</script>\n<main class="hero"><div class="hero-glow"></div><div class="container"><div class="badge">Engine v1.0.4 Ready</div><h1 class="hero-title">Nuclie x <span class="gradient-text">SvelteKit-like</span></h1><button class="btn-primary" onclick={() => count++}>Interactions: {count}</button></div></main>` },
|
|
258
|
+
{ path: 'src/styles/global.css', content: PREMIUM_CSS.replace('--primary: #00e5ff;', '--primary: #ff3e00;') }
|
|
259
|
+
],
|
|
260
|
+
dependencies: { "svelte": "latest" },
|
|
261
|
+
devDependencies: {}
|
|
262
|
+
}
|
|
72
263
|
};
|
package/native/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Rust native worker placeholder
|
|
2
|
+
|
|
3
|
+
This folder is a placeholder for a Rust crate that will provide high-performance transforms and analysis.
|
|
4
|
+
|
|
5
|
+
Planned layout:
|
|
6
|
+
- native/worker/Cargo.toml
|
|
7
|
+
- native/worker/src/lib.rs
|
|
8
|
+
- native/bridge/ - Node.js bridge to call the native binary via stdio or FFI
|
|
9
|
+
|
|
10
|
+
For the prototype, native worker will be optional and can be compiled separately.
|
package/native/index.cjs
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// CJS shim for native/index.js — used by Jest to avoid ESM transform issues
|
|
3
|
+
// with __dirname and native require() calls.
|
|
4
|
+
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
|
|
8
|
+
let nativeBinding = null;
|
|
9
|
+
|
|
10
|
+
// Try all known locations for the compiled .node binary
|
|
11
|
+
const candidates = [
|
|
12
|
+
path.join(__dirname, 'nuclie_native.win32-x64-msvc.node'),
|
|
13
|
+
path.join(__dirname, 'nuclie_native.win32-x64-gnu.node'),
|
|
14
|
+
path.join(__dirname, 'nuclie_native.linux-x64-gnu.node'),
|
|
15
|
+
path.join(__dirname, 'nuclie_native.linux-x64-musl.node'),
|
|
16
|
+
path.join(__dirname, 'nuclie_native.darwin-universal.node'),
|
|
17
|
+
path.join(__dirname, 'nuclie_native.darwin-arm64.node'),
|
|
18
|
+
path.join(__dirname, 'nuclie_native.darwin-x64.node'),
|
|
19
|
+
path.join(__dirname, 'nuclie_native.node'),
|
|
20
|
+
path.join(__dirname, '..', 'nuclie_native.node'),
|
|
21
|
+
path.join(__dirname, '..', 'dist', 'nuclie_native.node'),
|
|
22
|
+
path.join(process.cwd(), 'native', 'nuclie_native.win32-x64-msvc.node'),
|
|
23
|
+
path.join(process.cwd(), 'native', 'nuclie_native.linux-x64-gnu.node'),
|
|
24
|
+
path.join(process.cwd(), 'native', 'nuclie_native.darwin-universal.node'),
|
|
25
|
+
path.join(process.cwd(), 'nuclie_native.node'),
|
|
26
|
+
path.join(process.cwd(), 'dist', 'nuclie_native.node'),
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
for (const candidate of candidates) {
|
|
30
|
+
if (fs.existsSync(candidate)) {
|
|
31
|
+
try {
|
|
32
|
+
nativeBinding = require(candidate);
|
|
33
|
+
break;
|
|
34
|
+
} catch (_e) {
|
|
35
|
+
// try next
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// JS fallback stubs — used when native binding is not available (CI without Rust build)
|
|
41
|
+
const stub = {
|
|
42
|
+
BuildCache: class BuildCache {
|
|
43
|
+
constructor() { }
|
|
44
|
+
get(key) { return null; }
|
|
45
|
+
set(key, value) { }
|
|
46
|
+
invalidate(key) { }
|
|
47
|
+
clear() { }
|
|
48
|
+
},
|
|
49
|
+
BuildOrchestrator: class BuildOrchestrator {
|
|
50
|
+
constructor() { }
|
|
51
|
+
async build(config) { return { success: true, modules: [], duration: 0 }; }
|
|
52
|
+
},
|
|
53
|
+
GraphAnalyzer: class GraphAnalyzer {
|
|
54
|
+
constructor() { }
|
|
55
|
+
analyze(graph) { return { cycles: [], order: [] }; }
|
|
56
|
+
},
|
|
57
|
+
NativeWorker: class NativeWorker {
|
|
58
|
+
constructor(threads) { this.threads = threads; }
|
|
59
|
+
async batchTransform(items) {
|
|
60
|
+
return items.map(item => ({ code: item.content || '', map: null }));
|
|
61
|
+
}
|
|
62
|
+
async transform(code, options) { return { code, map: null }; }
|
|
63
|
+
},
|
|
64
|
+
PluginRuntime: class PluginRuntime {
|
|
65
|
+
constructor() { }
|
|
66
|
+
async runPlugin(plugin, context) { return context; }
|
|
67
|
+
},
|
|
68
|
+
BuildStage: { Load: 0, Transform: 1, Optimize: 2, Bundle: 3 },
|
|
69
|
+
batchHash: (items) => items.map(() => 'stub-hash-' + Math.random().toString(36).slice(2)),
|
|
70
|
+
benchmarkGraphAnalysis: () => ({ duration: 0 }),
|
|
71
|
+
benchmarkParallelism: () => ({ duration: 0 }),
|
|
72
|
+
benchmarkTransform: () => ({ duration: 0 }),
|
|
73
|
+
createArtifactKey: (id) => `artifact:${id}`,
|
|
74
|
+
createGraphKey: (id) => `graph:${id}`,
|
|
75
|
+
createInputKey: (id) => `input:${id}`,
|
|
76
|
+
createPlanKey: (id) => `plan:${id}`,
|
|
77
|
+
fastHash: (data) => 'stub-hash-' + Buffer.from(String(data)).toString('hex').slice(0, 8),
|
|
78
|
+
getOptimalParallelism: () => require('os').cpus().length || 4,
|
|
79
|
+
helloRust: () => 'Hello from JS stub!',
|
|
80
|
+
minifySync: (code) => code, // No-op fallback: return code unchanged
|
|
81
|
+
normalizePath: (p) => p.replace(/\\/g, '/'),
|
|
82
|
+
scanImports: (code) => [],
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const binding = nativeBinding || stub;
|
|
86
|
+
|
|
87
|
+
if (!nativeBinding) {
|
|
88
|
+
// Only warn once, not on every import
|
|
89
|
+
if (!global.__nuclie_native_warned) {
|
|
90
|
+
global.__nuclie_native_warned = true;
|
|
91
|
+
process.stderr.write('[nuclie] Native binding not found — using JS fallback stubs. Build/run `npm run build:native` to compile.\n');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
module.exports = binding;
|
|
96
|
+
|
|
97
|
+
// Named exports
|
|
98
|
+
module.exports.BuildCache = binding.BuildCache;
|
|
99
|
+
module.exports.BuildOrchestrator = binding.BuildOrchestrator;
|
|
100
|
+
module.exports.GraphAnalyzer = binding.GraphAnalyzer;
|
|
101
|
+
module.exports.NativeWorker = binding.NativeWorker;
|
|
102
|
+
module.exports.PluginRuntime = binding.PluginRuntime;
|
|
103
|
+
module.exports.batchHash = binding.batchHash;
|
|
104
|
+
module.exports.benchmarkGraphAnalysis = binding.benchmarkGraphAnalysis;
|
|
105
|
+
module.exports.benchmarkParallelism = binding.benchmarkParallelism;
|
|
106
|
+
module.exports.benchmarkTransform = binding.benchmarkTransform;
|
|
107
|
+
module.exports.BuildStage = binding.BuildStage;
|
|
108
|
+
module.exports.createArtifactKey = binding.createArtifactKey;
|
|
109
|
+
module.exports.createGraphKey = binding.createGraphKey;
|
|
110
|
+
module.exports.createInputKey = binding.createInputKey;
|
|
111
|
+
module.exports.createPlanKey = binding.createPlanKey;
|
|
112
|
+
module.exports.fastHash = binding.fastHash;
|
|
113
|
+
module.exports.getOptimalParallelism = binding.getOptimalParallelism;
|
|
114
|
+
module.exports.helloRust = binding.helloRust;
|
|
115
|
+
module.exports.minifySync = binding.minifySync;
|
|
116
|
+
module.exports.normalizePath = binding.normalizePath;
|
|
117
|
+
module.exports.scanImports = binding.scanImports;
|