@howssatoshi/quantumcss 1.8.0 → 1.10.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/README.md +1 -1
- package/dist/quantum.min.css +10 -1
- package/examples/admin-panel.html +2 -2
- package/examples/analytics-dashboard.html +6 -11
- package/examples/blog-template.html +16 -15
- package/examples/chat-messaging.html +33 -44
- package/examples/email-template.html +2 -2
- package/examples/gaming-template.html +148 -17
- package/examples/gradient-test.html +5 -0
- package/examples/images/eric.png +0 -0
- package/examples/index.html +89 -116
- package/examples/kitchen-sink.html +49 -1
- package/examples/music-streaming.html +3 -3
- package/examples/news-template.html +87 -229
- package/examples/portfolio-resume.html +121 -563
- package/examples/shopping/index.html +514 -327
- package/examples/shopping/nova-shop.css +984 -0
- package/examples/starlight.html +4 -3
- package/examples/travel/index.html +170 -13
- package/examples/video-streaming.html +10 -3
- package/package.json +1 -1
- package/src/defaults.js +1 -0
- package/src/generator.js +12 -3
- package/src/styles/quantum-animations.css +13 -13
- package/src/styles/quantum-base.css +106 -58
- package/src/styles/quantum-components.css +550 -265
- package/src/styles/starlight.css +327 -99
- package/dist/index.html +0 -232
package/examples/starlight.html
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
<script src="../src/starlight.js"></script>
|
|
9
9
|
<style>
|
|
10
10
|
body {
|
|
11
|
-
background:
|
|
11
|
+
background: transparent !important;
|
|
12
12
|
min-height: 100vh;
|
|
13
13
|
overflow-x: hidden;
|
|
14
14
|
}
|
|
15
|
+
header, main, section { position: relative; z-index: 1; }
|
|
15
16
|
|
|
16
17
|
html[data-theme="dark"] {
|
|
17
18
|
color: #f1f5f9;
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
height: 50%;
|
|
37
38
|
background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
|
|
38
39
|
filter: blur(60px);
|
|
39
|
-
z-index:
|
|
40
|
+
z-index: -1;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.hero-glow-2 {
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
height: 50%;
|
|
48
49
|
background: radial-gradient(circle, rgba(255, 179, 138, 0.1) 0%, transparent 70%);
|
|
49
50
|
filter: blur(60px);
|
|
50
|
-
z-index:
|
|
51
|
+
z-index: -1;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
.float {
|
|
@@ -8,17 +8,22 @@
|
|
|
8
8
|
<script src="../../src/starlight.js"></script>
|
|
9
9
|
<style>
|
|
10
10
|
body {
|
|
11
|
-
background: radial-gradient(circle at top right,
|
|
11
|
+
background: radial-gradient(circle at top right, var(--q-color-starlight-deep), #000);
|
|
12
12
|
overflow-x: hidden;
|
|
13
13
|
transition: background-color 0.5s ease, color 0.5s ease;
|
|
14
14
|
}
|
|
15
15
|
html[data-theme="dark"] {
|
|
16
|
-
color:
|
|
16
|
+
color: var(--q-text-primary);
|
|
17
17
|
}
|
|
18
18
|
html[data-theme="light"] {
|
|
19
|
-
background:
|
|
20
|
-
color:
|
|
19
|
+
background: var(--q-light-bg) !important;
|
|
20
|
+
color: var(--q-light-text);
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
html[data-theme="light"] body {
|
|
24
|
+
background: var(--q-light-bg) !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
.hero-glow {
|
|
23
28
|
position: absolute;
|
|
24
29
|
top: -10%;
|
|
@@ -27,7 +32,7 @@
|
|
|
27
32
|
height: 60%;
|
|
28
33
|
background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
|
|
29
34
|
filter: blur(100px);
|
|
30
|
-
z-index:
|
|
35
|
+
z-index: -1;
|
|
31
36
|
transition: opacity 0.5s ease;
|
|
32
37
|
}
|
|
33
38
|
|
|
@@ -57,19 +62,19 @@
|
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
html[data-theme="light"] .glass {
|
|
60
|
-
background:
|
|
61
|
-
border-color:
|
|
62
|
-
color:
|
|
65
|
+
background: var(--q-glass-bg) !important;
|
|
66
|
+
border-color: var(--q-glass-border) !important;
|
|
67
|
+
color: var(--q-light-text) !important;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
html[data-theme="light"] .starlight-card p,
|
|
66
71
|
html[data-theme="light"] header p,
|
|
67
72
|
html[data-theme="light"] section p {
|
|
68
|
-
color:
|
|
73
|
+
color: var(--q-light-text-muted);
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
html[data-theme="light"] .btn-outline:hover {
|
|
72
|
-
background-color:
|
|
77
|
+
background-color: var(--q-light-text);
|
|
73
78
|
color: white;
|
|
74
79
|
}
|
|
75
80
|
|
|
@@ -86,15 +91,167 @@
|
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
html[data-theme="light"] input {
|
|
89
|
-
color:
|
|
94
|
+
color: var(--q-light-text) !important;
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
html[data-theme="light"] input::placeholder {
|
|
93
|
-
color:
|
|
98
|
+
color: var(--q-light-text-muted) !important;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
html[data-theme="light"] .text-starlight-blue {
|
|
97
|
-
color:
|
|
102
|
+
color: var(--q-color-primary) !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
html[data-theme="light"] .starlight-navbar {
|
|
106
|
+
background: var(--q-light-card-bg) !important;
|
|
107
|
+
border-bottom-color: var(--q-light-card-border) !important;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
html[data-theme="light"] .starlight-navbar a {
|
|
111
|
+
color: var(--q-light-text-muted) !important;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
html[data-theme="light"] .starlight-navbar a:hover {
|
|
115
|
+
color: var(--q-color-primary) !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
html[data-theme="light"] .text-gradient-starlight {
|
|
119
|
+
background: none;
|
|
120
|
+
-webkit-text-fill-color: var(--q-light-text);
|
|
121
|
+
color: var(--q-light-text);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
html[data-theme="light"] .nav-link {
|
|
125
|
+
color: var(--q-light-text-muted) !important;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
html[data-theme="light"] .nav-link:hover {
|
|
129
|
+
color: var(--q-color-primary) !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
html[data-theme="light"] .glass {
|
|
133
|
+
background: var(--q-light-card-bg) !important;
|
|
134
|
+
border-color: var(--q-light-card-border) !important;
|
|
135
|
+
color: var(--q-light-text) !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
html[data-theme="light"] .glass input {
|
|
139
|
+
color: var(--q-light-text) !important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
html[data-theme="light"] .glass input::placeholder {
|
|
143
|
+
color: var(--q-light-text-muted) !important;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
html[data-theme="light"] .glass .btn-starlight {
|
|
147
|
+
background: var(--q-light-text);
|
|
148
|
+
color: white;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
html[data-theme="light"] .starlight-card {
|
|
152
|
+
background: var(--q-light-card-bg) !important;
|
|
153
|
+
border-color: var(--q-light-card-border) !important;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
html[data-theme="light"] .starlight-card h3 {
|
|
157
|
+
color: var(--q-light-text) !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
html[data-theme="light"] .starlight-card .text-slate-400 {
|
|
161
|
+
color: var(--q-light-text-muted) !important;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
html[data-theme="light"] .btn-outline {
|
|
165
|
+
border-color: var(--q-light-text) !important;
|
|
166
|
+
color: var(--q-light-text) !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
html[data-theme="light"] .btn-outline:hover {
|
|
170
|
+
background-color: var(--q-light-text) !important;
|
|
171
|
+
color: white !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
html[data-theme="light"] .starlight-footer {
|
|
175
|
+
background: var(--q-light-bg) !important;
|
|
176
|
+
border-top-color: var(--q-light-card-border) !important;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
html[data-theme="light"] .starlight-footer a {
|
|
180
|
+
color: var(--q-light-text-muted) !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
html[data-theme="light"] .starlight-footer a:hover {
|
|
184
|
+
color: var(--q-color-primary) !important;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
html[data-theme="light"] .starlight-footer p {
|
|
188
|
+
color: var(--q-light-text-muted) !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
html[data-theme="light"] .badge-primary {
|
|
192
|
+
background-color: rgba(37, 99, 235, 0.1) !important;
|
|
193
|
+
color: var(--q-color-primary) !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
html[data-theme="light"] .border-white_10 {
|
|
197
|
+
border-color: var(--q-light-card-border) !important;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
html[data-theme="light"] .text-white {
|
|
201
|
+
color: var(--q-light-text) !important;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
html[data-theme="light"] .text-white_10 {
|
|
205
|
+
color: var(--q-light-text-muted) !important;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
html[data-theme="light"] .text-slate-400 {
|
|
209
|
+
color: var(--q-light-text-muted) !important;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
html[data-theme="light"] .text-slate-500 {
|
|
213
|
+
color: var(--q-light-text-muted) !important;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
html[data-theme="light"] .bg-white_5 {
|
|
217
|
+
background: var(--q-glass-bg) !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
html[data-theme="light"] .border-white_10 {
|
|
221
|
+
border-color: var(--q-light-card-border) !important;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
html[data-theme="light"] .border-white_5 {
|
|
225
|
+
border-color: var(--q-light-card-border) !important;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
html[data-theme="light"] h1 {
|
|
229
|
+
color: var(--q-light-text) !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
html[data-theme="light"] h2 {
|
|
233
|
+
color: var(--q-light-text) !important;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
html[data-theme="light"] h3 {
|
|
237
|
+
color: var(--q-light-text) !important;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
html[data-theme="light"] .bg-gray-800,
|
|
241
|
+
html[data-theme="light"] .bg-gray-700,
|
|
242
|
+
html[data-theme="light"] .bg-gray-900 {
|
|
243
|
+
background-color: var(--q-light-card-bg) !important;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Card image overlay text stays light due to dark gradient */
|
|
247
|
+
html[data-theme="light"] .starlight-card .absolute .badge,
|
|
248
|
+
html[data-theme="light"] .starlight-card .absolute h3 {
|
|
249
|
+
color: white !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Newsletter section text */
|
|
253
|
+
html[data-theme="light"] .bg-gradient-to-br {
|
|
254
|
+
background: linear-gradient(to bottom right, var(--q-color-primary-100), transparent) !important;
|
|
98
255
|
}
|
|
99
256
|
</style>
|
|
100
257
|
</head>
|
|
@@ -46,14 +46,21 @@
|
|
|
46
46
|
margin: 0 2rem;
|
|
47
47
|
display: flex;
|
|
48
48
|
}
|
|
49
|
-
.search-input {
|
|
49
|
+
.video-search-input {
|
|
50
50
|
flex: 1;
|
|
51
|
-
padding: 0.625rem
|
|
51
|
+
padding: 0.625rem 1.25rem;
|
|
52
52
|
background: rgba(255, 255, 255, 0.05);
|
|
53
53
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
54
54
|
border-radius: 0.5rem 0 0 0.5rem;
|
|
55
55
|
color: var(--text-primary, #f1f5f9);
|
|
56
56
|
font-size: 0.9375rem;
|
|
57
|
+
outline: none;
|
|
58
|
+
transition: all 0.2s;
|
|
59
|
+
}
|
|
60
|
+
.video-search-input:focus {
|
|
61
|
+
border-color: var(--color-starlight, #00d4ff);
|
|
62
|
+
background: rgba(255, 255, 255, 0.08);
|
|
63
|
+
box-shadow: 0 0 0 2px var(--q-color-starlight-deep), 0 0 0 4px var(--q-color-starlight-blue);
|
|
57
64
|
}
|
|
58
65
|
.search-btn {
|
|
59
66
|
padding: 0 1.25rem;
|
|
@@ -344,7 +351,7 @@
|
|
|
344
351
|
<span>Starlight</span>
|
|
345
352
|
</div>
|
|
346
353
|
<div class="search-bar">
|
|
347
|
-
<input type="text" class="search-input" placeholder="Search">
|
|
354
|
+
<input type="text" class="video-search-input" placeholder="Search">
|
|
348
355
|
<button class="search-btn">🔍</button>
|
|
349
356
|
</div>
|
|
350
357
|
<div class="header-actions">
|
package/package.json
CHANGED
package/src/defaults.js
CHANGED
package/src/generator.js
CHANGED
|
@@ -122,6 +122,9 @@ function generateCSS(configPath) {
|
|
|
122
122
|
regex: new RegExp(`\\s${v}="([^"]+)"`, 'g')
|
|
123
123
|
}));
|
|
124
124
|
|
|
125
|
+
const jitLimit = (config.jit && config.jit.limit) || 10000;
|
|
126
|
+
const jitWarnAt = (config.jit && config.jit.warnAt) || (jitLimit * 0.8);
|
|
127
|
+
|
|
125
128
|
files.forEach(file => {
|
|
126
129
|
try {
|
|
127
130
|
const content = fs.readFileSync(file, 'utf8');
|
|
@@ -129,7 +132,9 @@ function generateCSS(configPath) {
|
|
|
129
132
|
// 1. Match standard class="..."
|
|
130
133
|
let match;
|
|
131
134
|
while ((match = classAttrRegex.exec(content)) !== null) {
|
|
132
|
-
match[1].split(/\s+/).forEach(cls => {
|
|
135
|
+
match[1].split(/\s+/).forEach(cls => {
|
|
136
|
+
if (cls && rawClasses.size < jitLimit) rawClasses.add(cls);
|
|
137
|
+
});
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
// 2. Match attribute lanes (e.g., md="flex gap-4")
|
|
@@ -137,7 +142,7 @@ function generateCSS(configPath) {
|
|
|
137
142
|
regex.lastIndex = 0;
|
|
138
143
|
while ((match = regex.exec(content)) !== null) {
|
|
139
144
|
match[1].split(/\s+/).forEach(cls => {
|
|
140
|
-
if (cls) {
|
|
145
|
+
if (cls && rawClasses.size < jitLimit) {
|
|
141
146
|
// We convert attribute-based utilities to a canonical internal format
|
|
142
147
|
// using the __ separator, which getRulesForClass already understands.
|
|
143
148
|
rawClasses.add(`${variant}__${cls}`);
|
|
@@ -150,6 +155,10 @@ function generateCSS(configPath) {
|
|
|
150
155
|
}
|
|
151
156
|
});
|
|
152
157
|
|
|
158
|
+
if (rawClasses.size >= jitWarnAt) {
|
|
159
|
+
console.warn(`⚠️ JIT Warning: Generated ${rawClasses.size} utilities, approaching limit of ${jitLimit}.`);
|
|
160
|
+
}
|
|
161
|
+
|
|
153
162
|
const utilities = new Set();
|
|
154
163
|
const responsiveUtils = {
|
|
155
164
|
sm: new Set(), md: new Set(), lg: new Set(), xl: new Set(), '2xl': new Set(),
|
|
@@ -162,7 +171,7 @@ function generateCSS(configPath) {
|
|
|
162
171
|
* @returns {string} The escaped selector
|
|
163
172
|
*/
|
|
164
173
|
const escapeSelector = (cls) => {
|
|
165
|
-
return cls.replace(/([:.[\]
|
|
174
|
+
return cls.replace(/([:.[\]\\/])/g, '\\$1');
|
|
166
175
|
};
|
|
167
176
|
|
|
168
177
|
const sideMap = {
|
|
@@ -53,42 +53,42 @@
|
|
|
53
53
|
.ani-svg-draw {
|
|
54
54
|
stroke-dasharray: 1000;
|
|
55
55
|
stroke-dashoffset: 1000;
|
|
56
|
-
animation: svg-draw
|
|
56
|
+
animation: svg-draw 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.ani-float {
|
|
60
|
-
animation: float-y 6s
|
|
60
|
+
animation: float-y 6s ease-in-out infinite;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.ani-fade-in {
|
|
64
|
-
animation: fadeIn
|
|
64
|
+
animation: fadeIn 0.3s ease-out forwards;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.ani-slide-up {
|
|
68
|
-
animation: slideUp
|
|
68
|
+
animation: slideUp 0.3s ease-out forwards;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.ani-slide-down {
|
|
72
|
-
animation: slideDown
|
|
72
|
+
animation: slideDown 0.3s ease-out forwards;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.ani-scale-in {
|
|
76
|
-
animation: scaleIn
|
|
76
|
+
animation: scaleIn 0.2s ease-out forwards;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.ani-spin {
|
|
80
|
-
animation: spin 1s
|
|
80
|
+
animation: spin 1s linear infinite;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/* Staggered Animations */
|
|
84
|
-
.ani-stagger-1 { animation-delay:
|
|
85
|
-
.ani-stagger-2 { animation-delay:
|
|
86
|
-
.ani-stagger-3 { animation-delay:
|
|
87
|
-
.ani-stagger-4 { animation-delay:
|
|
88
|
-
.ani-stagger-5 { animation-delay:
|
|
84
|
+
.ani-stagger-1 { animation-delay: 0.1s; }
|
|
85
|
+
.ani-stagger-2 { animation-delay: 0.2s; }
|
|
86
|
+
.ani-stagger-3 { animation-delay: 0.3s; }
|
|
87
|
+
.ani-stagger-4 { animation-delay: 0.4s; }
|
|
88
|
+
.ani-stagger-5 { animation-delay: 0.5s; }
|
|
89
89
|
|
|
90
90
|
/* Speed Modifiers */
|
|
91
|
-
.ani-fast { animation-duration:
|
|
91
|
+
.ani-fast { animation-duration: 0.5s !important; }
|
|
92
92
|
.ani-slow { animation-duration: 8s !important; }
|
|
93
93
|
.ani-slower { animation-duration: 15s !important; }
|
|
94
94
|
|