@muloka/figma-console-mcp 0.6.4 → 0.6.6
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 +18 -6
- package/dist/apps/design-system-dashboard/mcp-app.html +20 -20
- package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts.map +1 -1
- package/dist/apps/design-system-dashboard/scoring/accessibility.js +2 -1
- package/dist/apps/design-system-dashboard/scoring/accessibility.js.map +1 -1
- package/dist/apps/design-system-dashboard/scoring/coverage.d.ts.map +1 -1
- package/dist/apps/design-system-dashboard/scoring/coverage.js +2 -1
- package/dist/apps/design-system-dashboard/scoring/coverage.js.map +1 -1
- package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts.map +1 -1
- package/dist/apps/design-system-dashboard/scoring/token-architecture.js +2 -1
- package/dist/apps/design-system-dashboard/scoring/token-architecture.js.map +1 -1
- package/dist/apps/design-system-dashboard/server.d.ts.map +1 -1
- package/dist/apps/design-system-dashboard/server.js +2 -1
- package/dist/apps/design-system-dashboard/server.js.map +1 -1
- package/dist/core/annotation-tools.d.ts.map +1 -1
- package/dist/core/annotation-tools.js +7 -6
- package/dist/core/annotation-tools.js.map +1 -1
- package/dist/core/cache-invalidation.d.ts +18 -2
- package/dist/core/cache-invalidation.d.ts.map +1 -1
- package/dist/core/cache-invalidation.js +51 -0
- package/dist/core/cache-invalidation.js.map +1 -1
- package/dist/core/call-context.d.ts +13 -0
- package/dist/core/call-context.d.ts.map +1 -0
- package/dist/core/call-context.js +20 -0
- package/dist/core/call-context.js.map +1 -0
- package/dist/core/comment-tools.d.ts.map +1 -1
- package/dist/core/comment-tools.js +4 -3
- package/dist/core/comment-tools.js.map +1 -1
- package/dist/core/deep-component-tools.d.ts.map +1 -1
- package/dist/core/deep-component-tools.js +5 -4
- package/dist/core/deep-component-tools.js.map +1 -1
- package/dist/core/design-code-tools.d.ts.map +1 -1
- package/dist/core/design-code-tools.js +4 -3
- package/dist/core/design-code-tools.js.map +1 -1
- package/dist/core/design-system-manifest.d.ts +7 -3
- package/dist/core/design-system-manifest.d.ts.map +1 -1
- package/dist/core/design-system-manifest.js +14 -5
- package/dist/core/design-system-manifest.js.map +1 -1
- package/dist/core/design-system-tools.d.ts.map +1 -1
- package/dist/core/design-system-tools.js +2 -1
- package/dist/core/design-system-tools.js.map +1 -1
- package/dist/core/diagnose-tool.d.ts +2 -0
- package/dist/core/diagnose-tool.d.ts.map +1 -1
- package/dist/core/diagnose-tool.js +6 -5
- package/dist/core/diagnose-tool.js.map +1 -1
- package/dist/core/figjam-tools.d.ts.map +1 -1
- package/dist/core/figjam-tools.js +5 -4
- package/dist/core/figjam-tools.js.map +1 -1
- package/dist/core/figma-api.d.ts +12 -0
- package/dist/core/figma-api.d.ts.map +1 -1
- package/dist/core/figma-api.js +17 -1
- package/dist/core/figma-api.js.map +1 -1
- package/dist/core/figma-tools.d.ts.map +1 -1
- package/dist/core/figma-tools.js +42 -53
- package/dist/core/figma-tools.js.map +1 -1
- package/dist/core/library-tools.d.ts.map +1 -1
- package/dist/core/library-tools.js +7 -6
- package/dist/core/library-tools.js.map +1 -1
- package/dist/core/logger.d.ts +11 -0
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +13 -1
- package/dist/core/logger.js.map +1 -1
- package/dist/core/plugin-import-dir.d.ts +9 -0
- package/dist/core/plugin-import-dir.d.ts.map +1 -0
- package/dist/core/plugin-import-dir.js +47 -0
- package/dist/core/plugin-import-dir.js.map +1 -0
- package/dist/core/plugin-name.d.ts +26 -0
- package/dist/core/plugin-name.d.ts.map +1 -0
- package/dist/core/plugin-name.js +35 -0
- package/dist/core/plugin-name.js.map +1 -0
- package/dist/core/port-discovery.d.ts +2 -2
- package/dist/core/port-discovery.d.ts.map +1 -1
- package/dist/core/port-discovery.js +8 -6
- package/dist/core/port-discovery.js.map +1 -1
- package/dist/core/slides-tools.d.ts.map +1 -1
- package/dist/core/slides-tools.js +2 -1
- package/dist/core/slides-tools.js.map +1 -1
- package/dist/core/slot-tools.d.ts.map +1 -1
- package/dist/core/slot-tools.js +3 -2
- package/dist/core/slot-tools.js.map +1 -1
- package/dist/core/tokens/schemas.d.ts +1 -1
- package/dist/core/tokens-tools.d.ts.map +1 -1
- package/dist/core/tokens-tools.js +2 -1
- package/dist/core/tokens-tools.js.map +1 -1
- package/dist/core/variable-resolver.d.ts.map +1 -1
- package/dist/core/variable-resolver.js +3 -2
- package/dist/core/variable-resolver.js.map +1 -1
- package/dist/core/version-tools.d.ts.map +1 -1
- package/dist/core/version-tools.js +9 -8
- package/dist/core/version-tools.js.map +1 -1
- package/dist/core/websocket-connector.d.ts.map +1 -1
- package/dist/core/websocket-connector.js +3 -2
- package/dist/core/websocket-connector.js.map +1 -1
- package/dist/core/websocket-server.d.ts.map +1 -1
- package/dist/core/websocket-server.js +8 -5
- package/dist/core/websocket-server.js.map +1 -1
- package/dist/core/write-tools.d.ts.map +1 -1
- package/dist/core/write-tools.js +283 -232
- package/dist/core/write-tools.js.map +1 -1
- package/dist/local.d.ts +1 -1
- package/dist/local.d.ts.map +1 -1
- package/dist/local.js +114 -190
- package/dist/local.js.map +1 -1
- package/figma-desktop-bridge/README.md +15 -63
- package/figma-desktop-bridge/code.js +31 -29
- package/figma-desktop-bridge/manifest.json +5 -9
- package/figma-desktop-bridge/ui.html +768 -924
- package/package.json +1 -1
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
* This complements figma_get_component_for_development (REST API, depth 4)
|
|
10
10
|
* with deeper, richer data when the Desktop Bridge plugin is connected.
|
|
11
11
|
*/
|
|
12
|
+
import { PLUGIN_NAME, PLUGIN_NAME_WITH_OLD } from "./plugin-name.js";
|
|
12
13
|
import { z } from "zod";
|
|
13
14
|
import { createChildLogger } from "./logger.js";
|
|
14
15
|
const logger = createChildLogger({ component: "deep-component-tools" });
|
|
15
16
|
export function registerDeepComponentTools(server, getDesktopConnector) {
|
|
16
17
|
server.registerTool("figma_get_component_for_development_deep", {
|
|
17
|
-
description: "Get a deeply nested component tree with full visual properties, resolved design token names, instance references, prototype interactions, and annotations at every level. Uses the
|
|
18
|
+
description: "Get a deeply nested component tree with full visual properties, resolved design token names, instance references, prototype interactions, and annotations at every level. Uses the Figma Plugin API through the " + PLUGIN_NAME + " plugin for unlimited depth traversal — essential for complex components like data tables, nested menus, date pickers, and compound form fields where the standard depth-4 REST API tool misses deeper structure. Returns boundVariables resolved to actual token names (not just IDs), mainComponent references for INSTANCE nodes, and reactions for interaction states. Requires the " + PLUGIN_NAME + " plugin. For simpler components (depth ≤ 4), use figma_get_component_for_development instead.",
|
|
18
19
|
inputSchema: z.object({
|
|
19
20
|
nodeId: z
|
|
20
21
|
.string()
|
|
@@ -70,7 +71,7 @@ export function registerDeepComponentTools(server, getDesktopConnector) {
|
|
|
70
71
|
text: JSON.stringify({
|
|
71
72
|
error: "deep_component_failed",
|
|
72
73
|
message: `Cannot extract deep component. ${message}`,
|
|
73
|
-
hint: "This tool requires the
|
|
74
|
+
hint: "This tool requires the " + PLUGIN_NAME_WITH_OLD + " plugin to be running in Figma. For REST API fallback (depth 4), use figma_get_component_for_development.",
|
|
74
75
|
}),
|
|
75
76
|
},
|
|
76
77
|
],
|
|
@@ -82,7 +83,7 @@ export function registerDeepComponentTools(server, getDesktopConnector) {
|
|
|
82
83
|
// Tool: figma_analyze_component_set
|
|
83
84
|
// -----------------------------------------------------------------------
|
|
84
85
|
server.registerTool("figma_analyze_component_set", {
|
|
85
|
-
description: "Analyze a Figma COMPONENT_SET to extract variant state machine and cross-variant diffs for code generation. Returns: (1) variant axes (size, state) with all values, (2) CSS pseudo-class mappings for interaction states (hover→:hover, focus→:focus-visible, disabled→:disabled, error→[aria-invalid]), (3) visual diff from default state per variant (only changed properties — fill token, stroke token, stroke weight, text color, opacity, effects, visibility), (4) component property definitions mapped to code props (BOOLEAN→boolean, TEXT→string, INSTANCE_SWAP→slot/ReactNode), and (5) slots — Figma SLOT properties (name, preferredValues = the components a slot accepts, and limitViolations) to implement as named slots / children props (React {children} or named ReactNode; Web Components <slot name>). Use this on the parent COMPONENT_SET node, not individual variants. Requires
|
|
86
|
+
description: "Analyze a Figma COMPONENT_SET to extract variant state machine and cross-variant diffs for code generation. Returns: (1) variant axes (size, state) with all values, (2) CSS pseudo-class mappings for interaction states (hover→:hover, focus→:focus-visible, disabled→:disabled, error→[aria-invalid]), (3) visual diff from default state per variant (only changed properties — fill token, stroke token, stroke weight, text color, opacity, effects, visibility), (4) component property definitions mapped to code props (BOOLEAN→boolean, TEXT→string, INSTANCE_SWAP→slot/ReactNode), and (5) slots — Figma SLOT properties (name, preferredValues = the components a slot accepts, and limitViolations) to implement as named slots / children props (React {children} or named ReactNode; Web Components <slot name>). Use this on the parent COMPONENT_SET node, not individual variants. Requires the " + PLUGIN_NAME + " plugin.",
|
|
86
87
|
inputSchema: z.object({
|
|
87
88
|
nodeId: z
|
|
88
89
|
.string()
|
|
@@ -123,7 +124,7 @@ export function registerDeepComponentTools(server, getDesktopConnector) {
|
|
|
123
124
|
text: JSON.stringify({
|
|
124
125
|
error: "analyze_component_set_failed",
|
|
125
126
|
message: `Cannot analyze component set. ${message}`,
|
|
126
|
-
hint: "This tool requires the
|
|
127
|
+
hint: "This tool requires the " + PLUGIN_NAME_WITH_OLD + " plugin and a COMPONENT_SET node ID (not an individual variant). Use figma_search_components to find component sets.",
|
|
127
128
|
}),
|
|
128
129
|
},
|
|
129
130
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-component-tools.js","sourceRoot":"","sources":["../../src/core/deep-component-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"deep-component-tools.js","sourceRoot":"","sources":["../../src/core/deep-component-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAA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,EAAE,IAAI;4BACd,QAAQ,EAAE;gCACT,OAAO,EAAE,uBAAuB;gCAChC,IAAI,EAAE,gOAAgO;6BACtO;yBACD,CAAC;qBACF;iBACD;aACD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,+BAA+B,CAAC,CAAC;YAEzD,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACpB,KAAK,EAAE,8BAA8B;4BACrC,OAAO,EAAE,iCAAiC,OAAO,EAAE;4BACnD,IAAI,EAAE,yBAAyB,GAAG,oBAAoB,GAAG,sHAAsH;yBAC/K,CAAC;qBACF;iBACD;gBACD,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC,CACD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-code-tools.d.ts","sourceRoot":"","sources":["../../src/core/design-code-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"design-code-tools.d.ts","sourceRoot":"","sources":["../../src/core/design-code-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/C,OAAO,KAAK,EAUX,uBAAuB,EACvB,MAAM,wBAAwB,CAAC;AAUhC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1F,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC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AAO,CAEnD;AAED,uDAAuD;AACvD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AA2yDD,gFAAgF;AAChF,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GACjB,uBAAuB,CAazB;AAyJD,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,EACpC,aAAa,EAAE,MAAM,MAAM,GAAG,IAAI,EAClC,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,EAC9D,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,EACpC,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GACtC,IAAI,CA2lBN"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* MCP tools for comparing Figma design specs with code-side data
|
|
4
4
|
* and generating platform-agnostic component documentation.
|
|
5
5
|
*/
|
|
6
|
+
import { PLUGIN_NAME, PLUGIN_NAME_WITH_OLD } from "./plugin-name.js";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
import { extractFileKey } from "./figma-api.js";
|
|
8
9
|
import { createChildLogger } from "./logger.js";
|
|
@@ -2016,7 +2017,7 @@ function generateAnatomySection(node) {
|
|
|
2016
2017
|
lines.push(tree);
|
|
2017
2018
|
lines.push("```");
|
|
2018
2019
|
lines.push("");
|
|
2019
|
-
lines.push("_Note: Tree depth may be limited by the Figma REST API. Use the
|
|
2020
|
+
lines.push("_Note: Tree depth may be limited by the Figma REST API. Use the " + PLUGIN_NAME + " plugin for full node-level anatomy._");
|
|
2020
2021
|
}
|
|
2021
2022
|
lines.push("");
|
|
2022
2023
|
return lines.join("\n");
|
|
@@ -2313,7 +2314,7 @@ export function registerDesignCodeTools(server, getFigmaAPI, getCurrentUrl, vari
|
|
|
2313
2314
|
try {
|
|
2314
2315
|
const url = fileUrl || getCurrentUrl();
|
|
2315
2316
|
if (!url) {
|
|
2316
|
-
throw new Error("No Figma file URL available. Pass the fileUrl parameter or ensure the
|
|
2317
|
+
throw new Error("No Figma file URL available. Pass the fileUrl parameter or ensure the " + PLUGIN_NAME_WITH_OLD + " plugin is open in Figma.");
|
|
2317
2318
|
}
|
|
2318
2319
|
const fileKey = extractFileKey(url);
|
|
2319
2320
|
if (!fileKey) {
|
|
@@ -2513,7 +2514,7 @@ export function registerDesignCodeTools(server, getFigmaAPI, getCurrentUrl, vari
|
|
|
2513
2514
|
try {
|
|
2514
2515
|
const url = fileUrl || getCurrentUrl();
|
|
2515
2516
|
if (!url) {
|
|
2516
|
-
throw new Error("No Figma file URL available. Pass the fileUrl parameter or ensure the
|
|
2517
|
+
throw new Error("No Figma file URL available. Pass the fileUrl parameter or ensure the " + PLUGIN_NAME_WITH_OLD + " plugin is open in Figma.");
|
|
2517
2518
|
}
|
|
2518
2519
|
const fileKey = extractFileKey(url);
|
|
2519
2520
|
if (!fileKey) {
|