@createlex/figma-swiftui-mcp 1.2.9 → 1.3.1

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.
@@ -316,8 +316,8 @@ function startBridgeServer(options = {}) {
316
316
  const assetCount = data.assetExportPlan?.candidates?.length ?? 0;
317
317
  const aiWorkflow = {
318
318
  IF_YOU_HAVE_MCP_ACCESS: {
319
- step1: 'Call the MCP tool `write_selection_to_xcode` (server: figma-swiftui). It generates SwiftUI with correct Image("name") asset references AND writes the PNG files to Assets.xcassets automatically.',
320
- step2: 'After write_selection_to_xcode returns, ONLY refine the code it produced: add GeometryReader for responsiveness, wire @State interactions. DO NOT rewrite Image("name") calls or replace them with Rectangle()/shapes.',
319
+ step1: 'Call the MCP tool `write_selection_to_xcode` with generationMode="editable" (the default). It exports individual PNG assets with correct blendMode info and generates Image("name").blendMode() calls automatically.',
320
+ step2: 'After write_selection_to_xcode returns, ONLY refine: add GeometryReader for responsiveness, wire @State interactions. DO NOT rewrite Image("name") calls, DO NOT switch to fidelity mode unless the whole frame is a single photo with no text.',
321
321
  mcpTool: 'write_selection_to_xcode',
322
322
  mcpServer: 'figma-swiftui',
323
323
  },
@@ -765,11 +765,11 @@ server.registerTool('write_generated_swiftui_to_xcode', {
765
765
  });
766
766
 
767
767
  server.registerTool('write_selection_to_xcode', {
768
- description: 'Generate SwiftUI from the connected Figma selection and write it into the configured Xcode project. THIS IS THE CORRECT TOOL TO CALL — it exports real PNG assets to Assets.xcassets and generates Image("name") references automatically. Use generationMode="fidelity" for designs with blend modes, 3D renders, complex shadows, or photographic images fidelity rasterizes the whole frame as one pixel-perfect PNG instead of trying to reconstruct it with shapes.',
768
+ description: 'Generate SwiftUI from the connected Figma selection and write it into the configured Xcode project. THIS IS THE CORRECT TOOL TO CALL — it exports real PNG assets to Assets.xcassets and generates Image("name") references automatically. Always use the default generationMode="editable" individual assets include blendModeSwiftUI values so blend modes are applied correctly on each Image(). Only use generationMode="fidelity" when the ENTIRE frame is a single photographic image or illustration with no text, no interactive elements, and no distinct layers (e.g. a full-bleed photo background).',
769
769
  inputSchema: {
770
770
  nodeIds: z.array(z.string()).optional().describe('Optional list of Figma node ids. If omitted, uses the current selection'),
771
771
  includeOverflow: z.boolean().default(false).describe('Ignore Figma clipping when generating layout'),
772
- generationMode: z.enum(['editable', 'fidelity']).default('editable').describe('Use fidelity for designs with blend modes, 3D renders, complex shadows, or photographic content rasterizes the whole frame as one pixel-perfect PNG. Use editable for UI screens with native controls (buttons, lists, forms).'),
772
+ generationMode: z.enum(['editable', 'fidelity']).default('editable').describe('Default: editable generates individual SwiftUI elements with correct .blendMode() on each Image(). Use fidelity ONLY when the whole frame is a single photo/illustration with no text or interactive elements.'),
773
773
  projectPath: z.string().optional().describe('Optional Xcode source folder override'),
774
774
  },
775
775
  }, async ({ nodeIds, includeOverflow, generationMode, projectPath }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@createlex/figma-swiftui-mcp",
3
- "version": "1.2.9",
3
+ "version": "1.3.1",
4
4
  "description": "CreateLex MCP runtime for Figma-to-SwiftUI generation and Xcode export",
5
5
  "bin": {
6
6
  "figma-swiftui-mcp": "bin/figma-swiftui-mcp.js"