grg-kit-cli 0.6.13 ā 0.6.15
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 +8 -0
- package/commands/add.js +7 -14
- package/config/resources.js +82 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,6 +151,14 @@ Examples:
|
|
|
151
151
|
| `shell` | `sidebar`, `sidebar-footer`, `topnav`, `topnav-footer`, `collapsible`, `collapsible-footer` |
|
|
152
152
|
| `settings` | `profile`, `security`, `notification`, `danger-zone` |
|
|
153
153
|
|
|
154
|
+
**Search tags** (for MCP server discoverability):
|
|
155
|
+
|
|
156
|
+
| Block | Search Terms |
|
|
157
|
+
|-------|--------------|
|
|
158
|
+
| `auth` | signin, sign-in, signup, register, password, credentials, onboarding |
|
|
159
|
+
| `shell` | dashboard, admin, navbar, menu, left-nav, top-bar, wrapper |
|
|
160
|
+
| `settings` | user-settings, my-account, configuration, notifications, privacy |
|
|
161
|
+
|
|
154
162
|
### `grg list [category]`
|
|
155
163
|
|
|
156
164
|
List available blocks and themes.
|
package/commands/add.js
CHANGED
|
@@ -200,11 +200,6 @@ function showUsage(RESOURCES) {
|
|
|
200
200
|
* grg add component --all # All components
|
|
201
201
|
*/
|
|
202
202
|
async function addComponent(componentName, options) {
|
|
203
|
-
// Fetch catalog dynamically (with caching)
|
|
204
|
-
const spinner = ora('Fetching catalog...').start();
|
|
205
|
-
const RESOURCES = await fetchCatalog({ silent: true });
|
|
206
|
-
spinner.stop();
|
|
207
|
-
|
|
208
203
|
// Handle --all flag (download all components)
|
|
209
204
|
if (options.all) {
|
|
210
205
|
console.log(chalk.bold.cyan(`\nš¦ Adding all components\n`));
|
|
@@ -296,11 +291,6 @@ function showComponentUsage(RESOURCES) {
|
|
|
296
291
|
* grg add theme modern-minimal # Download and set modern-minimal theme
|
|
297
292
|
*/
|
|
298
293
|
async function addTheme(themeName, options) {
|
|
299
|
-
// Fetch catalog dynamically (with caching)
|
|
300
|
-
const spinner = ora('Fetching catalog...').start();
|
|
301
|
-
const RESOURCES = await fetchCatalog({ silent: true });
|
|
302
|
-
spinner.stop();
|
|
303
|
-
|
|
304
294
|
// Validate theme name
|
|
305
295
|
if (!themeName) {
|
|
306
296
|
showThemeUsage(RESOURCES);
|
|
@@ -360,10 +350,12 @@ async function downloadTheme(theme, customOutput) {
|
|
|
360
350
|
stylesContent = '';
|
|
361
351
|
}
|
|
362
352
|
|
|
363
|
-
|
|
353
|
+
// Use relative path from src/ to the theme file
|
|
354
|
+
const relativeThemePath = path.relative('src', outputPath).replace(/\\/g, '/');
|
|
355
|
+
const themeImport = `@import './${relativeThemePath}';`;
|
|
364
356
|
|
|
365
|
-
// Check if any theme is already imported
|
|
366
|
-
const themeImportRegex = /@import\s+['"]
|
|
357
|
+
// Check if any theme is already imported (match any .css file import from relative paths)
|
|
358
|
+
const themeImportRegex = /@import\s+['"]\.\/.+\.css['"];?\n?/g;
|
|
367
359
|
const existingThemeImports = stylesContent.match(themeImportRegex);
|
|
368
360
|
|
|
369
361
|
if (existingThemeImports && existingThemeImports.length > 0) {
|
|
@@ -400,7 +392,8 @@ async function downloadTheme(theme, customOutput) {
|
|
|
400
392
|
} catch (error) {
|
|
401
393
|
downloadSpinner.warn(chalk.yellow('Could not update src/styles.css automatically'));
|
|
402
394
|
console.log(chalk.gray('\nPlease add the following to your src/styles.css:'));
|
|
403
|
-
|
|
395
|
+
const relativeThemePath = path.relative('src', outputPath).replace(/\\/g, '/');
|
|
396
|
+
console.log(chalk.cyan(` @import './${relativeThemePath}';`));
|
|
404
397
|
}
|
|
405
398
|
|
|
406
399
|
console.log();
|
package/config/resources.js
CHANGED
|
@@ -20,7 +20,10 @@ const RESOURCES = {
|
|
|
20
20
|
"minimal",
|
|
21
21
|
"warm",
|
|
22
22
|
"amber",
|
|
23
|
-
"orange"
|
|
23
|
+
"orange",
|
|
24
|
+
"golden",
|
|
25
|
+
"autumn",
|
|
26
|
+
"cozy"
|
|
24
27
|
],
|
|
25
28
|
"features": [
|
|
26
29
|
"dark-mode",
|
|
@@ -40,7 +43,11 @@ const RESOURCES = {
|
|
|
40
43
|
"medical",
|
|
41
44
|
"green",
|
|
42
45
|
"life-sciences",
|
|
43
|
-
"biotech"
|
|
46
|
+
"biotech",
|
|
47
|
+
"laboratory",
|
|
48
|
+
"research",
|
|
49
|
+
"science",
|
|
50
|
+
"nature"
|
|
44
51
|
],
|
|
45
52
|
"features": [
|
|
46
53
|
"dark-mode",
|
|
@@ -60,7 +67,12 @@ const RESOURCES = {
|
|
|
60
67
|
"medical",
|
|
61
68
|
"professional",
|
|
62
69
|
"blue",
|
|
63
|
-
"healthcare"
|
|
70
|
+
"healthcare",
|
|
71
|
+
"hospital",
|
|
72
|
+
"clinic",
|
|
73
|
+
"doctor",
|
|
74
|
+
"patient",
|
|
75
|
+
"health"
|
|
64
76
|
],
|
|
65
77
|
"features": [
|
|
66
78
|
"dark-mode",
|
|
@@ -80,7 +92,11 @@ const RESOURCES = {
|
|
|
80
92
|
"warm",
|
|
81
93
|
"orange",
|
|
82
94
|
"brown",
|
|
83
|
-
"claude"
|
|
95
|
+
"claude",
|
|
96
|
+
"ai",
|
|
97
|
+
"anthropic",
|
|
98
|
+
"earthy",
|
|
99
|
+
"cozy"
|
|
84
100
|
],
|
|
85
101
|
"features": [
|
|
86
102
|
"dark-mode",
|
|
@@ -100,7 +116,10 @@ const RESOURCES = {
|
|
|
100
116
|
"minimal",
|
|
101
117
|
"grayscale",
|
|
102
118
|
"neutral",
|
|
103
|
-
"clean"
|
|
119
|
+
"clean",
|
|
120
|
+
"monochrome",
|
|
121
|
+
"simple",
|
|
122
|
+
"light"
|
|
104
123
|
],
|
|
105
124
|
"features": [
|
|
106
125
|
"dark-mode",
|
|
@@ -120,7 +139,10 @@ const RESOURCES = {
|
|
|
120
139
|
"default",
|
|
121
140
|
"blue",
|
|
122
141
|
"minimal",
|
|
123
|
-
"professional"
|
|
142
|
+
"professional",
|
|
143
|
+
"corporate",
|
|
144
|
+
"business",
|
|
145
|
+
"standard"
|
|
124
146
|
],
|
|
125
147
|
"features": [
|
|
126
148
|
"dark-mode",
|
|
@@ -140,7 +162,11 @@ const RESOURCES = {
|
|
|
140
162
|
"medical",
|
|
141
163
|
"purple",
|
|
142
164
|
"genomics",
|
|
143
|
-
"biotech"
|
|
165
|
+
"biotech",
|
|
166
|
+
"dna",
|
|
167
|
+
"genetics",
|
|
168
|
+
"research",
|
|
169
|
+
"science"
|
|
144
170
|
],
|
|
145
171
|
"features": [
|
|
146
172
|
"dark-mode",
|
|
@@ -160,7 +186,10 @@ const RESOURCES = {
|
|
|
160
186
|
"minimal",
|
|
161
187
|
"modern",
|
|
162
188
|
"contemporary",
|
|
163
|
-
"clean"
|
|
189
|
+
"clean",
|
|
190
|
+
"sleek",
|
|
191
|
+
"elegant",
|
|
192
|
+
"simple"
|
|
164
193
|
],
|
|
165
194
|
"features": [
|
|
166
195
|
"dark-mode",
|
|
@@ -180,7 +209,11 @@ const RESOURCES = {
|
|
|
180
209
|
"medical",
|
|
181
210
|
"teal",
|
|
182
211
|
"pharmaceutical",
|
|
183
|
-
"healthcare"
|
|
212
|
+
"healthcare",
|
|
213
|
+
"pharmacy",
|
|
214
|
+
"drug",
|
|
215
|
+
"medicine",
|
|
216
|
+
"calm"
|
|
184
217
|
],
|
|
185
218
|
"features": [
|
|
186
219
|
"dark-mode",
|
|
@@ -201,7 +234,15 @@ const RESOURCES = {
|
|
|
201
234
|
"file",
|
|
202
235
|
"upload",
|
|
203
236
|
"form",
|
|
204
|
-
"drag-drop"
|
|
237
|
+
"drag-drop",
|
|
238
|
+
"dropzone",
|
|
239
|
+
"attachment",
|
|
240
|
+
"file-picker",
|
|
241
|
+
"document",
|
|
242
|
+
"image-upload",
|
|
243
|
+
"file-input",
|
|
244
|
+
"browse",
|
|
245
|
+
"select-file"
|
|
205
246
|
],
|
|
206
247
|
"dependencies": [
|
|
207
248
|
"@spartan-ng/helm/button"
|
|
@@ -220,7 +261,16 @@ const RESOURCES = {
|
|
|
220
261
|
"login",
|
|
221
262
|
"signup",
|
|
222
263
|
"authentication",
|
|
223
|
-
"form"
|
|
264
|
+
"form",
|
|
265
|
+
"sign-in",
|
|
266
|
+
"signin",
|
|
267
|
+
"sign-up",
|
|
268
|
+
"register",
|
|
269
|
+
"password",
|
|
270
|
+
"user-login",
|
|
271
|
+
"account",
|
|
272
|
+
"credentials",
|
|
273
|
+
"onboarding"
|
|
224
274
|
],
|
|
225
275
|
"dependencies": [
|
|
226
276
|
"@spartan-ng/helm/button",
|
|
@@ -259,7 +309,15 @@ const RESOURCES = {
|
|
|
259
309
|
"preferences",
|
|
260
310
|
"account",
|
|
261
311
|
"profile",
|
|
262
|
-
"security"
|
|
312
|
+
"security",
|
|
313
|
+
"user-settings",
|
|
314
|
+
"my-account",
|
|
315
|
+
"configuration",
|
|
316
|
+
"options",
|
|
317
|
+
"notifications",
|
|
318
|
+
"privacy",
|
|
319
|
+
"delete-account",
|
|
320
|
+
"password-change"
|
|
263
321
|
],
|
|
264
322
|
"dependencies": [
|
|
265
323
|
"@spartan-ng/helm/button",
|
|
@@ -308,7 +366,18 @@ const RESOURCES = {
|
|
|
308
366
|
"footer",
|
|
309
367
|
"navigation",
|
|
310
368
|
"topnav",
|
|
311
|
-
"collapsible"
|
|
369
|
+
"collapsible",
|
|
370
|
+
"app-shell",
|
|
371
|
+
"dashboard",
|
|
372
|
+
"admin",
|
|
373
|
+
"main-layout",
|
|
374
|
+
"navbar",
|
|
375
|
+
"menu",
|
|
376
|
+
"left-nav",
|
|
377
|
+
"top-bar",
|
|
378
|
+
"horizontal-nav",
|
|
379
|
+
"vertical-nav",
|
|
380
|
+
"wrapper"
|
|
312
381
|
],
|
|
313
382
|
"dependencies": [
|
|
314
383
|
"@spartan-ng/helm/button",
|