@ttsalpha/mirra 1.0.0 → 1.1.0

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.
@@ -837,6 +837,11 @@
837
837
  // src/ops/pages.ts
838
838
  async function pages(params) {
839
839
  await figma.loadAllPagesAsync();
840
+ if (params.create) {
841
+ const page = figma.createPage();
842
+ page.name = params.create;
843
+ await figma.setCurrentPageAsync(page);
844
+ }
840
845
  if (params.select) {
841
846
  const wanted = figma.root.children.find(
842
847
  (page) => page.id === params.select || page.name === params.select
@@ -895,6 +900,18 @@
895
900
  touched.push(created);
896
901
  break;
897
902
  }
903
+ case "component": {
904
+ const key = node.getPluginData(KEY_FIELD);
905
+ const component = figma.createComponentFromNode(node);
906
+ component.name = op.name ?? node.name;
907
+ if (key) {
908
+ component.setPluginData(KEY_FIELD, key);
909
+ keys[key] = component.id;
910
+ }
911
+ index.invalidate();
912
+ touched.push(component);
913
+ break;
914
+ }
898
915
  case "move": {
899
916
  const parent = op.parent ? await index.resolve(op.parent) : node.parent;
900
917
  if (!parent || !("insertChild" in parent)) {
@@ -1252,7 +1269,7 @@
1252
1269
  }
1253
1270
 
1254
1271
  // src/main.ts
1255
- var PLUGIN_VERSION = "1.0.0";
1272
+ var PLUGIN_VERSION = "1.1.0";
1256
1273
  figma.showUI(__html__, { width: 300, height: 300, themeColors: true });
1257
1274
  var queue = Promise.resolve();
1258
1275
  figma.ui.onmessage = (message2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsalpha/mirra",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Two-way MCP server for Figma: read a design and render one back through the Figma Plugin API",
5
5
  "keywords": [
6
6
  "figma",
@@ -39,17 +39,16 @@
39
39
  "prepublishOnly": "pnpm -w run build",
40
40
  "build:mcpb": "node scripts/build-mcpb.mjs"
41
41
  },
42
- "dependencies": {
43
- "@modelcontextprotocol/sdk": "1.32.1",
44
- "ws": "8.22.0",
45
- "zod": "4.6.7"
46
- },
42
+ "dependencies": {},
47
43
  "devDependencies": {
48
44
  "@mirra/plugin": "workspace:*",
49
45
  "@mirra/schema": "workspace:*",
46
+ "@modelcontextprotocol/sdk": "1.32.1",
50
47
  "@types/node": "24.19.2",
51
48
  "@types/ws": "8.18.2",
52
- "esbuild": "0.25.12"
49
+ "esbuild": "0.25.12",
50
+ "ws": "8.22.0",
51
+ "zod": "4.6.7"
53
52
  },
54
53
  "publishConfig": {
55
54
  "access": "public"