@ject-5-fe/figma-plugin 0.0.5 → 0.0.7
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/dist/server/server.cjs +3 -6
- package/package.json +2 -2
package/dist/server/server.cjs
CHANGED
|
@@ -80,17 +80,14 @@ server.tool(
|
|
|
80
80
|
"get_selection",
|
|
81
81
|
"Get codegen snapshot (AST/reactNodes/tokens) for current selection or a specific node (optional nodeId)",
|
|
82
82
|
{
|
|
83
|
-
nodeId:
|
|
84
|
-
type: "string",
|
|
85
|
-
optional: true,
|
|
86
|
-
description: "Optional: scope snapshot to a specific node ID"
|
|
87
|
-
}
|
|
83
|
+
nodeId: import_zod.z.string().nullable().optional().describe("Optional: scope snapshot to a specific node ID")
|
|
88
84
|
},
|
|
89
85
|
async ({ nodeId }) => {
|
|
90
86
|
try {
|
|
87
|
+
const normalizedNodeId = typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0;
|
|
91
88
|
const result = await sendCommandToFigma(
|
|
92
89
|
"get_selection",
|
|
93
|
-
|
|
90
|
+
normalizedNodeId ? { nodeId: normalizedNodeId } : {}
|
|
94
91
|
);
|
|
95
92
|
return {
|
|
96
93
|
content: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ject-5-fe/figma-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"uuid": "^11",
|
|
25
25
|
"ws": "^8",
|
|
26
26
|
"xml-js": "^1.6.11",
|
|
27
|
-
"zod": "3"
|
|
27
|
+
"zod": "^3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@figma/plugin-typings": "^1.100.2",
|