figma-mcp-console 0.4.1 → 0.5.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/bin/darwin-amd64/figma-mcp +0 -0
- package/bin/darwin-arm64/figma-mcp +0 -0
- package/bin/linux-amd64/figma-mcp +0 -0
- package/bin/linux-arm64/figma-mcp +0 -0
- package/bin/plugin/ui.html +8 -1
- package/bin/windows-amd64/figma-mcp.exe +0 -0
- package/bin/windows-arm64/figma-mcp.exe +0 -0
- package/package.json +9 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/plugin/ui.html
CHANGED
|
@@ -97,10 +97,12 @@
|
|
|
97
97
|
// background tabs throttle timers, so a visibility change and a click on
|
|
98
98
|
// the status line also trigger an immediate attempt.
|
|
99
99
|
const PORT = 2000,
|
|
100
|
-
RETRY = 1000
|
|
100
|
+
RETRY = 1000,
|
|
101
|
+
PROTOCOL = 1; // must match bridge.ProtocolVersion in the Go server
|
|
101
102
|
let ws = null; // open connection, null while disconnected
|
|
102
103
|
let attempt = null; // socket currently trying to connect
|
|
103
104
|
let reg = null; // {key, name} of this file, sent by the main thread
|
|
105
|
+
let protoWarning = null; // set when the server reports a newer protocol
|
|
104
106
|
|
|
105
107
|
function setStatus(connected, text) {
|
|
106
108
|
document.getElementById("dot").className = connected ? "on" : "";
|
|
@@ -108,6 +110,7 @@
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
function label() {
|
|
113
|
+
if (protoWarning) return protoWarning;
|
|
111
114
|
return reg ? "Connected · " + reg.name : "Connected (port " + PORT + ")";
|
|
112
115
|
}
|
|
113
116
|
|
|
@@ -136,6 +139,10 @@
|
|
|
136
139
|
sock.onmessage = (e) => {
|
|
137
140
|
const msg = JSON.parse(e.data);
|
|
138
141
|
if (msg.hello) {
|
|
142
|
+
protoWarning =
|
|
143
|
+
msg.hello.protocol && msg.hello.protocol !== PROTOCOL
|
|
144
|
+
? "⚠ Plugin outdated — re-import from the latest release"
|
|
145
|
+
: null;
|
|
139
146
|
setStatus(true, label());
|
|
140
147
|
return;
|
|
141
148
|
}
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "figma-mcp-console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepublishOnly": "cp ../README.md ./README.md"
|
|
6
6
|
},
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=18"
|
|
17
17
|
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/hoangann2000/figma-mcp-console.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/hoangann2000/figma-mcp-console#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/hoangann2000/figma-mcp-console/issues"
|
|
25
|
+
},
|
|
18
26
|
"keywords": [
|
|
19
27
|
"figma",
|
|
20
28
|
"mcp",
|