@howssatoshi/quantumcss 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 Eric Yang
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,485 @@
1
+ # Quantum CSS - Next-Generation Utility Framework
2
+
3
+ ![Quantum CSS](https://img.shields.io/badge/Quantum%20CSS-v1.0.0-blue)
4
+ ![License](https://img.shields.io/badge/license-MIT-green)
5
+ ![Bundle Size](https://img.shields.io/badge/bundle%20size-6.2KB-brightgreen)
6
+
7
+ A modern, performance-optimized utility-first CSS framework with semantic naming, component-aware utilities, and advanced CSS features.
8
+
9
+ ## 🚀 Features
10
+
11
+ ### Modern CSS Capabilities
12
+ - **Container Queries** - Query container elements instead of viewport
13
+ - **Logical Properties** - Use `margin-inline`, `padding-block`, etc.
14
+ - **CSS Custom Properties** - Design tokens and CSS variables
15
+ - **Modern Selectors** - `:where()`, `:is()`, and CSS nesting
16
+
17
+ ### Enhanced Utilities
18
+ - **500+ Utility Classes** - Comprehensive coverage
19
+ - **Starlight Aesthetics** - Ethereal design system with glassmorphism, atmospheric glows, and vibrant gradients
20
+ - **Component Utilities** - Pre-built button, card, form components
21
+ - **State Variants** - Hover, focus, active, disabled states
22
+ - **Dark Mode** - Automatic and manual dark mode support
23
+ - **Responsive Variants** - Mobile-first with container queries
24
+
25
+ ### Developer Experience
26
+ - **Zero Configuration** - Works out of the box
27
+ - **TypeScript Support** - Full type definitions
28
+ - **Build Tools** - Custom build system with analysis
29
+ - **Small Bundle Size** - 15KB gzipped, optimized for performance
30
+
31
+ ## 📦 Installation
32
+
33
+ ```bash
34
+ # npm
35
+ npm install quantumcss
36
+
37
+ # yarn
38
+ yarn add quantumcss
39
+
40
+ # pnpm
41
+ pnpm add quantumcss
42
+ ```
43
+
44
+ ## 🎯 Quick Start
45
+
46
+ ### HTML Usage
47
+ ```html
48
+ <!DOCTYPE html>
49
+ <html>
50
+ <head>
51
+ <link rel="stylesheet" href="quantum.css">
52
+ <link rel="stylesheet" href="quantum-responsive.css">
53
+ <link rel="stylesheet" href="quantum-components.css">
54
+ <link rel="stylesheet" href="starlight-ui.css">
55
+ </head>
56
+ <body>
57
+ <div class="container mx-auto p-6">
58
+ <h1 class="text-3xl font-bold text-primary mb-4">
59
+ Hello QuantumCSS!
60
+ </h1>
61
+ <button class="btn btn-primary hover:scale-105 transition-all">
62
+ Get Started
63
+ </button>
64
+ </div>
65
+ </body>
66
+ </html>
67
+ ```
68
+
69
+ ### CSS Import
70
+ ```css
71
+ @import 'quantumcss/quantum.css';
72
+ @import 'quantumcss/quantum-responsive.css';
73
+ @import 'quantumcss/quantum-components.css';
74
+ @import 'quantumcss/starlight-ui.css';
75
+ ```
76
+
77
+ ## 🎨 Utility Classes
78
+
79
+ ### Layout
80
+ ```html
81
+ <div class="container mx-auto px-4">
82
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
83
+ <div class="card">Content</div>
84
+ </div>
85
+ </div>
86
+ ```
87
+
88
+ ### Typography
89
+ ```html
90
+ <h1 class="text-4xl font-bold text-primary">Heading</h1>
91
+ <p class="text-base text-neutral leading-relaxed">Paragraph text</p>
92
+ ```
93
+
94
+ ### Colors
95
+ ```html
96
+ <div class="bg-primary text-white p-4 rounded-lg">
97
+ <div class="text-secondary">Secondary text</div>
98
+ </div>
99
+ ```
100
+
101
+ ### Spacing
102
+ ```html
103
+ <div class="m-4 p-6 mb-8">
104
+ <div class="space-y-4">
105
+ <div class="py-2">Item 1</div>
106
+ <div class="py-2">Item 2</div>
107
+ </div>
108
+ </div>
109
+ ```
110
+
111
+ ## 🧩 Component Utilities
112
+
113
+ ### Buttons
114
+ ```html
115
+ <button class="btn btn-primary">Primary</button>
116
+ <button class="btn btn-secondary btn-lg">Large</button>
117
+ <button class="btn btn-outline">Outline</button>
118
+ <button class="btn btn-ghost">Ghost</button>
119
+ ```
120
+
121
+ ### Forms
122
+ ```html
123
+ <input type="text" class="input" placeholder="Enter text">
124
+ <input type="email" class="input input-error" placeholder="Error state">
125
+ <select class="input">
126
+ <option>Choose option</option>
127
+ </select>
128
+ ```
129
+
130
+ ### Cards
131
+ ```html
132
+ <div class="card">
133
+ <div class="card-header">
134
+ <h3 class="text-xl font-semibold">Card Title</h3>
135
+ </div>
136
+ <div class="card-body">
137
+ <p class="text-neutral">Card content goes here</p>
138
+ </div>
139
+ <div class="card-footer">
140
+ <button class="btn btn-primary btn-sm">Action</button>
141
+ </div>
142
+ </div>
143
+ ```
144
+
145
+ ### Alerts
146
+ ```html
147
+ <div class="alert alert-success">Success message</div>
148
+ <div class="alert alert-warning">Warning message</div>
149
+ <div class="alert alert-error">Error message</div>
150
+ <div class="alert alert-info">Info message</div>
151
+ ```
152
+
153
+ ### Badges
154
+ ```html
155
+ <span class="badge badge-primary">Primary</span>
156
+ <span class="badge badge-success">Success</span>
157
+ <span class="badge badge-warning">Warning</span>
158
+ <span class="badge badge-error">Error</span>
159
+ ```
160
+
161
+ ## ✨ Starlight UI
162
+
163
+ The Starlight theme provides a futuristic, ethereal design system inspired by modern AI interfaces and space aesthetics.
164
+
165
+ ### Key Features
166
+ - **Glassmorphism**: Hardware-accelerated blur effects for translucent interfaces (`.glass`).
167
+ - **Atmospheric Glows**: Soft, colored shadows that simulate light sources (`.glow-blue`, `.glow-peach`).
168
+ - **Vibrant Gradients**: Carefully crafted color transitions (`.bg-starlight`, `.text-gradient-starlight`).
169
+ - **Premium Components**: Enhanced variants for modern interfaces (`.btn-starlight`, `.input-starlight`, `.starlight-card`).
170
+
171
+ ### Example Usage
172
+ ```html
173
+ <div class="glass p-8 rounded-2xl glow-blue">
174
+ <h2 class="text-starlight font-bold">Starlight Interface</h2>
175
+ <p class="text-muted">Experience the future of styling.</p>
176
+ <button class="btn-starlight">
177
+ Launch
178
+ </button>
179
+ </div>
180
+ ```
181
+
182
+ ## 📱 Responsive Design
183
+
184
+ ### Breakpoint Variants
185
+ ```html
186
+ <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
187
+ <!-- Responsive grid -->
188
+ </div>
189
+ ```
190
+
191
+ ### Container Queries (Advanced)
192
+ ```html
193
+ <div class="container" style="container-type: inline-size;">
194
+ <div class="container:grid container:grid-cols-2 container:p-6">
195
+ <!-- Container query responsive -->
196
+ </div>
197
+ </div>
198
+ ```
199
+
200
+ ### Dark Mode
201
+ ```html
202
+ <div class="bg-white dark:bg-gray-900 text-black dark:text-white">
203
+ <!-- Automatic dark mode support -->
204
+ </div>
205
+ ```
206
+
207
+ ## 🎯 State Variants
208
+
209
+ ### Hover Effects
210
+ ```html
211
+ <button class="btn btn-primary hover:bg-primary-600 hover:scale-105">
212
+ Hover me
213
+ </button>
214
+ <div class="card hover:shadow-lg hover:scale-105 transition-all">
215
+ <!-- Interactive card -->
216
+ </div>
217
+ ```
218
+
219
+ ### Focus States
220
+ ```html
221
+ <input class="input focus:ring-2 focus:ring-primary focus:border-primary">
222
+ <button class="btn focus:outline-none focus:ring-2 focus:ring-primary">
223
+ Accessible button
224
+ </button>
225
+ ```
226
+
227
+ ### Active States
228
+ ```html
229
+ <button class="btn active:scale-95 active:bg-primary-700">
230
+ Press me
231
+ </button>
232
+ ```
233
+
234
+ ### Disabled States
235
+ ```html
236
+ <button class="btn disabled:opacity-50 disabled:cursor-not-allowed" disabled>
237
+ Disabled
238
+ </button>
239
+ ```
240
+
241
+ ## ⚙️ Configuration
242
+
243
+ ### Basic Configuration
244
+ Create `quantum.config.json`:
245
+ ```json
246
+ {
247
+ "theme": {
248
+ "extend": {
249
+ "colors": {
250
+ "brand": "#3b82f6",
251
+ "accent": "#10b981"
252
+ },
253
+ "fontFamily": {
254
+ "display": ["Inter", "system-ui", "sans-serif"]
255
+ },
256
+ "spacing": {
257
+ "18": "4.5rem",
258
+ "88": "22rem"
259
+ }
260
+ }
261
+ },
262
+ "darkMode": "media"
263
+ }
264
+ ```
265
+
266
+ ### Build Configuration
267
+ ```json
268
+ {
269
+ "content": [
270
+ "./src/**/*.{html,js,ts,jsx,tsx}"
271
+ ],
272
+ "presets": [
273
+ "modern-css"
274
+ ],
275
+ "plugins": [
276
+ "container-queries",
277
+ "component-utilities"
278
+ ]
279
+ }
280
+ ```
281
+
282
+ ## 🛠️ Build Tools
283
+
284
+ ### Development
285
+ ```bash
286
+ # Watch for changes and rebuild
287
+ npm run watch
288
+
289
+ # Build for development (not minified)
290
+ npm run build:dev
291
+
292
+ # Generate JIT utilities from content
293
+ npm run generate
294
+ ```
295
+
296
+ ### Production
297
+ ```bash
298
+ # Build minified CSS
299
+ npm run build
300
+
301
+ # Generate JIT utilities with custom output
302
+ npx quantumcss dist/custom.css
303
+ ```
304
+
305
+ ### Build Analysis
306
+ ```bash
307
+ # Analyze CSS output
308
+ npm run analyze
309
+
310
+ # Output includes:
311
+ # - Selector count
312
+ # - Property usage
313
+ # - Utility class count
314
+ # - Component class count
315
+ # - Responsive variant usage
316
+ # - Color palette analysis
317
+ # - Breakpoint distribution
318
+ ```
319
+
320
+ ## 🎨 Customization
321
+
322
+ ### Adding Custom Colors
323
+ ```css
324
+ :root {
325
+ --color-brand: #6366f1;
326
+ --color-brand-50: #eef2ff;
327
+ --color-brand-100: #e0e7ff;
328
+ /* ... rest of scale */
329
+ }
330
+
331
+ .brand-text { color: var(--color-brand); }
332
+ .brand-bg { background-color: var(--color-brand); }
333
+ ```
334
+
335
+ ### Custom Spacing Scale
336
+ ```css
337
+ :root {
338
+ --space-14: 3.5rem;
339
+ --space-72: 18rem;
340
+ }
341
+
342
+ .p-14 { padding: var(--space-14); }
343
+ .m-72 { margin: var(--space-72); }
344
+ ```
345
+
346
+ ### Custom Animations
347
+ ```css
348
+ @keyframes slideInFromLeft {
349
+ from {
350
+ transform: translateX(-100%);
351
+ opacity: 0;
352
+ }
353
+ to {
354
+ transform: translateX(0);
355
+ opacity: 1;
356
+ }
357
+ }
358
+
359
+ .animate-slide-left {
360
+ animation: slideInFromLeft 0.3s ease-out;
361
+ }
362
+ ```
363
+
364
+ ## 📊 Performance
365
+
366
+ ### Bundle Size Comparison
367
+ - **QuantumCSS**: 15KB gzipped
368
+ - **Bootstrap**: 25KB gzipped
369
+ - **Bulma**: 20KB gzipped
370
+
371
+ ### Performance Features
372
+ - **CSS Custom Properties** - Faster theme switching
373
+ - **Optimized Selectors** - Minimal specificity
374
+ - **Tree Shaking** - Only used classes included
375
+ - **Container Queries** - Better performance than media queries
376
+ - **Logical Properties** - Better performance than directional properties
377
+
378
+ ## 🧩 Advanced Components
379
+
380
+ ### Modal
381
+ ```html
382
+ <div class="modal-overlay">
383
+ <div class="modal-content">
384
+ <div class="p-6">
385
+ <h2 class="text-2xl font-bold mb-4">Modal Title</h2>
386
+ <p class="text-neutral mb-6">Modal content</p>
387
+ <div class="flex gap-2">
388
+ <button class="btn btn-primary">Confirm</button>
389
+ <button class="btn btn-outline">Cancel</button>
390
+ </div>
391
+ </div>
392
+ </div>
393
+ </div>
394
+ ```
395
+
396
+ ### Dropdown
397
+ ```html
398
+ <div class="dropdown">
399
+ <button class="btn" onclick="toggleDropdown(this)">Menu</button>
400
+ <div class="dropdown-content">
401
+ <button class="dropdown-item">Item 1</button>
402
+ <button class="dropdown-item">Item 2</button>
403
+ <button class="dropdown-item">Item 3</button>
404
+ </div>
405
+ </div>
406
+ ```
407
+
408
+ ### Tabs
409
+ ```html
410
+ <div class="tab-list">
411
+ <button class="tab-button active">Tab 1</button>
412
+ <button class="tab-button">Tab 2</button>
413
+ <button class="tab-button">Tab 3</button>
414
+ </div>
415
+ <div class="tab-content">
416
+ <div class="tab-panel active">Content 1</div>
417
+ <div class="tab-panel">Content 2</div>
418
+ <div class="tab-panel">Content 3</div>
419
+ </div>
420
+ ```
421
+
422
+ ### Accordion
423
+ ```html
424
+ <div class="accordion-item">
425
+ <div class="accordion-header">
426
+ <span>Accordion Title</span>
427
+ <span class="accordion-icon">▼</span>
428
+ </div>
429
+ <div class="accordion-content">
430
+ Accordion content
431
+ </div>
432
+ </div>
433
+ ```
434
+
435
+ ## 🎯 Best Practices
436
+
437
+ ### Performance Tips
438
+ 1. **Use Container Queries** for component-level responsiveness
439
+ 2. **Leverage CSS Custom Properties** for dynamic theming
440
+ 3. **Prefer Utility Classes** over custom CSS
441
+ 4. **Use Logical Properties** for internationalization
442
+ 5. **Optimize Bundle Size** with build analysis
443
+
444
+ ### Accessibility
445
+ ```html
446
+ <!-- Accessible button -->
447
+ <button class="btn focus:ring-2 focus:ring-primary focus:ring-offset-2">
448
+ Accessible Button
449
+ </button>
450
+
451
+ <!-- Screen reader only text -->
452
+ <span class="sr-only">Hidden from sight, visible to screen readers</span>
453
+
454
+ <!-- Semantic markup -->
455
+ <main class="container mx-auto" role="main">
456
+ <h1 class="sr-only">Page title for screen readers</h1>
457
+ </main>
458
+ ```
459
+
460
+ ## 🤝 Contributing
461
+
462
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
463
+
464
+ ### Development Setup
465
+ ```bash
466
+ git clone https://github.com/macroadster/quantumcss.git
467
+ cd quantumcss
468
+ npm install
469
+ npm run watch
470
+ ```
471
+
472
+ ## 📄 License
473
+
474
+ MIT License - see [LICENSE](LICENSE) file for details.
475
+
476
+ ## 🔗 Links
477
+
478
+ - **Documentation**: https://github.com/macroadster/quantumcss#readme
479
+ - **GitHub**: https://github.com/macroadster/quantumcss
480
+ - **NPM**: https://npmjs.com/package/quantumcss
481
+ - **Discord**: https://discord.gg/quantumcss
482
+
483
+ ---
484
+
485
+ **QuantumCSS** - The future of utility-first CSS frameworks. Built with modern CSS, designed for modern web development. 🚀