@gilav21/shadcn-angular 0.0.14 → 0.0.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.
@@ -130,7 +130,6 @@ export async function init(options) {
130
130
  utils: responses.utilsPath.replace('src/', '@/').replace('.ts', ''),
131
131
  ui: responses.componentsPath.replace('src/', '@/'),
132
132
  },
133
- iconLibrary: 'lucide-angular',
134
133
  };
135
134
  }
136
135
  const spinner = ora('Initializing project...').start();
@@ -178,7 +177,6 @@ export async function init(options) {
178
177
  'clsx',
179
178
  'tailwind-merge',
180
179
  'class-variance-authority',
181
- 'lucide-angular',
182
180
  'tailwindcss',
183
181
  'postcss',
184
182
  '@tailwindcss/postcss'
@@ -195,35 +193,6 @@ export async function init(options) {
195
193
  };
196
194
  await fs.writeJson(postcssrcPath, configContent, { spaces: 4 });
197
195
  }
198
- // Configure app.config.ts with Lucide icons
199
- spinner.text = 'Configuring icons in app.config.ts...';
200
- const appConfigPath = path.join(cwd, 'src/app/app.config.ts');
201
- if (await fs.pathExists(appConfigPath)) {
202
- let appConfigContent = await fs.readFile(appConfigPath, 'utf-8');
203
- // Add imports
204
- if (!appConfigContent.includes('LucideAngularModule')) {
205
- const iconImports = "import { LucideAngularModule, ArrowDown, ArrowUp, ChevronsUpDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-angular';";
206
- appConfigContent = iconImports + '\n' + appConfigContent;
207
- }
208
- if (!appConfigContent.includes('importProvidersFrom')) {
209
- appConfigContent = "import { importProvidersFrom } from '@angular/core';\n" + appConfigContent;
210
- }
211
- // Add provider
212
- const providerCode = `
213
- importProvidersFrom(LucideAngularModule.pick({
214
- ArrowDown,
215
- ArrowUp,
216
- ChevronsUpDown,
217
- ChevronLeft,
218
- ChevronRight,
219
- ChevronsLeft,
220
- ChevronsRight
221
- }))`;
222
- if (!appConfigContent.includes('LucideAngularModule.pick')) {
223
- appConfigContent = appConfigContent.replace(/providers:\s*\[/, `providers: [${providerCode},`);
224
- await fs.writeFile(appConfigPath, appConfigContent);
225
- }
226
- }
227
196
  spinner.succeed(chalk.green('Project initialized successfully!'));
228
197
  console.log('\n' + chalk.bold('Next steps:'));
229
198
  console.log(chalk.dim(' 1. Add components: ') + chalk.cyan('npx @gilav21/shadcn-angular add button'));
@@ -130,6 +130,7 @@ export const registry = {
130
130
  'pagination',
131
131
  'popover',
132
132
  'component-outlet',
133
+ 'icon',
133
134
  ],
134
135
  },
135
136
  dialog: {
@@ -144,11 +145,12 @@ export const registry = {
144
145
  'dock-icon.component.ts',
145
146
  'dock-label.component.ts',
146
147
  ],
148
+ dependencies: ['icon'],
147
149
  },
148
150
  'tree-select': {
149
151
  name: 'tree-select',
150
152
  files: ['tree-select.component.ts'],
151
- dependencies: ['popover', 'tree'],
153
+ dependencies: ['popover', 'tree', 'icon'],
152
154
  },
153
155
  'virtual-scroll': {
154
156
  name: 'virtual-scroll',
@@ -175,6 +177,10 @@ export const registry = {
175
177
  name: 'field',
176
178
  files: ['field.component.ts'],
177
179
  },
180
+ icon: {
181
+ name: 'icon',
182
+ files: ['icon.component.ts'],
183
+ },
178
184
  'file-upload': {
179
185
  name: 'file-upload',
180
186
  files: ['file-upload.component.ts'],
@@ -264,7 +270,7 @@ export const registry = {
264
270
  sidebar: {
265
271
  name: 'sidebar',
266
272
  files: ['sidebar.component.ts'],
267
- dependencies: ['scroll-area', 'tooltip'],
273
+ dependencies: ['scroll-area', 'tooltip', 'icon'],
268
274
  },
269
275
  skeleton: {
270
276
  name: 'skeleton',
@@ -321,6 +327,7 @@ export const registry = {
321
327
  tree: {
322
328
  name: 'tree',
323
329
  files: ['tree.component.ts'],
330
+ dependencies: ['icon'],
324
331
  },
325
332
  'speed-dial': {
326
333
  name: 'speed-dial',
@@ -424,7 +431,7 @@ export const registry = {
424
431
  },
425
432
  'bento-grid': {
426
433
  name: 'bento-grid',
427
- dependencies: ['context-menu', 'component-outlet'],
434
+ dependencies: ['context-menu', 'component-outlet', 'icon'],
428
435
  files: [
429
436
  'bento-grid.component.ts',
430
437
  ],
@@ -438,12 +445,14 @@ export const registry = {
438
445
  'label',
439
446
  'select',
440
447
  'switch',
441
- 'slider'
448
+ 'slider',
449
+ 'icon'
442
450
  ],
443
451
  files: [
444
452
  'page-builder/page-builder.component.ts',
445
453
  'page-builder/page-builder.types.ts',
446
- 'page-builder/property-editor.component.ts'
454
+ 'page-builder/property-editor.component.ts',
455
+ 'page-builder/page-renderer.component.ts'
447
456
  ],
448
457
  },
449
458
  'component-outlet': {
@@ -12,7 +12,6 @@ export interface Config {
12
12
  utils: string;
13
13
  ui: string;
14
14
  };
15
- iconLibrary: string;
16
15
  }
17
16
  export declare function getDefaultConfig(): Config;
18
17
  export declare function getConfig(cwd: string): Promise<Config | null>;
@@ -15,7 +15,6 @@ export function getDefaultConfig() {
15
15
  utils: '@/components/lib/utils',
16
16
  ui: '@/components/ui',
17
17
  },
18
- iconLibrary: 'lucide-angular',
19
18
  };
20
19
  }
21
20
  export async function getConfig(cwd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gilav21/shadcn-angular",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "CLI for adding shadcn-angular components to your project",
5
5
  "bin": {
6
6
  "shadcn-angular": "./dist/index.js"
@@ -145,7 +145,6 @@ export async function init(options: InitOptions) {
145
145
  utils: responses.utilsPath.replace('src/', '@/').replace('.ts', ''),
146
146
  ui: responses.componentsPath.replace('src/', '@/'),
147
147
  },
148
- iconLibrary: 'lucide-angular',
149
148
  };
150
149
  }
151
150
 
@@ -204,7 +203,6 @@ export async function init(options: InitOptions) {
204
203
  'clsx',
205
204
  'tailwind-merge',
206
205
  'class-variance-authority',
207
- 'lucide-angular',
208
206
  'tailwindcss',
209
207
  'postcss',
210
208
  '@tailwindcss/postcss'
@@ -224,43 +222,6 @@ export async function init(options: InitOptions) {
224
222
  await fs.writeJson(postcssrcPath, configContent, { spaces: 4 });
225
223
  }
226
224
 
227
- // Configure app.config.ts with Lucide icons
228
- spinner.text = 'Configuring icons in app.config.ts...';
229
- const appConfigPath = path.join(cwd, 'src/app/app.config.ts');
230
-
231
- if (await fs.pathExists(appConfigPath)) {
232
- let appConfigContent = await fs.readFile(appConfigPath, 'utf-8');
233
-
234
- // Add imports
235
- if (!appConfigContent.includes('LucideAngularModule')) {
236
- const iconImports = "import { LucideAngularModule, ArrowDown, ArrowUp, ChevronsUpDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-angular';";
237
- appConfigContent = iconImports + '\n' + appConfigContent;
238
- }
239
-
240
- if (!appConfigContent.includes('importProvidersFrom')) {
241
- appConfigContent = "import { importProvidersFrom } from '@angular/core';\n" + appConfigContent;
242
- }
243
-
244
- // Add provider
245
- const providerCode = `
246
- importProvidersFrom(LucideAngularModule.pick({
247
- ArrowDown,
248
- ArrowUp,
249
- ChevronsUpDown,
250
- ChevronLeft,
251
- ChevronRight,
252
- ChevronsLeft,
253
- ChevronsRight
254
- }))`;
255
-
256
- if (!appConfigContent.includes('LucideAngularModule.pick')) {
257
- appConfigContent = appConfigContent.replace(
258
- /providers:\s*\[/,
259
- `providers: [${providerCode},`
260
- );
261
- await fs.writeFile(appConfigPath, appConfigContent);
262
- }
263
- }
264
225
 
265
226
  spinner.succeed(chalk.green('Project initialized successfully!'));
266
227
 
@@ -140,6 +140,7 @@ export const registry: Record<string, ComponentDefinition> = {
140
140
  'pagination',
141
141
  'popover',
142
142
  'component-outlet',
143
+ 'icon',
143
144
  ],
144
145
  },
145
146
  dialog: {
@@ -154,11 +155,12 @@ export const registry: Record<string, ComponentDefinition> = {
154
155
  'dock-icon.component.ts',
155
156
  'dock-label.component.ts',
156
157
  ],
158
+ dependencies: ['icon'],
157
159
  },
158
160
  'tree-select': {
159
161
  name: 'tree-select',
160
162
  files: ['tree-select.component.ts'],
161
- dependencies: ['popover', 'tree'],
163
+ dependencies: ['popover', 'tree', 'icon'],
162
164
  },
163
165
  'virtual-scroll': {
164
166
  name: 'virtual-scroll',
@@ -185,6 +187,10 @@ export const registry: Record<string, ComponentDefinition> = {
185
187
  name: 'field',
186
188
  files: ['field.component.ts'],
187
189
  },
190
+ icon: {
191
+ name: 'icon',
192
+ files: ['icon.component.ts'],
193
+ },
188
194
 
189
195
  'file-upload': {
190
196
  name: 'file-upload',
@@ -275,7 +281,7 @@ export const registry: Record<string, ComponentDefinition> = {
275
281
  sidebar: {
276
282
  name: 'sidebar',
277
283
  files: ['sidebar.component.ts'],
278
- dependencies: ['scroll-area', 'tooltip'],
284
+ dependencies: ['scroll-area', 'tooltip', 'icon'],
279
285
  },
280
286
  skeleton: {
281
287
  name: 'skeleton',
@@ -332,6 +338,7 @@ export const registry: Record<string, ComponentDefinition> = {
332
338
  tree: {
333
339
  name: 'tree',
334
340
  files: ['tree.component.ts'],
341
+ dependencies: ['icon'],
335
342
  },
336
343
  'speed-dial': {
337
344
  name: 'speed-dial',
@@ -435,7 +442,7 @@ export const registry: Record<string, ComponentDefinition> = {
435
442
  },
436
443
  'bento-grid': {
437
444
  name: 'bento-grid',
438
- dependencies: ['context-menu', 'component-outlet'],
445
+ dependencies: ['context-menu', 'component-outlet', 'icon'],
439
446
  files: [
440
447
  'bento-grid.component.ts',
441
448
  ],
@@ -449,12 +456,14 @@ export const registry: Record<string, ComponentDefinition> = {
449
456
  'label',
450
457
  'select',
451
458
  'switch',
452
- 'slider'
459
+ 'slider',
460
+ 'icon'
453
461
  ],
454
462
  files: [
455
463
  'page-builder/page-builder.component.ts',
456
464
  'page-builder/page-builder.types.ts',
457
- 'page-builder/property-editor.component.ts'
465
+ 'page-builder/property-editor.component.ts',
466
+ 'page-builder/page-renderer.component.ts'
458
467
  ],
459
468
  },
460
469
  'component-outlet': {
@@ -15,7 +15,6 @@ export interface Config {
15
15
  utils: string;
16
16
  ui: string;
17
17
  };
18
- iconLibrary: string;
19
18
  }
20
19
 
21
20
  export function getDefaultConfig(): Config {
@@ -33,7 +32,6 @@ export function getDefaultConfig(): Config {
33
32
  utils: '@/components/lib/utils',
34
33
  ui: '@/components/ui',
35
34
  },
36
- iconLibrary: 'lucide-angular',
37
35
  };
38
36
  }
39
37