@schandlergarcia/sf-web-components 1.9.44 → 1.9.45
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/CHANGELOG.md +23 -0
- package/package.json +1 -1
- package/scripts/reset-command-center.sh +18 -10
package/CHANGELOG.md
CHANGED
|
@@ -73,6 +73,29 @@ Between versions 1.9.29 and 1.9.42, a critical inconsistency existed that broke
|
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
|
+
## [1.9.45] - 2026-04-01
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
- **scripts/reset-command-center.sh** - Fixed directory structure mismatch
|
|
80
|
+
- Issue: Script tried to create files in `src/components/pages/` (old structure)
|
|
81
|
+
- Cause: Script wasn't updated when postinstall migrated dashboards to `src/pages/`
|
|
82
|
+
- Fix: Updated all paths to use correct structure:
|
|
83
|
+
- `src/components/pages/` → `src/pages/` (for dashboards)
|
|
84
|
+
- `src/components/pages/CommandCenter.tsx` → `src/components/workspace/CommandCenter.tsx`
|
|
85
|
+
- Changed BlankDashboard from `.jsx` to `.tsx` (TypeScript)
|
|
86
|
+
- Added `mkdir -p` to ensure directories exist before writing
|
|
87
|
+
- Updated import paths: `../components/pages/CommandCenter` → `../components/workspace/CommandCenter`
|
|
88
|
+
- Updated import paths: `./BlankDashboard` → `../../pages/BlankDashboard`
|
|
89
|
+
- Error was: "No such file or directory" when trying to create BlankDashboard.jsx
|
|
90
|
+
|
|
91
|
+
### Changed
|
|
92
|
+
- **BlankDashboard** file format from `.jsx` to `.tsx` for consistency with other templates
|
|
93
|
+
|
|
94
|
+
### Context
|
|
95
|
+
The postinstall script (lines 318-356) migrates dashboards from the old location (`src/components/pages/`) to the new location (`src/pages/`) introduced in earlier versions. The reset script wasn't updated to match this change, causing it to try creating files in directories that don't exist in new installations.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
76
99
|
## [1.9.44] - 2026-04-01
|
|
77
100
|
|
|
78
101
|
### Added
|
package/package.json
CHANGED
|
@@ -39,11 +39,14 @@ echo ""
|
|
|
39
39
|
echo "→ Removing custom dashboards…"
|
|
40
40
|
|
|
41
41
|
removed=0
|
|
42
|
-
for f in src/
|
|
42
|
+
for f in src/pages/*Dashboard*.jsx src/pages/*Dashboard*.tsx; do
|
|
43
43
|
if [ -f "$f" ]; then
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
# Don't remove BlankDashboard.tsx (it's the template)
|
|
45
|
+
if [[ "$(basename "$f")" != "BlankDashboard.tsx" ]]; then
|
|
46
|
+
rm "$f"
|
|
47
|
+
echo " ✓ Removed $(basename "$f")"
|
|
48
|
+
removed=$((removed + 1))
|
|
49
|
+
fi
|
|
47
50
|
fi
|
|
48
51
|
done
|
|
49
52
|
|
|
@@ -54,11 +57,13 @@ echo ""
|
|
|
54
57
|
|
|
55
58
|
# ── 2. Write the blank starter dashboard ────────────────────────────────────
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
# Ensure src/pages directory exists
|
|
61
|
+
mkdir -p src/pages
|
|
62
|
+
|
|
63
|
+
BLANK="src/pages/BlankDashboard.tsx"
|
|
58
64
|
echo "→ Creating ${BLANK}..."
|
|
59
65
|
|
|
60
66
|
cat > "$BLANK" << 'DASHBOARD_EOF'
|
|
61
|
-
import React from "react";
|
|
62
67
|
import { RocketLaunchIcon } from "@heroicons/react/24/outline";
|
|
63
68
|
import { EmptyState } from "@/components/library";
|
|
64
69
|
|
|
@@ -82,7 +87,10 @@ echo ""
|
|
|
82
87
|
# ── 3. Update CommandCenter.tsx to use BlankDashboard ────────────────────────
|
|
83
88
|
# Preserves theme initialMode if previously customized.
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
# Ensure src/components/workspace directory exists
|
|
91
|
+
mkdir -p src/components/workspace
|
|
92
|
+
|
|
93
|
+
WRAPPER="src/components/workspace/CommandCenter.tsx"
|
|
86
94
|
echo "→ Updating ${WRAPPER}..."
|
|
87
95
|
|
|
88
96
|
# Extract existing initialMode from AppThemeProvider (default: "light")
|
|
@@ -99,7 +107,7 @@ cat > "$WRAPPER" << WRAPPER_EOF
|
|
|
99
107
|
import AppThemeProvider from "@/components/library/theme/AppThemeProvider";
|
|
100
108
|
import DataModeProvider from "@/components/library/data/DataModeProvider";
|
|
101
109
|
import { Toast } from "@heroui/react";
|
|
102
|
-
import BlankDashboard from "
|
|
110
|
+
import BlankDashboard from "../../pages/BlankDashboard";
|
|
103
111
|
|
|
104
112
|
export default function CommandCenter() {
|
|
105
113
|
return (
|
|
@@ -124,7 +132,7 @@ HOME="src/pages/Home.tsx"
|
|
|
124
132
|
echo "→ Updating ${HOME}..."
|
|
125
133
|
|
|
126
134
|
cat > "$HOME" << 'HOME_EOF'
|
|
127
|
-
import CommandCenter from "../components/
|
|
135
|
+
import CommandCenter from "../components/workspace/CommandCenter";
|
|
128
136
|
|
|
129
137
|
export default function Home() {
|
|
130
138
|
return <CommandCenter />;
|
|
@@ -341,7 +349,7 @@ echo "║ /search → Search (global search input) ║"
|
|
|
341
349
|
echo "║ Nav bar on Home + Search pages only ║"
|
|
342
350
|
echo "║ ║"
|
|
343
351
|
echo "║ Start building: ║"
|
|
344
|
-
echo "║ Edit src/
|
|
352
|
+
echo "║ Edit src/pages/BlankDashboard.tsx ║"
|
|
345
353
|
echo "║ npm run dev ║"
|
|
346
354
|
echo "╚════════════════════════════════════════════════╝"
|
|
347
355
|
echo ""
|