mcp-figma-toolkit 1.0.0 → 1.0.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.
- package/package.json +1 -1
- package/plugin/plugin.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-figma-toolkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "MCP server that enables AI agents to manipulate Figma documents - create shapes, text, styles, components, variables, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server.js",
|
package/plugin/plugin.js
CHANGED
|
@@ -229,7 +229,8 @@ function createStar({ points, width, height, x = 0, y = 0, hex, parentId }) {
|
|
|
229
229
|
async function addText({ text, x = 0, y = 0, fontFamily = "Inter", fontStyle = "Regular", fontSize = 32, parentId }) {
|
|
230
230
|
await figma.loadFontAsync({ family: fontFamily, style: fontStyle });
|
|
231
231
|
const t = figma.createText();
|
|
232
|
-
t.
|
|
232
|
+
t.fontName = { family: fontFamily, style: fontStyle };
|
|
233
|
+
t.characters = text;
|
|
233
234
|
if (fontSize) t.fontSize = fontSize;
|
|
234
235
|
t.x = x; t.y = y; getParent(parentId).appendChild(t);
|
|
235
236
|
return { nodeId: t.id, type: t.type, text: t.characters };
|