@db-ux/mcp-server 4.6.1 → 4.7.0-mcp-server-migrate-tool-test-2-0cf8204
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 +165 -110
- package/agent/_instructions.md +27 -8
- package/assets/migration/color-migration.md +150 -0
- package/assets/migration/component-migration.md +105 -0
- package/assets/migration/general-migration.md +33 -0
- package/assets/migration/icon-migration.md +3 -0
- package/assets/tokens/default-variables.scss +1317 -0
- package/assets/tokens/density-all.css +1807 -0
- package/assets/visuals/dashboard.png +0 -0
- package/assets/visuals/form.png +0 -0
- package/assets/visuals/landingpage.png +0 -0
- package/assets/visuals/table.png +0 -0
- package/dist/index.js +1049 -110
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -91,22 +91,53 @@ This will copy the correct rules for DB UX component usage and design token refe
|
|
|
91
91
|
- **Check Status:** Look for a green indicator or "db-ux" in your IDE's MCP server list.
|
|
92
92
|
- **Check Logs:** If it doesn't appear, check the MCP output logs in your IDE (e.g., in VS Code: _Output Panel_ → _MCP_ or _MCP Servers_).
|
|
93
93
|
|
|
94
|
+
### 5. Optimize Amazon Q for this Project (Recommended)
|
|
95
|
+
|
|
96
|
+
Amazon Q can automatically load the project's `CONTEXT.md` as a persistent system prompt ("Rules") for every session. This means the agent **already knows** the MCP server architecture, all available tools, design token sources, migration workflows, and the v3 component API — without any manual onboarding or repeated context-setting by the developer.
|
|
97
|
+
|
|
98
|
+
**Why this matters:**
|
|
99
|
+
|
|
100
|
+
- ✅ Eliminates hallucinations about component names, prop signatures, and token values
|
|
101
|
+
- ✅ The agent follows the correct 6-step migration workflow from the first message
|
|
102
|
+
- ✅ New team members get a fully context-aware AI assistant on day one
|
|
103
|
+
|
|
104
|
+
**Setup:**
|
|
105
|
+
|
|
106
|
+
1. Open (or create) the file `~/.aws/amazonq/agents/default.json`
|
|
107
|
+
2. Add the following configuration:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"agentInstruction": {
|
|
112
|
+
"paths": ["CONTEXT.md"]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
3. Place the `CONTEXT.md` file in your project root (it ships with `@db-ux/mcp-server` and is copied by `npx @db-ux/agent-cli`)
|
|
118
|
+
|
|
119
|
+
> **Note:** The path is resolved relative to the workspace root. Amazon Q / Kiro will read this file at the start of every session and inject it as system-level context for the agent.
|
|
120
|
+
|
|
94
121
|
---
|
|
95
122
|
|
|
96
123
|
## 🛠 Available AI Tools (Skills)
|
|
97
124
|
|
|
98
|
-
| Tool | Description
|
|
99
|
-
| ------------------------------ |
|
|
100
|
-
| `list_components` | Returns all available DB UX component names (e.g. `button`, `input`, `tag`). Call this first to confirm a component exists before using it.
|
|
101
|
-
| `get_component_props` | Returns the raw TypeScript `model.ts` for a component — all interfaces, prop types, and JSDoc comments.
|
|
102
|
-
| `get_component_details` | Returns the list of available example names for a component (e.g. `"Variant"`, `"Show Icon Leading"`).
|
|
103
|
-
| `get_example_code` | Fetches the exact generated source code for a component example in a specific framework (`react`, `angular`, `vue`, `web-components`, or `html`). This is the code the AI adapts — not invents.
|
|
104
|
-
| `get_design_tokens` | Returns CSS custom properties (`--db-*`)
|
|
105
|
-
| `list_design_token_categories` | Lists all available token categories to pass to `get_design_tokens`.
|
|
106
|
-
| `list_icons` | Returns all valid DB UX icon names (e.g. `arrow_down`, `chevron_right`, `x_placeholder`). Always call this before using any `icon` prop — never guess a name.
|
|
107
|
-
| `docs_search` | Searches the DB UX conceptual documentation (guidelines, A11y, migration, ADRs) or component-specific markdown docs. Acts as our Retrieval-Augmented Generation (RAG) engine.
|
|
108
|
-
| `list_migration_guides` | Returns all available migration guide names (e.g. `
|
|
109
|
-
| `get_migration_guide` | Returns the full markdown content of a specific migration guide. Use this to load official package renames, prop changes, and component workarounds before refactoring legacy code.
|
|
125
|
+
| Tool | Description |
|
|
126
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
127
|
+
| `list_components` | Returns all available DB UX component names (e.g. `button`, `input`, `tag`). Call this first to confirm a component exists before using it. |
|
|
128
|
+
| `get_component_props` | Returns the raw TypeScript `model.ts` for a component — all interfaces, prop types, and JSDoc comments. |
|
|
129
|
+
| `get_component_details` | Returns the list of available example names for a component (e.g. `"Variant"`, `"Show Icon Leading"`). |
|
|
130
|
+
| `get_example_code` | Fetches the exact generated source code for a component example in a specific framework (`react`, `angular`, `vue`, `web-components`, or `html`). This is the code the AI adapts — not invents. |
|
|
131
|
+
| `get_design_tokens` | Returns CSS custom properties (`--db-*`) for a token category (`colors`, `spacing`, `typography`, `elevation`, `density`, …). For spacing, elevation, and density, returns **compiled primitive values** (e.g. `0.75rem`, box-shadow strings) instead of raw SCSS. Prevents hardcoded hex values and magic numbers. |
|
|
132
|
+
| `list_design_token_categories` | Lists all available token categories to pass to `get_design_tokens`. |
|
|
133
|
+
| `list_icons` | Returns all valid DB UX icon names (e.g. `arrow_down`, `chevron_right`, `x_placeholder`). Always call this before using any `icon` prop — never guess a name. |
|
|
134
|
+
| `docs_search` | Searches the DB UX conceptual documentation (guidelines, A11y, migration, ADRs) or component-specific markdown docs. Acts as our Retrieval-Augmented Generation (RAG) engine. |
|
|
135
|
+
| `list_migration_guides` | Returns all available migration guide names (e.g. `color-migration`, `component-migration`). Call this first before any migration task. |
|
|
136
|
+
| `get_migration_guide` | Returns the full markdown content of a specific migration guide. Use this to load official package renames, prop changes, and component workarounds before refactoring legacy code. |
|
|
137
|
+
| `verify_migrated_code` | Saves generated code to a temp file and runs a compiler check (`tsc --noEmit`). Must be called after code generation and before showing code to the user. Returns diagnostics on failure so the AI can self-correct (max 3 attempts). |
|
|
138
|
+
| `get_component_visual` | Returns a downsampled screenshot (max 800×800 px, JPEG q75, bilinear interpolation) of a DB UX component or page layout as a Base64-encoded image. Use sparingly — only when visual context is needed for complex layouts, z-index dependencies, or visual hierarchies. |
|
|
139
|
+
| `analyze_v2_migration` | **Call FIRST when migrating a file.** Scans a source file for DB UI v2 patterns (`<cmp-*>`, `<elm-*>`, `<rea-*>` tags, `db-color-*` tokens, legacy icon names) and returns a JSON report with exact line numbers and deterministic migration suggestions from the official guides. No LLM guessing needed. |
|
|
140
|
+
| `scaffold_component` | Generates a DB UX-conformant component skeleton for a specified framework (`react`, `angular`, `vue`, `web-components`, or `html`). Creates all boilerplate files (component, template, SCSS) with correct `@db-ux/*` imports and SCSS foundation `@use` directives. The developer only needs to fill in business logic. |
|
|
110
141
|
|
|
111
142
|
### Example: fetching a React button example
|
|
112
143
|
|
|
@@ -117,6 +148,8 @@ get_component_details → lists ["Density", "Variant", "Show Icon Leading", .
|
|
|
117
148
|
get_example_code → returns show-icon-leading.example.tsx source
|
|
118
149
|
list_icons → confirms "arrow_right" is a valid icon name
|
|
119
150
|
get_design_tokens → returns --db-spacing-fixed-md for layout
|
|
151
|
+
get_component_visual → (optional) returns a downsampled screenshot for visual reference
|
|
152
|
+
verify_migrated_code → runs tsc --noEmit on generated code, returns ✅ or diagnostics
|
|
120
153
|
```
|
|
121
154
|
|
|
122
155
|
---
|
|
@@ -141,10 +174,78 @@ Performs a strict multi-layered QA, accessibility, and DB UX compliance audit on
|
|
|
141
174
|
|
|
142
175
|
### `migrate_component` (Legacy Refactoring)
|
|
143
176
|
|
|
144
|
-
Transforms legacy UI code (e.g., Bootstrap, native HTML, DB UI v1/v2) into the modern DB UX v3
|
|
177
|
+
Transforms legacy UI code (e.g., Bootstrap, native HTML, DB UI v1/v2) into the modern DB UX v3 architecture. This is the most complex prompt — it orchestrates **12 different MCP tools** across 5 mandatory steps, including a compiler-verified self-correction loop.
|
|
178
|
+
|
|
179
|
+
**Parameters:**
|
|
180
|
+
|
|
181
|
+
| Parameter | Required | Description |
|
|
182
|
+
| ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
183
|
+
| `legacy_code` | Yes | The outdated source code to migrate (DB UI, Bootstrap, raw HTML/CSS). Max 10,000 chars |
|
|
184
|
+
| `source_context` | Yes | Origin of the legacy code: `db-ui-v1`, `db-ui-v2`, `db-ux-v1`, `db-ux-v2`, `db-ux-v3`, `bootstrap-4`, or `native-html` |
|
|
185
|
+
| `target_framework` | Yes | Target framework: `react`, `angular`, `vue`, `web-components`, or `html` |
|
|
186
|
+
|
|
187
|
+
**Full workflow (5 mandatory steps):**
|
|
188
|
+
|
|
189
|
+
```text
|
|
190
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
191
|
+
│ STEP 0: FILE SCAN (NEW — deterministic, no guessing) │
|
|
192
|
+
│ analyze_v2_migration → JSON report with line numbers, │
|
|
193
|
+
│ v2 patterns, and migration suggestions │
|
|
194
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
195
|
+
│ STEP 1: MIGRATION ANALYSIS │
|
|
196
|
+
│ list_migration_guides → get_migration_guide → docs_search │
|
|
197
|
+
│ Output: Legacy Element → DB UX v3 Component mapping table │
|
|
198
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
199
|
+
│ STEP 2: COMPONENT DISCOVERY & PROPS RETRIEVAL │
|
|
200
|
+
│ list_components → get_component_props → get_component_details │
|
|
201
|
+
│ → get_example_code → get_design_tokens → list_icons │
|
|
202
|
+
│ → get_component_visual (optional, for layout uncertainty) │
|
|
203
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
204
|
+
│ STEP 3: CODE GENERATION │
|
|
205
|
+
│ Generates complete migrated code (NOT shown to user yet) │
|
|
206
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
207
|
+
│ STEP 4: CODE VERIFICATION & SELF-CORRECTION (mandatory) │
|
|
208
|
+
│ verify_migrated_code → fix errors → retry (max 3 attempts) │
|
|
209
|
+
│ ⚠️ Only for react, angular, vue — skipped for html/wc │
|
|
210
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
211
|
+
│ STEP 5: FINAL OUTPUT │
|
|
212
|
+
│ ✅ VERIFIED or ⚠️ WARNING with remaining diagnostics │
|
|
213
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Step-by-step details:**
|
|
217
|
+
|
|
218
|
+
1. **Migration Analysis** — Calls `list_migration_guides` then `get_migration_guide` to load official migration rules (package renames, prop changes, removed components). Calls `docs_search` for component-specific migration docs. Produces a mapping table: Legacy Element → DB UX v3 Component → Rationale.
|
|
219
|
+
2. **Component Discovery & Props Retrieval** — Calls `list_components` to verify every mapped component exists. For each: `get_component_props` (TypeScript API), `get_component_details` (examples), `get_example_code` (canonical source to adapt). Calls `get_design_tokens` to replace hardcoded colors/spacing. Calls `list_icons` to verify icon names. Optionally calls `get_component_visual` when uncertain about layout structures.
|
|
220
|
+
3. **Code Generation** — Generates the complete migrated code with correct `@db-ux/*` imports, verified design tokens, and verified icon names. **Does NOT output this to the user yet.**
|
|
221
|
+
4. **Code Verification & Self-Correction** — Passes the generated code to `verify_migrated_code` which runs `tsc --noEmit`. If compiler errors are returned, the AI analyzes diagnostics, fixes the code, and retries — up to **3 attempts maximum**. This step only applies to `react`, `angular`, and `vue` targets. For `web-components` and `html`, it is skipped.
|
|
222
|
+
5. **Final Output** — Presents the result in three sections: "Migration Analysis" (mapping table + guide references), "Migrated Code" (marked ✅ VERIFIED on success, or ⚠️ WARNING with remaining diagnostics), and "Accessibility Statement" (WCAG 2.2 AA compliance confirmation).
|
|
223
|
+
|
|
224
|
+
**Available migration guides:**
|
|
225
|
+
|
|
226
|
+
| Guide | Covers |
|
|
227
|
+
| --------------------- | ------------------------------------------------------------------ |
|
|
228
|
+
| `component-migration` | Component renames, prop changes, removed/planned components |
|
|
229
|
+
| `color-migration` | Full color token mapping (old → new `--db-*` tokens) |
|
|
230
|
+
| `icon-migration` | Icon name mapping (e.g. `account` → `person`, `delete` → `bin`) |
|
|
231
|
+
| `general-migration` | Typography tokens, spacing tokens, elevation, inline style removal |
|
|
232
|
+
|
|
233
|
+
**Example: migrating a DB UI v2 React component**
|
|
234
|
+
|
|
235
|
+
Trigger the prompt with these parameters:
|
|
236
|
+
|
|
237
|
+
- `legacy_code`: your old React component source code
|
|
238
|
+
- `source_context`: `db-ui-v2`
|
|
239
|
+
- `target_framework`: `react`
|
|
145
240
|
|
|
146
|
-
|
|
147
|
-
|
|
241
|
+
The AI will then autonomously:
|
|
242
|
+
|
|
243
|
+
1. Load `component-migration`, `color-migration`, `icon-migration`, and `general-migration`
|
|
244
|
+
2. Map every legacy element (e.g. `variant="brand-primary"` → `variant="brand"`, `icon="search"` → `icon="magnifying_glass"`)
|
|
245
|
+
3. Fetch the exact generated React example code for each component and adapt it
|
|
246
|
+
4. Replace all hardcoded `#ec0016` / `margin: 15px` values with `--db-*` design tokens
|
|
247
|
+
5. Compile the result via `verify_migrated_code` and self-correct up to 3 times
|
|
248
|
+
6. Present the verified code with a migration analysis and accessibility statement
|
|
148
249
|
|
|
149
250
|
### `audit_accessibility` (Deep A11y Scan)
|
|
150
251
|
|
|
@@ -170,7 +271,7 @@ Because `model.ts`, showcase files, and framework example source files are **not
|
|
|
170
271
|
```text
|
|
171
272
|
manifest.json
|
|
172
273
|
├── icons[] — icon names from packages/foundations/src/all-icons.ts
|
|
173
|
-
├── tokens{} —
|
|
274
|
+
├── tokens{} — SCSS design tokens mapped by category (colors, typography, animation, transitions)
|
|
174
275
|
├── docs{} — conceptual markdown documentation
|
|
175
276
|
└── components{}
|
|
176
277
|
└── {componentName}
|
|
@@ -203,10 +304,16 @@ This means the same binary works for:
|
|
|
203
304
|
- **Design system developers** working inside the monorepo (always up-to-date, live files)
|
|
204
305
|
- **Consumer teams** running `npx @db-ux/mcp-server` (self-contained, no monorepo needed)
|
|
205
306
|
|
|
307
|
+
> **Note on compiled tokens:** For `spacing`, `elevation`, and `density`, the tool reads compiled CSS/SCSS files with concrete primitive values (not raw SCSS with `@each` loops). In the monorepo it reads directly from `packages/foundations/`; in standalone mode it falls back to `assets/tokens/` (populated by the `prebuild` step).
|
|
308
|
+
|
|
206
309
|
### Directory structure
|
|
207
310
|
|
|
208
311
|
```text
|
|
209
312
|
packages/mcp-server/
|
|
313
|
+
├── assets/
|
|
314
|
+
│ ├── migration/ # Migration guides (copied from docs/migration/db-ui/ by prebuild)
|
|
315
|
+
│ ├── tokens/ # Compiled token files (copied from foundations by prebuild)
|
|
316
|
+
│ └── visuals/ # Curated reference images (shipped with npm package)
|
|
210
317
|
├── src/
|
|
211
318
|
│ ├── index.ts # Bootstrap — connects transport, registers tools/prompts
|
|
212
319
|
│ ├── server.ts # McpServer singleton and lifecycle handlers
|
|
@@ -226,67 +333,6 @@ packages/mcp-server/
|
|
|
226
333
|
|
|
227
334
|
---
|
|
228
335
|
|
|
229
|
-
## ⚠️ Defensive Rules for AI
|
|
230
|
-
|
|
231
|
-
These are the **Golden Rules** the AI agent must follow when using this server. They are enforced by the workflow rules file and should be treated as hard constraints, not suggestions.
|
|
232
|
-
|
|
233
|
-
### NEVER use native HTML elements when a DB UX component exists
|
|
234
|
-
|
|
235
|
-
```tsx
|
|
236
|
-
// ❌ WRONG
|
|
237
|
-
<button style="background: #d40000; padding: 8px 16px">Save</button>
|
|
238
|
-
<input type="text" placeholder="Search..." />
|
|
239
|
-
<div style="display: flex; gap: 16px">...</div>
|
|
240
|
-
|
|
241
|
-
// ✅ CORRECT
|
|
242
|
-
<DBButton variant="brand">Save</DBButton>
|
|
243
|
-
<DBInput placeholder="Search..." />
|
|
244
|
-
<DBStack>...</DBStack>
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
| Native element | DB UX replacement |
|
|
248
|
-
| ---------------- | -------------------------------- |
|
|
249
|
-
| `<button>` | `DBButton` |
|
|
250
|
-
| `<input>` | `DBInput` |
|
|
251
|
-
| `<select>` | `DBSelect` |
|
|
252
|
-
| `<a>` | `DBLink` |
|
|
253
|
-
| `<textarea>` | `DBTextarea` |
|
|
254
|
-
| `<div>` (layout) | `DBStack`, `DBSection`, `DBCard` |
|
|
255
|
-
|
|
256
|
-
### NEVER use hardcoded colors or magic spacing values
|
|
257
|
-
|
|
258
|
-
```scss
|
|
259
|
-
// ❌ WRONG
|
|
260
|
-
.my-element {
|
|
261
|
-
color: #ec0016;
|
|
262
|
-
margin: 15px;
|
|
263
|
-
gap: 8px;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// ✅ CORRECT — values retrieved via get_design_tokens
|
|
267
|
-
.my-element {
|
|
268
|
-
color: var(--db-color-red-500);
|
|
269
|
-
margin: var(--db-spacing-fixed-sm);
|
|
270
|
-
gap: var(--db-spacing-fixed-xs);
|
|
271
|
-
}
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
### ALWAYS verify props and icon names via MCP tools
|
|
275
|
-
|
|
276
|
-
```tsx
|
|
277
|
-
// ❌ WRONG — icon name invented, prop API assumed
|
|
278
|
-
<DBButton icon="chevronRight" size="large">Next</DBButton>
|
|
279
|
-
|
|
280
|
-
// ✅ CORRECT — icon name from list_icons, props from get_component_props
|
|
281
|
-
<DBButton icon="chevron_right" size="small">Next</DBButton>
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### ALWAYS call get_example_code before writing component usage
|
|
285
|
-
|
|
286
|
-
The generated examples are the canonical reference. Adapt them — do not rewrite component usage from scratch.
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
336
|
## 📦 Build Command
|
|
291
337
|
|
|
292
338
|
The server is built as part of the `@db-ux/mcp-server` package:
|
|
@@ -312,42 +358,17 @@ npm run dev # runs src/index.ts directly via tsx (monorepo mode, live files)
|
|
|
312
358
|
|
|
313
359
|
---
|
|
314
360
|
|
|
315
|
-
## ❓ Troubleshooting
|
|
316
|
-
|
|
317
|
-
### "Unknown Configuration Setting" in VS Code
|
|
318
|
-
|
|
319
|
-
If you see a yellow squiggle/warning in your `settings.json`, this is expected. Standard VS Code does not natively recognize the `mcp` key yet. As long as your MCP client (like the Claude extension or Cursor) is active, the server will work perfectly.
|
|
320
|
-
|
|
321
|
-
### Server fails to start from the monorepo root (Local Development)
|
|
322
|
-
|
|
323
|
-
If you are developing or testing the MCP server directly from within the DB UX monorepo, the global `npx` command might fail due to npm workspace resolution. In this case, bypass `npx` and point your IDE directly to the local built file.
|
|
324
|
-
|
|
325
|
-
**Fallback IDE Configuration (VS Code/IntelliJ):**
|
|
326
|
-
Instead of using `npx`, use `node` and point it to the local build path (ensure you have run `npm run build` in the `mcp-server` directory first):
|
|
327
|
-
|
|
328
|
-
```json
|
|
329
|
-
"db-ux": {
|
|
330
|
-
"command": "node",
|
|
331
|
-
"disabled": false,
|
|
332
|
-
"timeout": 60000,
|
|
333
|
-
"args": ["packages/mcp-server/dist/index.js"]
|
|
334
|
-
}
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
_Alternatively, you can change your IDE's working directory for the MCP server to `packages/mcp-server`._
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
361
|
## 🛡️ Security & Compliance
|
|
342
362
|
|
|
343
363
|
This MCP server operates under a strict, zero-trust security model to prevent malicious AI behavior or accidental system damage.
|
|
344
364
|
|
|
345
|
-
- **Strict Read-Only Sandbox:** The server has zero write-permissions. All imports from `node:fs` are strictly read-only (`readFile`, `readdir`).
|
|
365
|
+
- **Strict Read-Only Sandbox:** The server has zero write-permissions for design system files. All imports from `node:fs` for component data are strictly read-only (`readFile`, `readdir`). The only exception is the `verify_migrated_code` tool, which writes a temporary file under the current working directory (`process.cwd()`, typically the repo/workspace root) and deletes it in a `finally` block after the check completes. Shell execution via `child_process.exec` is scoped exclusively to this tool and limited to running `tsc --noEmit` on the temporary file with a 30-second timeout.
|
|
346
366
|
- **Path Traversal Protection (Jailbreak Prevention):** All file and directory accesses (e.g., resolving component names) pass through a cryptographic-style path resolver. The server mathematically guarantees that no file reads can escape the allowed `REPO_ROOT` or `COMPONENTS_DIR` (blocking `../../etc/passwd` attacks).
|
|
347
367
|
- **DoS & Context Window Protection:** To prevent LLMs from crashing or generating massive API billing spikes due to context window overflows, strict token limiters are enforced:
|
|
348
368
|
- File reads are truncated at **20,000 characters**.
|
|
349
369
|
- JSON arrays (like component or icon lists) are truncated at **20,000 characters**.
|
|
350
370
|
- Directory scans are hard-limited to a maximum of **10 files**.
|
|
371
|
+
- **Image Downsampling (Token Optimization):** The `get_component_visual` tool downsamples images to a maximum of **800×800 px** and encodes them as **JPEG at quality 75** before Base64 encoding. This keeps the payload well under the 100 000-character MCP client limit. Images are served exclusively from the curated `assets/visuals/` directory — path traversal protection applies here as well.
|
|
351
372
|
|
|
352
373
|
---
|
|
353
374
|
|
|
@@ -368,18 +389,52 @@ npm run build
|
|
|
368
389
|
|
|
369
390
|
Run the following command from the `packages/mcp-server/` directory:
|
|
370
391
|
|
|
371
|
-
> **Note:**
|
|
392
|
+
> **Note:** The Inspector UI runs on **port 6274**, the proxy on **port 6277**. If either port is already in use, free it first: `lsof -ti :6274 -ti :6277 | xargs kill -9`
|
|
372
393
|
|
|
373
394
|
```bash
|
|
374
|
-
npx @modelcontextprotocol/inspector --
|
|
395
|
+
npx @modelcontextprotocol/inspector --transport stdio node dist/index.js
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
The Inspector prints a URL with a session token to the terminal, e.g.:
|
|
399
|
+
|
|
400
|
+
```text
|
|
401
|
+
🔍 MCP Inspector is up and running at http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<token>
|
|
375
402
|
```
|
|
376
403
|
|
|
404
|
+
Open that **full URL including the token** in your browser — the token is required for authentication.
|
|
405
|
+
|
|
377
406
|
### Step-by-step workflow
|
|
378
407
|
|
|
379
408
|
1. Run the command above — the Inspector starts a local web server
|
|
380
|
-
2. Open the
|
|
381
|
-
3.
|
|
382
|
-
4. Navigate to the **"Tools"** tab to call individual tools (e.g. `list_components`, `
|
|
383
|
-
5.
|
|
409
|
+
2. Open the **full URL with token** printed in the terminal (e.g. `http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=...`)
|
|
410
|
+
3. Click **"Connect"** to establish the stdio connection to the server
|
|
411
|
+
4. Navigate to the **"Tools"** tab to call individual tools (e.g. `list_components`, `get_component_visual`) and inspect their responses
|
|
412
|
+
5. Navigate to the **"Prompts"** tab to browse and execute interactive prompts like `scaffold_page`
|
|
384
413
|
|
|
385
414
|
> **Tip:** The Inspector is framework- and IDE-agnostic. It communicates with the server over stdio exactly as a real MCP client would, making it the most reliable way to catch issues before they surface in an AI agent session.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## ❓ Troubleshooting
|
|
419
|
+
|
|
420
|
+
### "Unknown Configuration Setting" in VS Code
|
|
421
|
+
|
|
422
|
+
If you see a yellow squiggle/warning in your `settings.json`, this is expected. Standard VS Code does not natively recognize the `mcp` key yet. As long as your MCP client (like the Claude extension or Cursor) is active, the server will work perfectly.
|
|
423
|
+
|
|
424
|
+
### Server fails to start from the monorepo root (Local Development)
|
|
425
|
+
|
|
426
|
+
If you are developing or testing the MCP server directly from within the DB UX monorepo, the global `npx` command might fail due to npm workspace resolution. In this case, bypass `npx` and point your IDE directly to the local built file.
|
|
427
|
+
|
|
428
|
+
**Fallback IDE Configuration (VS Code/IntelliJ):**
|
|
429
|
+
Instead of using `npx`, use `node` and point it to the local build path (ensure you have run `npm run build` in the `mcp-server` directory first):
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
"db-ux": {
|
|
433
|
+
"command": "node",
|
|
434
|
+
"disabled": false,
|
|
435
|
+
"timeout": 60000,
|
|
436
|
+
"args": ["packages/mcp-server/dist/index.js"]
|
|
437
|
+
}
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
_Alternatively, you can change your IDE's working directory for the MCP server to `packages/mcp-server`._
|
package/agent/_instructions.md
CHANGED
|
@@ -29,10 +29,14 @@ Or add it to your MCP client config:
|
|
|
29
29
|
4. `docs_search` — search guidelines, accessibility docs, or component-specific documentation if needed
|
|
30
30
|
5. `get_example_code` — fetch the real generated code for the target framework
|
|
31
31
|
6. `list_design_token_categories` — get available token categories if unsure which to query
|
|
32
|
-
7. `get_design_tokens` — retrieve spacing, color, and typography tokens
|
|
32
|
+
7. `get_design_tokens` — retrieve spacing, elevation, density, color, and typography tokens
|
|
33
33
|
8. `list_icons` — look up the exact icon name before using any icon prop
|
|
34
34
|
9. `list_migration_guides` — list all available migration guides before any migration task
|
|
35
35
|
10. `get_migration_guide` — load the full content of a specific migration guide
|
|
36
|
+
11. `verify_migrated_code` — after generating migrated code, pass the full code string and framework to this tool for a compiler check. Fix errors and retry (max 3 attempts) before presenting code to the user
|
|
37
|
+
12. `get_component_visual` — _(optional, use sparingly)_ if you need visual context for complex layouts, z-index dependencies, or visual hierarchies, call this tool with the component or layout name to receive a downsampled screenshot
|
|
38
|
+
13. `analyze_v2_migration` — **call FIRST when migrating a file.** Scans a source file for v2 patterns (`<cmp-*>`, `<elm-*>`, `db-color-*`, legacy icons) and returns a JSON report with line numbers and deterministic suggestions. Use this before any code generation.
|
|
39
|
+
14. `scaffold_component` — generates a DB UX-conformant component skeleton for a specified framework. Creates all boilerplate files with correct `@db-ux/*` imports and SCSS foundation `@use` directives.
|
|
36
40
|
|
|
37
41
|
### DON'Ts — these are hard violations:
|
|
38
42
|
|
|
@@ -41,6 +45,8 @@ Or add it to your MCP client config:
|
|
|
41
45
|
- **NEVER** hardcode color values (`#d40000`, `rgb(...)`) — use design tokens exclusively
|
|
42
46
|
- **NEVER** write inline styles (`style="margin: 15px"`)
|
|
43
47
|
- **NEVER** invent or guess icon names — always call `list_icons` first
|
|
48
|
+
- **NEVER** output migrated code to the user without calling `verify_migrated_code` first — the self-correction loop (max 3 attempts) is mandatory
|
|
49
|
+
- **NEVER** use `// @ts-nocheck`, `// @ts-ignore`, `// @ts-expect-error`, `eslint-disable`, or any other compiler/linter bypass directive to "fix" errors — solve the underlying issue instead
|
|
44
50
|
|
|
45
51
|
### DOs:
|
|
46
52
|
|
|
@@ -53,6 +59,17 @@ Or add it to your MCP client config:
|
|
|
53
59
|
</div>
|
|
54
60
|
```
|
|
55
61
|
|
|
62
|
+
### Migration workflow (MANDATORY when the user asks to migrate, refactor, or upgrade legacy code):
|
|
63
|
+
|
|
64
|
+
When the user asks you to migrate, refactor, or upgrade code from DB UI, Bootstrap, native HTML, or any older version to DB UX v3, you **MUST** follow this exact 5-step workflow — do NOT skip any step:
|
|
65
|
+
|
|
66
|
+
1. **File Scan** — Call `analyze_v2_migration` with the file path. This returns a deterministic JSON report of all v2 patterns (components, colors, icons) with line numbers and suggestions. Use this as your migration checklist.
|
|
67
|
+
2. **Migration Analysis** — Call `list_migration_guides`, then `get_migration_guide` for each relevant guide. Call `docs_search` for component-specific migration docs. Produce a mapping table: Legacy Element → DB UX v3 Component → Rationale.
|
|
68
|
+
3. **Component Discovery & Props Retrieval** — Call `list_components` to verify every mapped component. For each: `get_component_props`, `get_component_details`, `get_example_code`. Call `get_design_tokens` to replace hardcoded values. Call `list_icons` to verify icon names. Optionally call `get_component_visual` for layout uncertainty.
|
|
69
|
+
4. **Code Generation** — Generate the complete migrated code. Do **NOT** show it to the user yet.
|
|
70
|
+
5. **Code Verification (MANDATORY for react/angular/vue)** — Call `verify_migrated_code`. If errors are returned, fix and retry (max 3 attempts). For `web-components` and `html` targets, skip this step.
|
|
71
|
+
6. **Final Output** — Present: "Migration Analysis" (mapping table), "Migrated Code" (✅ VERIFIED or ⚠️ WARNING with diagnostics), "Accessibility Statement".
|
|
72
|
+
|
|
56
73
|
---
|
|
57
74
|
|
|
58
75
|
## Available AI Workflows (Prompts)
|
|
@@ -77,6 +94,7 @@ Generates the initial structure of a complete web page or complex module. Enforc
|
|
|
77
94
|
2. **Component Discovery** — Calls `list_components` to verify every planned block maps to a DB UX component. Reports missing components instead of falling back to native HTML
|
|
78
95
|
3. **Props & Examples** — For each component: `get_component_props` → `get_component_details` → `get_example_code` with the target framework
|
|
79
96
|
4. **Token & Asset Validation** — `list_design_token_categories` → `get_design_tokens` for needed categories, `list_icons` for any icon props
|
|
97
|
+
5. **Visual Validation (optional)** — If uncertain about layout structure or visual hierarchy, call `get_component_visual` for a reference screenshot
|
|
80
98
|
|
|
81
99
|
**Output structure:**
|
|
82
100
|
|
|
@@ -113,7 +131,7 @@ Performs a strict multi-layered QA, accessibility, and DB UX compliance audit on
|
|
|
113
131
|
|
|
114
132
|
### `migrate_component` — Legacy Refactoring
|
|
115
133
|
|
|
116
|
-
Transforms legacy UI code (e.g. Bootstrap, native HTML, DB UI) into the modern DB UX architecture.
|
|
134
|
+
Transforms legacy UI code (e.g. Bootstrap, native HTML, DB UI) into the modern DB UX architecture. Includes a **mandatory code verification step** before presenting results.
|
|
117
135
|
|
|
118
136
|
**Parameters:**
|
|
119
137
|
|
|
@@ -125,16 +143,17 @@ Transforms legacy UI code (e.g. Bootstrap, native HTML, DB UI) into the modern D
|
|
|
125
143
|
|
|
126
144
|
**Workflow:**
|
|
127
145
|
|
|
128
|
-
1. **
|
|
129
|
-
2. **
|
|
130
|
-
3. **
|
|
131
|
-
4. **
|
|
146
|
+
1. **Migration Analysis** — Calls `list_migration_guides` then `get_migration_guide` for relevant versions. Studies package renames, missing components, prop changes
|
|
147
|
+
2. **Component Discovery & Props Retrieval** — Calls `list_components`, `get_component_props`, `get_component_details`, and `get_example_code` to verify modern equivalents. Calls `get_design_tokens` to replace legacy CSS variables or hardcoded values. Calls `list_icons` for any icon references. Optionally calls `get_component_visual` when uncertain about layout structures or visual hierarchies
|
|
148
|
+
3. **Code Generation** — Generates the complete migrated component code. **Does NOT output this to the user yet**
|
|
149
|
+
4. **Code Verification & Self-Correction (MANDATORY)** — Calls `verify_migrated_code` with the generated code and framework. If the tool returns compiler errors, the AI analyzes the diagnostics, fixes the code, and retries. This loop runs for a **maximum of 3 attempts**. If verification still fails after 3 attempts, the AI presents the code with a prominent ⚠️ warning block containing the remaining errors
|
|
150
|
+
5. **Final Output** — Presents the verified code (✅ on success, ⚠️ with diagnostics on failure)
|
|
132
151
|
|
|
133
152
|
**Output structure:**
|
|
134
153
|
|
|
135
154
|
1. "Migration Analysis" — Maps each legacy element to its modern replacement, referencing migration guide rules
|
|
136
|
-
2. "
|
|
137
|
-
3. "
|
|
155
|
+
2. "Migrated Code" — Fully migrated, production-ready code with correct `@db-ux/*` imports. Marked ✅ VERIFIED or ⚠️ WARNING with remaining diagnostics
|
|
156
|
+
3. "Accessibility Statement" — Confirmation of WCAG 2.2 AA compliance through the selected DB UX components
|
|
138
157
|
|
|
139
158
|
### `audit_accessibility` — Deep A11y Scan
|
|
140
159
|
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# DB UI → DB UX Color Migration
|
|
2
|
+
|
|
3
|
+
BG column = `background-color`/`background`. FG column = `color`/`border-color`/`outline-color`/`fill`/`stroke`/`caret-color`. For `box-shadow` use `--db-elevation-*` instead.
|
|
4
|
+
|
|
5
|
+
Format: `old` → BG: `bg-token`, FG: `fg-token`
|
|
6
|
+
|
|
7
|
+
`db-color-yellow-100` → BG: `--db-yellow-bg-basic-level-2-default`, FG: `--db-successful-on-bg-inverted-default`
|
|
8
|
+
`db-color-yellow-200` → BG: `--db-yellow-bg-basic-level-3-default`, FG: `--db-successful-on-bg-inverted-default`
|
|
9
|
+
`db-color-yellow-300` → BG: `--db-yellow-bg-basic-level-3-default`, FG: `--db-yellow-on-bg-basic-emphasis-60-default`
|
|
10
|
+
`db-color-yellow-400` → BG: `--db-yellow-bg-vibrant-default`, FG: `--db-yellow-on-bg-basic-emphasis-60-default`
|
|
11
|
+
`db-color-yellow-500` → BG: `--db-yellow-bg-vibrant-default`, FG: `--db-yellow-on-bg-basic-emphasis-60-default`
|
|
12
|
+
`db-color-yellow-600` → BG: `--db-yellow-bg-vibrant-default`, FG: `--db-yellow-on-bg-basic-emphasis-60-default`
|
|
13
|
+
`db-color-yellow-700` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
14
|
+
`db-color-yellow-800` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
15
|
+
`db-color-yellow-900` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
16
|
+
`db-color-orange-100` → BG: `--db-yellow-bg-basic-level-2-default`, FG: `--db-yellow-on-bg-inverted-default`
|
|
17
|
+
`db-color-orange-200` → BG: `--db-yellow-bg-basic-level-3-default`, FG: `--db-yellow-on-bg-inverted-default`
|
|
18
|
+
`db-color-orange-300` → BG: `--db-yellow-bg-basic-level-3-default`, FG: `--db-warning-on-bg-basic-emphasis-60-default`
|
|
19
|
+
`db-color-orange-400` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
20
|
+
`db-color-orange-500` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
21
|
+
`db-color-orange-600` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
22
|
+
`db-color-orange-700` → BG: `--db-warning-bg-inverted-contrast-low-default`, FG: `--db-warning-on-bg-basic-emphasis-70-default`
|
|
23
|
+
`db-color-orange-800` → BG: `--db-warning-bg-inverted-contrast-high-default`, FG: `--db-warning-on-bg-basic-emphasis-80-default`
|
|
24
|
+
`db-color-red-100` → BG: `--db-brand-bg-basic-level-3-default`, FG: `--db-brand-on-bg-inverted-default`
|
|
25
|
+
`db-color-red-200` → BG: `--db-brand-bg-basic-level-3-default`, FG: `--db-burgundy-on-bg-basic-emphasis-60-default`
|
|
26
|
+
`db-color-red-300` → BG: `--db-brand-bg-vibrant-default`, FG: `--db-brand-on-bg-basic-emphasis-50-default`
|
|
27
|
+
`db-color-red-400` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
28
|
+
`db-color-red-500` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
29
|
+
`db-color-red-600` → BG: `--db-brand-bg-inverted-contrast-high-default`, FG: `--db-brand-on-bg-basic-emphasis-80-default`
|
|
30
|
+
`db-color-red-700` → BG: `--db-brand-bg-inverted-contrast-high-default`, FG: `--db-brand-on-bg-basic-emphasis-90-default`
|
|
31
|
+
`db-color-red-800` → BG: `--db-brand-bg-inverted-contrast-max-default`, FG: `--db-brand-on-bg-basic-emphasis-90-default`
|
|
32
|
+
`db-color-burgundy-100` → BG: `--db-burgundy-bg-basic-level-3-default`, FG: `--db-pink-on-bg-inverted-default`
|
|
33
|
+
`db-color-burgundy-200` → BG: `--db-pink-bg-basic-level-3-default`, FG: `--db-burgundy-on-bg-basic-emphasis-60-default`
|
|
34
|
+
`db-color-burgundy-300` → BG: `--db-burgundy-bg-vibrant-default`, FG: `--db-burgundy-on-bg-basic-emphasis-50-default`
|
|
35
|
+
`db-color-burgundy-400` → BG: `--db-burgundy-bg-inverted-contrast-low-default`, FG: `--db-burgundy-on-bg-basic-emphasis-70-default`
|
|
36
|
+
`db-color-burgundy-500` → BG: `--db-burgundy-bg-inverted-contrast-high-default`, FG: `--db-burgundy-on-bg-basic-emphasis-80-default`
|
|
37
|
+
`db-color-burgundy-600` → BG: `--db-burgundy-bg-inverted-contrast-high-default`, FG: `--db-burgundy-on-bg-basic-emphasis-80-default`
|
|
38
|
+
`db-color-burgundy-700` → BG: `--db-pink-bg-inverted-contrast-max-default`, FG: `--db-burgundy-on-bg-basic-emphasis-90-default`
|
|
39
|
+
`db-color-burgundy-800` → BG: `--db-pink-bg-inverted-contrast-max-default`, FG: `--db-pink-on-bg-basic-emphasis-100-default`
|
|
40
|
+
`db-color-pink-100` → BG: `--db-pink-bg-basic-level-3-default`, FG: `--db-pink-on-bg-inverted-default`
|
|
41
|
+
`db-color-pink-200` → BG: `--db-pink-bg-basic-level-3-default`, FG: `--db-burgundy-on-bg-basic-emphasis-60-default`
|
|
42
|
+
`db-color-pink-300` → BG: `--db-pink-bg-vibrant-default`, FG: `--db-pink-on-bg-basic-emphasis-60-default`
|
|
43
|
+
`db-color-pink-400` → BG: `--db-pink-bg-vibrant-default`, FG: `--db-pink-on-bg-basic-emphasis-50-default`
|
|
44
|
+
`db-color-pink-500` → BG: `--db-pink-bg-inverted-contrast-low-default`, FG: `--db-pink-on-bg-basic-emphasis-70-default`
|
|
45
|
+
`db-color-pink-600` → BG: `--db-pink-bg-inverted-contrast-low-default`, FG: `--db-pink-on-bg-basic-emphasis-70-default`
|
|
46
|
+
`db-color-pink-700` → BG: `--db-pink-bg-inverted-contrast-high-default`, FG: `--db-pink-on-bg-basic-emphasis-80-default`
|
|
47
|
+
`db-color-pink-800` → BG: `--db-pink-bg-inverted-contrast-high-default`, FG: `--db-pink-on-bg-basic-emphasis-80-default`
|
|
48
|
+
`db-color-violett-100` → BG: `--db-violet-bg-basic-level-3-default`, FG: `--db-violet-on-bg-inverted-default`
|
|
49
|
+
`db-color-violett-200` → BG: `--db-violet-bg-basic-level-3-default`, FG: `--db-violet-on-bg-basic-emphasis-60-default`
|
|
50
|
+
`db-color-violett-300` → BG: `--db-violet-bg-vibrant-default`, FG: `--db-violet-on-bg-basic-emphasis-50-default`
|
|
51
|
+
`db-color-violett-400` → BG: `--db-violet-bg-inverted-contrast-low-default`, FG: `--db-violet-on-bg-basic-emphasis-70-default`
|
|
52
|
+
`db-color-violett-500` → BG: `--db-violet-bg-inverted-contrast-high-default`, FG: `--db-violet-on-bg-basic-emphasis-80-default`
|
|
53
|
+
`db-color-violett-600` → BG: `--db-violet-bg-inverted-contrast-high-default`, FG: `--db-violet-on-bg-basic-emphasis-80-default`
|
|
54
|
+
`db-color-violett-700` → BG: `--db-violet-bg-inverted-contrast-high-default`, FG: `--db-violet-on-bg-basic-emphasis-90-default`
|
|
55
|
+
`db-color-violett-800` → BG: `--db-violet-bg-inverted-contrast-max-default`, FG: `--db-violet-on-bg-basic-emphasis-90-default`
|
|
56
|
+
`db-color-blue-100` → BG: `--db-informational-bg-basic-level-3-default`, FG: `--db-informational-on-bg-inverted-default`
|
|
57
|
+
`db-color-blue-200` → BG: `--db-informational-bg-basic-level-3-default`, FG: `--db-informational-on-bg-basic-emphasis-60-default`
|
|
58
|
+
`db-color-blue-300` → BG: `--db-blue-bg-vibrant-default`, FG: `--db-blue-on-bg-basic-emphasis-50-default`
|
|
59
|
+
`db-color-blue-400` → BG: `--db-blue-bg-inverted-contrast-low-default`, FG: `--db-blue-on-bg-basic-emphasis-70-default`
|
|
60
|
+
`db-color-blue-500` → BG: `--db-blue-bg-inverted-contrast-high-default`, FG: `--db-blue-on-bg-basic-emphasis-80-default`
|
|
61
|
+
`db-color-blue-600` → BG: `--db-blue-bg-inverted-contrast-high-default`, FG: `--db-blue-on-bg-basic-emphasis-90-default`
|
|
62
|
+
`db-color-blue-700` → BG: `--db-blue-bg-inverted-contrast-max-default`, FG: `--db-blue-on-bg-basic-emphasis-90-default`
|
|
63
|
+
`db-color-blue-800` → BG: `--db-blue-bg-inverted-contrast-max-default`, FG: `--db-blue-on-bg-basic-emphasis-100-default`
|
|
64
|
+
`db-color-cyan-100` → BG: `--db-turquoise-bg-basic-level-1-default`, FG: `--db-turquoise-on-bg-inverted-default`
|
|
65
|
+
`db-color-cyan-200` → BG: `--db-informational-bg-basic-level-3-default`, FG: `--db-informational-on-bg-basic-emphasis-60-default`
|
|
66
|
+
`db-color-cyan-300` → BG: `--db-informational-bg-vibrant-default`, FG: `--db-informational-on-bg-basic-emphasis-60-default`
|
|
67
|
+
`db-color-cyan-400` → BG: `--db-informational-bg-vibrant-default`, FG: `--db-informational-on-bg-basic-emphasis-50-default`
|
|
68
|
+
`db-color-cyan-500` → BG: `--db-informational-bg-vibrant-default`, FG: `--db-informational-on-bg-basic-emphasis-50-default`
|
|
69
|
+
`db-color-cyan-600` → BG: `--db-informational-bg-inverted-contrast-low-default`, FG: `--db-informational-on-bg-basic-emphasis-70-default`
|
|
70
|
+
`db-color-cyan-700` → BG: `--db-informational-bg-inverted-contrast-high-default`, FG: `--db-informational-on-bg-basic-emphasis-80-default`
|
|
71
|
+
`db-color-cyan-800` → BG: `--db-informational-bg-inverted-contrast-high-default`, FG: `--db-informational-on-bg-basic-emphasis-90-default`
|
|
72
|
+
`db-color-turquoise-100` → BG: `--db-turquoise-bg-basic-level-1-default`, FG: `--db-turquoise-on-bg-inverted-default`
|
|
73
|
+
`db-color-turquoise-200` → BG: `--db-turquoise-bg-basic-level-1-default`, FG: `--db-turquoise-on-bg-inverted-default`
|
|
74
|
+
`db-color-turquoise-300` → BG: `--db-turquoise-bg-vibrant-default`, FG: `--db-turquoise-on-bg-basic-emphasis-50-default`
|
|
75
|
+
`db-color-turquoise-400` → BG: `--db-turquoise-bg-vibrant-default`, FG: `--db-turquoise-on-bg-basic-emphasis-50-default`
|
|
76
|
+
`db-color-turquoise-500` → BG: `--db-turquoise-bg-vibrant-default`, FG: `--db-turquoise-on-bg-basic-emphasis-50-default`
|
|
77
|
+
`db-color-turquoise-600` → BG: `--db-turquoise-bg-inverted-contrast-low-default`, FG: `--db-turquoise-on-bg-basic-emphasis-70-default`
|
|
78
|
+
`db-color-turquoise-700` → BG: `--db-turquoise-bg-inverted-contrast-high-default`, FG: `--db-turquoise-on-bg-basic-emphasis-80-default`
|
|
79
|
+
`db-color-turquoise-800` → BG: `--db-turquoise-bg-inverted-contrast-high-default`, FG: `--db-turquoise-on-bg-basic-emphasis-90-default`
|
|
80
|
+
`db-color-green-100` → BG: `--db-green-bg-basic-level-1-default`, FG: `--db-green-on-bg-inverted-default`
|
|
81
|
+
`db-color-green-200` → BG: `--db-green-bg-basic-level-2-default`, FG: `--db-successful-on-bg-inverted-default`
|
|
82
|
+
`db-color-green-300` → BG: `--db-green-bg-vibrant-default`, FG: `--db-green-on-bg-basic-emphasis-50-default`
|
|
83
|
+
`db-color-green-400` → BG: `--db-green-bg-vibrant-default`, FG: `--db-green-on-bg-basic-emphasis-50-default`
|
|
84
|
+
`db-color-green-500` → BG: `--db-green-bg-inverted-contrast-low-default`, FG: `--db-green-on-bg-basic-emphasis-70-default`
|
|
85
|
+
`db-color-green-600` → BG: `--db-green-bg-inverted-contrast-high-default`, FG: `--db-green-on-bg-basic-emphasis-80-default`
|
|
86
|
+
`db-color-green-700` → BG: `--db-green-bg-inverted-contrast-high-default`, FG: `--db-green-on-bg-basic-emphasis-80-default`
|
|
87
|
+
`db-color-green-800` → BG: `--db-green-bg-inverted-contrast-high-default`, FG: `--db-green-on-bg-basic-emphasis-90-default`
|
|
88
|
+
`db-color-light-green-100` → BG: `--db-successful-bg-basic-level-1-default`, FG: `--db-successful-on-bg-inverted-default`
|
|
89
|
+
`db-color-light-green-200` → BG: `--db-successful-bg-basic-level-3-default`, FG: `--db-green-on-bg-basic-emphasis-60-default`
|
|
90
|
+
`db-color-light-green-300` → BG: `--db-successful-bg-vibrant-default`, FG: `--db-successful-on-bg-basic-emphasis-60-default`
|
|
91
|
+
`db-color-light-green-400` → BG: `--db-successful-bg-vibrant-default`, FG: `--db-successful-on-bg-basic-emphasis-50-default`
|
|
92
|
+
`db-color-light-green-500` → BG: `--db-successful-bg-vibrant-default`, FG: `--db-successful-on-bg-basic-emphasis-50-default`
|
|
93
|
+
`db-color-light-green-600` → BG: `--db-successful-bg-inverted-contrast-low-default`, FG: `--db-successful-on-bg-basic-emphasis-70-default`
|
|
94
|
+
`db-color-light-green-700` → BG: `--db-successful-bg-inverted-contrast-high-default`, FG: `--db-successful-on-bg-basic-emphasis-80-default`
|
|
95
|
+
`db-color-light-green-800` → BG: `--db-successful-bg-inverted-contrast-high-default`, FG: `--db-successful-on-bg-basic-emphasis-80-default`
|
|
96
|
+
`db-color-warm-gray-100` → BG: `--db-adaptive-bg-basic-level-2-default`, FG: `--db-adaptive-on-bg-inverted-default`
|
|
97
|
+
`db-color-warm-gray-200` → BG: `--db-adaptive-bg-basic-level-3-default`, FG: `--db-yellow-on-bg-inverted-default`
|
|
98
|
+
`db-color-warm-gray-300` → BG: `--db-adaptive-bg-vibrant-default`, FG: `--db-adaptive-on-bg-basic-emphasis-60-default`
|
|
99
|
+
`db-color-warm-gray-400` → BG: `--db-adaptive-bg-vibrant-default`, FG: `--db-adaptive-on-bg-basic-emphasis-50-default`
|
|
100
|
+
`db-color-warm-gray-500` → BG: `--db-adaptive-bg-inverted-contrast-low-default`, FG: `--db-adaptive-on-bg-basic-emphasis-70-default`
|
|
101
|
+
`db-color-warm-gray-600` → BG: `--db-adaptive-bg-inverted-contrast-low-default`, FG: `--db-adaptive-on-bg-basic-emphasis-70-default`
|
|
102
|
+
`db-color-warm-gray-700` → BG: `--db-adaptive-bg-inverted-contrast-high-default`, FG: `--db-adaptive-on-bg-basic-emphasis-90-default`
|
|
103
|
+
`db-color-warm-gray-800` → BG: `--db-adaptive-bg-inverted-contrast-max-default`, FG: `--db-adaptive-on-bg-basic-emphasis-90-default`
|
|
104
|
+
`db-color-cool-gray-100` → BG: `--db-adaptive-bg-basic-level-3-default`, FG: `--db-informational-on-bg-inverted-default`
|
|
105
|
+
`db-color-cool-gray-200` → BG: `--db-adaptive-bg-basic-level-3-default`, FG: `--db-adaptive-on-bg-basic-emphasis-60-default`
|
|
106
|
+
`db-color-cool-gray-300` → BG: `--db-adaptive-bg-vibrant-default`, FG: `--db-adaptive-on-bg-basic-emphasis-50-default`
|
|
107
|
+
`db-color-cool-gray-400` → BG: `--db-adaptive-bg-inverted-contrast-low-default`, FG: `--db-adaptive-on-bg-basic-emphasis-70-default`
|
|
108
|
+
`db-color-cool-gray-500` → BG: `--db-adaptive-bg-inverted-contrast-high-default`, FG: `--db-adaptive-on-bg-basic-emphasis-80-default`
|
|
109
|
+
`db-color-cool-gray-600` → BG: `--db-adaptive-bg-inverted-contrast-high-default`, FG: `--db-adaptive-on-bg-basic-emphasis-90-default`
|
|
110
|
+
`db-color-cool-gray-700` → BG: `--db-adaptive-bg-inverted-contrast-max-default`, FG: `--db-adaptive-on-bg-basic-emphasis-90-default`
|
|
111
|
+
`db-color-cool-gray-800` → BG: `--db-adaptive-bg-inverted-contrast-max-default`, FG: `--db-adaptive-on-bg-basic-emphasis-100-default`
|
|
112
|
+
`db-color-red` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
113
|
+
`db-color-white` → BG: `--db-adaptive-bg-basic-level-1-default`, FG: `--db-adaptive-on-bg-inverted-default`
|
|
114
|
+
`db-color-black` → BG: `--db-adaptive-bg-inverted-contrast-max-default`, FG: `--db-adaptive-on-bg-basic-emphasis-100-default`
|
|
115
|
+
`db-color-success` → BG: `--db-successful-bg-inverted-contrast-low-default`, FG: `--db-successful-on-bg-basic-emphasis-70-default`
|
|
116
|
+
`db-color-success-small-font` → BG: `--db-successful-bg-inverted-contrast-low-default`, FG: `--db-successful-on-bg-basic-emphasis-70-default`
|
|
117
|
+
`db-color-error` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
118
|
+
`db-color-error-small-font` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
119
|
+
`db-color-warning` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
120
|
+
`db-color-warning-small-font` → BG: `--db-brand-bg-inverted-contrast-low-default`, FG: `--db-brand-on-bg-basic-emphasis-70-default`
|
|
121
|
+
`db-color-informative` → BG: `--db-informational-bg-inverted-contrast-low-default`, FG: `--db-informational-on-bg-basic-emphasis-70-default`
|
|
122
|
+
`db-color-informative-small-font` → BG: `--db-informational-bg-inverted-contrast-high-default`, FG: `--db-informational-on-bg-basic-emphasis-80-default`
|
|
123
|
+
`db-color-food-drink` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
124
|
+
`db-color-health` → BG: `--db-burgundy-bg-inverted-contrast-high-default`, FG: `--db-burgundy-on-bg-basic-emphasis-80-default`
|
|
125
|
+
`db-color-things-to-know` → BG: `--db-adaptive-bg-inverted-contrast-low-default`, FG: `--db-adaptive-on-bg-basic-emphasis-70-default`
|
|
126
|
+
`db-color-community-facilities` → BG: `--db-turquoise-bg-vibrant-default`, FG: `--db-turquoise-on-bg-basic-emphasis-50-default`
|
|
127
|
+
`db-color-db-services-facilities` → BG: `--db-blue-bg-inverted-contrast-high-default`, FG: `--db-blue-on-bg-basic-emphasis-90-default`
|
|
128
|
+
`db-color-shopping` → BG: `--db-violet-bg-inverted-contrast-high-default`, FG: `--db-violet-on-bg-basic-emphasis-80-default`
|
|
129
|
+
`db-color-arts-culture` → BG: `--db-pink-bg-inverted-contrast-low-default`, FG: `--db-pink-on-bg-basic-emphasis-70-default`
|
|
130
|
+
`db-color-leisure` → BG: `--db-green-bg-inverted-contrast-low-default`, FG: `--db-green-on-bg-basic-emphasis-70-default`
|
|
131
|
+
`db-color-services` → BG: `--db-informational-bg-vibrant-default`, FG: `--db-informational-on-bg-basic-emphasis-50-default`
|
|
132
|
+
`db-color-guidance` → BG: `--db-adaptive-bg-inverted-contrast-high-default`, FG: `--db-adaptive-on-bg-basic-emphasis-90-default`
|
|
133
|
+
`db-color-ice` → BG: `--db-adaptive-bg-inverted-contrast-max-default`, FG: `--db-adaptive-on-bg-basic-emphasis-90-default`
|
|
134
|
+
`db-color-ic` → BG: `--db-adaptive-bg-inverted-contrast-high-default`, FG: `--db-adaptive-on-bg-basic-emphasis-80-default`
|
|
135
|
+
`db-color-ec` → BG: `--db-adaptive-bg-inverted-contrast-high-default`, FG: `--db-adaptive-on-bg-basic-emphasis-80-default`
|
|
136
|
+
`db-color-re` → BG: `--db-adaptive-bg-inverted-contrast-low-default`, FG: `--db-adaptive-on-bg-basic-emphasis-70-default`
|
|
137
|
+
`db-color-rb` → BG: `--db-adaptive-bg-inverted-contrast-low-default`, FG: `--db-adaptive-on-bg-basic-emphasis-70-default`
|
|
138
|
+
`db-color-s-bahn` → BG: `--db-green-bg-inverted-contrast-low-default`, FG: `--db-green-on-bg-basic-emphasis-70-default`
|
|
139
|
+
`db-color-u-bahn` → BG: `--db-blue-bg-inverted-contrast-high-default`, FG: `--db-blue-on-bg-basic-emphasis-80-default`
|
|
140
|
+
`db-color-tram` → BG: `--db-burgundy-bg-inverted-contrast-high-default`, FG: `--db-burgundy-on-bg-basic-emphasis-80-default`
|
|
141
|
+
`db-color-bus` → BG: `--db-violet-bg-inverted-contrast-high-default`, FG: `--db-violet-on-bg-basic-emphasis-80-default`
|
|
142
|
+
`db-color-intercity-bus` → BG: `--db-pink-bg-inverted-contrast-low-default`, FG: `--db-pink-on-bg-basic-emphasis-70-default`
|
|
143
|
+
`db-color-call-bus` → BG: `--db-violet-bg-inverted-contrast-high-default`, FG: `--db-violet-on-bg-basic-emphasis-80-default`
|
|
144
|
+
`db-color-ev-bus` → BG: `--db-pink-bg-inverted-contrast-high-default`, FG: `--db-pink-on-bg-basic-emphasis-80-default`
|
|
145
|
+
`db-color-ship` → BG: `--db-informational-bg-vibrant-default`, FG: `--db-informational-on-bg-basic-emphasis-50-default`
|
|
146
|
+
`db-color-airplane` → BG: `--db-turquoise-bg-vibrant-default`, FG: `--db-turquoise-on-bg-basic-emphasis-50-default`
|
|
147
|
+
`db-color-carsharing` → BG: `--db-warning-bg-vibrant-default`, FG: `--db-warning-on-bg-basic-emphasis-50-default`
|
|
148
|
+
`db-color-taxi` → BG: `--db-yellow-bg-vibrant-default`, FG: `--db-yellow-on-bg-basic-emphasis-60-default`
|
|
149
|
+
`db-color-bikesharing` → BG: `--db-brand-bg-inverted-contrast-high-default`, FG: `--db-brand-on-bg-basic-emphasis-80-default`
|
|
150
|
+
`db-color-walk` → BG: `--db-adaptive-bg-basic-level-3-default`, FG: `--db-adaptive-on-bg-basic-emphasis-60-default`
|