igniteui-angular 22.2.0-rc.0 → 22.2.0-rc.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.
Files changed (111) hide show
  1. package/README.md +1 -1
  2. package/button-group/README.md +42 -9
  3. package/calendar/README.md +30 -20
  4. package/card/README.md +1 -1
  5. package/fesm2022/igniteui-angular-accordion.mjs +7 -7
  6. package/fesm2022/igniteui-angular-action-strip.mjs +11 -22
  7. package/fesm2022/igniteui-angular-action-strip.mjs.map +1 -1
  8. package/fesm2022/igniteui-angular-avatar.mjs +7 -7
  9. package/fesm2022/igniteui-angular-badge.mjs +7 -7
  10. package/fesm2022/igniteui-angular-banner.mjs +10 -10
  11. package/fesm2022/igniteui-angular-bottom-nav.mjs +22 -22
  12. package/fesm2022/igniteui-angular-button-group.mjs +32 -35
  13. package/fesm2022/igniteui-angular-button-group.mjs.map +1 -1
  14. package/fesm2022/igniteui-angular-calendar.mjs +132 -180
  15. package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
  16. package/fesm2022/igniteui-angular-card.mjs +47 -58
  17. package/fesm2022/igniteui-angular-card.mjs.map +1 -1
  18. package/fesm2022/igniteui-angular-carousel.mjs +22 -22
  19. package/fesm2022/igniteui-angular-chat-extras.mjs +6 -6
  20. package/fesm2022/igniteui-angular-chat.mjs +12 -12
  21. package/fesm2022/igniteui-angular-checkbox.mjs +7 -7
  22. package/fesm2022/igniteui-angular-chips.mjs +10 -10
  23. package/fesm2022/igniteui-angular-combo.mjs +69 -67
  24. package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
  25. package/fesm2022/igniteui-angular-core.mjs +139 -92
  26. package/fesm2022/igniteui-angular-core.mjs.map +1 -1
  27. package/fesm2022/igniteui-angular-date-picker.mjs +53 -70
  28. package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
  29. package/fesm2022/igniteui-angular-dialog.mjs +13 -13
  30. package/fesm2022/igniteui-angular-directives.mjs +194 -194
  31. package/fesm2022/igniteui-angular-drop-down.mjs +29 -29
  32. package/fesm2022/igniteui-angular-expansion-panel.mjs +28 -28
  33. package/fesm2022/igniteui-angular-grids-core.mjs +737 -661
  34. package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
  35. package/fesm2022/igniteui-angular-grids-grid.mjs +49 -49
  36. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +37 -37
  37. package/fesm2022/igniteui-angular-grids-lite.mjs +25 -17
  38. package/fesm2022/igniteui-angular-grids-lite.mjs.map +1 -1
  39. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +80 -80
  40. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
  41. package/fesm2022/igniteui-angular-grids-tree-grid.mjs +55 -55
  42. package/fesm2022/igniteui-angular-icon.mjs +10 -10
  43. package/fesm2022/igniteui-angular-input-group.mjs +59 -55
  44. package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
  45. package/fesm2022/igniteui-angular-list.mjs +40 -40
  46. package/fesm2022/igniteui-angular-navbar.mjs +13 -13
  47. package/fesm2022/igniteui-angular-navigation-drawer.mjs +43 -38
  48. package/fesm2022/igniteui-angular-navigation-drawer.mjs.map +1 -1
  49. package/fesm2022/igniteui-angular-paginator.mjs +19 -19
  50. package/fesm2022/igniteui-angular-progressbar.mjs +19 -19
  51. package/fesm2022/igniteui-angular-query-builder.mjs +22 -22
  52. package/fesm2022/igniteui-angular-radio.mjs +25 -21
  53. package/fesm2022/igniteui-angular-radio.mjs.map +1 -1
  54. package/fesm2022/igniteui-angular-select.mjs +29 -33
  55. package/fesm2022/igniteui-angular-select.mjs.map +1 -1
  56. package/fesm2022/igniteui-angular-simple-combo.mjs +9 -9
  57. package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
  58. package/fesm2022/igniteui-angular-slider.mjs +28 -28
  59. package/fesm2022/igniteui-angular-snackbar.mjs +7 -7
  60. package/fesm2022/igniteui-angular-splitter.mjs +13 -13
  61. package/fesm2022/igniteui-angular-stepper.mjs +34 -34
  62. package/fesm2022/igniteui-angular-switch.mjs +7 -7
  63. package/fesm2022/igniteui-angular-tabs.mjs +34 -34
  64. package/fesm2022/igniteui-angular-time-picker.mjs +26 -36
  65. package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
  66. package/fesm2022/igniteui-angular-toast.mjs +7 -7
  67. package/fesm2022/igniteui-angular-tree.mjs +28 -28
  68. package/fesm2022/igniteui-angular-virtual-scroll.mjs +497 -145
  69. package/fesm2022/igniteui-angular-virtual-scroll.mjs.map +1 -1
  70. package/migrations/common/UpdateChanges.d.ts +56 -0
  71. package/migrations/common/UpdateChanges.js +366 -38
  72. package/migrations/common/UpdateChanges.spec.js +829 -0
  73. package/migrations/migration-collection.json +1 -1
  74. package/migrations/update-22_2_0/index.js +145 -0
  75. package/migrations/update-22_2_0/index.spec.js +206 -0
  76. package/navigation-drawer/README.md +1 -1
  77. package/package.json +3 -3
  78. package/schematics/tsconfig.tsbuildinfo +1 -1
  79. package/skills/igniteui-angular-components/SKILL.md +9 -5
  80. package/skills/igniteui-angular-components/references/form-controls.md +1 -1
  81. package/skills/igniteui-angular-components/references/mcp-setup.md +14 -2
  82. package/skills/igniteui-angular-figma-to-app/SKILL.md +112 -525
  83. package/skills/igniteui-angular-figma-to-app/references/asset-extraction.md +49 -75
  84. package/skills/igniteui-angular-figma-to-app/references/design-provenance.md +201 -0
  85. package/skills/igniteui-angular-figma-to-app/references/design-token-bridge.md +175 -52
  86. package/skills/igniteui-angular-figma-to-app/references/figma-component-map.md +153 -99
  87. package/skills/igniteui-angular-figma-to-app/references/figma-exploration.md +226 -0
  88. package/skills/igniteui-angular-figma-to-app/references/mcp-setup.md +71 -105
  89. package/skills/igniteui-angular-figma-to-app/references/project-setup.md +63 -0
  90. package/skills/igniteui-angular-figma-to-app/references/theme-generation.md +120 -0
  91. package/skills/igniteui-angular-figma-to-app/references/validation-patterns.md +48 -50
  92. package/skills/igniteui-angular-generate-from-image-design/SKILL.md +11 -7
  93. package/skills/igniteui-angular-grids/SKILL.md +7 -3
  94. package/skills/igniteui-angular-grids/references/editing.md +1 -2
  95. package/skills/igniteui-angular-grids/references/grid-migration.md +1 -1
  96. package/skills/igniteui-angular-theming/SKILL.md +9 -5
  97. package/skills/igniteui-angular-theming/references/mcp-setup.md +12 -2
  98. package/types/igniteui-angular-button-group.d.ts +49 -34
  99. package/types/igniteui-angular-calendar.d.ts +33 -50
  100. package/types/igniteui-angular-card.d.ts +12 -17
  101. package/types/igniteui-angular-combo.d.ts +6 -0
  102. package/types/igniteui-angular-core.d.ts +25 -8
  103. package/types/igniteui-angular-grids-core.d.ts +48 -4
  104. package/types/igniteui-angular-grids-lite.d.ts +5 -1
  105. package/types/igniteui-angular-grids-pivot-grid.d.ts +1 -1
  106. package/types/igniteui-angular-input-group.d.ts +17 -3
  107. package/types/igniteui-angular-navigation-drawer.d.ts +1 -0
  108. package/types/igniteui-angular-radio.d.ts +5 -0
  109. package/types/igniteui-angular-time-picker.d.ts +0 -1
  110. package/types/igniteui-angular-virtual-scroll.d.ts +41 -13
  111. package/virtual-scroll/README.md +32 -1
@@ -1,380 +1,100 @@
1
1
  ---
2
2
  license: MIT
3
3
  name: igniteui-angular-figma-to-app
4
- description: >
5
- Translate Figma app screens designed using the Indigo.Design UI Kits into production
6
- Angular applications with Ignite UI for Angular. The Indigo.Design UI Kits are Figma
7
- component libraries available in four design-system variants — Material, Fluent,
8
- Bootstrap, and Indigo — each with light and dark themes. Designers build their own
9
- app frames in Figma using these kit libraries, and every kit component instance maps
10
- 1:1 to an Ignite UI Angular control. The active kit variant also determines the
11
- design system used in the Angular theme. Uses the Figma MCP for design data, the
12
- Ignite UI CLI MCP for component docs, the Ignite UI Theming MCP for palette and
13
- component-level styling, and the Playwright MCP for visual validation against the
14
- original Figma design. Triggers on "implement this Figma design", "build from Figma",
15
- "translate Figma to Angular", "implement this artboard", "generate app from Figma",
16
- or when a Figma URL is shared with implementation intent in an Ignite UI Angular context.
4
+ description: "Builds Angular views from Figma designs with Ignite UI for Angular, supporting Indigo.Design kits, third-party kits, and plain frames. Uses Figma, Ignite UI CLI, theming, and Playwright MCP servers. WHEN TO USE: implementing a Figma design or artboard in an Ignite UI Angular project. WHEN NOT TO USE: screenshots or wireframes without a Figma file (use igniteui-angular-generate-from-image-design), single-component APIs (use igniteui-angular-components or igniteui-angular-grids), or theme-only changes (use igniteui-angular-theming)."
17
5
  user-invocable: true
18
6
  ---
19
7
 
20
8
  # Ignite UI for Angular — Figma to App
21
9
 
22
- Translate Figma app screens built with the **Indigo.Design UI Kits** into production
23
- Angular applications. Designers create their own frames in Figma using the Indigo.Design
24
- component libraries as shared libraries — these kits come in four design-system variants
25
- (**Material**, **Fluent**, **Bootstrap**, **Indigo**) with light and dark themes each.
26
- Every component instance in the design maps 1:1 to an Ignite UI Angular control, and
27
- the active kit variant directly determines which design system to use in the Angular
28
- theme.
10
+ Translate Figma app screens into production Angular applications built with Ignite UI for Angular. The skill accepts designs from three kinds of source. A single file often mixes them, so every component is classified individually (Phase 1f):
29
11
 
30
- This skill orchestrates four MCP servers: **Figma** (design data), **Ignite UI CLI**
31
- (component docs), **Ignite UI Theming** (styles), and **Playwright** (visual validation).
12
+ | Tier | Source | How it maps to Ignite UI |
13
+ | --- | --- | --- |
14
+ | **A** | The Infragistics **Indigo.Design UI Kits** (Material, Fluent, Bootstrap, Indigo variants, light and dark) | Directly, by kit layer name. The kit variant *is* the Ignite UI design system. |
15
+ | **B** | Any other component library: public kits such as Material 3, Fluent 2, Bootstrap, shadcn/ui, Untitled UI, or Ant, and in-house design systems | Variant properties are normalized to a canonical role, then mapped. The theme is fitted to a closest baseline design system. |
16
+ | **C** | Plain frames, groups, and detached instances | The role is inferred from structure and visuals, with lower confidence, and the user confirms it. |
17
+
18
+ Tier A gives the highest fidelity for the least effort. Tiers B and C reach high fidelity through token overrides, and record the remaining **anatomy deltas** (structural differences between the design's components and Ignite UI's) for the user to approve instead of hiding them.
19
+
20
+ This skill orchestrates four MCP servers: **Figma** (design data), **Ignite UI CLI** (component docs), **Ignite UI Theming** (styles), and **Playwright** (visual validation).
32
21
 
33
22
  ---
34
23
 
35
24
  ## Required Workflow
36
25
 
37
- Complete all phases in order — do not skip phases or generate component code from
38
- memory. Every component selector, input name, and import path must come from
39
- `get_doc` results or, where no doc exists in the catalog, from the
40
- `igniteui-angular-components` / `igniteui-angular-grids` skill reference files —
41
- never guessed.
26
+ Complete all phases in order — do not skip phases or generate component code from memory. Every component selector, input name, and import path must come from `get_doc` results or, where no doc exists in the catalog, from the `igniteui-angular-components` / `igniteui-angular-grids` skill reference files — never guessed.
42
27
 
43
- Read [references/figma-component-map.md](references/figma-component-map.md) before Phase 2.
44
- Read [references/design-token-bridge.md](references/design-token-bridge.md) before Phase 3.
45
- Read [references/asset-extraction.md](references/asset-extraction.md) before Phase 1h.
46
- Read [references/validation-patterns.md](references/validation-patterns.md) before Phase 5.
28
+ Read [references/project-setup.md](references/project-setup.md) before Phase 0b. Read [references/figma-exploration.md](references/figma-exploration.md) before Phase 1. Read [references/design-provenance.md](references/design-provenance.md) before Phase 1f. Read [references/asset-extraction.md](references/asset-extraction.md) before Phase 1h. Read [references/figma-component-map.md](references/figma-component-map.md) before Phase 2. Read [references/theme-generation.md](references/theme-generation.md) before Phase 3. Read [references/design-token-bridge.md](references/design-token-bridge.md) before Phase 3. Read [references/validation-patterns.md](references/validation-patterns.md) before Phase 5.
47
29
 
48
30
  ---
49
31
 
50
32
  ## Phase 0 — Prerequisites
51
33
 
52
- > **Tool naming:** this skill writes MCP tool names as `<server>_<tool>` (e.g.
53
- > `figma_get_metadata`, `theming_create_theme`). The exact name depends on the client —
54
- > Claude Code exposes them as `mcp__<server>__<tool>` (e.g. `mcp__figma__get_metadata`).
55
- > Match by the tool's base name on whatever server is connected.
34
+ > **Tool naming:** this skill writes MCP tool names as `<server>_<tool>` (e.g. `figma_get_metadata`, `theming_create_theme`). The exact name depends on the client — Claude Code exposes them as `mcp__<server>__<tool>` (e.g. `mcp__figma__get_metadata`). Match by the tool's base name on whatever server is connected.
56
35
 
57
36
  ### 0a: Verify All Four MCP Servers
58
37
 
59
- Run these checks **silently** in parallel. Each verification call is a no-op if the
60
- server is not connected; do not surface raw errors to the user at this point.
38
+ Run these checks **silently** in parallel. Each verification call is a no-op if the server is not connected; do not surface raw errors to the user at this point.
61
39
 
62
40
  | Server | Verification call | Success signal |
63
41
  | --------------------- | ---------------------------------------------- | ----------------------------------- |
64
- | **Figma** | `figma_get_metadata` with no `nodeId` | Returns page list or selection info |
42
+ | **Figma** | Inspect `figma_get_metadata` schema (no call) | Tool is listed. The configured server URL (or `fileKey` in the tool schema) tells remote from desktop |
65
43
  | **Ignite UI CLI** | `list_components` with `framework: "angular"` | Returns component list |
66
44
  | **Ignite UI Theming** | `theming_detect_platform` | Returns platform info |
67
45
  | **Playwright** | `playwright_browser_navigate` to `about:blank` | Navigates without error |
68
46
 
69
- If **any server fails**, stop and guide the user through setup **for that server only**
70
- before continuing. For `igniteui-cli` and `igniteui-theming`, the fastest path is
71
- `npx -y igniteui-cli ai-config`, which configures both. Full setup instructions for all
72
- servers are in [references/mcp-setup.md](references/mcp-setup.md). Newly configured MCP
73
- servers require an editor/session reload before their tools appear.
47
+ If **any server fails**, fix setup **for that server only** before continuing. For `igniteui-cli` and `igniteui-theming`, configure them yourself — run `npx -y igniteui-cli ai-config` (or `ig ai-config`) from the project root, which configures both. Add a missing Playwright entry yourself as well. The Figma servers need the user's action — the desktop server is enabled in the Figma desktop app, and the remote server signs in through Figma OAuth — so guide the user through the Figma setup. Full setup instructions for all servers are in [references/mcp-setup.md](references/mcp-setup.md). Newly configured MCP servers require an editor/session reload before their tools appear — ask the user to reload, then stop.
74
48
 
75
49
  ### 0b: Detect or Scaffold Angular Project
76
50
 
77
- Check whether the current working directory contains a valid Angular + Ignite UI project:
78
-
79
- ```
80
- 1. Does package.json exist?
81
- 2. Does it list "igniteui-angular" OR "@infragistics/igniteui-angular" in dependencies?
82
- 3. Is there a src/app/ directory?
83
- ```
84
-
85
- **If a valid project is found:**
86
-
87
- - Note the package layout: `igniteui-angular` (open-source) or `@infragistics/igniteui-angular` (licensed)
88
- - Note the Angular version from `package.json`
89
- - **Check the MCP configuration for all four required server entries** — `figma`, `igniteui-cli`,
90
- `igniteui-theming`, and `playwright` (in `.vscode/mcp.json` or the client's equivalent).
91
- If `igniteui-cli` or `igniteui-theming` is missing, run `npx -y igniteui-cli ai-config`
92
- from the project root — it configures both servers and copies the Agent Skills, preserving
93
- existing entries. Add missing `figma` and `playwright` entries from
94
- [references/mcp-setup.md](references/mcp-setup.md). Projects scaffolded with
95
- `npx igniteui-cli new` have `igniteui-cli` pre-wired but typically lack the other three.
96
- A reload is required before newly configured servers' tools appear.
97
- - Inform the user: "Found existing Ignite UI Angular project. Proceeding with the Figma workflow."
98
-
99
- **If no valid project is found:**
100
- Present this message and wait for the user’s choice:
101
-
102
- > “No Ignite UI Angular project found in the current directory. Would you like me to
103
- > scaffold a new one using the Ignite UI CLI before implementing the Figma design?
104
- >
105
- > `npx -y igniteui-cli new` creates a project pre-configured with Ignite UI Angular,
106
- > theming already applied in `styles.scss`, and the Ignite UI CLI MCP server auto-wired
107
- > into `.vscode/mcp.json`. No global install required.
108
- >
109
- > Alternatively, point me at an existing project directory.”
110
-
111
- If the user confirms scaffolding:
112
-
113
- 1. Ask for a project name. If the user has already shared a Figma URL, suggest a name
114
- derived from the Figma file name; otherwise prompt.
115
-
116
- 2. Choose the project template based on the artboard structure. Because Phase 1 has
117
- not run yet, use the lightest signal available:
118
-
119
- | Signal | Template to use |
120
- | -------------------------------------------------------------------- | ------------------------------------------------ |
121
- | User mentions a sidebar, navigation drawer, or multiple routed views | `side-nav` |
122
- | No strong signal — default | `empty` (routing + home page; easiest to extend) |
123
-
124
- 3. Create the project:
125
-
126
- ```bash
127
- npx -y igniteui-cli new <project-name> --framework=angular --type=igx-ts --template=<empty|side-nav>
128
- ```
129
-
130
- This produces a standard Angular workspace fully compatible with `ng` commands,
131
- and additionally:
132
- - Installs and configures `igniteui-angular` with a default theme in `styles.scss`
133
- - Generates `.vscode/mcp.json` with the Ignite UI CLI MCP server entry already set
134
- - Copies Ignite UI Agent Skills to `.claude/skills/`
135
-
136
- 4. `cd <project-name>`
51
+ Check whether the working directory contains a `package.json` that lists `igniteui-angular` or `@infragistics/igniteui-angular`, and a `src/app/` directory.
137
52
 
138
- 5. Open the auto-generated `.vscode/mcp.json` and **append** the Figma, Ignite UI
139
- Theming, and Playwright server entries from `references/mcp-setup.md`. The Ignite
140
- UI CLI entry is already present — do not duplicate it.
53
+ - **Project found:** note the package (open-source or licensed) and the Angular version, and confirm the MCP configuration has all four server entries.
54
+ - **No project found:** offer to scaffold one with `npx -y igniteui-cli new`, or to use an existing project directory, and wait for the user's choice.
141
55
 
142
- 6. Confirm the project starts cleanly:
143
- ```bash
144
- npm start
145
- ```
146
- Then continue to Phase 1.
56
+ Read [references/project-setup.md](references/project-setup.md) for the detection checklist, the exact messages to show the user, template selection, and the scaffolding steps.
147
57
 
148
58
  ---
149
59
 
150
60
  ## Phase 1 — Figma Design Exploration
151
61
 
152
- **Goal:** understand the full design structure and capture all data needed for
153
- implementation and validation before writing any code.
154
-
155
- > **Rate-limit awareness:** Figma MCP calls count against plan quotas
156
- > (indicative, subject to change — verify against the user's current Figma plan:
157
- > Starter **6 calls/month**, Organization 200/day, Enterprise 600/day).
158
- >
159
- > Estimated call budget for a 5-artboard design:
160
- > `figma_get_metadata` ×2 + `figma_get_screenshot` ×5 + `figma_get_design_context` ×5 + `figma_get_variable_defs` ×1 + `figma_get_code_connect_map` ×5 = **~18 calls**.
161
- > **Starter plan users will exceed their monthly quota in a single session.** Strategies:
162
- > 1. Call `figma_get_variable_defs` only **once** for the root page (variables are file-scoped, not artboard-scoped — calling it per artboard wastes quota on duplicate data).
163
- > 2. Prioritize `figma_get_design_context` over additional screenshots if quota is tight.
164
- > 3. For large files, consider implementing one artboard per monthly budget cycle.
165
- >
166
- > Use `figma_get_metadata` first to discover structure cheaply, then call
167
- > `figma_get_design_context` only for the artboards you will implement.
168
-
169
- ### 1a: Discover Pages and Artboards
170
-
171
- Call `figma_get_metadata` with no `nodeId`. This returns the top-level page list.
172
- Then call `figma_get_metadata` again for each page that looks relevant to get its
173
- artboard tree.
174
-
175
- > If the user already shared a Figma URL, extract the `nodeId` from it:
176
- > URL format: `https://figma.com/design/:fileKey/:name?node-id=1-2` → nodeId = `1:2`
177
- > (replace `-` with `:`)
178
-
179
- ### 1b: Select Target Artboards
180
-
181
- If there are multiple pages or artboards, show the user a list:
182
-
183
- > "I found these artboards in your Figma file:
184
- >
185
- > - Page 1: [list artboard names + node IDs]
186
- > - Page 2: [list artboard names + node IDs]
187
- >
188
- > Which artboards should I implement? (You can say 'all' or list specific names.)"
189
-
190
- Wait for confirmation before proceeding.
191
-
192
- ### 1c: Capture Reference Screenshots
193
-
194
- > **IMPORTANT — Figma MCP is session-bound.** The `figma_get_screenshot` tool returns a
195
- > screenshot of the **currently selected node in the Figma desktop app**, regardless of any
196
- > `nodeId` parameter passed. To capture each artboard, you must ask the user to navigate
197
- > to it in Figma first.
198
-
199
- For each target artboard:
200
-
201
- 1. Ask the user: *"In Figma, please click the **[Artboard Name]** frame to select it, then confirm."*
202
- 2. Wait for confirmation, then call:
203
- ```
204
- figma_get_screenshot({})
205
- // Store: { artboardName, screenshotFile, width: <from metadata>, height: <from metadata> }
206
- ```
207
- 3. Repeat for each artboard — do **not** batch these calls before the user navigates.
208
-
209
- After all artboards are captured, confirm the count:
210
- > *"I have N reference screenshots: [list artboard names]. Proceeding to design context extraction."
211
- > If any are missing, navigate to that artboard in Figma and recapture before continuing.*
212
-
213
- > Never skip this step. The screenshots are your ground truth for Phase 5 validation.
214
-
215
- ### 1d: Extract Design Context
216
-
217
- > **IMPORTANT — Figma MCP is session-bound.** The `figma_get_design_context` tool returns
218
- > context for the **currently selected node in the Figma desktop app**. You must ask the
219
- > user to navigate to each artboard before calling this tool.
220
- >
221
- > **Output format:** `figma_get_design_context` returns **React + Tailwind CSS code**, not
222
- > structured Angular metadata. The response is explicitly tagged *"SUPER CRITICAL: The
223
- > generated React+Tailwind code MUST be converted to match the target project's technology
224
- > stack."* Do **not** copy the React code into Angular files. Instead, read the JSX to extract
225
- > the information below. Image localhost URLs in the output are session-scoped previews —
226
- > do **not** use them as final assets (see Phase 1h and `references/asset-extraction.md`).
227
-
228
- For **each** target artboard:
229
-
230
- 1. Ask the user: *"In Figma, please click the **[Artboard Name]** frame to select it, then confirm."*
231
- 2. Wait for confirmation, then call:
232
- ```
233
- figma_get_design_context({
234
- clientLanguages: "typescript",
235
- clientFrameworks: "angular",
236
- artifactType: "WEB_PAGE_OR_APP_SCREEN",
237
- taskType: "CREATE_ARTIFACT"
238
- })
239
- ```
240
- 3. From the React+Tailwind output, extract:
241
-
242
- - **Component layer names** (`data-name` attributes in the JSX) — match against `references/figma-component-map.md`
243
- - **Layout structure** — `flex`, `grid`, `gap-*`, `p-*`, `w-*`, `h-*` Tailwind classes on container divs
244
- - **Typography** — `font-['...']`, `text-[...]`, `font-weight` classes
245
- - **Surface colors** — `bg-[#XXXXXX]` classes on container `<div>` elements that wrap major sections
246
- (these become plain `<div>` wrappers in Angular with `background: #XXXXXX`)
247
- - **Border/roundness** — `rounded-[...]`, `border`, `border-[...]` classes on containers and cards
248
- - **Input type variants** — look for hidden zero-size nodes (`size-[0.5px]`) whose `data-name`
249
- contains a component type (e.g. `"Date Picker Type"`, `"Combo Input"`). These are the
250
- Indigo.Design kit's **variant indicator nodes** — their name encodes which input variant
251
- (border/line/box) is active for that component.
252
- - **Chart series colors** — for any chart layer, note the fill colors on its series paths
253
- - **Action controls** — list every button, icon button, and toolbar action visible in the artboard;
254
- this is your authoritative inventory — do not add actions not present in the design
255
- - **Active kit variant** — look for library component references whose source file name
256
- contains "Material", "Fluent", "Bootstrap", or "Indigo". If not found here, defer to
257
- Phase 1e variable names and [references/design-token-bridge.md](references/design-token-bridge.md).
258
-
259
- 4. Record all surface containers in the **Surfaces Spec** (added to Phase 1g).
260
-
261
- ### 1e: Extract Design Tokens
262
-
263
- > Figma variables are **file-scoped**, not artboard-scoped. Call `figma_get_variable_defs`
264
- > **once** for the root page node — not once per artboard. Calling it multiple times returns
265
- > identical data and wastes plan quota.
266
-
267
- Call once:
268
-
269
- ```
270
- figma_get_variable_defs({})
271
- ```
272
-
273
- The response contains a map of variable names to values, e.g.:
274
-
275
- ```
276
- "color/primary/500": "#6200EE"
277
- "color/surface": "#FFFFFF"
278
- "typography/body/font-family": "Roboto"
279
- ```
280
-
281
- Use `references/design-token-bridge.md` to map color and typography variables to Ignite
282
- UI theming inputs in Phase 3. Do **not** attempt to map Figma spacing or sizing values
283
- — see `references/design-token-bridge.md § Spacing, Sizing, and Roundness` for why.
284
-
285
- ### 1f: Check for Existing Code Connect Mappings
286
-
287
- Call `figma_get_code_connect_map` for each artboard. If mappings exist, they confirm
288
- which Ignite UI Angular components correspond to which Figma nodes — use these to
289
- validate or augment your component mapping in Phase 2.
290
-
291
- ```
292
- figma_get_code_connect_map({ nodeId: "<artboardId>" })
293
- ```
294
-
295
- ### 1g: Build the Decomposition Table
296
-
297
- Before writing any code, produce **two tables** for **each artboard**.
298
-
299
- #### Table A — Ignite UI Components
62
+ **Goal:** understand the full design structure and capture all data needed for implementation and validation before writing any code.
300
63
 
301
- | Figma Layer Name | Visual Role | Ignite UI Component | Design Tokens Used | Data Type |
302
- | -------------------------- | ------------------ | ----------------------- | ------------------- | --------------- |
303
- | _e.g._ `_NavBar` | Top navigation bar | `IgxNavbarComponent` | `color/primary/500` | n/a |
304
- | _e.g._ `_Grid/Default` | Data table | `IgxGridComponent` | `color/surface` | Tabular records |
305
- | _e.g._ `_Button/Contained` | Primary CTA | `igxButton="contained"` | `color/primary/500` | n/a |
64
+ Read [references/figma-exploration.md](references/figma-exploration.md) in full before the first Figma MCP call. It has the call budget, exact tool arguments, extraction checklists, and table templates for each step:
306
65
 
307
- Fallback to plain semantic HTML only when no Ignite UI component can match the layer
308
- after consulting `references/figma-component-map.md`. Document the reason inline.
66
+ | Step | What to do |
67
+ | ---- | ---------- |
68
+ | **1a** | Discover pages and artboards with `figma_get_metadata` |
69
+ | **1b** | List the artboards and wait for the user to choose which to implement |
70
+ | **1c** | Capture one reference screenshot per artboard — the ground truth for Phase 5 |
71
+ | **1d** | Extract design context per artboard: layers and variant props, layout, typography, surfaces, input variants, chart colors, color census, control heights, action controls, provenance signals |
72
+ | **1e** | Extract design tokens with `figma_get_variable_defs`, once per target page |
73
+ | **1f** | Classify every component's provenance (Tier A Indigo.Design kit / B other library / C plain frames) and normalize it to a canonical role; check Code Connect mappings |
74
+ | **1g** | Build Table A (Ignite UI components, with tier, confidence, and anatomy deltas) and Table B (layout surfaces), then present both for review — low-confidence mappings first |
75
+ | **1h** | Extract every image asset to `src/assets/` — zero-placeholder policy |
309
76
 
310
- #### Table B — Layout Surfaces
77
+ Key constraints:
311
78
 
312
- Record every **non-IgxXxx container** that carries visual properties (background color,
313
- border, padding, shadow). These are plain `<div>` wrappers in Angular — not Ignite UI
314
- components — but they are critical to visual fidelity. Populate this table from the
315
- `bg-[...]`, `rounded-[...]`, `border`, `p-[...]`, and `shadow-[...]` Tailwind classes
316
- observed on container divs in the Phase 1d design context output.
317
-
318
- | Figma Frame / Container Name | Background | Border-Radius | Padding | Border | Shadow | Encloses (child sections) |
319
- | ---------------------------- | ---------- | ------------- | ------- | ------ | ------ | ------------------------- |
320
- | _e.g._ `Budget Categories` | `#222222` | `4px` | `24px` | none | none | Categories list, Add button |
321
- | _e.g._ `Friend Card` | `#222222` | `8px` | `24px 16px` | `1px solid #333` | none | Avatar, name, phone, email, buttons |
322
-
323
- > **Rule:** if a section appears on a surface in Figma (i.e. its container has a
324
- > non-transparent background), it **must** have that background in the Angular implementation.
325
- > If a section floats on the page background (transparent), do **not** add a surface wrapper.
326
- > Never infer surface structure from another page — always derive it from the design context
327
- > for the specific artboard being implemented.
328
-
329
- Present both tables to the user for review before proceeding.
330
-
331
- ### 1h: Extract Image Assets
332
-
333
- Read [references/asset-extraction.md](references/asset-extraction.md) in full before
334
- running any extraction.
335
-
336
- **Zero-placeholder policy:** every image visible in the Figma design must be extracted
337
- and committed to `src/assets/` before Phase 4. Gradient placeholders are not acceptable.
338
-
339
- **Step 0 — Get the file key first.** Ask the user to share the Figma file URL or key
340
- before attempting any extraction. In Figma desktop: right-click the file tab →
341
- **Copy link**. Without it you fall back to Tier 2 or Tier 3 (see below).
342
-
343
- From the decomposition tables, identify every layer that is a **static image asset**
344
- (photo, background, logo, custom icon, illustration) rather than an Ignite UI component.
345
- Do **not** extract Indigo.Design UI Kit component instances.
346
-
347
- **Use the four-tier decision tree from `asset-extraction.md`:**
348
-
349
- | Tier | Method | When to use |
350
- | ---- | ------ | ----------- |
351
- | **1** | REST API `/v1/files/:key/images` (Method A) or `/v1/images/:key` (Method B) | File key available — always the highest fidelity |
352
- | **2** | Download localhost URLs from `figma_get_design_context` with `curl` | No file key; Figma session is active; design context was already called |
353
- | **3** | `figma_get_screenshot` per node (ask user to select each node) | No file key; no localhost URLs |
354
- | **4** | CSS gradient/color placeholder with `// TODO` comment | Only for confirmed pure-color fills — never as a shortcut |
355
-
356
- After extraction, save assets to:
357
- - `src/assets/images/` — raster images (PNG, JPG)
358
- - `src/assets/icons/` — SVG icons and logos
359
-
360
- Build a concise asset manifest (see `asset-extraction.md § Build an Asset Manifest`)
361
- so the implementation phase uses consistent paths.
362
-
363
- If you used Tier 2 or Tier 3 for any asset, tell the user which ones need re-export
364
- once the file key becomes available.
79
+ - **Rate limits:** limits depend on the Figma **seat**. A View/Collab seat allows about 6 calls a month, which may not cover one artboard. Compare the call estimate with the user's quota before starting, and discover structure with `figma_get_metadata` first.
80
+ - **Two Figma MCP servers:** the **remote** server (`mcp.figma.com`) takes `fileKey` and `nodeId`, so you can move between artboards yourself. The **desktop** server (`127.0.0.1:3845`) works only on the file open in the Figma desktop app. Pass the node ID from a frame link and check the response, or ask the user to select each artboard and do not batch those calls. Detect the server before the first call (see `figma-exploration.md`).
81
+ - **Any UI kit:** do not assume the Indigo.Design kits. Classify each component in 1f. A third-party kit's names, variables, and Code Connect mappings are evidence of the component's role. Never copy them into the code.
82
+ - **React + Tailwind output:** `figma_get_design_context` returns React + Tailwind code. Read it for information only — never copy it into Angular files, and never use its localhost image URLs as final assets.
365
83
 
366
84
  ---
367
85
 
368
86
  ## Phase 2 — Component Discovery (Ignite UI CLI MCP)
369
87
 
370
- **Goal:** look up exact Angular selectors, inputs, outputs, and usage patterns for every
371
- component identified in Phase 1. Never generate component code from memory.
88
+ **Goal:** look up exact Angular selectors, inputs, outputs, and usage patterns for every component identified in Phase 1. Never generate component code from memory.
372
89
 
373
90
  ### 2a: Read the Component Map
374
91
 
375
- Read [references/figma-component-map.md](references/figma-component-map.md) in full.
376
- Find the row for each Figma layer name from your Phase 1 decomposition table.
377
- Each row gives you:
92
+ Read [references/figma-component-map.md](references/figma-component-map.md) in full. For each row of the Phase 1g Table A:
93
+
94
+ - **Tier A:** find the Indigo.Design kit name in the kit tables.
95
+ - **Tier B/C:** find the canonical role in the **Canonical Role Index**, then the row it points to in the named section.
96
+
97
+ That row gives you:
378
98
 
379
99
  - The Ignite UI Angular selector
380
100
  - The `get_doc` key to call
@@ -382,15 +102,10 @@ Each row gives you:
382
102
 
383
103
  ### 2b: Fetch Component Docs
384
104
 
385
- Call `list_components({ framework: "angular" })` **once** to discover which component
386
- families have full docs — **the catalog covers only a subset of components**. Then:
105
+ Call `list_components({ framework: "angular" })` **once** to discover which component families have full docs — **the catalog covers only a subset of components**. Then:
387
106
 
388
- - For families **with** a doc: call `get_doc({ framework: "angular", name: "<doc-name>" })`,
389
- all in a single parallel batch — never sequentially.
390
- - For families **without** a doc: read the matching reference files from the
391
- [`igniteui-angular-components`](../igniteui-angular-components/SKILL.md) and
392
- [`igniteui-angular-grids`](../igniteui-angular-grids/SKILL.md) skills, and use
393
- `search_api` for member-level API lookups.
107
+ - For families **with** a doc: call `get_doc({ framework: "angular", name: "<doc-name>" })`, all in a single parallel batch — never sequentially.
108
+ - For families **without** a doc: read the matching reference files from the [`igniteui-angular-components`](../igniteui-angular-components/SKILL.md) and [`igniteui-angular-grids`](../igniteui-angular-grids/SKILL.md) skills, and use `search_api` for member-level API lookups.
394
109
 
395
110
  Do **not** write any component code until you have read its doc or reference file.
396
111
 
@@ -404,8 +119,7 @@ search_docs({ framework: "angular", query: "virtual scrolling" })
404
119
  search_docs({ framework: "angular", query: "column pinning" })
405
120
  ```
406
121
 
407
- Feature docs are mandatory when the artboard shows grid editing, filtering, sorting,
408
- pinning, or other advanced feature states.
122
+ Feature docs are mandatory when the artboard shows grid editing, filtering, sorting, pinning, or other advanced feature states.
409
123
 
410
124
  ### 2d: Document the Final Component Plan
411
125
 
@@ -415,144 +129,39 @@ After reading all docs, confirm or revise the decomposition table from Phase 1g
415
129
  - Exact import paths (never imported from the root barrel)
416
130
  - Required peer modules or provider functions
417
131
 
418
- Present this updated plan to the user and wait for confirmation before Phase 3.
419
-
420
- ---
421
-
422
- ## Phase 3 — Theme Generation (Ignite UI Theming MCP)
423
-
424
- **Goal:** produce Sass theming code that matches the Figma design's visual language
425
- using design tokens extracted in Phase 1e.
426
-
427
- Read [references/design-token-bridge.md](references/design-token-bridge.md) in full
428
- before running any theming tool.
429
-
430
- ### 3a: Inspect Existing Theme (Guard)
431
-
432
- Open `src/styles.scss` (or the project's global stylesheet). Look for an active
433
- `@include theme(...)` or `@include palette(...)` call.
434
-
435
- - **Theme found, but variant mismatch** — if the existing theme is **light** and the
436
- Figma design is **dark** (or vice versa), treat this as a theme change and proceed with
437
- 3b–3c. A light theme applied to a dark design produces wrong background colors on every
438
- component and will fail every Phase 5 check.
439
- - **Theme found, variant matches** → do **not** call `theming_create_theme` or
440
- `theming_create_palette` unless the user explicitly asks for a global theme change.
441
- Reuse the existing palette. Skip to step 3d.
442
- - **No theme found** → proceed with 3b.
132
+ **Anatomy delta ledger (Tier B and C).** For every mapped component whose anatomy differs from the design in a way that tokens or content projection **cannot** close, add a ledger entry:
443
133
 
444
- Detect the Figma design's variant from Phase 1e: if a `color/mode` variable exists,
445
- use its value. Otherwise, use the artboard background color: near-black (`#121212`,
446
- `#1a1a1a`, `#000`) → `"dark"`; near-white (`#fff`, `#f5f5f5`) → `"light"`.
134
+ | Component | Design shows | Ignite UI renders | Options | Decision |
135
+ | --- | --- | --- | --- | --- |
136
+ | _e.g._ M3 segmented button | Check icon on the selected segment | `igx-buttongroup`, no check icon | Project an `igx-icon` into the selected button / accept | ask |
137
+ | _e.g._ Breadcrumbs | Breadcrumb trail | No Angular breadcrumb component | Semantic `<nav><ol>` with router links | ask |
447
138
 
448
- ### 3b: Resolve Design System
139
+ Do not ledger differences that tokens *can* close: color, radius, border, casing, height, and spacing are implementation work, not deltas. For every interactive control, prefer the Ignite UI component with a recorded delta over hand-built markup. The component's keyboard, focus, ARIA, and form behavior are worth more than a pixel-exact but inert copy. Approved entries are classified **Accepted** in Phase 5.
449
140
 
450
- You don't need to call `theming_detect_platform` to confirm the Angular package layout. We already did that in Phase 0.
141
+ If new packages are required (including an icon package for a third-party kit), identify exact packages and versions and ask for approval before installing. Present this updated plan, with the ledger, to the user and wait for confirmation before Phase 3.
451
142
 
452
- To determine the design system, use this **strict precedence order**. Stop at the first
453
- signal that gives a clear answer:
454
-
455
- 1. **Explicit user request** — "make it Material", "use Fluent", etc.
456
- 2. **Library source name in design context** — the `figma_get_design_context` or
457
- `figma_get_metadata` response may reference the Figma source library file name
458
- (e.g. `"Indigo.Design UI Kit for Material"` → `material`).
459
- 3. **Variable collection names from Phase 1e** — collection names like
460
- `Material/color/primary` identify the kit variant directly.
461
- 4. **Elevation variable structure** — inspect the `Elevations/*` variables in
462
- `figma_get_variable_defs` output:
463
- - **Three-layer DROP_SHADOW** (umbra + penumbra + ambient) → **Material Design**
464
- - **Single-layer DROP_SHADOW** → Indigo, Fluent, or Bootstrap
465
- 5. **Palette shade naming** — variables named `primary/500`, `primary/100`–`primary/900`
466
- follow the Material 100–900 palette convention → likely **Material**.
467
- 6. **Visual heuristics** (use only when all above are inconclusive):
468
- prominent shadows + ripple effects → `"material"`;
469
- flat surfaces + sharp corners + Segoe/Inter font → `"fluent"`;
470
- component borders + Bootstrap grid → `"bootstrap"`;
471
- rounded purple/indigo accents without Material shadows → `"indigo"`.
472
-
473
- > **Never use font name as a primary signal.** "Titillium Web" is the default body font
474
- > in the Indigo.Design UI Kit for Material — it is not exclusive to the Indigo design system.
475
-
476
- Supported values: `material` (default), `bootstrap`, `fluent`, `indigo`.
477
-
478
- ### 3c: Generate Global Theme
479
-
480
- Extract the following from Phase 1e variables using
481
- [references/design-token-bridge.md](references/design-token-bridge.md):
482
-
483
- ```
484
- primaryColor ← from "color/primary/500" or "primary/500"
485
- secondaryColor ← from "color/secondary/500" or "secondary/500"
486
- surfaceColor ← from "color/surface" or "surface/default"
487
- fontFamily ← from "typography/font-family" or "typography/body/font-family"
488
- ```
489
-
490
- Then call in order:
491
-
492
- > **Parameter names differ between tools** — `theming_create_palette` uses `primary`,
493
- > `secondary`, `surface` (not `primaryColor` etc.). `theming_create_theme` uses
494
- > `primaryColor`, `secondaryColor`, `surfaceColor`. Do not mix them up.
495
-
496
- > **fontFamily double-quote bug** — `theming_create_theme` may double-wrap the fontFamily
497
- > string (e.g. `""'Titillium Web', sans-serif""`) in its Sass output, producing invalid Sass.
498
- > If you see double-quoted strings in the generated output, strip the outer quotes before
499
- > applying to `styles.scss`.
500
-
501
- ```
502
- theming_create_palette({
503
- primary: primaryColor,
504
- secondary: secondaryColor,
505
- surface: surfaceColor,
506
- platform: "angular",
507
- licensed: <true if @infragistics package>
508
- })
509
-
510
- theming_create_elevations({
511
- preset: "material" // or "indigo" if design system is Indigo
512
- })
513
-
514
- theming_create_typography({
515
- fontFamily,
516
- platform: "angular"
517
- })
518
-
519
- theming_create_theme({
520
- palette: <from create_palette>,
521
- elevations: <from create_elevations>,
522
- typography: <from create_typography>,
523
- variant: "<light|dark>",
524
- designSystem: "<resolved design system>",
525
- platform: "angular",
526
- licensed: <true if @infragistics package>
527
- })
528
- ```
143
+ ---
529
144
 
530
- Apply the generated output to `src/styles.scss` as instructed in the tool's response.
145
+ ## Phase 3 — Theme Generation (Ignite UI Theming MCP)
531
146
 
532
- ### 3d: Per-Component Token Mapping
147
+ **Goal:** produce Sass theming code that matches the Figma design's visual language using the kit variables from Phase 1e (Path A) or the color census and measurements from Phase 1d (Path B).
533
148
 
534
- > **Scope:** applies only to core Ignite UI Angular components (grid, navbar, card,
535
- > inputs, chips, list, etc.). Charts, maps, and gauges have no Sass tokens — configure
536
- > those via component inputs only.
149
+ Read [references/theme-generation.md](references/theme-generation.md) and [references/design-token-bridge.md](references/design-token-bridge.md) in full before running any theming tool. The steps are:
537
150
 
538
- For **every** Ignite UI core component in your plan, run this loop:
151
+ | Step | What to do |
152
+ | ---- | ---------- |
153
+ | **3a** | Inspect `src/styles.scss` **and** the `styles` array in `angular.json`. A CLI scaffold theme counts as no theme. Reuse an app's own theme only if its variant, design system, and primary color all match the design; otherwise ask before changing it |
154
+ | **3b** | Choose the path from the dominant Phase 1f tier. **Path A** (Indigo.Design kits): resolve the design system with the strict precedence order. **Path B** (other kits or none): pick the closest baseline — the user's request, then the kit's direct counterpart, then input label placement, then control heights. In a mixed file, count only rows that map to a component |
155
+ | **3c** | Generate the global theme with one `theming_create_theme` call. **Path B:** seed it from the color census, then override the type styles that differ (including button casing) with `--ig-<style>-<property>` CSS variables after the theme. Do not rely on `customScale`: `theming_create_typography` accepts it, but its generators ignore it |
156
+ | **3d** | Map per-component tokens for every core Ignite UI component in the plan. Path B also sets radius, border, shadow, and state tokens, and picks `--ig-size` from measured heights |
539
157
 
540
- 1. `theming_get_component_design_tokens({ component: "<igx-component-name>" })`
541
- — review all token names, types, and descriptions
542
- 2. Go back to the Phase 1e variable map and find Figma variables that correspond to
543
- this component's surfaces (background, text, border, hover state)
544
- 3. `theming_create_component_theme({ component: "<igx-component-name>", platform: "angular", tokens: { <only differing tokens> } })`
545
- 4. Apply the generated `@include tokens(<theme>)` block to the component's SCSS or to a
546
- scoped block in `styles.scss`
158
+ Key constraints:
547
159
 
548
- When a specific component needs a different density or spacing from the global default,
549
- use `theming_set_size` or `theming_set_spacing` with the `component` parameter — this
550
- scopes `--ig-size` or `--ig-spacing` to that component’s selector rather than applying
551
- globally. For compound components, use `scope` with a sub-component selector. Only
552
- apply these globally (`:root`) when the entire app has a clearly distinct density.
553
- Leave `theming_set_roundness` at its default unless the user explicitly requests a
554
- change. Never derive multiplier values from Figma pixel values.
555
- See `references/design-token-bridge.md § Spacing, Sizing, and Roundness`.
160
+ - `theming_create_palette` takes `primary`/`secondary`/`surface`/`gray`/`success`/`warn`/`error`/`info` and `variant`, while `theming_create_theme` takes `primaryColor`/`secondaryColor`/`surfaceColor` (no `gray`).
161
+ - `theming_create_elevations` takes `designSystem` (`material` or `indigo`); there is no `preset` parameter.
162
+ - Never use the font name as the primary design-system signal.
163
+ - Never convert Figma pixel values into `theming_set_spacing` or `theming_set_roundness` multipliers. `--ig-size` is different: it is a size step (`small` / `medium` / `large`), not a multiplier. Path A keeps the default; Path B picks the nearest step to the measured control heights (3d).
164
+ - **Path B:** seed the palette with the color painted on the component, not the variable named `…/500`. On a `material` baseline, buttons, checkboxes, and switches use `secondary`, so seed it with the button color.
556
165
 
557
166
  ---
558
167
 
@@ -562,7 +171,7 @@ See `references/design-token-bridge.md § Spacing, Sizing, and Roundness`.
562
171
 
563
172
  ### Implementation Rules
564
173
 
565
- 1. **Never generate component code without reading its `get_doc` result first** (Phase 2b)
174
+ 1. **Never generate component code without reading its doc first** — the `get_doc` result, or the skill reference file when the catalog has no doc for that family (Phase 2b)
566
175
  2. **Section by section** — layout → navigation → primary content → secondary → data
567
176
  3. Follow Angular standalone component conventions and AGENTS.md coding standards
568
177
  4. Import components from their specific entry points, never from the root barrel
@@ -570,28 +179,18 @@ See `references/design-token-bridge.md § Spacing, Sizing, and Roundness`.
570
179
  6. Apply theming via the SCSS classes and tokens generated in Phase 3
571
180
  7. Use typed mock data that matches the design's density and domain
572
181
  8. Keep layout, spacing, and typography in SCSS files — not inline styles
573
- 9. For DV components (charts, maps, gauges), set visual properties via component inputs
574
- as described in [references/figma-component-map.md](references/figma-component-map.md)
182
+ 9. For DV components (charts, maps, gauges), set visual properties via component inputs as described in [references/figma-component-map.md](references/figma-component-map.md)
575
183
  10. After implementing each major section, save and check in the browser (if dev server is running)
576
- 11. **Global input type:** if the Figma design uses `border`-type inputs globally (detected
577
- via variant indicator nodes in Phase 1d), set the `IGX_INPUT_GROUP_TYPE` injection token
578
- once in `app.config.ts` rather than `type="border"` on every component. This covers all
579
- compound components that wrap `IgxInputGroup` internally (`IgxSimpleCombo`,
580
- `IgxDatePickerComponent`, `IgxDateRangePickerComponent`, `IgxTimePickerComponent`,
581
- `IgxSelectComponent`):
184
+ 11. **Global input type:** the default type is `box`. If the Figma design uses one other type everywhere (for example `border`, detected via variant indicator nodes in Phase 1d), set the `IGX_INPUT_GROUP_TYPE` injection token once in `app.config.ts` rather than `type="border"` on every component. The token is read by `IgxInputGroupComponent`, `IgxComboComponent`, `IgxSimpleComboComponent`, `IgxSelectComponent`, `IgxDatePickerComponent`, `IgxDateRangePickerComponent`, and `IgxTimePickerComponent`:
582
185
  ```typescript
583
186
  // app.config.ts
584
187
  import { IGX_INPUT_GROUP_TYPE } from 'igniteui-angular/input-group';
585
188
  // in providers array:
586
189
  { provide: IGX_INPUT_GROUP_TYPE, useValue: 'border' }
587
190
  ```
588
- 12. **Layout surfaces:** for every entry in the Phase 1g Surfaces table, add a CSS class
589
- with the recorded `background`, `border-radius`, `padding`, `border`, and `box-shadow`.
590
- Never leave a section transparent if the Figma surface has a background. Never add a
591
- background to a section that floats on the page background in the Figma design.
592
- 13. **Implement only controls that appear in the Figma artboard.** Do not add toolbar
593
- buttons, actions, or UI elements that look useful but are not visible in the design
594
- context output for that artboard.
191
+ For other kits, map the normalized field style from Phase 1f: **outlined** → `border`, **filled** → `box`, **underlined** → `line`. Label placement comes from the baseline design system (3b), not from the input type.
192
+ 12. **Layout surfaces:** for every entry in the Phase 1g Table B (Layout Surfaces), add a CSS class with the recorded `background`, `border-radius`, `padding`, `border`, and `box-shadow`. Never leave a section transparent if the Figma surface has a background. Never add a background to a section that floats on the page background in the Figma design.
193
+ 13. **Implement only controls that appear in the Figma artboard.** Do not add toolbar buttons, actions, or UI elements that look useful but are not visible in the design context output for that artboard.
595
194
 
596
195
  ### Layout Strategy
597
196
 
@@ -627,16 +226,13 @@ Register the route in `app.routes.ts` when the project uses routing.
627
226
 
628
227
  ## Phase 5 — Visual Validation (Playwright MCP)
629
228
 
630
- **Goal:** measure and compare the running app against the Figma reference screenshots
631
- from Phase 1c. Use the measurement-driven loop — compare numbers, not impressions.
229
+ **Goal:** measure and compare the running app against the Figma reference screenshots from Phase 1c. Use the measurement-driven loop — compare numbers, not impressions.
632
230
 
633
- Read [references/validation-patterns.md](references/validation-patterns.md) in full
634
- before running any Playwright tool.
231
+ Read [references/validation-patterns.md](references/validation-patterns.md) in full before running any Playwright tool.
635
232
 
636
233
  ### 5a: Ensure the Dev Server Is Running
637
234
 
638
- Ask the user for the local dev URL if not already known (default: `http://localhost:4200`).
639
- Navigate to confirm the app is running:
235
+ Ask the user for the local dev URL if not already known (default: `http://localhost:4200`). Navigate to confirm the app is running:
640
236
 
641
237
  ```
642
238
  playwright_browser_navigate({ url: "http://localhost:4200" })
@@ -652,34 +248,27 @@ playwright_browser_resize({ width: <artboard.width>, height: <artboard.height> }
652
248
  playwright_browser_navigate({ url: "<target route>" }) // re-navigate after resize
653
249
  ```
654
250
 
655
- > **Always re-navigate after resize.** The browser may reset to `about:blank` on
656
- > viewport change. This is a known Playwright MCP pitfall.
251
+ > **Always re-navigate after resize.** The browser may reset to `about:blank` on viewport change. This is a known Playwright MCP pitfall.
657
252
 
658
253
  ### 5c: Capture and Compare Screenshots
659
254
 
660
- > **IMPORTANT — Figma MCP is session-bound.** To get a fresh Figma reference screenshot
661
- > for comparison, ask the user to select the artboard in Figma, then call
662
- > `figma_get_screenshot({})`. Alternatively, use the Phase 1c reference screenshots
663
- > already saved to disk.
255
+ Compare against the Phase 1c reference screenshots saved to disk. They are the ground truth. Do not spend Figma quota re-capturing them.
664
256
 
665
257
  For **each target artboard** (run the full 5c–5f loop once per page):
666
258
 
667
- 1. Ask the user: *"In Figma, please click the **[Artboard Name]** frame to select it, then confirm."*
259
+ 1. Open the Phase 1c reference file for the artboard.
668
260
  2. Navigate the browser to the corresponding route.
669
261
  3. Take a browser screenshot:
670
262
  ```
671
263
  playwright_browser_take_screenshot({ type: "png" })
672
264
  ```
673
265
  4. Do a **section-by-section** visual comparison against the Phase 1c reference:
674
- - top bar → sidebar → **every section in the Phase 1g Surfaces table** → footer
675
- 5. Do **not** advance to the next artboard until no Critical/Major issues remain on the current one.
266
+ - top bar → sidebar → **every section in the Phase 1g Table B (Layout Surfaces)** → footer
267
+ 5. Do **not** advance to the next artboard until only Cosmetic and Accepted items remain on the current one.
676
268
 
677
269
  ### 5d: Measure Computed Styles
678
270
 
679
- For each section with visible differences — and **mandatorily for every entry in the
680
- Phase 1g Surfaces table** — use `playwright_browser_evaluate` to extract exact values.
681
- Pass code as a **plain JavaScript function string** using the `function` parameter
682
- (see [references/validation-patterns.md](references/validation-patterns.md)):
271
+ For each section with visible differences — and **mandatorily for every entry in the Phase 1g Table B (Layout Surfaces)** — use `playwright_browser_evaluate` to extract exact values. Pass code as a **plain JavaScript function string** using the `function` parameter (see [references/validation-patterns.md](references/validation-patterns.md)):
683
272
 
684
273
  ```
685
274
  playwright_browser_evaluate({
@@ -687,17 +276,12 @@ playwright_browser_evaluate({
687
276
  })
688
277
  ```
689
278
 
690
- **Surfaces audit (mandatory for every page):** For every section in the Phase 1g Surfaces
691
- table, assert:
279
+ **Surfaces audit (mandatory for every page):** For every section in the Phase 1g Table B (Layout Surfaces), assert:
692
280
  - `backgroundColor` is **not** `rgba(0, 0, 0, 0)` when the surface has a background color
693
- - `backgroundColor` **is** `rgba(0, 0, 0, 0)` when the design shows the section floating
694
- on the page background (no card wrapper)
695
- - All child elements shown inside the surface card in Figma are enclosed within the card's
696
- bounding rect in the DOM
281
+ - `backgroundColor` **is** `rgba(0, 0, 0, 0)` when the design shows the section floating on the page background (no card wrapper)
282
+ - All child elements shown inside the surface card in Figma are enclosed within the card's bounding rect in the DOM
697
283
 
698
- **Action controls audit (mandatory for every page):** Count and name all visible action
699
- buttons and toolbar controls. Compare against the Phase 1d inventory — any button not
700
- recorded in the Figma design context is fabricated and must be removed.
284
+ **Action controls audit (mandatory for every page):** Count and name all visible action buttons and toolbar controls. Compare against the Phase 1d inventory — any button not recorded in the Figma design context is fabricated and must be removed.
701
285
 
702
286
  Compare all returned values against the Figma spec (from Phase 1d design context).
703
287
 
@@ -705,10 +289,14 @@ Compare all returned values against the Figma spec (from Phase 1d design context
705
289
 
706
290
  | Severity | Category | Example | Action |
707
291
  | ------------ | --------------- | ----------------------------------------- | --------------------------- |
708
- | **Critical** | Missing element | Button in Figma, absent in code | Auto-fix |
709
- | **Major** | Wrong component | Figma shows dropdown, code has text input | Auto-fix |
710
- | **Minor** | Spacing off | 24px gap in Figma, 16px in code | Auto-fix if straightforward |
711
- | **Cosmetic** | Color shade | `#333` vs `#2d2d2d` | Report only |
292
+ | **Critical** | Missing element | Button in Figma, absent in code | Fix |
293
+ | **Major** | Wrong component | Figma shows dropdown, code has text input | Fix |
294
+ | **Major** | Token-fixable | Wrong color shade, radius, border, casing, or height | Fix |
295
+ | **Minor** | Spacing off | 24px gap in Figma, 16px in code | Fix |
296
+ | **Cosmetic** | Rounding only | `rgb(51, 51, 51)` vs `#333333`; ≤ 4px size | Report only |
297
+ | **Accepted** | Approved delta | A ledger entry the user approved | Report only; not a retry |
298
+
299
+ The full table and the definitions are in `validation-patterns.md § Mismatch Severity Classification`. A visibly different color is Major, not Cosmetic. **Accepted** needs the user's approval of a ledger entry, from Phase 2d or added during Phase 5.
712
300
 
713
301
  For each mismatch, produce:
714
302
 
@@ -717,21 +305,20 @@ ISSUE: <description>
717
305
  LOCATION: <section or component>
718
306
  FIGMA: <spec value>
719
307
  RENDERED: <measured value>
720
- SEVERITY: <Critical / Major / Minor / Cosmetic>
308
+ SEVERITY: <Critical / Major / Minor / Cosmetic / Accepted>
721
309
  FIX: <specific code change>
722
310
  ```
723
311
 
724
312
  ### 5f: Apply Corrections
725
313
 
726
- Fix Critical and Major issues immediately. After applying fixes, re-navigate and take a
727
- fresh screenshot to confirm:
314
+ Fix Critical, Major, and Minor issues. After applying fixes, re-navigate and take a fresh screenshot to confirm:
728
315
 
729
316
  ```
730
317
  playwright_browser_navigate({ url: "<target route>" })
731
318
  playwright_browser_take_screenshot({ type: "png" })
732
319
  ```
733
320
 
734
- Repeat the measure → fix → re-verify loop until no Critical or Major issues remain.
321
+ Repeat the measure → fix → re-verify loop until only Cosmetic and Accepted items remain.
735
322
 
736
323
  ### 5g: Accessibility Snapshot
737
324
 
@@ -751,17 +338,17 @@ Check that:
751
338
 
752
339
  ## Critical Rules
753
340
 
754
- - **Phase 0 is not optional.** Never skip MCP verification.
755
- - **Phase 2b before code.** Never write a selector you have not read from a doc.
756
- - **Phase 1c screenshots are immutable ground truth.** Never overwrite them; always
757
- compare against the original Figma state.
341
+ - **Phase 0 is not optional.** Never skip MCP verification, and establish which Figma MCP variant is connected before Phase 1.
342
+ - **Classify provenance per instance (Phase 1f).** Do not assume the Indigo.Design kits. A third-party kit's names and variables are evidence to normalize, not to copy.
343
+ - **Never import from Code Connect of another library.** Code Connect snippets that point at shadcn, MUI, or an in-house package confirm the role only. The code is always Ignite UI.
344
+ - **Seed the palette from usage on Path B.** Use the color painted on the component, not the variable named `…/500`. On a `material` baseline, controls use `secondary`.
345
+ - **Ledger what tokens cannot fix; fix what they can.** Structural anatomy deltas go to the user in Phase 2d. Color, radius, casing, and height mismatches get fixed.
346
+ - **Phase 2b before code.** Never write a selector you have not read from a doc (the `get_doc` result, or the skill reference file when no doc exists).
347
+ - **Phase 1c screenshots are immutable ground truth.** Never overwrite them; always compare against the original Figma state.
758
348
  - **Re-navigate after resize** in Phase 5 to avoid Playwright's browser reset bug.
759
- - **Rate-limit Figma MCP calls.** Use `figma_get_metadata` for discovery, then targeted
760
- `figma_get_design_context` per artboard. Batch screenshot calls.
761
- - **Fail fast on 3 retries.** If the same correction fails three times, stop, report
762
- the issue to the user, and ask for guidance.
763
- - **Do not modify dependency manifests or lock files without asking.** Identify the exact
764
- packages and versions required, then get approval before installing.
349
+ - **Rate-limit Figma MCP calls.** Use `figma_get_metadata` for discovery, then targeted `figma_get_design_context` per artboard, and `figma_get_variable_defs` once per target page. On the desktop server, check that each response describes the requested artboard. When you rely on the selection, ask the user to select each artboard first and do not batch those calls.
350
+ - **Fail fast on 3 retries.** If the same correction fails three times, stop, report the issue to the user, and ask for guidance.
351
+ - **Do not modify dependency manifests or lock files without asking.** Identify the exact packages and versions required, then get approval before installing.
765
352
 
766
353
  ---
767
354