@ject-5-fe/figma-plugin 0.0.1 → 0.0.2

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.
@@ -78,11 +78,16 @@ server.tool(
78
78
  );
79
79
  server.tool(
80
80
  "get_selection",
81
- "Get information about the current selection in Figma",
82
- {},
83
- async () => {
81
+ "Get codegen snapshot (AST/reactNodes/tokens) for current selection or a specific node (optional nodeId)",
82
+ {
83
+ nodeId: import_zod.z.string().optional().describe("Optional: scope snapshot to a specific node ID")
84
+ },
85
+ async ({ nodeId }) => {
84
86
  try {
85
- const result = await sendCommandToFigma("get_selection");
87
+ const result = await sendCommandToFigma(
88
+ "get_selection",
89
+ nodeId ? { nodeId } : {}
90
+ );
86
91
  return {
87
92
  content: [
88
93
  {
@@ -105,7 +110,7 @@ server.tool(
105
110
  );
106
111
  server.tool(
107
112
  "get_node_info",
108
- "Get detailed information about a specific node in Figma",
113
+ "Get raw Figma node info for a specific node (not for codegen)",
109
114
  {
110
115
  nodeId: import_zod.z.string().describe("The ID of the node to get information about")
111
116
  },
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@ject-5-fe/figma-plugin",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
- "private": false,
6
5
  "publishConfig": {
7
6
  "access": "public"
8
7
  },
@@ -10,7 +9,8 @@
10
9
  "dev": "plugma dev",
11
10
  "socket": "tsx src/socket.ts",
12
11
  "start": "concurrently \"yarn run socket\" \"yarn run dev\" --names \"SOCKET,MCP\" --prefix-colors \"blue,green\"",
13
- "build:server": "tsup"
12
+ "build:server": "tsup",
13
+ "type-check": "yarn run -T -B tsc --noEmit"
14
14
  },
15
15
  "bin": "dist/server/server.cjs",
16
16
  "files": [
@@ -18,6 +18,7 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@modelcontextprotocol/sdk": "^1",
21
+ "es-toolkit": "^1.39.10",
21
22
  "react": "^18.3.1",
22
23
  "react-dom": "^18.3.1",
23
24
  "uuid": "^11",