@clovis500c/figma-bridge 1.5.0 → 1.8.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/plugin/ui.html CHANGED
@@ -473,6 +473,7 @@ const METHODS = {
473
473
  find: { label: "Find", color: "#64748b", icon: "i-search" },
474
474
  get_design_system: { label: "Design system", color: "#64748b", icon: "i-swatch" },
475
475
  design_tokens: { label: "Design tokens", color: "#0d99ff", icon: "i-swatch" },
476
+ export_tokens: { label: "Export tokens", color: "#64748b", icon: "i-swatch" },
476
477
  audit: { label: "Audit", color: "#16a34a", icon: "i-shield" },
477
478
  get_css: { label: "CSS", color: "#64748b", icon: "i-braces" },
478
479
  checkpoint: { label: "Checkpoint", color: "#64748b", icon: "i-history" },
@@ -779,7 +780,7 @@ function summarize(msg) {
779
780
  const walk = (n) => { if (!n || typeof n !== "object") return; if (Array.isArray(n)) return n.forEach(walk); count++; if (Array.isArray(n.children)) n.children.forEach(walk); if (Array.isArray(n.variants)) n.variants.forEach(walk); };
780
781
  walk(p.spec);
781
782
  const root = Array.isArray(p.spec) ? p.spec[0] : p.spec;
782
- return ((root && root.name) || "Layout") + " · " + count + " layer" + (count === 1 ? "" : "s");
783
+ return (p.label ? p.label + " · " : "") + ((root && root.name) || "Layout") + " · " + count + " layer" + (count === 1 ? "" : "s");
783
784
  }
784
785
  case "find": {
785
786
  const parts = [];
@@ -798,7 +799,8 @@ function summarize(msg) {
798
799
  const styles = (st.colors || []).length + (st.text || []).length + (st.effects || []).length;
799
800
  return vars + " variable" + (vars === 1 ? "" : "s") + " · " + styles + " style" + (styles === 1 ? "" : "s");
800
801
  }
801
- case "audit": return p.nodeId ? "Node " + p.nodeId : "Selection";
802
+ case "export_tokens": return p.collections && p.collections.length ? p.collections.join(", ") : "Variables and styles";
803
+ case "audit": return (p.fix || p.fixes ? "Fix · " : p.scope === "design-system" ? "Design system health · " : "") + (p.nodeId ? "Node " + p.nodeId : p.scope === "design-system" && !p.fix ? "Whole file" : "Selection");
802
804
  case "get_css": return p.nodeId ? "Node " + p.nodeId : "Selection";
803
805
  case "checkpoint": return p.action.charAt(0).toUpperCase() + p.action.slice(1) + (p.label ? " · " + p.label : p.id ? " · " + p.id : "");
804
806
  default: return "";