@schandlergarcia/sf-web-components 1.9.47 → 1.9.48

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 CHANGED
@@ -73,6 +73,48 @@ Between versions 1.9.29 and 1.9.42, a critical inconsistency existed that broke
73
73
 
74
74
  ---
75
75
 
76
+ ## [1.9.48] - 2026-04-01
77
+
78
+ ### Changed
79
+ - **scripts/reset-command-center.sh** - Home page now resets to search page template (not CommandCenter)
80
+ - Issue: Reset forced users into CommandCenter/BlankDashboard pattern
81
+ - Expected: Reset should restore template default (search page)
82
+ - Previous behavior: Home → CommandCenter → BlankDashboard → "Bespoke App Template" EmptyState
83
+ - New behavior: Home → Search page with UIInput/UIButton for finding Salesforce records
84
+ - Updated final message: "/ → Home (search page)" instead of "/ → Home (CommandCenter dashboard)"
85
+
86
+ ### Rationale
87
+ - **Reset should mean "go back to template"** not "force command center pattern"
88
+ - Users building command centers can manually wire their dashboard
89
+ - Search page is the more universal default
90
+ - CommandCenter/BlankDashboard still available, just not forced on reset
91
+ - Aligns with postinstall behavior (which installs search Home.tsx)
92
+
93
+ ### For Command Center Users
94
+ If you want Home to render a command center dashboard:
95
+
96
+ 1. Create your dashboard (e.g., `src/pages/EngineDashboard.tsx`)
97
+ 2. Update Home.tsx:
98
+ ```tsx
99
+ import EngineDashboard from './EngineDashboard';
100
+ export default function Home() {
101
+ return <EngineDashboard />;
102
+ }
103
+ ```
104
+
105
+ Or use CommandCenter as a wrapper:
106
+
107
+ 1. Edit `src/components/workspace/CommandCenter.tsx` to render your dashboard
108
+ 2. Update Home.tsx:
109
+ ```tsx
110
+ import CommandCenter from '../components/workspace/CommandCenter';
111
+ export default function Home() {
112
+ return <CommandCenter />;
113
+ }
114
+ ```
115
+
116
+ ---
117
+
76
118
  ## [1.9.47] - 2026-04-01
77
119
 
78
120
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.47",
3
+ "version": "1.9.48",
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",
@@ -73,6 +73,7 @@
73
73
  "world-atlas": "^2.0.0"
74
74
  },
75
75
  "dependencies": {
76
+ "@schandlergarcia/sf-web-components": "^1.9.47",
76
77
  "class-variance-authority": "^0.7.1",
77
78
  "clsx": "^2.1.1",
78
79
  "glob": "^11.0.0",
@@ -144,20 +144,73 @@ WRAPPER_EOF
144
144
  echo " ✓ Wired up BlankDashboard"
145
145
  echo ""
146
146
 
147
- # ── 4. Reset Home.tsx to render CommandCenter ────────────────────────────────
147
+ # ── 4. Reset Home.tsx to search page template ───────────────────────────────
148
148
 
149
149
  HOME="src/pages/Home.tsx"
150
- echo "→ Updating ${HOME}..."
150
+ echo "→ Restoring ${HOME} from template..."
151
151
 
152
152
  cat > "$HOME" << 'HOME_EOF'
153
- import CommandCenter from "../components/workspace/CommandCenter";
153
+ import { useState } from "react";
154
+ import { useNavigate } from "react-router";
155
+ import UIInput from '@/components/library/ui/UIInput';
156
+ import UIButton from '@/components/library/ui/UIButton';
157
+ import { Search } from "lucide-react";
158
+
159
+ export default function HomePage() {
160
+ const [searchQuery, setSearchQuery] = useState("");
161
+ const navigate = useNavigate();
162
+
163
+ const handleSearch = () => {
164
+ const trimmed = searchQuery.trim();
165
+ if (trimmed) {
166
+ navigate(`/accounts?search=${encodeURIComponent(trimmed)}`);
167
+ } else {
168
+ navigate('/accounts');
169
+ }
170
+ };
171
+
172
+ const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
173
+ if (e.key === "Enter") {
174
+ e.preventDefault();
175
+ handleSearch();
176
+ }
177
+ };
154
178
 
155
- export default function Home() {
156
- return <CommandCenter />;
179
+ return (
180
+ <div className="flex min-h-[80vh] items-center justify-center px-4 sm:px-6 lg:px-8 bg-slate-50 dark:bg-slate-950 transition-colors">
181
+ <div className="w-full max-w-4xl">
182
+ <div className="text-center mb-8">
183
+ <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
184
+ <p className="text-lg text-slate-600 dark:text-slate-300">Find records across your organization.</p>
185
+ </div>
186
+ <div className="flex flex-col gap-4">
187
+ <div className="relative">
188
+ <Search className="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-slate-400" />
189
+ <UIInput
190
+ type="text"
191
+ value={searchQuery}
192
+ onChange={(e) => setSearchQuery(e.target.value)}
193
+ onKeyDown={handleKeyDown}
194
+ placeholder="Search..."
195
+ className="pl-10 w-full"
196
+ />
197
+ </div>
198
+ <div className="flex gap-3 justify-center">
199
+ <UIButton onClick={handleSearch} variant="primary">
200
+ Search
201
+ </UIButton>
202
+ <UIButton onClick={() => navigate('/accounts')} variant="secondary">
203
+ Browse All
204
+ </UIButton>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ );
157
210
  }
158
211
  HOME_EOF
159
212
 
160
- echo " ✓ Home renders CommandCenter"
213
+ echo " ✓ Home restored to search page"
161
214
  echo ""
162
215
 
163
216
  # ── 5. Ensure Search.tsx page exists ─────────────────────────────────────────
@@ -362,12 +415,14 @@ echo "║ • Salesforce SDK stubs for local dev ║"
362
415
  echo "║ • All styles & dependencies ║"
363
416
  echo "║ ║"
364
417
  echo "║ Layout: ║"
365
- echo "║ / → Home (CommandCenter dashboard) ║"
366
- echo "║ /search → Search (global search input) ║"
418
+ echo "║ / → Home (search page) ║"
419
+ echo "║ /search → Search (search page) ║"
367
420
  echo "║ Nav bar on Home + Search pages only ║"
368
421
  echo "║ ║"
369
422
  echo "║ Start building: ║"
370
- echo "║ Edit src/pages/BlankDashboard.tsx ║"
423
+ echo "║ • For dashboards: Edit BlankDashboard.tsx ║"
424
+ echo "║ then wire into routes or CommandCenter ║"
425
+ echo "║ • For search app: Ready to go! ║"
371
426
  echo "║ npm run dev ║"
372
427
  echo "╚════════════════════════════════════════════════╝"
373
428
  echo ""