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