@schandlergarcia/sf-web-components 1.9.11 → 1.9.13
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 +3 -0
- package/package.json +1 -1
- package/scripts/postinstall.mjs +26 -0
- package/scripts/reset-command-center.sh +2 -2
package/README.md
CHANGED
|
@@ -74,6 +74,9 @@ The postinstall script automatically:
|
|
|
74
74
|
✅ **Copies utility files** to `src/lib/`
|
|
75
75
|
- `utils.ts` - Helper functions (cn, etc.)
|
|
76
76
|
|
|
77
|
+
✅ **Installs workspace components** to `src/components/workspace/`
|
|
78
|
+
- `CommandCenter.tsx` - Dashboard wrapper with theme and data providers
|
|
79
|
+
|
|
77
80
|
---
|
|
78
81
|
|
|
79
82
|
## Using the Dashboard Framework
|
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -243,9 +243,35 @@ if (fs.existsSync(routesTemplatePath) && fs.existsSync(path.join(cwd, 'src'))) {
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
// Add reset:command-center script to package.json
|
|
247
|
+
const packageJsonPath = path.join(cwd, 'package.json');
|
|
248
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
249
|
+
console.log('\n🔧 Adding reset script to package.json...\n');
|
|
250
|
+
|
|
251
|
+
try {
|
|
252
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
253
|
+
|
|
254
|
+
if (!packageJson.scripts) {
|
|
255
|
+
packageJson.scripts = {};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Add the reset:command-center script if it doesn't exist
|
|
259
|
+
if (!packageJson.scripts['reset:command-center']) {
|
|
260
|
+
packageJson.scripts['reset:command-center'] = 'bash node_modules/@schandlergarcia/sf-web-components/scripts/reset-command-center.sh';
|
|
261
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
|
|
262
|
+
console.log(' ✓ Added "reset:command-center" script to package.json');
|
|
263
|
+
} else {
|
|
264
|
+
console.log(' ℹ Script "reset:command-center" already exists');
|
|
265
|
+
}
|
|
266
|
+
} catch (error) {
|
|
267
|
+
console.error(` ✗ Failed to update package.json: ${error.message}`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
246
271
|
console.log('\n📊 Summary:');
|
|
247
272
|
console.log(` - Copied ${componentsCopied} UI components`);
|
|
248
273
|
console.log(` - Updated ${filesUpdated} files`);
|
|
249
274
|
console.log(` - Installed ${templatesInstalled} page templates`);
|
|
250
275
|
console.log(` - Installed CommandCenter.tsx for dashboard management`);
|
|
276
|
+
console.log(` - Added "npm run reset:command-center" script`);
|
|
251
277
|
console.log('\n✅ Setup complete! UI components are now local for optimal Tailwind scanning\n');
|
|
@@ -264,14 +264,14 @@ cat > "$ROUTES" << 'ROUTES_EOF'
|
|
|
264
264
|
import type { RouteObject } from 'react-router';
|
|
265
265
|
import Home from './pages/Home';
|
|
266
266
|
import NotFound from './pages/NotFound';
|
|
267
|
-
import
|
|
267
|
+
import AppLayout from './appLayout';
|
|
268
268
|
import AccountSearch from "./features/object-search/__examples__/pages/AccountSearch";
|
|
269
269
|
import AccountObjectDetail from "./features/object-search/__examples__/pages/AccountObjectDetailPage";
|
|
270
270
|
|
|
271
271
|
export const routes: RouteObject[] = [
|
|
272
272
|
{
|
|
273
273
|
path: "/",
|
|
274
|
-
element: <
|
|
274
|
+
element: <AppLayout />,
|
|
275
275
|
children: [
|
|
276
276
|
{
|
|
277
277
|
index: true,
|