Skip to content

themekit-mcp v2.6.0 — design_to_code, expandInstances, auto-validate

Choose a tag to compare

@isamercan isamercan released this 30 Jun 19:14

npm: @isamercan/themekit-mcp@2.6.0 · npx -y @isamercan/themekit-mcp

The Figma→SwiftUI generator gets a clearer name, deeper conversion, and self-checking output.

Added

  • design_to_code tool — a more readable, design-tool-agnostic name for the Figma→SwiftUI generator. figma_to_swiftui is kept as a backward-compatible alias (identical behavior), so existing prompts and automations keep working.
  • expandInstances option — when true, an unmapped Figma component INSTANCE with children is walked into (like a FRAME/GROUP) instead of an opaque // ⚠️ unmapped leaf, so a screen built from nested instances (forms, headers, nav bars) actually converts. Default false; recursion capped by instanceMaxDepth (default 8).
  • Auto-validationdesign_to_code runs validate_code on its own output and appends the PASS/FAIL verdict under an ## Auto-validation section.
  • More figma-mapping.json rulesCheckbox, Radio/RadioButton, Toggle/SwitchThemeToggle, and Divider/Divider ContainerDividerView map out of the box.
  • Direct Figma url input — pass the design link as url; the tool parses fileKey + nodeId itself (both /design/ and legacy /file/ links, and normalises the URL's dash node-id → colon). Explicit fileKey + nodeId still accepted.

Fixed

  • Placeholder noise — design-system scaffolding text (scribble, Action Button, Input Label, …) is no longer emitted as real SwiftUI Text.
  • Spacing token → SpacingKey case emissionsp-4xl now emits Theme.SpacingKey.xl4.value (was the non-compiling .4xl) and spacing-none emits .none (was .spacing-none).

Full changelog: mcp/CHANGELOG.md