@clovis500c/figma-bridge 1.8.0 → 1.12.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.
- package/README.md +45 -10
- package/dist/server.js +1953 -121
- package/package.json +5 -2
- package/plugin/code.js +574 -20
- package/plugin/manifest.json +2 -1
- package/plugin/ui.html +7 -1
package/plugin/manifest.json
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
"api": "1.0.0",
|
|
5
5
|
"main": "code.js",
|
|
6
6
|
"ui": "ui.html",
|
|
7
|
-
"editorType": ["figma"],
|
|
7
|
+
"editorType": ["figma", "figjam", "slides"],
|
|
8
8
|
"documentAccess": "dynamic-page",
|
|
9
|
+
"enablePrivatePluginApi": true,
|
|
9
10
|
"networkAccess": {
|
|
10
11
|
"allowedDomains": ["none"],
|
|
11
12
|
"devAllowedDomains": ["http://localhost:3055", "ws://localhost:3055"],
|
package/plugin/ui.html
CHANGED
|
@@ -487,6 +487,9 @@ const METHODS = {
|
|
|
487
487
|
prototype: { label: "Prototype", color: "#8b5cf6", icon: "i-play" },
|
|
488
488
|
annotate: { label: "Annotate", color: "#f59e0b", icon: "i-note" },
|
|
489
489
|
export_tree: { label: "Export code", color: "#64748b", icon: "i-braces" },
|
|
490
|
+
node_info: { label: "Layer names", color: "#64748b", icon: "i-tree" },
|
|
491
|
+
roblox_tree: { label: "Roblox export", color: "#e11d48", icon: "i-braces" },
|
|
492
|
+
roblox_images: { label: "Roblox images", color: "#e11d48", icon: "i-image" },
|
|
490
493
|
ping: { label: "Ping", color: "#64748b", icon: "i-pulse" },
|
|
491
494
|
};
|
|
492
495
|
const methodOf = (m) => METHODS[m] || { label: m, color: "#64748b", icon: "i-pulse" };
|
|
@@ -774,6 +777,9 @@ function summarize(msg) {
|
|
|
774
777
|
return action.charAt(0).toUpperCase() + action.slice(1) + (p.nodeId ? " · " + p.nodeId : "");
|
|
775
778
|
}
|
|
776
779
|
case "export_tree": return p.nodeId ? "Node " + p.nodeId : "Selection";
|
|
780
|
+
case "roblox_tree": return p.nodeId ? "Node " + p.nodeId : "Selection";
|
|
781
|
+
case "roblox_images": return (p.items || []).length + " picture" + ((p.items || []).length === 1 ? "" : "s") + " at " + ((p.items && p.items[0] && p.items[0].scale) || 2) + "×";
|
|
782
|
+
case "node_info": return (p.ids || []).length + " layer" + ((p.ids || []).length === 1 ? "" : "s");
|
|
777
783
|
case "wait_for_selection": return p.message || "Select layers";
|
|
778
784
|
case "build": {
|
|
779
785
|
let count = 0;
|
|
@@ -1184,7 +1190,7 @@ window.onmessage = (ev) => {
|
|
|
1184
1190
|
} else if (msg.t === "info") {
|
|
1185
1191
|
session = msg.session;
|
|
1186
1192
|
renderSession();
|
|
1187
|
-
send({ t: "info", fileName: session.fileName, page: session.page });
|
|
1193
|
+
send({ t: "info", fileName: session.fileName, page: session.page, pageId: session.pageId });
|
|
1188
1194
|
} else if (msg.t === "res") {
|
|
1189
1195
|
onResult(msg);
|
|
1190
1196
|
} else if (msg.t === "progress") {
|