figma-mcp-stdio 1.0.6 → 1.0.8

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 (2) hide show
  1. package/build/index.js +12 -2
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -27,6 +27,8 @@ const taskList = [
27
27
  - 格式为png
28
28
  - 保存到编辑文件同级的images目录下
29
29
  - 张图片下载失败时自动重试 2-3 次`,
30
+ `【页面生成要求】:
31
+ - 视觉类属性严格遵循Figma中的属性设置:borderRadius、fill、stroke、boxShadow、opacity、textAlign、fontWeight、fontSize 禁止任何调整`,
30
32
  '【前期准备】:',
31
33
  "1. 使用能够获取Figma设计稿数据的工具提取页面的JSON结构数据,注入上下文中,数据名称 figmaJson",
32
34
  "2. 页面整体的nodeId节点ID需要转换,使用【Figma节点ID转换规则】来获取转换规则, 使用【下载Figma图片工具】下载页面截图",
@@ -44,11 +46,10 @@ const taskList = [
44
46
  ];
45
47
  // 自动生成页面工具-印尼专用
46
48
  server.addTool({
47
- name: "figma_generate_page_tasks_new",
49
+ name: "figma_generate_page_tasks",
48
50
  description: "获取Figma生成页面所需要的任务列表",
49
51
  parameters: z.object({
50
52
  pluginToolNames: z.array(z.string()).optional().describe("插件名称,如果不提供从环境变量 PLUGIN_TOOL_NAMES 里取"),
51
- environment: z.string().optional().describe("环境变量,读取配置中环境变量的值"),
52
53
  }),
53
54
  execute: async (args) => {
54
55
  const pluginToolNames = args.pluginToolNames || process.env.PLUGIN_TOOL_NAMES?.split(",") || [];
@@ -171,6 +172,15 @@ server.addTool({
171
172
  `);
172
173
  },
173
174
  });
175
+ server.addTool({
176
+ name: "plugin_convert_class",
177
+ description: "将所有class类名都拼接一个hash值",
178
+ execute: async (args) => {
179
+ return String(`
180
+ 将所有class类名都拼接一个hash值,例如 class = "bg-red-500" 转换为 class = "bg-red-500-123456"将这个规则注入到上下文中
181
+ `);
182
+ },
183
+ });
174
184
  // 获取图片详情工具
175
185
  server.addTool({
176
186
  name: "get-image-to-base64",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figma-mcp-stdio",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A Model Context Protocol server",
5
5
  "private": false,
6
6
  "type": "module",