igniteui-cli 15.8.0 → 15.8.2
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/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/client-scripts.md +7 -7
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +65 -18
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +1 -1
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +5 -5
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +23 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +4 -3
- package/templates/react/igr-ts/constants.d.ts +1 -1
- package/templates/react/igr-ts/constants.js +1 -1
- package/templates/webcomponents/igc-ts/constants.d.ts +1 -1
- package/templates/webcomponents/igc-ts/constants.js +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/README.md +15 -15
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-choose-components/SKILL.md +36 -36
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-choose-components/reference/mcp-setup.md +8 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/SKILL.md +62 -60
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/references/mcp-setup.md +8 -6
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/SKILL.md +107 -94
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/asset-extraction.md +32 -32
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/design-provenance.md +32 -30
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/design-token-bridge.md +84 -71
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/figma-component-map.md +45 -44
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/figma-exploration.md +57 -51
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/mcp-setup.md +23 -23
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/project-setup.md +28 -26
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/theme-generation.md +45 -35
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-figma-to-app/references/validation-patterns.md +38 -29
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/SKILL.md +63 -63
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +12 -12
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +24 -24
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-grids/SKILL.md +23 -23
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/SKILL.md +23 -23
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/angular.md +10 -10
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/react.md +9 -9
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/vanilla-js.md +9 -9
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-integrate-with-framework/references/vue.md +11 -11
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +18 -18
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-optimize-bundle-size/SKILL.md +78 -48
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Part of the [`igniteui-wc-figma-to-app`](../SKILL.md) skill.**
|
|
4
4
|
>
|
|
5
|
-
> This file contains setup instructions for all four MCP servers
|
|
5
|
+
> This file contains setup instructions for all four MCP servers that this skill requires. Configure all four servers before you run the Figma-to-app workflow.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
| **Ignite UI Theming** (`igniteui-theming`) | Palette + component-level theming code | `theming_detect_platform` |
|
|
16
16
|
| **Playwright** | Browser automation, screenshots, DOM measurement | `playwright_browser_navigate` to `about:blank` |
|
|
17
17
|
|
|
18
|
-
> **Fast path for the two Ignite UI servers:** run `npx -y igniteui-cli ai-config` in the project root. It configures `igniteui-cli` **and** `igniteui-theming
|
|
18
|
+
> **Fast path for the two Ignite UI servers:** run `npx -y igniteui-cli ai-config` in the project root. It configures `igniteui-cli` **and** `igniteui-theming`, and copies the Agent Skills. It keeps the existing entries. Projects created with `npx igniteui-cli new --framework=webcomponents` already have both servers. They are in the config file of the assistant chosen with `--assistants` (`.mcp.json` by default). These projects usually need only the Figma and Playwright entries.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
## 1. Figma MCP
|
|
23
23
|
|
|
24
|
-
Figma provides two official MCP servers. Both are HTTP servers
|
|
24
|
+
Figma provides two official MCP servers. Both are HTTP servers. There is **no npm package** to install for either server. Source: https://developers.figma.com/docs/figma-mcp-server/
|
|
25
25
|
|
|
26
26
|
| Server | URL | Authentication | How tools find a node |
|
|
27
27
|
| --- | --- | --- | --- |
|
|
28
|
-
| **Desktop** (local) | `http://127.0.0.1:3845/mcp` | None
|
|
29
|
-
| **Remote** | `https://mcp.figma.com/mcp` | Figma OAuth sign-in on first use | A **link** to a frame or layer
|
|
28
|
+
| **Desktop** (local) | `http://127.0.0.1:3845/mcp` | None. The Figma desktop app must be running with the server enabled | The **file open in the desktop app**: the current selection, or the node ID taken from a pasted frame link |
|
|
29
|
+
| **Remote** | `https://mcp.figma.com/mcp` | Figma OAuth sign-in on first use | A **link** to a frame or layer. The tools take the file key and node ID from the link. No selection |
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
When the user can share file links, use the **remote** server. You can then move between artboards without asking the user to click anything. Use the **desktop** server when the file is only available in the user's desktop app.
|
|
32
32
|
|
|
33
33
|
### Desktop server
|
|
34
34
|
|
|
@@ -67,7 +67,7 @@ Prefer the **remote** server when the user can share file links: you can move be
|
|
|
67
67
|
claude mcp add --transport http figma-desktop http://127.0.0.1:3845/mcp
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
**JetBrains IDEs:** **Settings → Tools → AI Assistant → MCP Servers → + Add MCP Server
|
|
70
|
+
**JetBrains IDEs:** go to **Settings → Tools → AI Assistant → MCP Servers → + Add MCP Server**. Then add an HTTP server with the URL `http://127.0.0.1:3845/mcp`.
|
|
71
71
|
|
|
72
72
|
Official guide: https://developers.figma.com/docs/figma-mcp-server/local-server-installation/
|
|
73
73
|
|
|
@@ -94,7 +94,7 @@ Official guide: https://developers.figma.com/docs/figma-mcp-server/local-server-
|
|
|
94
94
|
claude mcp add --transport http figma https://mcp.figma.com/mcp
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
The client opens Figma's OAuth flow the first time a tool
|
|
97
|
+
The client opens Figma's OAuth flow the first time that you call a tool.
|
|
98
98
|
|
|
99
99
|
Official guide: https://developers.figma.com/docs/figma-mcp-server/remote-server-installation/
|
|
100
100
|
|
|
@@ -104,16 +104,16 @@ Official guide: https://developers.figma.com/docs/figma-mcp-server/remote-server
|
|
|
104
104
|
|
|
105
105
|
The MCP servers do **not** use a personal access token. You need one only for the Figma **REST API** calls in this skill: Tier 1 asset export (`asset-extraction.md`) and reading exact variant properties (`design-provenance.md § Step 1`).
|
|
106
106
|
|
|
107
|
-
1. Figma → avatar → **Settings** → **Security** → **Personal access tokens** → **Generate new token
|
|
107
|
+
1. Go to Figma → avatar → **Settings** → **Security** → **Personal access tokens** → **Generate new token**. Give the token read access to file content.
|
|
108
108
|
2. Ask the user to export it in the shell that runs the agent (`export FIGMA_TOKEN=…`). **Never** write it into a project file, `mcp.json`, or source control.
|
|
109
109
|
|
|
110
|
-
Without a token, asset extraction
|
|
110
|
+
Without a token, asset extraction uses Tier 2/3, and the variant properties come only from the design context.
|
|
111
111
|
|
|
112
112
|
### Verifying Figma MCP
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Make sure that the Figma tools (`figma_get_metadata`, `figma_get_design_context`, …) are listed. Do not use a call only to verify the server, because View/Collab seats have very small quotas. Use the **configured URL** to identify the connected server (`127.0.0.1:3845` → desktop, `mcp.figma.com` → remote). See `figma-exploration.md` for how to drive each server.
|
|
115
115
|
|
|
116
|
-
> **Rate limits** (per seat; verify at https://developers.figma.com/docs/figma-mcp-server/rate-limits-access/): View/Collab seats get up to 6 calls/month (20 on Starter). Dev/Full seats get 200/day on Starter and Professional, and 600/day on Organization and Enterprise, with per-minute caps of 10–20.
|
|
116
|
+
> **Rate limits** (per seat; verify at https://developers.figma.com/docs/figma-mcp-server/rate-limits-access/): View/Collab seats get up to 6 calls/month (20 on Starter). Dev/Full seats get 200/day on Starter and Professional, and 600/day on Organization and Enterprise, with per-minute caps of 10–20. To use less quota, use `figma_get_metadata` for structural discovery, and use `figma_get_design_context` only for target artboards.
|
|
117
117
|
|
|
118
118
|
### Troubleshooting Figma MCP
|
|
119
119
|
|
|
@@ -122,13 +122,13 @@ Check that the Figma tools (`figma_get_metadata`, `figma_get_design_context`,
|
|
|
122
122
|
| `figma_get_metadata` returns an error | Desktop: the Figma desktop app is closed, the server is not enabled in Dev Mode, or no file is open. Remote: sign in again through OAuth |
|
|
123
123
|
| Tools not available after config | Restart the editor/IDE |
|
|
124
124
|
| `File not found` | Verify the Figma file URL and your access; `/design/` URLs only (not `/board/`, `/make/`) |
|
|
125
|
-
| Monthly/daily call quota exceeded | A View/Collab seat allows 6 calls/month (20 on Starter)
|
|
125
|
+
| Monthly/daily call quota exceeded | A View/Collab seat allows 6 calls/month (20 on Starter). Use a Dev/Full seat, or the Figma REST API with a personal access token for metadata and assets |
|
|
126
126
|
|
|
127
127
|
---
|
|
128
128
|
|
|
129
129
|
## 2. Ignite UI CLI MCP (`igniteui-cli`)
|
|
130
130
|
|
|
131
|
-
> Projects created with `npx igniteui-cli new` already have this configured. For existing projects, `npx -y igniteui-cli ai-config`
|
|
131
|
+
> Projects created with `npx igniteui-cli new` already have this server configured. For existing projects, `npx -y igniteui-cli ai-config` configures this server and the theming server in one step. Use the manual steps below only when `ai-config` is not available or does not support your editor.
|
|
132
132
|
|
|
133
133
|
### VS Code
|
|
134
134
|
|
|
@@ -169,9 +169,9 @@ claude mcp add igniteui-cli -- npx -y igniteui-cli mcp
|
|
|
169
169
|
|
|
170
170
|
### Verifying Ignite UI CLI MCP
|
|
171
171
|
|
|
172
|
-
Ask: *"List all available Ignite UI Web Components."*
|
|
172
|
+
Ask: *"List all available Ignite UI Web Components."* Make sure that the `list_components` tool returns the catalog for `framework: "webcomponents"`.
|
|
173
173
|
|
|
174
|
-
Tools this skill
|
|
174
|
+
Tools that this skill uses: `list_components`, `get_doc`, `search_docs`, `search_api`, `get_api_reference`, `get_project_setup_guide`.
|
|
175
175
|
|
|
176
176
|
---
|
|
177
177
|
|
|
@@ -218,9 +218,9 @@ claude mcp add igniteui-theming -- npx -y igniteui-theming igniteui-theming-mcp
|
|
|
218
218
|
|
|
219
219
|
### Verifying Ignite UI Theming MCP
|
|
220
220
|
|
|
221
|
-
Ask: *"Detect which Ignite UI platform my project uses."* `detect_platform`
|
|
221
|
+
Ask: *"Detect which Ignite UI platform my project uses."* Make sure that `detect_platform` analyzes `package.json` and returns `webcomponents`.
|
|
222
222
|
|
|
223
|
-
Tools this skill
|
|
223
|
+
Tools that this skill uses: `detect_platform`, `create_palette`, `create_custom_palette`, `create_typography`, `create_elevations`, `create_theme`, `get_component_design_tokens`, `create_component_theme`, `get_color`, `get_chart_series_colors`, `set_size`, `set_spacing`, `set_roundness`, `read_resource`.
|
|
224
224
|
|
|
225
225
|
---
|
|
226
226
|
|
|
@@ -265,7 +265,7 @@ claude mcp add playwright -- npx -y @playwright/mcp@latest
|
|
|
265
265
|
|
|
266
266
|
### Verifying Playwright MCP
|
|
267
267
|
|
|
268
|
-
Ask: *"Navigate the browser to `about:blank`."* `playwright_browser_navigate`
|
|
268
|
+
Ask: *"Navigate the browser to `about:blank`."* Make sure that `playwright_browser_navigate` opens the page without an error.
|
|
269
269
|
|
|
270
270
|
### Troubleshooting Playwright MCP
|
|
271
271
|
|
|
@@ -274,7 +274,7 @@ Ask: *"Navigate the browser to `about:blank`."* `playwright_browser_navigate` sh
|
|
|
274
274
|
| Screenshots are blank | Make sure the dev server is running (`npm start`; Vite defaults to port 5173) |
|
|
275
275
|
| Page resets to `about:blank` after resize | Always re-navigate after `playwright_browser_resize` |
|
|
276
276
|
| `ERR_CONNECTION_REFUSED` | The dev server is not running, or the port differs from 5173 |
|
|
277
|
-
| `browser_evaluate` fails with *"Invalid input: expected string, received undefined"* | Pass code
|
|
277
|
+
| `browser_evaluate` fails with *"Invalid input: expected string, received undefined"* | Pass code in the `function` parameter, not `script` |
|
|
278
278
|
| Selector returns `null` for something clearly visible | It is inside a shadow root — use the deep-query helper in `validation-patterns.md` |
|
|
279
279
|
| Element measures `0` height | Measured before upgrade/render, or the host lacks `display: block` — see the same file |
|
|
280
280
|
|
|
@@ -282,9 +282,9 @@ Ask: *"Navigate the browser to `about:blank`."* `playwright_browser_navigate` sh
|
|
|
282
282
|
|
|
283
283
|
## Combined JSON Config (All Four Servers)
|
|
284
284
|
|
|
285
|
-
> **If your project was created with `npx igniteui-cli new`:** `igniteui-cli` and `igniteui-theming` are already in your client's config file (the one chosen with `--assistants`; `.mcp.json` by default). Add only the Figma and Playwright entries below
|
|
285
|
+
> **If your project was created with `npx igniteui-cli new`:** `igniteui-cli` and `igniteui-theming` are already in your client's config file (the one chosen with `--assistants`; `.mcp.json` by default). Add only the Figma and Playwright entries below. Do not duplicate the other entries.
|
|
286
286
|
>
|
|
287
|
-
> **Fresh setup:** use the complete blocks below. They use Figma's **remote** server
|
|
287
|
+
> **Fresh setup:** use the complete blocks below. They use Figma's **remote** server. For the desktop server, replace the `figma` entry with the desktop entry from section 1 (`http://127.0.0.1:3845/mcp`). Do not put a Figma token in these files.
|
|
288
288
|
|
|
289
289
|
### VS Code (`.vscode/mcp.json`)
|
|
290
290
|
|
|
@@ -360,4 +360,4 @@ Ask: *"Navigate the browser to `about:blank`."* `playwright_browser_navigate` sh
|
|
|
360
360
|
}
|
|
361
361
|
```
|
|
362
362
|
|
|
363
|
-
>
|
|
363
|
+
> The tools of newly added MCP servers appear only after an editor or session reload.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Part of the [`igniteui-wc-figma-to-app`](../SKILL.md) skill.**
|
|
4
4
|
>
|
|
5
|
-
> Use this file in Phase 0b to detect an existing Ignite UI Web Components project or scaffold a new one
|
|
5
|
+
> Use this file in Phase 0b to detect an existing Ignite UI Web Components project or to scaffold a new one. Use it in Phase 4 for the view layout and file structure ([Implementation Layout](#implementation-layout)). Read the setup part in full before you check the project or run `igniteui-cli new`.
|
|
6
6
|
|
|
7
7
|
Check whether the current working directory contains a valid Web Components + Ignite UI project:
|
|
8
8
|
|
|
@@ -14,27 +14,29 @@ Check whether the current working directory contains a valid Web Components + Ig
|
|
|
14
14
|
|
|
15
15
|
## If a valid project is found
|
|
16
16
|
|
|
17
|
-
- Note the package layout: `igniteui-webcomponents` (MIT).
|
|
18
|
-
- Note the host setup: plain Lit/vanilla app, or a framework wrapper (React/Angular/Vue). If
|
|
19
|
-
- Note whether **Sass** is configured (a `.scss` entry file, `sass` in `devDependencies`, or a bundler Sass plugin). This decides the Phase 3 output format
|
|
20
|
-
- **Check the MCP configuration for all four required server entries
|
|
21
|
-
|
|
17
|
+
- Note the package layout: `igniteui-webcomponents` (MIT). The commercial packages are `igniteui-webcomponents-grids` (trial) / `@infragistics/igniteui-webcomponents-grids` (licensed), `igniteui-webcomponents-charts` (trial) / `@infragistics/igniteui-webcomponents-charts` (licensed), `igniteui-webcomponents-core` (trial) / `@infragistics/igniteui-webcomponents-core` (licensed), `igniteui-dockmanager` (trial) / `@infragistics/igniteui-dockmanager` (licensed).
|
|
18
|
+
- Note the host setup: plain Lit/vanilla app, or a framework wrapper (React/Angular/Vue). If the app uses a wrapper, follow [`igniteui-wc-integrate-with-framework`](../../igniteui-wc-integrate-with-framework/SKILL.md) for registration and event binding, not the raw `defineComponents` pattern.
|
|
19
|
+
- Note whether **Sass** is configured (a `.scss` entry file, `sass` in `devDependencies`, or a bundler Sass plugin). This decides the Phase 3 output format: CSS or Sass.
|
|
20
|
+
- **Check the MCP configuration for all four required server entries**: a Figma entry (`figma` or `figma-desktop`), `igniteui-cli`, `igniteui-theming`, and `playwright`. Look in the config file that your client reads (`.mcp.json`, `.vscode/mcp.json`, `.cursor/mcp.json`, …). If `igniteui-cli` or `igniteui-theming` is missing, run `npx -y igniteui-cli ai-config` yourself from the project root. Use `ig ai-config` when `igniteui-cli` is installed globally. The command configures both servers and copies the Agent Skills. It keeps the existing entries.
|
|
21
|
+
|
|
22
|
+
Add a missing Figma entry and `playwright` from [mcp-setup.md](mcp-setup.md). Projects scaffolded with `npx igniteui-cli new` already have `igniteui-cli` **and** `igniteui-theming` configured. Usually, they do not have Figma and Playwright. The tools of newly configured servers appear only after a reload. Ask the user to reload, then stop.
|
|
23
|
+
- Tell the user: "Found an existing Ignite UI Web Components project. Proceeding with the Figma workflow."
|
|
22
24
|
|
|
23
25
|
## If no valid project is found
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Show this message and wait for the user's choice:
|
|
26
28
|
|
|
27
|
-
> "
|
|
29
|
+
> "I did not find an Ignite UI Web Components project in the current directory. Do you want me to scaffold a new project with the Ignite UI CLI before I implement the Figma design?
|
|
28
30
|
>
|
|
29
|
-
> `npx -y igniteui-cli new` creates a Vite + Lit + TypeScript project
|
|
31
|
+
> `npx -y igniteui-cli new` creates a Vite + Lit + TypeScript project. The project has `igniteui-webcomponents`, a starter theme, and the Ignite UI CLI and Theming MCP servers configured for your coding assistant. You do not need a global install.
|
|
30
32
|
>
|
|
31
|
-
>
|
|
33
|
+
> You can also give me the path to an existing project directory."
|
|
32
34
|
|
|
33
35
|
If the user confirms scaffolding:
|
|
34
36
|
|
|
35
|
-
1. Ask for a project name. If the user
|
|
37
|
+
1. Ask for a project name. If the user already shared a Figma URL, suggest a name from the Figma file name. Otherwise, ask the user for a name.
|
|
36
38
|
|
|
37
|
-
2. Choose the project template
|
|
39
|
+
2. Choose the project template from the artboard structure. Phase 1 has not run yet, so use the lightest signal available:
|
|
38
40
|
|
|
39
41
|
| Signal | Template to use |
|
|
40
42
|
| ----------------------------------------------------------- | ------------------------------------------------ |
|
|
@@ -48,29 +50,29 @@ If the user confirms scaffolding:
|
|
|
48
50
|
npx -y igniteui-cli new <project-name> --framework=webcomponents --type=igc-ts --template=<empty|side-nav|side-nav-mini> --assistants=<generic|vscode|cursor|gemini|junie> --agents=<generic|claude|copilot|cursor|…>
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
`--assistants`
|
|
53
|
+
`--assistants` selects the MCP config file: `generic` → `.mcp.json` (the default; Claude Code, GitHub Copilot, and others), `vscode` → `.vscode/mcp.json`, `cursor` → `.cursor/mcp.json`, `gemini` → `.gemini/settings.json`, `junie` → `.junie/mcp/mcp.json`. `--agents` selects where the CLI copies the Agent Skills (`generic` → `.agents/skills`, `claude` → `.claude/skills`, `copilot` → `.github/skills`, …). Pass both flags. Without them, the CLI asks interactively.
|
|
52
54
|
|
|
53
|
-
This
|
|
54
|
-
- Installs and configures `igniteui-webcomponents` and `lit`, with a starter theme
|
|
55
|
-
-
|
|
56
|
-
- Runs the `ai-config` setup
|
|
57
|
-
- Copies static assets from `src/assets`
|
|
55
|
+
This command creates a standard Vite workspace. It also:
|
|
56
|
+
- Installs and configures `igniteui-webcomponents` and `lit`, with a starter theme. The theme is a `<link>` in `index.html` to `themes/light/bootstrap.css` or `themes/light/material.css`, and the template decides which file. Phase 3a treats it as "no theme"
|
|
57
|
+
- Configures `@vaadin/router` routing in `src/app/app-routing.ts`
|
|
58
|
+
- Runs the `ai-config` setup. This setup adds the `igniteui-cli` **and** `igniteui-theming` MCP servers to the config file of the chosen assistant. It also copies the Agent Skills for the chosen agents
|
|
59
|
+
- Copies static assets from `src/assets` with `vite-plugin-static-copy`
|
|
58
60
|
|
|
59
61
|
4. `cd <project-name>`.
|
|
60
62
|
|
|
61
|
-
5. Add the Figma and Playwright entries from [mcp-setup.md](mcp-setup.md) to the
|
|
63
|
+
5. Add the Figma and Playwright entries from [mcp-setup.md](mcp-setup.md) to the config file that the scaffold wrote (the file for `--assistants`).
|
|
62
64
|
|
|
63
|
-
6.
|
|
65
|
+
6. Make sure that the project builds:
|
|
64
66
|
```bash
|
|
65
67
|
npm run build
|
|
66
68
|
```
|
|
67
|
-
Do not run `npm start` in the foreground
|
|
69
|
+
Do not run `npm start` in the foreground, because the Vite dev server never exits. When Phase 5 needs the dev server, start it in the background or ask the user to start it (default `http://localhost:5173`).
|
|
68
70
|
|
|
69
|
-
7. The new servers and the new folder
|
|
71
|
+
7. The new servers and the new folder take effect only in a new session. Ask the user to **reopen the editor or agent session in the new project folder**, then stop. Phase 1 continues in that session.
|
|
70
72
|
|
|
71
73
|
## Implementation Layout
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
Phase 4 uses this section.
|
|
74
76
|
|
|
75
77
|
### Layout Strategy
|
|
76
78
|
|
|
@@ -86,13 +88,13 @@ Translate Figma frame dimensions into CSS Grid first:
|
|
|
86
88
|
}
|
|
87
89
|
```
|
|
88
90
|
|
|
89
|
-
Match desktop proportions before
|
|
91
|
+
Match the desktop proportions before you add responsive breakpoints.
|
|
90
92
|
|
|
91
|
-
>
|
|
93
|
+
> By default, the host of a Lit component is `display: inline`. Set `:host { display: block }` (or `grid`/`flex`), or the layout collapses. Charts and grids in a flexible grid track need an explicit height on the track and on the element.
|
|
92
94
|
|
|
93
95
|
### Project Structure
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
Use this structure for a new view from a Figma artboard in a CLI-scaffolded project:
|
|
96
98
|
|
|
97
99
|
```
|
|
98
100
|
src/app/
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
> **Part of the [`igniteui-wc-figma-to-app`](../SKILL.md) skill.**
|
|
4
4
|
>
|
|
5
|
-
> Use this file in Phase 3 to generate the global theme and per-component tokens. Read in full, together with [`design-token-bridge.md`](design-token-bridge.md), before
|
|
5
|
+
> Use this file in Phase 3 to generate the global theme and per-component tokens. Read it in full, together with [`design-token-bridge.md`](design-token-bridge.md), before you call a theming tool.
|
|
6
6
|
|
|
7
|
-
> **Tool names:** like SKILL.md, this file writes theming tools as `theming_<tool>`.
|
|
7
|
+
> **Tool names:** like SKILL.md, this file writes theming tools as `theming_<tool>`. Find each tool by its base name (`create_palette`, `create_theme`, `create_component_theme`, …) on the connected `igniteui-theming` server. Your client can show them as `mcp__igniteui-theming__create_palette` or a similar name. The `licensed` parameter is for Angular only. Do not pass it for Web Components.
|
|
8
8
|
|
|
9
|
-
**Goal:** produce theming code that matches the
|
|
9
|
+
**Goal:** produce theming code that matches the visual language of the Figma design. Use the kit variables from Phase 1e (Path A), or the color census and measurements from Phase 1d (Path B).
|
|
10
10
|
|
|
11
|
-
> **Output format decision — make it once, here.** Pass `output: "css"` (the default) when the project has no Sass
|
|
11
|
+
> **Output format decision — make it once, here.** Pass `output: "css"` (the default) when the project has no Sass. Pass `output: "sass"` only when Phase 0b found a Sass setup. Every theming tool that generates code (`create_*`, `set_size`, `set_spacing`, `set_roundness`) accepts `output`. Do not write Sass into a project that cannot compile it. Do not use the Angular-only `core()` / `theme()` mixins. The Web Components Sass API uses `igniteui-theming` with individual `palette()`, `typography()`, `elevations()`, and `spacing()` mixins.
|
|
12
12
|
|
|
13
13
|
## 3a: Inspect the Existing Theme (Guard)
|
|
14
14
|
|
|
15
|
-
Check **all three** places a theme can come from: `index.html`, the app entry point (`src/index.ts` / `main.ts`), and the global stylesheet (`styles.css` or the project's equivalent). Look for:
|
|
15
|
+
Check **all three** places that a theme can come from: `index.html`, the app entry point (`src/index.ts` / `main.ts`), and the global stylesheet (`styles.css` or the project's equivalent). Look for:
|
|
16
16
|
|
|
17
17
|
- a pre-built theme import or `<link>`, such as `igniteui-webcomponents/themes/dark/material.css`
|
|
18
18
|
- `--ig-theme` / `--ig-theme-variant` declarations on `:root`
|
|
@@ -24,7 +24,7 @@ Then classify what you found:
|
|
|
24
24
|
| Found | Meaning | Action |
|
|
25
25
|
| --- | --- | --- |
|
|
26
26
|
| Nothing | No theme | Continue with 3b–3c |
|
|
27
|
-
| Only the CLI scaffold's theme: a `<link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/<bootstrap\|material>.css">` in `index.html` (the template decides which), with no `--ig-*` palette overrides and no `configureTheme` call | The scaffold's starter theme, not a choice made for this app | Treat it as no theme. In 3c, **replace** that `<link>` with the resolved design system and variant
|
|
27
|
+
| Only the CLI scaffold's theme: a `<link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/<bootstrap\|material>.css">` in `index.html` (the template decides which), with no `--ig-*` palette overrides and no `configureTheme` call | The scaffold's starter theme, not a choice made for this app | Treat it as no theme. In 3c, **replace** that `<link>` with the resolved design system and variant. Never load two pre-built themes |
|
|
28
28
|
| Any other theme | A theme the app's authors chose | Keep it for now. Finish the comparison below after 3b |
|
|
29
29
|
|
|
30
30
|
**Existing app theme — compare after 3b.** Reuse it, and skip to 3d, only when **all three** match the design:
|
|
@@ -33,35 +33,37 @@ Then classify what you found:
|
|
|
33
33
|
2. the **design system** (the import path, or `--ig-theme`);
|
|
34
34
|
3. the **primary color**: the seed color on the high-emphasis controls, as seen in the design (Path A: the kit variables; Path B: the color census).
|
|
35
35
|
|
|
36
|
-
If
|
|
36
|
+
If one of them is different, **ask the user** before you change the global theme. The global theme affects every existing view in the app.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
If the user does not agree, do not change the global theme. Instead, scope the design's palette overrides, type-style variables, and component tokens to the new view's host selector, not to `:root`. You cannot scope the design system and variant, because components read `--ig-theme` and `--ig-theme-variant` from the document root. Pass the app's `designSystem` / `variant` to `create_component_theme`. Tell the user which anatomy differences will remain.
|
|
39
|
+
|
|
40
|
+
Find the variant of the Figma design from Phase 1e. If a `color/mode` variable exists, use its value. Otherwise, use the artboard background color: near-black (`#121212`, `#1a1a1a`, `#000`) → `"dark"`; near-white (`#fff`, `#f5f5f5`) → `"light"`.
|
|
39
41
|
|
|
40
42
|
## 3b: Resolve the Design System
|
|
41
43
|
|
|
42
44
|
**Choose the path from the dominant Phase 1f tier** (see `design-token-bridge.md § Two Paths`):
|
|
43
45
|
|
|
44
|
-
- **Path B (mostly Tier B/C):** the design system is the **closest baseline**, not a match.
|
|
46
|
+
- **Path B (mostly Tier B/C):** the design system is the **closest baseline**, not a match. Use `design-token-bridge.md § B1` to choose it, in this order: the user's request, then the kit's direct counterpart (Material 3 → `material`, Fluent 2 → `fluent`, Bootstrap → `bootstrap`), then text-field label placement, then control heights. If the fields of a design have labels *above* them, do not use `material`. Then apply B2–B4 in 3c and B5–B8 in 3d.
|
|
45
47
|
- **Path A (mostly Tier A):** use this **strict precedence order**. Stop at the first signal that gives a clear answer:
|
|
46
48
|
|
|
47
49
|
1. **Explicit user request** — "make it Material", "use Fluent", etc.
|
|
48
|
-
2. **Library source name in design context** — the `figma_get_design_context` or `figma_get_metadata` response
|
|
50
|
+
2. **Library source name in design context** — the `figma_get_design_context` or `figma_get_metadata` response can contain the source library file name (for example, `"Indigo.Design UI Kit for Material"` → `material`).
|
|
49
51
|
3. **Variable collection names from Phase 1e** — collection names like `Material/color/primary` identify the kit variant directly.
|
|
50
52
|
4. **Elevation variable structure** — inspect the `Elevations/*` variables:
|
|
51
53
|
- **Three-layer DROP_SHADOW** (umbra + penumbra + ambient) → **Material**
|
|
52
54
|
- **Single-layer DROP_SHADOW** → Indigo, Fluent, or Bootstrap
|
|
53
55
|
5. **Palette shade naming** — `primary/500`, `primary/100`–`primary/900` follows the Material 100–900 convention → likely **Material**.
|
|
54
|
-
6. **Visual heuristics** (only when all above
|
|
56
|
+
6. **Visual heuristics** (only when all signals above give no clear answer): layered shadows + ripple effects → `"material"`; flat surfaces + sharp corners + Segoe/Inter font → `"fluent"`; component borders + Bootstrap grid → `"bootstrap"`; rounded purple/indigo accents without Material shadows → `"indigo"`.
|
|
55
57
|
|
|
56
|
-
> **Never use font name as a primary signal.** "Titillium Web" is the default body font in the Indigo.Design UI Kit for Material
|
|
58
|
+
> **Never use font name as a primary signal.** "Titillium Web" is the default body font in the Indigo.Design UI Kit for Material. It is not unique to one kit variant.
|
|
57
59
|
|
|
58
60
|
Supported values: `material`, `bootstrap`, `fluent`, `indigo`.
|
|
59
61
|
|
|
60
|
-
> **Web Components read the active design system from CSS variables for the initial theme.** Components read `--ig-theme` and `--ig-theme-variant
|
|
62
|
+
> **Web Components read the active design system from CSS variables for the initial theme.** Components read `--ig-theme` and `--ig-theme-variant`. When these variables are absent, components use `bootstrap` / `light`. A generated palette alone does **not** switch the design system. To switch it, use the pre-built theme CSS or the generated `:root` block. `configureTheme(ds, variant)` switches the registered components at runtime, but it does not change those root variables.
|
|
61
63
|
|
|
62
64
|
## 3c: Generate the Global Theme
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
Use [design-token-bridge.md](design-token-bridge.md) to extract these values:
|
|
65
67
|
|
|
66
68
|
```
|
|
67
69
|
Path A (Indigo.Design kits) — from Phase 1e variables:
|
|
@@ -79,18 +81,18 @@ fontFamily ← family of the text styles in use
|
|
|
79
81
|
type overrides ← kit type ramp by role (`design-token-bridge.md § B3`), incl. button text transform (§ B4)
|
|
80
82
|
```
|
|
81
83
|
|
|
82
|
-
Read the theming guidance resources before
|
|
84
|
+
Read the theming guidance resources before you generate code. This makes sure that you extract only values that the theme system accepts:
|
|
83
85
|
|
|
84
86
|
```
|
|
85
87
|
theming_read_resource({ uri: "theming://guidance/colors/rules" }) // luminance + variant rules
|
|
86
88
|
theming_read_resource({ uri: "theming://platforms/webcomponents" }) // platform specifics
|
|
87
89
|
```
|
|
88
90
|
|
|
89
|
-
> **Parameter names differ between tools
|
|
91
|
+
> **Parameter names differ between tools.** `theming_create_palette` uses `primary`, `secondary`, `surface`, `gray`, `success`, `warn`, `error`, `info`, and `variant`. `theming_create_theme` uses `primaryColor`, `secondaryColor`, `surfaceColor`, and has no `gray` or status colors. Do not confuse them.
|
|
90
92
|
|
|
91
93
|
**CSS path (default — no Sass in the project):**
|
|
92
94
|
|
|
93
|
-
1. Load the pre-built theme CSS for the resolved design system and variant
|
|
95
|
+
1. Load the pre-built theme CSS for the resolved design system and variant. Load it in the app entry point, or replace the scaffold's `<link>` in `index.html` (see 3a). This one line sets `--ig-theme`, `--ig-theme-variant`, the full palette, typography, and elevations:
|
|
94
96
|
|
|
95
97
|
```typescript
|
|
96
98
|
import 'igniteui-webcomponents/themes/dark/material.css';
|
|
@@ -109,11 +111,11 @@ theming_read_resource({ uri: "theming://platforms/webcomponents" }) // platform
|
|
|
109
111
|
})
|
|
110
112
|
```
|
|
111
113
|
|
|
112
|
-
Apply the generated custom properties to `:root` in the global stylesheet. The overrides must load **after** the theme
|
|
114
|
+
Apply the generated custom properties to `:root` in the global stylesheet. The overrides must load **after** the theme. Load both through the same mechanism, in this order. Import the theme CSS and then `styles.css` from the entry module. Alternatively, put both as `<link>` tags in `index.html`, with the theme first. (Vite injects CSS imported from JS after any `<link>` in `index.html`, so if you mix the two mechanisms, the theme can take precedence.)
|
|
113
115
|
|
|
114
|
-
3. Apply the font family with plain CSS (`--ig-font-family` or `font-family`) or the CSS output of `theming_create_typography({ fontFamily, designSystem, platform: "webcomponents", output: "css" })`. Do not pass `customScale`: the tool accepts it but its generators ignore it. Do not
|
|
116
|
+
3. Apply the font family with plain CSS (`--ig-font-family` or `font-family`) or with the CSS output of `theming_create_typography({ fontFamily, designSystem, platform: "webcomponents", output: "css" })`. Do not pass `customScale`: the tool accepts it, but its generators ignore it. Do not write Sass typography mixins into a CSS-only app.
|
|
115
117
|
|
|
116
|
-
4. Read
|
|
118
|
+
4. Read each **luminance warning** that the palette tools return, and make the necessary changes. The design can have several distinct surface depths that one generated surface color cannot express. In that case, use `theming_create_custom_palette`, or define semantic variables (`--surface-1`, `--surface-2`) for the extra depths.
|
|
117
119
|
|
|
118
120
|
**Sass path (only when Sass is configured):**
|
|
119
121
|
|
|
@@ -131,13 +133,13 @@ theming_create_theme({
|
|
|
131
133
|
})
|
|
132
134
|
```
|
|
133
135
|
|
|
134
|
-
`theming_create_theme`
|
|
136
|
+
`theming_create_theme` generates the `@use 'igniteui-theming'` imports, the `palette()` / `elevations()` / `typography()` / `spacing()` mixin calls, and the `:root` block with `--ig-theme` and `--ig-theme-variant`. Apply its output as the response instructs. For `gray`, status colors, or a full custom ramp, add the output of `theming_create_palette` or `theming_create_custom_palette` **after** it. Its `:root` palette variables override the generated ones. Remove the scaffold's theme `<link>` from `index.html` (3a), so that only one theme loads.
|
|
135
137
|
|
|
136
|
-
> `theming_create_elevations` takes **`designSystem`** (`"material"` or `"indigo"`)
|
|
138
|
+
> `theming_create_elevations` takes **`designSystem`** (`"material"` or `"indigo"`). It has no `preset` parameter.
|
|
137
139
|
|
|
138
|
-
**Path B type overrides (both paths).** After the theme, add a `:root` block that sets the `--ig-<style>-<property>` variables for the type styles that differ from the baseline, including the button's text transform. See `design-token-bridge.md § B4`.
|
|
140
|
+
**Path B type overrides (both paths).** After the theme, add a `:root` block that sets the `--ig-<style>-<property>` variables. Set them for the type styles that differ from the baseline, including the button's text transform. See `design-token-bridge.md § B4`.
|
|
139
141
|
|
|
140
|
-
**Runtime switching.** When the design needs light and dark at runtime,
|
|
142
|
+
**Runtime switching.** When the design needs light and dark at runtime, replace the pre-built stylesheet (or the palette block). **Also** call the library API with the same design system and variant. Components cache the design system that they read from `--ig-theme` on first use. Thus, one step alone does not switch both the palette and the component styles:
|
|
141
143
|
|
|
142
144
|
```typescript
|
|
143
145
|
import { configureTheme } from 'igniteui-webcomponents';
|
|
@@ -145,7 +147,7 @@ import { configureTheme } from 'igniteui-webcomponents';
|
|
|
145
147
|
configureTheme('material', 'dark');
|
|
146
148
|
```
|
|
147
149
|
|
|
148
|
-
**Grid and chart packages carry their own themes.** The premium grids need `igniteui-webcomponents-grids/grids/themes/<variant>/<design-system>.css` in addition to the core theme
|
|
150
|
+
**Grid and chart packages carry their own themes.** The premium grids need `igniteui-webcomponents-grids/grids/themes/<variant>/<design-system>.css` in addition to the core theme. In a Lit component, import that CSS with `?inline` and inject it into the shadow root:
|
|
149
151
|
|
|
150
152
|
```typescript
|
|
151
153
|
import gridTheme from 'igniteui-webcomponents-grids/grids/themes/dark/material.css?inline';
|
|
@@ -154,27 +156,35 @@ import gridTheme from 'igniteui-webcomponents-grids/grids/themes/dark/material.c
|
|
|
154
156
|
|
|
155
157
|
## 3d: Per-Component Token Mapping
|
|
156
158
|
|
|
157
|
-
> **Scope:** applies to every Ignite UI family that
|
|
159
|
+
> **Scope:** this section applies to every Ignite UI family that has design tokens: card, inputs, select, combo, navbar, nav drawer, list, tabs, date pickers, chips, grids, and others. Charts, gauges, and maps have **no design tokens**. Configure them through component properties (see 3e).
|
|
158
160
|
|
|
159
161
|
For **every** Ignite UI component in your plan, run this loop:
|
|
160
162
|
|
|
161
|
-
1. `theming_get_component_design_tokens({ component: "<theme-key>" })
|
|
162
|
-
2. Find the values for this component's surfaces (background, text, border, hover state). **Path A:** from the Phase 1e kit variables. **Path B:** from the Phase 1d color census and measurements.
|
|
163
|
-
3. `theming_create_component_theme({ component: "<theme-key>", platform: "webcomponents", designSystem: "<3b result>", variant: "<light|dark>", tokens: { <only differing tokens> }, output: "css" | "sass" })`. Always pass `designSystem` and `variant
|
|
164
|
-
4. Apply the generated block exactly as
|
|
165
|
-
5.
|
|
163
|
+
1. `theming_get_component_design_tokens({ component: "<theme-key>" })`: examine all token names, types, and descriptions. Also examine the **related themes** that the result lists for compound components. Theme keys are not always the tag name: inputs are `input-group`, and the nav drawer is `navdrawer`. Progress bars are `progress-linear` / `progress-circular`, and a single-select combo is `simple-combo`. Buttons need the variant name (`contained-button`, `flat-icon-button`, …). See `design-token-bridge.md § Per-Component Token Resolution` for the full map.
|
|
164
|
+
2. Find the values for this component's surfaces (background, text, border, hover state). **Path A:** get them from the Phase 1e kit variables. **Path B:** get them from the Phase 1d color census and measurements. When variables exist, they only confirm these values.
|
|
165
|
+
3. `theming_create_component_theme({ component: "<theme-key>", platform: "webcomponents", designSystem: "<3b result>", variant: "<light|dark>", tokens: { <only differing tokens> }, output: "css" | "sass" })`. Always pass `designSystem` and `variant`. Without them, the tool uses Material light and computes the theme against the wrong schema.
|
|
166
|
+
4. Apply the generated block exactly as the tool returns it, to the component selector or to the `selector` that you passed. Color token values must refer to palette variables (`var(--ig-primary-500)`), never to raw hex values.
|
|
167
|
+
5. A compound component is a component whose `get_component_design_tokens` result lists related themes. Examples are `combo`, `select`, the date pickers, `card`, `navbar`, `dialog`, `banner`, and the grids. For compound components, follow the related-theme chain from step 1, and theme each child with its scoped selector. If you style only the parent, the dropdown or calendar does not match the theme. Exception: the grid theme **derives** its children (`action-strip`, `column-actions`, toolbar, paginator, …). Theme the grid, and do not call `create_component_theme` for those keys separately.
|
|
168
|
+
|
|
169
|
+
**Path B additions to this loop** (see `design-token-bridge.md § B5–B8`). Include these tokens in the same `theming_create_component_theme` call:
|
|
170
|
+
|
|
171
|
+
- the component's **radius** tokens, at the measured px value
|
|
172
|
+
- its **border** and **shadow/elevation** tokens, as the design shows them
|
|
173
|
+
- its hover/focus/disabled **state** tokens, from the kit's state variants
|
|
174
|
+
|
|
175
|
+
Choose `--ig-size` for each component family from the measured control heights (`design-token-bridge.md § B7`). Do this before you tune individual components.
|
|
166
176
|
|
|
167
|
-
|
|
177
|
+
A specific component can need a density or spacing that is different from the global default. For that component, use `theming_set_size` or `theming_set_spacing` with the `component` parameter. This scopes `--ig-size` or `--ig-spacing` to the component's selector, not globally. For compound components, use `scope` with a sub-component selector. Apply these globally (`:root`) only when the entire app has a clearly different density (Path B: when every component family moves the same way, see `design-token-bridge.md § B7`).
|
|
168
178
|
|
|
169
|
-
|
|
179
|
+
Keep `theming_set_roundness` at its default unless the user explicitly asks for a change. For Path B, use per-component tokens for radius, because one global factor cannot reproduce the radii of a kit. Never derive multiplier values from Figma pixel values. See `design-token-bridge.md § Spacing, Sizing, and Roundness`.
|
|
170
180
|
|
|
171
181
|
## 3e: Chart Series Colors
|
|
172
182
|
|
|
173
|
-
Charts have no design tokens,
|
|
183
|
+
Charts have no design tokens. By default, they use their own brush palette, which does not match the Figma series colors. Before you implement a chart, make these calls:
|
|
174
184
|
|
|
175
185
|
```
|
|
176
186
|
theming_get_chart_series_colors({ chartType: "<e.g. category-chart>" })
|
|
177
187
|
theming_get_chart_series_colors({ customBrushes: ["#9DE772", "#6DB1FF"] }) // validate Figma colors
|
|
178
188
|
```
|
|
179
189
|
|
|
180
|
-
The first call lists
|
|
190
|
+
The first call lists the theme tokens on that chart type that accept a brush list. The second call validates the colors that you extracted in Phase 1d. It also identifies pairs of colors that are difficult to distinguish. Apply the result through the brush properties of the chart, and assign them on the element. Use `brushes` / `outlines` on most charts, `brush` on `igc-sparkline`, and `fillBrushes` on `igc-treemap`. On a doughnut chart, use `brushes` / `outlines` on each `igc-ring-series`.
|