@howssatoshi/quantumcss 1.7.3 → 1.7.5
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 +31 -27
- package/dist/quantum.css +2374 -0
- package/dist/quantum.min.css +1 -6473
- package/examples/admin-panel.html +12 -9
- package/examples/analytics-dashboard.html +53 -1
- package/examples/blog-template.html +34 -15
- package/examples/chat-messaging.html +7 -6
- package/examples/email-template.html +42 -19
- package/examples/gaming-template.html +7 -7
- package/examples/gradient-test.html +106 -30
- package/examples/index.html +17 -17
- package/examples/kitchen-sink.html +164 -38
- package/examples/news-template.html +13 -13
- package/examples/portfolio-resume.html +23 -8
- package/examples/shopping/index.html +15 -15
- package/examples/travel/index.html +61 -39
- package/examples/verify_fixes.html +2 -2
- package/examples/verify_presets.html +1 -1
- package/package.json +3 -1
- package/src/cli.js +160 -27
- package/src/defaults.js +40 -23
- package/src/generator.js +191 -45
- package/src/starlight.js +6 -0
- package/src/styles/quantum-base.css +12 -1
- package/src/styles/quantum-components.css +2 -70
- package/src/styles/starlight.css +64 -43
- package/src/styles/quantum-responsive.css +0 -363
|
@@ -102,8 +102,15 @@
|
|
|
102
102
|
<div class="hero-glow"></div>
|
|
103
103
|
|
|
104
104
|
<!-- Navigation -->
|
|
105
|
-
<nav class="
|
|
105
|
+
<nav class="starlight-navbar">
|
|
106
106
|
<div class="container mx-auto px-6 py-4 flex justify-between items-center">
|
|
107
|
+
<div class="md:hidden hamburger-left">
|
|
108
|
+
<div class="hamburger">
|
|
109
|
+
<span></span>
|
|
110
|
+
<span></span>
|
|
111
|
+
<span></span>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
107
114
|
<div class="text-3xl font-black tracking-tighter text-gradient-starlight uppercase">NEBULA</div>
|
|
108
115
|
<div class="hidden md:flex space-x-12 text-[11px] font-black uppercase tracking-[0.2em]">
|
|
109
116
|
<a href="#" class="hover:text-starlight-blue transition-colors">Destinations</a>
|
|
@@ -119,32 +126,47 @@
|
|
|
119
126
|
<button class="btn-starlight px-8 h-12 text-[10px] font-black uppercase tracking-widest">Book Now</button>
|
|
120
127
|
</div>
|
|
121
128
|
</div>
|
|
129
|
+
|
|
130
|
+
<!-- Mobile Menu -->
|
|
131
|
+
<div class="nav-menu-mobile">
|
|
132
|
+
<ul class="nav-list vertical">
|
|
133
|
+
<li><a href="#" class="nav-link">Destinations</a></li>
|
|
134
|
+
<li><a href="#" class="nav-link">Cruises</a></li>
|
|
135
|
+
<li><a href="#" class="nav-link">Excursions</a></li>
|
|
136
|
+
<li><a href="#" class="nav-link">Concierge</a></li>
|
|
137
|
+
<li class="pt-4 border-t border-white_5">
|
|
138
|
+
<button class="btn-starlight w-full py-3">Book Now</button>
|
|
139
|
+
</li>
|
|
140
|
+
</ul>
|
|
141
|
+
</div>
|
|
122
142
|
</nav>
|
|
123
143
|
|
|
124
144
|
<!-- Hero Section -->
|
|
125
|
-
<header class="
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
<header class="starlight-hero">
|
|
146
|
+
<div class="max-w-5xl mx-auto">
|
|
147
|
+
<span class="badge badge-primary mb-8 animate-fade-in px-4 py-1.5 font-black tracking-[0.2em] text-[10px]">New Frontier: Titan IX</span>
|
|
148
|
+
<h1 class="text-6xl font-black mb-10 leading-none uppercase italic tracking-tighter text-center">
|
|
149
|
+
Travel Beyond <br>
|
|
150
|
+
<span class="text-gradient-starlight">The Horizon</span>
|
|
151
|
+
</h1>
|
|
152
|
+
<p class="text-xl text-slate-400 max-w-4xl mx-auto mb-16 font-medium leading-relaxed">
|
|
153
|
+
Experience the ethereal beauty of the outer rim with our exclusive Starlight-class lunar retreats and nebula cruises.
|
|
154
|
+
</p>
|
|
134
155
|
|
|
135
156
|
<!-- Search Bar -->
|
|
136
|
-
<div class="glass p-8 rounded-[2.5rem] max-w-5xl mx-auto flex flex-col md:flex-row gap-12 items-stretch shadow-2xl">
|
|
137
|
-
<div class="flex-1 flex flex-col items-start px-6">
|
|
157
|
+
<div class="glass p-6 md:p-8 rounded-[2rem] md:rounded-[2.5rem] max-w-5xl mx-auto flex flex-col md:flex-row gap-6 md:gap-12 items-stretch shadow-2xl">
|
|
158
|
+
<div class="flex-1 flex flex-col items-start px-4 md:px-6">
|
|
138
159
|
<label class="text-[10px] text-starlight-blue mb-3 font-black uppercase tracking-[0.3em]">Destination</label>
|
|
139
|
-
<input type="text" class="w-full bg-transparent border-none text-white focus:outline-none text-2xl font-black p-0 placeholder:text-
|
|
160
|
+
<input type="text" class="w-full bg-transparent border-none text-white focus:outline-none text-xl md:text-2xl font-black p-0 placeholder:text-white_10" placeholder="Where to?">
|
|
140
161
|
</div>
|
|
141
|
-
<div class="border-l border-
|
|
142
|
-
<div class="flex-1 flex flex-col items-start px-6">
|
|
162
|
+
<div class="border-l border-white_10 hidden md:block"></div>
|
|
163
|
+
<div class="flex-1 flex flex-col items-start px-4 md:px-6">
|
|
143
164
|
<label class="text-[10px] text-starlight-blue mb-3 font-black uppercase tracking-[0.3em]">Departure</label>
|
|
144
|
-
<input type="date" class="w-full bg-transparent border-none text-white focus:outline-none text-2xl font-black p-0" id="departure-date">
|
|
165
|
+
<input type="date" class="w-full bg-transparent border-none text-white focus:outline-none text-xl md:text-2xl font-black p-0" id="departure-date">
|
|
145
166
|
</div>
|
|
146
|
-
<button class="btn-starlight px-16 py-6 h-auto md:h-full text-lg font-black uppercase tracking-widest shadow-2xl hover:glow-blue">Search</button>
|
|
167
|
+
<button class="btn-starlight px-8 md:px-16 py-4 md:py-6 h-auto md:h-full text-base md:text-lg font-black uppercase tracking-widest shadow-2xl hover:glow-blue">Search</button>
|
|
147
168
|
</div>
|
|
169
|
+
</div>
|
|
148
170
|
</header>
|
|
149
171
|
|
|
150
172
|
<!-- Featured Destinations -->
|
|
@@ -155,22 +177,22 @@
|
|
|
155
177
|
<h2 class="text-5xl font-black mb-3 uppercase italic tracking-tighter">Popular Sectors</h2>
|
|
156
178
|
<p class="text-slate-400 text-lg font-medium">Curated experiences from our master explorers.</p>
|
|
157
179
|
</div>
|
|
158
|
-
<a href="#" class="text-starlight-blue text-sm font-black uppercase tracking-widest hover:underline pb-2 border-b border-starlight-
|
|
180
|
+
<a href="#" class="text-starlight-blue text-sm font-black uppercase tracking-widest hover:underline pb-2 border-b border-starlight-blue_30">View All Clusters</a>
|
|
159
181
|
</div>
|
|
160
182
|
|
|
161
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-16">
|
|
183
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-16">
|
|
162
184
|
<!-- Card 1 -->
|
|
163
|
-
<div class="starlight-card group overflow-hidden p-0
|
|
185
|
+
<div class="starlight-card group overflow-hidden p-0 hover:border-starlight-blue_30 transition-all duration-500">
|
|
164
186
|
<div class="h-80 bg-gray-800 relative overflow-hidden">
|
|
165
187
|
<img src="https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?auto=format&fit=crop&w=800&q=80" alt="Saturn" class="w-full h-full object-cover group-hover:scale-110 transition-transform duration-700">
|
|
166
|
-
<div class="absolute inset-0 bg-gradient-to-t from-
|
|
188
|
+
<div class="absolute inset-0 bg-gradient-to-t from-black_90 via-black_20 to-transparent z-10"></div>
|
|
167
189
|
<div class="absolute bottom-8 left-8 z-20">
|
|
168
|
-
<span class="badge badge-primary bg-blue-
|
|
190
|
+
<span class="badge badge-primary bg-blue-600_20 text-white border-none px-3 py-1 text-[9px] font-black uppercase tracking-widest mb-3 shadow-lg backdrop-blur-md">Orbit Sector</span>
|
|
169
191
|
<h3 class="text-3xl font-black text-white uppercase italic tracking-tighter">The Cassini</h3>
|
|
170
192
|
</div>
|
|
171
193
|
</div>
|
|
172
|
-
<div class="p-10">
|
|
173
|
-
<p class="text-slate-400 font-medium leading-loose mb-10">Experience the majestic silence of the rings from our gold-plated observation deck. Artificial gravity enabled.</p>
|
|
194
|
+
<div class="p-10 flex flex-col flex-1">
|
|
195
|
+
<p class="text-slate-400 font-medium leading-loose mb-10 flex-1">Experience the majestic silence of the rings from our gold-plated observation deck. Artificial gravity enabled.</p>
|
|
174
196
|
<div class="flex justify-between items-center">
|
|
175
197
|
<span class="text-starlight-blue font-black text-xl italic tracking-tighter">4.2 ETH <span class="text-[10px] text-slate-500 uppercase not-italic tracking-widest ml-2">/ night</span></span>
|
|
176
198
|
<button class="btn btn-outline px-8 h-12 text-[10px] font-black uppercase tracking-widest hover:bg-white hover:text-black transition-all">Details</button>
|
|
@@ -179,17 +201,17 @@
|
|
|
179
201
|
</div>
|
|
180
202
|
|
|
181
203
|
<!-- Card 2 -->
|
|
182
|
-
<div class="starlight-card group overflow-hidden p-0
|
|
204
|
+
<div class="starlight-card group overflow-hidden p-0 hover:border-starlight-blue_30 transition-all duration-500">
|
|
183
205
|
<div class="h-80 bg-gray-700 relative overflow-hidden">
|
|
184
206
|
<img src="https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=800&q=80" alt="Alpha Centauri" class="w-full h-full object-cover group-hover:scale-110 transition-transform duration-700">
|
|
185
|
-
<div class="absolute inset-0 bg-gradient-to-t from-
|
|
207
|
+
<div class="absolute inset-0 bg-gradient-to-t from-black_90 via-black_20 to-transparent z-10"></div>
|
|
186
208
|
<div class="absolute bottom-8 left-8 z-20">
|
|
187
|
-
<span class="badge badge-primary bg-emerald-
|
|
209
|
+
<span class="badge badge-primary bg-emerald-600_20 text-white border-none px-3 py-1 text-[9px] font-black uppercase tracking-widest mb-3 shadow-lg backdrop-blur-md">Deep Space</span>
|
|
188
210
|
<h3 class="text-3xl font-black text-white uppercase italic tracking-tighter">Biolume Forest</h3>
|
|
189
211
|
</div>
|
|
190
212
|
</div>
|
|
191
|
-
<div class="p-10">
|
|
192
|
-
<p class="text-slate-400 font-medium leading-loose mb-10">Wander through the glowing flora of Proxima b in our climate-controlled bio-domes. Protective suits provided.</p>
|
|
213
|
+
<div class="p-10 flex flex-col flex-1">
|
|
214
|
+
<p class="text-slate-400 font-medium leading-loose mb-10 flex-1">Wander through the glowing flora of Proxima b in our climate-controlled bio-domes. Protective suits provided.</p>
|
|
193
215
|
<div class="flex justify-between items-center">
|
|
194
216
|
<span class="text-starlight-blue font-black text-xl italic tracking-tighter">12.5 ETH <span class="text-[10px] text-slate-500 uppercase not-italic tracking-widest ml-2">/ stay</span></span>
|
|
195
217
|
<button class="btn btn-outline px-8 h-12 text-[10px] font-black uppercase tracking-widest hover:bg-white hover:text-black transition-all">Details</button>
|
|
@@ -198,17 +220,17 @@
|
|
|
198
220
|
</div>
|
|
199
221
|
|
|
200
222
|
<!-- Card 3 -->
|
|
201
|
-
<div class="starlight-card group overflow-hidden p-0
|
|
223
|
+
<div class="starlight-card group overflow-hidden p-0 hover:border-starlight-blue_30 transition-all duration-500">
|
|
202
224
|
<div class="h-80 bg-gray-900 relative overflow-hidden">
|
|
203
225
|
<img src="https://images.unsplash.com/photo-1614728894747-a83421e2b9c9?auto=format&fit=crop&w=800&q=80" alt="Mars" class="w-full h-full object-cover group-hover:scale-110 transition-transform duration-700">
|
|
204
|
-
<div class="absolute inset-0 bg-gradient-to-t from-
|
|
226
|
+
<div class="absolute inset-0 bg-gradient-to-t from-black_90 via-black_20 to-transparent z-10"></div>
|
|
205
227
|
<div class="absolute bottom-8 left-8 z-20">
|
|
206
|
-
<span class="badge badge-primary bg-orange-
|
|
228
|
+
<span class="badge badge-primary bg-orange-600_20 text-white border-none px-3 py-1 text-[9px] font-black uppercase tracking-widest mb-3 shadow-lg backdrop-blur-md">Red Planet</span>
|
|
207
229
|
<h3 class="text-3xl font-black text-white uppercase italic tracking-tighter">Valles Marineris</h3>
|
|
208
230
|
</div>
|
|
209
231
|
</div>
|
|
210
|
-
<div class="p-10">
|
|
211
|
-
<p class="text-slate-400 font-medium leading-loose mb-10">Grand Canyon of Mars. Helicopter tours and dust-gliding available daily for elite members.</p>
|
|
232
|
+
<div class="p-10 flex flex-col flex-1">
|
|
233
|
+
<p class="text-slate-400 font-medium leading-loose mb-10 flex-1">Grand Canyon of Mars. Helicopter tours and dust-gliding available daily for elite members.</p>
|
|
212
234
|
<div class="flex justify-between items-center">
|
|
213
235
|
<span class="text-starlight-blue font-black text-xl italic tracking-tighter">1.8 ETH <span class="text-[10px] text-slate-500 uppercase not-italic tracking-widest ml-2">/ tour</span></span>
|
|
214
236
|
<button class="btn btn-outline px-8 h-12 text-[10px] font-black uppercase tracking-widest hover:bg-white hover:text-black transition-all">Details</button>
|
|
@@ -220,19 +242,19 @@
|
|
|
220
242
|
|
|
221
243
|
<!-- Newsletter -->
|
|
222
244
|
<section class="container mx-auto px-6 py-16">
|
|
223
|
-
<div class="glass p-16 rounded-[3rem] text-center glow-blue
|
|
224
|
-
<div class="absolute inset-0 bg-gradient-to-br from-starlight-
|
|
245
|
+
<div class="glass p-16 rounded-[3rem] text-center glow-blue relative overflow-hidden">
|
|
246
|
+
<div class="absolute inset-0 bg-gradient-to-br from-starlight-blue_5 to-transparent"></div>
|
|
225
247
|
<h2 class="text-5xl font-black mb-6 uppercase italic tracking-tighter relative z-10">Join the Voyager Network</h2>
|
|
226
248
|
<p class="text-slate-400 text-xl font-medium mb-12 max-w-2xl mx-auto leading-relaxed relative z-10">Get early access to maiden voyages and exclusive stellar discounts directly in your comms link.</p>
|
|
227
249
|
<div class="flex flex-col md:flex-row gap-6 max-w-xl mx-auto relative z-10 items-center">
|
|
228
|
-
<input type="email" class="input-starlight h-16 flex-1 bg-
|
|
229
|
-
<button class="btn-starlight px-12 h-16 text-[11px] font-black uppercase tracking-widest shadow-2xl shadow-starlight-
|
|
250
|
+
<input type="email" class="input-starlight h-16 flex-1 bg-white_5 border-white_10 text-white px-8 placeholder:text-white_20" placeholder="explorer@nebula.io">
|
|
251
|
+
<button class="btn-starlight px-12 h-16 text-[11px] font-black uppercase tracking-widest shadow-2xl shadow-starlight-blue_20">Subscribe Link</button>
|
|
230
252
|
</div>
|
|
231
253
|
</div>
|
|
232
254
|
</section>
|
|
233
255
|
|
|
234
256
|
<!-- Footer -->
|
|
235
|
-
<footer class="
|
|
257
|
+
<footer class="starlight-footer">
|
|
236
258
|
<div class="container mx-auto px-6 flex flex-col md:flex-row justify-between items-center gap-8">
|
|
237
259
|
<div class="text-xl font-bold text-gradient-starlight">NEBULA</div>
|
|
238
260
|
<div class="flex space-x-6 text-sm text-muted">
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div class="mt-8 grid grid-cols-1 lg:grid-cols-12 gap-4">
|
|
25
|
-
<div class="lg
|
|
26
|
-
<div class="lg
|
|
25
|
+
<div class="lg="col-span-8" bg-blue-500 p-4">lg="grid-cols-12" test (8/12)</div>
|
|
26
|
+
<div class="lg="col-span-4" bg-red-500 p-4">lg="grid-cols-12" test (4/12)</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
29
|
<div class="mt-8 flex gap-4">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<h2 class="text-xl font-semibold">Buttons</h2>
|
|
16
16
|
<div class="flex gap-4">
|
|
17
17
|
<button class="btn-primary">Primary Preset</button>
|
|
18
|
-
<button class="md
|
|
18
|
+
<button class="md="btn-primary"">Responsive Primary</button>
|
|
19
19
|
<button class="btn-secondary">Secondary Preset</button>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howssatoshi/quantumcss",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "Advanced utility-first CSS framework with JIT generation and modern components",
|
|
5
5
|
"main": "dist/quantum.min.css",
|
|
6
6
|
"bin": {
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@eslint/js": "^9.39.2",
|
|
52
|
+
"@playwright/test": "^1.58.2",
|
|
53
|
+
"@types/node": "^25.3.3",
|
|
52
54
|
"eslint": "^9.39.2",
|
|
53
55
|
"stylelint": "^17.1.1",
|
|
54
56
|
"stylelint-config-standard": "^40.0.0"
|
package/src/cli.js
CHANGED
|
@@ -1,26 +1,118 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const { generateCSS } = require('./generator');
|
|
3
|
+
const { defaultTheme, utilityMaps } = require('./defaults');
|
|
3
4
|
const fs = require('fs');
|
|
4
5
|
const path = require('path');
|
|
5
6
|
const chokidar = require('chokidar');
|
|
7
|
+
const pkg = require('../package.json');
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
const CONFIG_FILE = 'quantum.config.json';
|
|
10
|
+
|
|
11
|
+
function showHelp() {
|
|
12
|
+
console.log(`
|
|
13
|
+
QuantumCSS CLI v${pkg.version}
|
|
14
|
+
Usage:
|
|
15
|
+
quantumcss [command] [options]
|
|
16
|
+
|
|
17
|
+
Commands:
|
|
18
|
+
build [output] Build the JIT CSS (default command)
|
|
19
|
+
watch [output] Build and watch for changes
|
|
20
|
+
init Generate a default ${CONFIG_FILE}
|
|
21
|
+
scaffold <type> Generate a template (gaming, blog, travel, etc.)
|
|
22
|
+
manifest [output] Generate an AI-optimized design system catalog
|
|
23
|
+
|
|
24
|
+
Options:
|
|
25
|
+
-w, --watch Same as the 'watch' command
|
|
26
|
+
-v, --version Show version
|
|
27
|
+
-h, --help Show this help
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function manifest(outputPath) {
|
|
32
|
+
console.log('📖 Generating AI Design System Manifest...');
|
|
33
|
+
|
|
34
|
+
let userConfig = {};
|
|
35
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
36
|
+
try {
|
|
37
|
+
userConfig = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.warn('⚠️ Could not parse quantum.config.json, using defaults only.');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const manifestData = {
|
|
44
|
+
version: pkg.version,
|
|
45
|
+
theme: {
|
|
46
|
+
colors: { ...defaultTheme.colors, ...(userConfig.theme?.extend?.colors || {}) },
|
|
47
|
+
spacing: { ...defaultTheme.spacing, ...(userConfig.theme?.extend?.spacing || {}) },
|
|
48
|
+
fontSize: defaultTheme.fontSize,
|
|
49
|
+
shadows: defaultTheme.shadows,
|
|
50
|
+
maxWidth: defaultTheme.maxWidth
|
|
51
|
+
},
|
|
52
|
+
utilityMaps: Object.keys(utilityMaps),
|
|
53
|
+
componentPresets: {
|
|
54
|
+
...utilityMaps, // Default semantic presets are in utilityMaps
|
|
55
|
+
...(userConfig.componentPresets || {})
|
|
56
|
+
},
|
|
57
|
+
variants: ['sm', 'md', 'lg', 'xl', '2xl', 'dark', 'light', 'hover', 'focus', 'active', 'group-hover'],
|
|
58
|
+
instructions: "Always use ':' for variants (e.g., md:flex). Prefer 'Attribute Mode' for complex layouts using sm=\"...\" md=\"...\" attributes."
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const json = JSON.stringify(manifestData, null, 2);
|
|
62
|
+
if (outputPath) {
|
|
63
|
+
fs.writeFileSync(outputPath, json);
|
|
64
|
+
console.log(`✅ Manifest saved to ${outputPath}`);
|
|
65
|
+
} else {
|
|
66
|
+
console.log(json);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function init() {
|
|
71
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
72
|
+
console.warn(`⚠️ ${CONFIG_FILE} already exists. Skipping.`);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const defaultConfig = {
|
|
77
|
+
theme: {
|
|
78
|
+
extend: {
|
|
79
|
+
colors: {
|
|
80
|
+
primary: defaultTheme.colors.blue[500],
|
|
81
|
+
secondary: defaultTheme.colors.slate[600],
|
|
82
|
+
starlight: defaultTheme.colors.starlight.blue
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
content: ["./**/*.html"],
|
|
87
|
+
componentPresets: {
|
|
88
|
+
"btn-action": "btn-base theme-starlight px-8 py-3 focus-glow",
|
|
89
|
+
"card-premium": "card-base theme-glass-dark p-10 shadow-2xl"
|
|
90
|
+
},
|
|
91
|
+
darkMode: "media"
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(defaultConfig, null, 2));
|
|
95
|
+
console.log(`✅ Created ${CONFIG_FILE} with default settings.`);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function build(outputPath = 'dist/quantum.css') {
|
|
9
99
|
console.log('✨ Quantum CSS: Generating styles...');
|
|
10
100
|
try {
|
|
11
|
-
const css = generateCSS(
|
|
101
|
+
const css = generateCSS(CONFIG_FILE);
|
|
12
102
|
const outputDir = path.dirname(outputPath);
|
|
13
103
|
if (!fs.existsSync(outputDir)) {
|
|
14
104
|
fs.mkdirSync(outputDir, { recursive: true });
|
|
15
105
|
}
|
|
16
106
|
fs.writeFileSync(outputPath, css);
|
|
17
107
|
console.log(`✅ Success! Styles generated at ${outputPath}`);
|
|
108
|
+
return true;
|
|
18
109
|
} catch (err) {
|
|
19
110
|
console.error('❌ Error generating CSS:', err);
|
|
111
|
+
return false;
|
|
20
112
|
}
|
|
21
113
|
}
|
|
22
114
|
|
|
23
|
-
function scaffold(template, targetPath) {
|
|
115
|
+
function scaffold(template, targetPath = 'index.html') {
|
|
24
116
|
const templatesDir = path.resolve(__dirname, '../examples');
|
|
25
117
|
const templateMap = {
|
|
26
118
|
gaming: 'gaming-template.html',
|
|
@@ -44,9 +136,12 @@ function scaffold(template, targetPath) {
|
|
|
44
136
|
process.exit(1);
|
|
45
137
|
}
|
|
46
138
|
|
|
139
|
+
// Ensure config exists for the new user
|
|
140
|
+
if (!fs.existsSync(CONFIG_FILE)) {
|
|
141
|
+
init();
|
|
142
|
+
}
|
|
143
|
+
|
|
47
144
|
let content = fs.readFileSync(srcPath, 'utf8');
|
|
48
|
-
|
|
49
|
-
// Adjust stylesheet path in template
|
|
50
145
|
content = content.replace(/href="(\.\.\/)*dist\/quantum(\.min)?\.css"/, 'href="dist/quantum.css"');
|
|
51
146
|
|
|
52
147
|
const fullTargetPath = path.resolve(targetPath);
|
|
@@ -62,34 +157,72 @@ function scaffold(template, targetPath) {
|
|
|
62
157
|
|
|
63
158
|
function main() {
|
|
64
159
|
const args = process.argv.slice(2);
|
|
160
|
+
const command = args[0];
|
|
65
161
|
|
|
66
|
-
if (args
|
|
67
|
-
|
|
68
|
-
const targetPath = args[2] || 'index.html';
|
|
69
|
-
if (!template) {
|
|
70
|
-
console.error('❌ Error: Please specify a template name (e.g., gaming, blog, travel)');
|
|
71
|
-
process.exit(1);
|
|
72
|
-
}
|
|
73
|
-
scaffold(template, targetPath);
|
|
162
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
163
|
+
showHelp();
|
|
74
164
|
return;
|
|
75
165
|
}
|
|
76
166
|
|
|
77
|
-
|
|
78
|
-
|
|
167
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
168
|
+
console.log(`v${pkg.version}`);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
79
171
|
|
|
80
|
-
|
|
172
|
+
switch (command) {
|
|
173
|
+
case 'init':
|
|
174
|
+
init();
|
|
175
|
+
break;
|
|
176
|
+
|
|
177
|
+
case 'manifest':
|
|
178
|
+
manifest(args[1]);
|
|
179
|
+
break;
|
|
180
|
+
|
|
181
|
+
case 'scaffold':
|
|
182
|
+
if (!args[1]) {
|
|
183
|
+
console.error('❌ Error: Please specify a template name (e.g., gaming, blog, travel)');
|
|
184
|
+
process.exit(1);
|
|
185
|
+
}
|
|
186
|
+
scaffold(args[1], args[2]);
|
|
187
|
+
break;
|
|
188
|
+
|
|
189
|
+
case 'watch': {
|
|
190
|
+
const out = args[1] || 'dist/quantum.css';
|
|
191
|
+
build(out);
|
|
192
|
+
console.log(`👀 Watching for changes...`);
|
|
193
|
+
|
|
194
|
+
// Load content globs from config if possible
|
|
195
|
+
let watchPaths = ['./**/*.html', CONFIG_FILE];
|
|
196
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
197
|
+
try {
|
|
198
|
+
const config = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
|
|
199
|
+
if (config.content) watchPaths = [...config.content, CONFIG_FILE];
|
|
200
|
+
} catch (e) {}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const watcher = chokidar.watch(watchPaths, { ignored: '**/node_modules/**', persistent: true });
|
|
204
|
+
watcher.on('change', (p) => {
|
|
205
|
+
console.log(`File ${p} changed, rebuilding...`);
|
|
206
|
+
build(out);
|
|
207
|
+
});
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
81
210
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
ignored: '**/.*',
|
|
86
|
-
persistent: true
|
|
87
|
-
});
|
|
211
|
+
case 'build':
|
|
212
|
+
build(args[1]);
|
|
213
|
+
break;
|
|
88
214
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
215
|
+
default:
|
|
216
|
+
if (args.includes('--watch') || args.includes('-w')) {
|
|
217
|
+
// Handle shorthand watch
|
|
218
|
+
const out = args.find(a => !a.startsWith('-')) || 'dist/quantum.css';
|
|
219
|
+
build(out);
|
|
220
|
+
console.log(`👀 Watching for changes...`);
|
|
221
|
+
chokidar.watch(['./**/*.html', CONFIG_FILE], { ignored: '**/node_modules/**' }).on('change', () => build(out));
|
|
222
|
+
} else {
|
|
223
|
+
// Default to build
|
|
224
|
+
build(command);
|
|
225
|
+
}
|
|
93
226
|
}
|
|
94
227
|
}
|
|
95
228
|
|
package/src/defaults.js
CHANGED
|
@@ -88,7 +88,7 @@ const utilityMaps = {
|
|
|
88
88
|
'top-1/2': { property: 'top', value: '50%' },
|
|
89
89
|
'left-4': { property: 'left', value: '1rem' },
|
|
90
90
|
'pl-12': { property: 'padding-left', value: '3rem' },
|
|
91
|
-
'-translate-y-
|
|
91
|
+
'-translate-y-1_2': { property: 'transform', value: 'translateY(-50%)' },
|
|
92
92
|
'pointer-events-none': { property: 'pointer-events', value: 'none' },
|
|
93
93
|
'w-5': { property: 'width', value: '1.25rem' },
|
|
94
94
|
'h-5': { property: 'height', value: '1.25rem' },
|
|
@@ -109,20 +109,20 @@ const utilityMaps = {
|
|
|
109
109
|
'overlay-bottom-left': { property: ['position', 'bottom', 'left'], value: ['absolute', '0', '0'] },
|
|
110
110
|
'overlay-bottom-right': { property: ['position', 'bottom', 'right'], value: ['absolute', '0', '0'] },
|
|
111
111
|
'nav-base': {
|
|
112
|
-
property: ['display', 'flex-direction', 'align-items', 'width', 'position', 'top', 'z-index'],
|
|
113
|
-
value: ['flex', 'row', 'center', '100%', 'sticky', '0', '1000']
|
|
112
|
+
property: ['display', 'flex-direction', 'align-items', 'width', 'min-width', 'position', 'top', 'left', 'right', 'z-index'],
|
|
113
|
+
value: ['flex', 'row', 'center', '100%', '100%', 'sticky', '0', '0', '0', '1000']
|
|
114
114
|
},
|
|
115
115
|
'card-base': {
|
|
116
116
|
property: ['display', 'flex-direction', 'align-items', 'padding', 'overflow', 'border-radius', 'transition', 'position'],
|
|
117
117
|
value: ['flex', 'column', 'stretch', 'var(--q-space-10)', 'hidden', 'var(--q-radius-lg)', 'all 0.3s ease', 'relative']
|
|
118
118
|
},
|
|
119
119
|
'btn-base': {
|
|
120
|
-
property: ['display', 'align-items', 'justify-content', 'cursor', 'transition', 'font-weight', 'border-radius', 'border'],
|
|
121
|
-
value: ['inline-flex', 'center', 'center', 'pointer', 'all 0.2s ease', '600', 'var(--q-radius-md)', 'none']
|
|
120
|
+
property: ['display', 'align-items', 'justify-content', 'cursor', 'transition', 'font-weight', 'border-radius', 'border', 'height'],
|
|
121
|
+
value: ['inline-flex', 'center', 'center', 'pointer', 'all 0.2s ease', '600', 'var(--q-radius-md)', 'none', '3rem']
|
|
122
122
|
},
|
|
123
123
|
'input-base': {
|
|
124
|
-
property: ['display', 'width', 'appearance', 'transition', 'border-radius', 'border', 'line-height'],
|
|
125
|
-
value: ['block', '100%', 'none', 'all 0.2s ease', 'var(--q-radius-md)', 'none', '
|
|
124
|
+
property: ['display', 'width', 'appearance', 'transition', 'border-radius', 'border', 'line-height', 'height'],
|
|
125
|
+
value: ['block', '100%', 'none', 'all 0.2s ease', 'var(--q-radius-md)', 'none', '1.2', '3rem']
|
|
126
126
|
},
|
|
127
127
|
'dialog-base': {
|
|
128
128
|
property: ['display', 'flex-direction', 'align-items', 'padding', 'overflow-y', 'border-radius', 'position'],
|
|
@@ -145,8 +145,8 @@ const utilityMaps = {
|
|
|
145
145
|
value: ['absolute', '1.5rem', '1.5rem', '2rem', '2rem', '50%', 'flex', 'center', 'center', 'pointer']
|
|
146
146
|
},
|
|
147
147
|
'glass': {
|
|
148
|
-
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter', 'border-width', 'border-color'],
|
|
149
|
-
value: ['rgba(255, 255, 255, 0.03)', 'blur(16px)', 'blur(16px)', '1px', 'rgba(255, 255, 255, 0.1)']
|
|
148
|
+
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter', 'border-width', 'border-style', 'border-color'],
|
|
149
|
+
value: ['rgba(255, 255, 255, 0.03)', 'blur(16px)', 'blur(16px)', '1px', 'solid', 'rgba(255, 255, 255, 0.1)']
|
|
150
150
|
},
|
|
151
151
|
'bg-starlight': { property: 'background', value: 'linear-gradient(135deg, var(--q-color-starlight-peach) 0%, var(--q-color-starlight-blue) 100%)' },
|
|
152
152
|
'text-gradient-starlight': {
|
|
@@ -158,33 +158,50 @@ const utilityMaps = {
|
|
|
158
158
|
value: ['linear-gradient(135deg, var(--q-color-starlight-peach) 0%, var(--q-color-starlight-blue) 100%)', '#000', 'transparent', '0 0 30px rgba(0, 212, 255, 0.2)']
|
|
159
159
|
},
|
|
160
160
|
'theme-glass': {
|
|
161
|
-
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter', 'border-color', 'border-width'],
|
|
162
|
-
value: ['rgba(255, 255, 255, 0.05)', 'blur(16px)', 'blur(16px)', 'rgba(255, 255, 255, 0.1)', '1px']
|
|
161
|
+
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter', 'border-color', 'border-width', 'border-style'],
|
|
162
|
+
value: ['rgba(255, 255, 255, 0.05)', 'blur(16px)', 'blur(16px)', 'rgba(255, 255, 255, 0.1)', '1px', 'solid']
|
|
163
163
|
},
|
|
164
164
|
'theme-glass-dark': {
|
|
165
|
-
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter', 'border-color', 'border-width'],
|
|
166
|
-
value: ['rgba(255, 255, 255, 0.05)', 'blur(16px)', 'blur(16px)', 'rgba(255, 255, 255, 0.
|
|
165
|
+
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter', 'border-color', 'border-width', 'border-style'],
|
|
166
|
+
value: ['rgba(255, 255, 255, 0.05)', 'blur(16px)', 'blur(16px)', 'rgba(255, 255, 255, 0.03)', '1px', 'solid']
|
|
167
|
+
},
|
|
168
|
+
'starlight-dialog-bg': {
|
|
169
|
+
property: ['background-color', 'backdrop-filter', '-webkit-backdrop-filter'],
|
|
170
|
+
value: ['rgba(8, 8, 26, 0.4) !important', 'blur(24px) !important', 'blur(24px) !important']
|
|
167
171
|
},
|
|
168
172
|
'glow-blue': { property: 'box-shadow', value: '0 0 30px rgba(0, 212, 255, 0.25)' },
|
|
169
173
|
'glow-starlight': { property: 'box-shadow', value: '0 0 30px rgba(0, 212, 255, 0.25)' },
|
|
170
174
|
'glow-peach': { property: 'box-shadow', value: '0 0 30px rgba(255, 179, 138, 0.25)' },
|
|
171
175
|
'glow-orange': { property: 'box-shadow', value: '0 0 30px rgba(255, 126, 95, 0.25)' },
|
|
172
|
-
'
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
'
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
'focus-glow': {
|
|
177
|
+
property: ['outline', 'box-shadow'],
|
|
178
|
+
value: ['none !important', '0 0 0 4px rgba(0, 212, 255, 0.4), 0 0 35px rgba(0, 212, 255, 0.7) !important'],
|
|
179
|
+
variant: 'focus'
|
|
180
|
+
},
|
|
181
|
+
'btn-starlight': 'btn-base theme-starlight px-6',
|
|
182
|
+
'btn-secondary': 'btn-base theme-glass-dark px-6 border-white_15',
|
|
183
|
+
'input-starlight': 'input-base theme-glass-dark px-4 border-white_15',
|
|
184
|
+
'textarea-starlight': 'input-base theme-glass-dark p-4 min-h-32 border-white_15',
|
|
185
|
+
'checkbox-starlight': 'btn-base theme-glass-dark w-5 h-5 border-white_20',
|
|
186
|
+
'search-container': 'relative block w-full h-12',
|
|
187
|
+
'search-input': 'pl-12 w-full h-12',
|
|
188
|
+
'search-icon': 'absolute left-4 top-1_2 -translate-y-1_2 pointer-events-none z-10 w-5 h-5',
|
|
180
189
|
'nav-glass': 'nav-base theme-glass-dark',
|
|
181
190
|
'starlight-card': 'card-base theme-glass-dark',
|
|
191
|
+
'starlight-card-interactive': 'card-base theme-glass-dark hover:border-white_20 hover:-translate-y-1 transition-all duration-300',
|
|
182
192
|
'starlight-nav': 'nav-base theme-glass-dark w-full',
|
|
193
|
+
'starlight-navbar': 'nav-base theme-glass-dark w-full sticky top-0 z-50 border-b border-white_10',
|
|
194
|
+
'starlight-hero': 'container mx-auto px-6 py-16 md:py-24 text-center relative overflow-hidden',
|
|
195
|
+
'starlight-footer': 'border-t border-white_10 py-12 mt-20 bg-black_20 backdrop-blur-md',
|
|
196
|
+
'starlight-sidebar-nav': 'flex flex-col h-full p-6 bg-black_40 backdrop-blur-xl border-r border-white_10',
|
|
197
|
+
'nav-reverse': { property: 'flex-direction', value: 'row-reverse' },
|
|
198
|
+
'nav-center': { property: 'display', value: 'grid' },
|
|
199
|
+
'hamburger-left': { property: 'order', value: '-1' },
|
|
183
200
|
'starlight-search': 'search-container theme-glass-dark rounded-xl',
|
|
184
201
|
'starlight-dashboard': 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8',
|
|
185
202
|
'starlight-gallery': 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4',
|
|
186
|
-
'starlight-form': '
|
|
187
|
-
'starlight-dialog': 'dialog-base modal-fixed theme-glass-dark ani-scale-in'
|
|
203
|
+
'starlight-form': 'card-base theme-glass-dark grid grid-cols-1 md:grid-cols-2 gap-8 items-start',
|
|
204
|
+
'starlight-dialog': 'dialog-base modal-fixed theme-glass-dark starlight-dialog-bg ani-scale-in'
|
|
188
205
|
};
|
|
189
206
|
|
|
190
207
|
module.exports = { defaultTheme, utilityMaps };
|