@schandlergarcia/sf-web-components 2.0.0 → 2.1.0
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 +10 -0
- package/CLAUDE.md +23 -0
- package/brands/engine/agentApiConfig.ts +36 -0
- package/brands/engine/brand.css +40 -0
- package/brands/engine/engine-command-center-prd.md +575 -0
- package/brands/engine/engine-live-data.js +135 -0
- package/brands/engine/engine-sample-data.js +378 -0
- package/brands/engine/engine_logo.png +0 -0
- package/brands/engine/global.css +234 -0
- package/brands/engine/schema.graphql +292 -0
- package/brands/engine/useEngineLiveData.ts +49 -0
- package/brands/engine/useEvaAgent.ts +288 -0
- package/package.json +6 -2
- package/scripts/apply-brand.mjs +178 -0
- package/scripts/postinstall.mjs +14 -0
- package/scripts/reset-command-center.sh +28 -7
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.1.0] - 2026-04-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Brand system** — `npm run brand:engine` applies Engine branding (colors, sample data, PRD, hooks, logo) on top of the generic framework. `npm run brand:reset` reverts to neutral. `npm run brand:list` shows available brands.
|
|
12
|
+
- **`brands/engine/`** directory with Engine-branded `global.css` using official brand guidelines: Engine Black #0D1117, Cyan #7DCBD9, Green #1E9D6D, Blue #157DE5, Orange-Red #FD4B23, Amber #FFB200.
|
|
13
|
+
- **`scripts/apply-brand.mjs`** — brand application script that copies brand CSS, sample data, hooks, configs, PRD, schema, and logo into the consuming project.
|
|
14
|
+
- **`.brand` marker file** — tracks the active brand so `reset-command-center.sh` preserves it.
|
|
15
|
+
- **Brand-aware reset** — when a brand is active, `reset-command-center.sh` restores the brand's `global.css` instead of neutral.
|
|
16
|
+
- **Postinstall brand scripts** — `brand:engine`, `brand:reset`, `brand:list` npm scripts are automatically added to consuming projects.
|
|
17
|
+
|
|
8
18
|
## [2.0.0] - 2026-04-04
|
|
9
19
|
|
|
10
20
|
### Changed — Generic framework release
|
package/CLAUDE.md
CHANGED
|
@@ -67,8 +67,11 @@ sf-web-components/
|
|
|
67
67
|
│ │ └── workspace/ # CommandCenter.tsx.template
|
|
68
68
|
│ ├── lib/ # Utilities (utils.ts)
|
|
69
69
|
│ └── styles/ # global.css with neutral brand tokens
|
|
70
|
+
├── brands/
|
|
71
|
+
│ └── engine/ # Engine brand (global.css, sample data, PRD, hooks)
|
|
70
72
|
├── scripts/
|
|
71
73
|
│ ├── postinstall.mjs # Runs after npm install in consuming projects
|
|
74
|
+
│ ├── apply-brand.mjs # Apply/reset brand themes
|
|
72
75
|
│ ├── reset-command-center.sh
|
|
73
76
|
│ ├── validate-dashboard.sh
|
|
74
77
|
│ └── verify-consistency.sh
|
|
@@ -81,6 +84,26 @@ sf-web-components/
|
|
|
81
84
|
└── webapp-ui.md
|
|
82
85
|
```
|
|
83
86
|
|
|
87
|
+
## Brand System
|
|
88
|
+
|
|
89
|
+
The package ships with a **neutral theme** by default. Opt into a specific brand:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run brand:engine # Apply Engine brand (colors, sample data, PRD, hooks)
|
|
93
|
+
npm run brand:reset # Revert to neutral theme
|
|
94
|
+
npm run brand:list # Show available brands
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
When a brand is active, the reset script (`npm run reset:command-center`) preserves the brand's `global.css` instead of restoring neutral. The `.brand` marker file tracks which brand is active.
|
|
98
|
+
|
|
99
|
+
### Engine Brand
|
|
100
|
+
- **Primary:** Engine Black `#0D1117`
|
|
101
|
+
- **Accent:** Cyan `#7DCBD9`, Green `#1E9D6D`, Blue `#157DE5`
|
|
102
|
+
- **Secondary:** Orange-Red `#FD4B23`, Amber `#FFB200`
|
|
103
|
+
- **Neutrals:** Dark Gray `#616368`, Mid Gray `#B0B1B3`, Light Gray `#F3F3F4`
|
|
104
|
+
|
|
105
|
+
Installs: Engine-branded `global.css`, sample data, live data, PRD, GraphQL schema, Eva agent hook, agent config, and Engine logo.
|
|
106
|
+
|
|
84
107
|
## Key Conventions
|
|
85
108
|
|
|
86
109
|
### Component Naming
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentforce Agent API Configuration
|
|
3
|
+
*
|
|
4
|
+
* These values connect the ChatBar to the real Agentforce agent (Eva)
|
|
5
|
+
* via the REST-based Agent API instead of the iframe-based
|
|
6
|
+
* AgentforceConversationClient.
|
|
7
|
+
*
|
|
8
|
+
* Flow: OAuth token → create session → send messages → end session
|
|
9
|
+
*
|
|
10
|
+
* All requests are proxied through the Vite dev server to avoid CORS.
|
|
11
|
+
* See vite.config.ts proxy rules:
|
|
12
|
+
* /sf-oauth/* → myDomainUrl (for OAuth token)
|
|
13
|
+
* /sf-agent/* → agentApiBaseUrl (for Agent API calls)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const AGENT_API_CONFIG = {
|
|
17
|
+
myDomainUrl: "https://tdx26-keynote-org-1com.my.salesforce.com",
|
|
18
|
+
|
|
19
|
+
clientId:
|
|
20
|
+
"3MVG9Gm6vbdjgMWSOIAuIN3VSB5Rju6PgYQ5rl1yH3bVTTg9E2as4.C61Q0cyT.zqv2vUWNaxrm.A7SW5o3t7",
|
|
21
|
+
clientSecret:
|
|
22
|
+
"9ADF795A183A6B074A2E4B4CB1748B8DF7090C74191AF1C190213B512A733E03",
|
|
23
|
+
|
|
24
|
+
agentId: "0Xxa5000000rQlxCAE",
|
|
25
|
+
|
|
26
|
+
agentApiBaseUrl: "https://api.salesforce.com",
|
|
27
|
+
|
|
28
|
+
bypassUser: true,
|
|
29
|
+
|
|
30
|
+
demoTraveler: {
|
|
31
|
+
contactId: "003a500000mj4TlAAI",
|
|
32
|
+
email: "sarah.chen@arcline.ai",
|
|
33
|
+
firstName: "Sarah",
|
|
34
|
+
lastName: "Chen",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Engine Brand Overrides
|
|
3
|
+
*
|
|
4
|
+
* Applied on top of the base global.css when `npm run brand:engine` is run.
|
|
5
|
+
* Colors sourced from the official Engine Brand Guidelines.
|
|
6
|
+
*
|
|
7
|
+
* Primary: Engine Black #0D1117, White #FFFFFF
|
|
8
|
+
* Secondary: Orange-Red #FD4B23, Amber #FFB200, Green #1E9D6D,
|
|
9
|
+
* Cyan #7DCBD9, Blue #157DE5
|
|
10
|
+
* Neutrals: Dark Gray #616368, Mid Gray #B0B1B3, Light Gray #F3F3F4
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/* ── Engine brand palette (injected into @theme inline block) ─────────────── */
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
--color-engine-black: #0D1117
|
|
17
|
+
--color-engine-cyan: #7DCBD9 (primary accent)
|
|
18
|
+
--color-engine-green: #1E9D6D (savings, FlexPro, Flex, BestPrice)
|
|
19
|
+
--color-engine-blue: #157DE5 (finance, Credit, Charge)
|
|
20
|
+
--color-engine-orange: #FD4B23 (secondary accent)
|
|
21
|
+
--color-engine-amber: #FFB200 (alerts, warnings)
|
|
22
|
+
--color-engine-bg: #F3F3F4 (light gray background)
|
|
23
|
+
--color-engine-border: #B0B1B3 (mid gray)
|
|
24
|
+
--color-engine-text: #0D1117 (engine black)
|
|
25
|
+
--color-engine-muted: #616368 (dark gray)
|
|
26
|
+
--color-engine-label: #B0B1B3 (mid gray)
|
|
27
|
+
|
|
28
|
+
Brand ramp (built from Cyan #7DCBD9):
|
|
29
|
+
--color-brand-50: #F0FAFB
|
|
30
|
+
--color-brand-100: #D9F2F5
|
|
31
|
+
--color-brand-200: #B3E5EB
|
|
32
|
+
--color-brand-300: #7DCBD9 (Cyan — primary)
|
|
33
|
+
--color-brand-400: #5BB8CA
|
|
34
|
+
--color-brand-500: #3AA0B5
|
|
35
|
+
--color-brand-600: #2D849A
|
|
36
|
+
--color-brand-700: #266B7E
|
|
37
|
+
--color-brand-800: #235768
|
|
38
|
+
--color-brand-900: #1F4858
|
|
39
|
+
--color-brand-950: #112E3A
|
|
40
|
+
*/
|