@glass-ui-kit/cli 0.2.0 → 0.2.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +144 -31
  3. package/package.json +11 -11
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Juan Tellez
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/dist/index.js CHANGED
@@ -87,59 +87,171 @@ async function installDependencies(deps, pm) {
87
87
  var GLASS_BASE_STYLES = `
88
88
  @layer base {
89
89
  :root {
90
- /* === Glass UI Tokens (Default) === */
91
- --glass-bg: rgba(255, 255, 255, 0.4);
92
- --glass-border: rgba(255, 255, 255, 0.5);
93
- --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
94
- --glass-blur: 12px;
95
- --glass-saturation: 110%;
96
-
97
- /* === Intensity Variants === */
98
- --glass-bg-strong: rgba(255, 255, 255, 0.75);
90
+ /* === TEXT TOKENS (Light) === */
91
+ --foreground: #18181b;
92
+ --muted-foreground: #3f3f46;
93
+
94
+ /* === BASE PRIMITIVES (Default) === */
95
+ --glass-bg: rgba(255, 255, 255, 0.35);
96
+ --glass-border: rgba(255, 255, 255, 0.6);
97
+ --glass-shadow: var(--glass-shadow-sm);
98
+ --glass-blur: 6px;
99
+
100
+ /* === SHADOW SIZES === */
101
+ --glass-shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
102
+ --glass-shadow-md: 0 4px 30px 0 rgba(0, 0, 0, 0.1);
103
+ --glass-shadow-lg: 0 8px 40px 0 rgba(0, 0, 0, 0.2);
104
+
105
+ /* === BORDER RADIUS === */
106
+ --glass-radius-sm: 0.375rem;
107
+ --glass-radius-md: 0.75rem;
108
+ --glass-radius-lg: 1rem;
109
+ --glass-radius-xl: 1.5rem;
110
+
111
+ /* === SEMANTIC VARIANTS === */
112
+ --glass-bg-strong: rgba(255, 255, 255, 0.5);
99
113
  --glass-border-strong: rgba(255, 255, 255, 0.8);
100
- --glass-blur-strong: 20px;
114
+ --glass-blur-strong: 10px;
101
115
 
102
116
  --glass-bg-soft: rgba(255, 255, 255, 0.2);
103
- --glass-border-soft: rgba(255, 255, 255, 0.3);
104
- --glass-blur-soft: 8px;
117
+ --glass-border-soft: rgba(255, 255, 255, 0.4);
118
+ --glass-blur-soft: 2px;
105
119
  }
106
120
 
107
121
  .dark {
108
- /* === Glass UI Tokens (Dark) === */
109
- --glass-bg: rgba(15, 23, 42, 0.6);
110
- --glass-border: rgba(255, 255, 255, 0.08);
111
- --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
112
-
113
- --glass-bg-strong: rgba(15, 23, 42, 0.85);
114
- --glass-border-strong: rgba(255, 255, 255, 0.15);
115
-
116
- --glass-bg-soft: rgba(15, 23, 42, 0.3);
117
- --glass-border-soft: rgba(255, 255, 255, 0.05);
122
+ /* === TEXT TOKENS (Dark) === */
123
+ --foreground: #fafafa;
124
+ --muted-foreground: #d4d4d8;
125
+
126
+ /* === DARK PRIMITIVES === */
127
+ --glass-bg: rgba(255, 255, 255, 0.08);
128
+ --glass-border: rgba(255, 255, 255, 0.1);
129
+ --glass-shadow: var(--glass-shadow-sm);
130
+
131
+ /* === DARK SHADOW SIZES === */
132
+ --glass-shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
133
+ --glass-shadow-md: 0 4px 30px 0 rgba(0, 0, 0, 0.2);
134
+ --glass-shadow-lg: 0 8px 40px 0 rgba(0, 0, 0, 0.35);
135
+
136
+ /* === DARK VARIANTS === */
137
+ --glass-bg-strong: rgba(255, 255, 255, 0.15);
138
+ --glass-border-strong: rgba(255, 255, 255, 0.2);
139
+
140
+ --glass-bg-soft: rgba(255, 255, 255, 0.03);
141
+ --glass-border-soft: rgba(255, 255, 255, 0.06);
118
142
  }
119
143
  }
120
144
 
145
+ @theme {
146
+ --color-foreground: var(--foreground);
147
+ --color-muted-foreground: var(--muted-foreground);
148
+ --color-glass-bg: var(--glass-bg);
149
+ --color-glass-border: var(--glass-border);
150
+ --shadow-glass: var(--glass-shadow);
151
+ --shadow-glass-sm: var(--glass-shadow-sm);
152
+ --shadow-glass-md: var(--glass-shadow-md);
153
+ --shadow-glass-lg: var(--glass-shadow-lg);
154
+ --backdrop-blur-glass: var(--glass-blur);
155
+ --radius-glass-sm: var(--glass-radius-sm);
156
+ --radius-glass-md: var(--glass-radius-md);
157
+ --radius-glass-lg: var(--glass-radius-lg);
158
+ --radius-glass-xl: var(--glass-radius-xl);
159
+ }
160
+
161
+ /* --- Global Utilities Injected by Glass UI --- */
162
+
163
+ /* Hide native reveal icons in password inputs */
164
+ input[type="password"]::-ms-reveal,
165
+ input[type="password"]::-ms-clear {
166
+ display: none;
167
+ width: 0;
168
+ height: 0;
169
+ }
170
+
171
+ /* Provisional gradient background to highlight Glassmorphism */
172
+ body {
173
+ /* Pastel gradient for light mode */
174
+ background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
175
+ background-attachment: fixed;
176
+ color: var(--foreground);
177
+ min-height: 100vh;
178
+ }
179
+
180
+ .dark body {
181
+ /* Deep gradient for dark mode */
182
+ background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
183
+ background-attachment: fixed;
184
+ color: var(--foreground);
185
+ }
186
+
121
187
  @layer components {
122
- /* La clase base obligatoria */
123
- .glass {
188
+ /* .glass -> La clase fundacional.
189
+ Usa las variables por defecto (--glass-bg, etc).
190
+ */
191
+ .glass,
192
+ .hover\\:glass:hover {
124
193
  background: var(--glass-bg);
125
194
  border: 1px solid var(--glass-border);
126
- backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
127
- -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
195
+ backdrop-filter: blur(var(--glass-blur));
128
196
  box-shadow: var(--glass-shadow);
129
197
  }
130
198
 
131
- /* Variantes sem\xE1nticas (solo reasignan variables) */
132
- .glass-strong {
199
+ /* PRESETS DE INTENSIDAD
200
+ No reescriben propiedades CSS (background, border).
201
+ Solo re-asignan las variables locales.
202
+ */
203
+ .glass-strong,
204
+ .hover\\:glass-strong:hover {
133
205
  --glass-bg: var(--glass-bg-strong);
134
206
  --glass-border: var(--glass-border-strong);
135
207
  --glass-blur: var(--glass-blur-strong);
136
208
  }
137
209
 
138
- .glass-soft {
210
+ .glass-soft,
211
+ .hover\\:glass-soft:hover {
139
212
  --glass-bg: var(--glass-bg-soft);
140
213
  --glass-border: var(--glass-border-soft);
141
214
  --glass-blur: var(--glass-blur-soft);
142
215
  }
216
+
217
+ /* SIZES */
218
+ .input-sm,
219
+ .btn-sm {
220
+ height: 1.5rem;
221
+ padding-left: 0.5rem;
222
+ padding-right: 0.5rem;
223
+ font-size: 0.75rem;
224
+ line-height: 1rem;
225
+ gap: 0.375rem;
226
+ }
227
+
228
+ .input-md,
229
+ .btn-md {
230
+ height: 2rem;
231
+ padding-top: 0.5rem;
232
+ padding-bottom: 0.5rem;
233
+ padding-left: 0.625rem;
234
+ padding-right: 0.625rem;
235
+ font-size: 0.875rem;
236
+ line-height: 1.25rem;
237
+ gap: 0.5rem;
238
+ }
239
+
240
+ .input-lg,
241
+ .btn-lg {
242
+ height: 2.5rem;
243
+ padding-left: 0.875rem;
244
+ padding-right: 0.875rem;
245
+ font-size: 1rem;
246
+ line-height: 1.5rem;
247
+ gap: 0.625rem;
248
+ }
249
+
250
+ /* ICON BUTTON */
251
+ .btn-icon {
252
+ padding: 0;
253
+ aspect-ratio: 1 / 1;
254
+ }
143
255
  }
144
256
  `;
145
257
 
@@ -199,8 +311,9 @@ var init = new Command().name("init").description("Initialize configuration and
199
311
  } catch (e) {
200
312
  }
201
313
  if (!cssContent.includes("--glass-bg")) {
202
- const newCssContent = `${GLASS_BASE_STYLES}
203
- ${cssContent}`;
314
+ const newCssContent = `${cssContent.trimEnd()}
315
+
316
+ ${GLASS_BASE_STYLES}`;
204
317
  await writeFile(cssPath, newCssContent);
205
318
  console.log(chalk.green(` Updated ${cssPath} with glass tokens`));
206
319
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glass-ui-kit/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "The official CLI for Glass UI. Add glassmorphism components to your React projects in seconds.",
5
5
  "keywords": [
6
6
  "glassmorphism",
@@ -32,12 +32,6 @@
32
32
  "engines": {
33
33
  "node": ">=18.0.0"
34
34
  },
35
- "scripts": {
36
- "build": "tsup src/index.ts --format esm --clean",
37
- "dev": "bun run ./src/index.ts",
38
- "lint": "eslint src",
39
- "prepublishOnly": "pnpm run build"
40
- },
41
35
  "dependencies": {
42
36
  "chalk": "^5.3.0",
43
37
  "commander": "^11.1.0",
@@ -45,14 +39,20 @@
45
39
  "zod": "^3.22.4"
46
40
  },
47
41
  "devDependencies": {
48
- "@glass-ui-kit/tsconfig": "workspace:*",
49
- "@glass-ui-kit/schema": "workspace:*",
50
42
  "@types/node": "^20.11.0",
51
43
  "bun-types": "latest",
52
44
  "tsup": "^8.0.1",
53
- "typescript": "^5.3.3"
45
+ "typescript": "^5.3.3",
46
+ "@glass-ui-kit/tsconfig": "0.0.1",
47
+ "@glass-ui-kit/schema": "0.0.1"
54
48
  },
55
49
  "publishConfig": {
56
50
  "access": "public"
51
+ },
52
+ "scripts": {
53
+ "sync": "node scripts/sync-styles.mjs",
54
+ "build": "pnpm run sync && tsup src/index.ts --format esm --clean",
55
+ "dev": "pnpm run sync && bun run ./src/index.ts",
56
+ "lint": "eslint src"
57
57
  }
58
- }
58
+ }