canicode 0.7.0 → 0.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/README.md +2 -0
- package/dist/cli/index.js +23 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +16 -3
- package/dist/index.js +256 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +264 -3
- package/dist/mcp/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,6 +78,8 @@ For Cursor / Claude Desktop config, see [`docs/CUSTOMIZATION.md`](docs/CUSTOMIZA
|
|
|
78
78
|
|
|
79
79
|
Then ask: *"Analyze this Figma design: https://www.figma.com/design/..."*
|
|
80
80
|
|
|
81
|
+
> **Note:** MCP/Skill path extracts style data from Figma MCP's generated code (React + Tailwind), not raw Figma node properties. For the most accurate analysis, use the CLI with a Figma API token.
|
|
82
|
+
|
|
81
83
|
### 3. Web (no install)
|
|
82
84
|
|
|
83
85
|
Go to **[let-sunny.github.io/canicode](https://let-sunny.github.io/canicode/)**, paste a Figma URL, and get results instantly in your browser.
|
package/dist/cli/index.js
CHANGED
|
@@ -2563,11 +2563,11 @@ async function runCalibration(config2, executor, options) {
|
|
|
2563
2563
|
};
|
|
2564
2564
|
}
|
|
2565
2565
|
}
|
|
2566
|
-
|
|
2567
|
-
|
|
2566
|
+
var require2 = createRequire(import.meta.url);
|
|
2567
|
+
var pkg = require2("../../package.json");
|
|
2568
2568
|
function printDocsIndex() {
|
|
2569
2569
|
console.log(`
|
|
2570
|
-
CANICODE DOCUMENTATION
|
|
2570
|
+
CANICODE DOCUMENTATION (v${pkg.version})
|
|
2571
2571
|
|
|
2572
2572
|
canicode docs setup Full setup guide (CLI, MCP, Skills)
|
|
2573
2573
|
canicode docs rules Custom rules guide + example
|
|
@@ -2618,8 +2618,9 @@ CANICODE SETUP GUIDE
|
|
|
2618
2618
|
|
|
2619
2619
|
Flow:
|
|
2620
2620
|
Claude Code
|
|
2621
|
-
-> Figma MCP get_metadata(fileKey, nodeId) -> XML node tree
|
|
2622
|
-
->
|
|
2621
|
+
-> Figma MCP get_metadata(fileKey, nodeId) -> XML node tree (structure)
|
|
2622
|
+
-> Figma MCP get_design_context(fileKey, nodeId) -> code (styles)
|
|
2623
|
+
-> Merge into fixture JSON (structure + styles)
|
|
2623
2624
|
-> canicode analyze fixture.json -> report
|
|
2624
2625
|
|
|
2625
2626
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
@@ -2640,6 +2641,19 @@ CANICODE SETUP GUIDE
|
|
|
2640
2641
|
In Figma -> Figma Plugin
|
|
2641
2642
|
Browser -> Web App (GitHub Pages)
|
|
2642
2643
|
Quick trial, offline -> CLI + JSON fixtures
|
|
2644
|
+
|
|
2645
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
2646
|
+
DATA SOURCE DIFFERENCES
|
|
2647
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
2648
|
+
|
|
2649
|
+
CLI (REST API) Reads raw Figma node data directly.
|
|
2650
|
+
Most accurate \u2014 all style properties available.
|
|
2651
|
+
|
|
2652
|
+
MCP / Skill Uses Figma MCP's get_metadata (structure) and
|
|
2653
|
+
get_design_context (styles). Style data is extracted
|
|
2654
|
+
from Figma MCP's own generated code (React + Tailwind),
|
|
2655
|
+
not raw Figma node properties. Results may differ
|
|
2656
|
+
slightly from CLI due to this interpretation layer.
|
|
2643
2657
|
`.trimStart());
|
|
2644
2658
|
}
|
|
2645
2659
|
function printDocsRules() {
|
|
@@ -4070,13 +4084,13 @@ defineRule({
|
|
|
4070
4084
|
|
|
4071
4085
|
// src/cli/index.ts
|
|
4072
4086
|
config();
|
|
4073
|
-
var
|
|
4074
|
-
var
|
|
4087
|
+
var require3 = createRequire(import.meta.url);
|
|
4088
|
+
var pkg2 = require3("../../package.json");
|
|
4075
4089
|
var cli = cac("canicode");
|
|
4076
4090
|
{
|
|
4077
4091
|
const monitoringConfig = {
|
|
4078
4092
|
environment: "cli",
|
|
4079
|
-
version:
|
|
4093
|
+
version: pkg2.version,
|
|
4080
4094
|
enabled: getTelemetryEnabled()
|
|
4081
4095
|
};
|
|
4082
4096
|
const phKey = getPosthogApiKey() || POSTHOG_API_KEY;
|
|
@@ -4620,7 +4634,7 @@ cli.help((sections) => {
|
|
|
4620
4634
|
}
|
|
4621
4635
|
);
|
|
4622
4636
|
});
|
|
4623
|
-
cli.version(
|
|
4637
|
+
cli.version(pkg2.version);
|
|
4624
4638
|
cli.parse();
|
|
4625
4639
|
//# sourceMappingURL=index.js.map
|
|
4626
4640
|
//# sourceMappingURL=index.js.map
|