@schandlergarcia/sf-web-components 1.0.6 → 1.0.8

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.
@@ -1,15 +1,3 @@
1
- @layer base {
2
- html,
3
- body,
4
- #root {
5
- @apply min-h-screen;
6
- }
7
-
8
- body {
9
- @apply antialiased bg-white;
10
- }
11
- }
12
- @import 'shadcn/tailwind.css';
13
1
  @theme inline {
14
2
  --color-background: var(--background);
15
3
  --color-foreground: var(--foreground);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Remove Local Components Script
5
+ *
6
+ * Removes local shadcn/ui components and lib utilities after migrating to the component library.
7
+ * This script should be run from the consuming project's webapp directory.
8
+ *
9
+ * Usage:
10
+ * node node_modules/@schandlergarcia/sf-web-components/scripts/remove-local-components.mjs
11
+ *
12
+ * Or add to package.json:
13
+ * "scripts": {
14
+ * "remove-local-ui": "node node_modules/@schandlergarcia/sf-web-components/scripts/remove-local-components.mjs"
15
+ * }
16
+ */
17
+
18
+ import fs from 'fs';
19
+ import path from 'path';
20
+ import { fileURLToPath } from 'url';
21
+
22
+ const __filename = fileURLToPath(import.meta.url);
23
+ const __dirname = path.dirname(__filename);
24
+
25
+ // Get the webapp root (where this script is being called from)
26
+ const webappRoot = process.cwd();
27
+
28
+ console.log('šŸ—‘ļø Remove Local Components');
29
+ console.log('==========================\n');
30
+ console.log(`Working directory: ${webappRoot}\n`);
31
+
32
+ // Paths to remove
33
+ const pathsToRemove = [
34
+ 'src/components/ui',
35
+ 'src/lib/utils.ts',
36
+ 'src/lib/utils.js'
37
+ ];
38
+
39
+ let removedCount = 0;
40
+ const errors = [];
41
+
42
+ for (const pathToRemove of pathsToRemove) {
43
+ const fullPath = path.join(webappRoot, pathToRemove);
44
+
45
+ if (!fs.existsSync(fullPath)) {
46
+ console.log(` ⊘ ${pathToRemove} (does not exist)`);
47
+ continue;
48
+ }
49
+
50
+ try {
51
+ const stats = fs.statSync(fullPath);
52
+
53
+ if (stats.isDirectory()) {
54
+ fs.rmSync(fullPath, { recursive: true, force: true });
55
+ console.log(` āœ“ Removed directory: ${pathToRemove}`);
56
+ } else {
57
+ fs.unlinkSync(fullPath);
58
+ console.log(` āœ“ Removed file: ${pathToRemove}`);
59
+ }
60
+
61
+ removedCount++;
62
+ } catch (error) {
63
+ const errorMsg = `Failed to remove ${pathToRemove}: ${error.message}`;
64
+ errors.push(errorMsg);
65
+ console.error(` āœ— ${errorMsg}`);
66
+ }
67
+ }
68
+
69
+ console.log(`\nšŸ“Š Summary: Removed ${removedCount} items`);
70
+
71
+ if (errors.length > 0) {
72
+ console.error('\nāŒ Errors:');
73
+ errors.forEach(e => console.error(` - ${e}`));
74
+ process.exit(1);
75
+ }
76
+
77
+ console.log('\nāœ… Local components removed successfully!');
78
+ console.log('\nā„¹ļø Note: All imports should now use @schandlergarcia/sf-web-components');