@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` (
|
|
320
|
-
step2: 'After write_selection_to_xcode returns, ONLY refine
|
|
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
|
},
|
package/companion/mcp-server.mjs
CHANGED
|
@@ -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.
|
|
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('
|
|
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