sonance-brand-mcp 1.3.8 → 1.3.9
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/dist/index.js +11 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -583,14 +583,21 @@ function runDevToolsInstaller() {
|
|
|
583
583
|
modified = true;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
// Add component
|
|
586
|
+
// Add component - try ThemeProvider first, then body
|
|
587
587
|
if (!layoutContent.includes("<SonanceDevTools")) {
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
const componentLine = "{process.env.NODE_ENV === 'development' && <SonanceDevTools />}";
|
|
589
|
+
// Priority 1: Inside ThemeProvider (for next-themes compatibility)
|
|
590
|
+
if (layoutContent.includes("</ThemeProvider>")) {
|
|
591
|
+
layoutContent = layoutContent.replace(/<\/ThemeProvider>/, ` ${componentLine}\n </ThemeProvider>`);
|
|
592
|
+
modified = true;
|
|
593
|
+
}
|
|
594
|
+
// Priority 2: Before </body>
|
|
595
|
+
else if (layoutContent.includes("</body>")) {
|
|
596
|
+
layoutContent = layoutContent.replace(/<\/body>/, ` ${componentLine}\n </body>`);
|
|
590
597
|
modified = true;
|
|
591
598
|
}
|
|
592
599
|
else {
|
|
593
|
-
manualSteps.push("Could not find
|
|
600
|
+
manualSteps.push("Could not find ThemeProvider or body tag - add DevTools component manually");
|
|
594
601
|
}
|
|
595
602
|
}
|
|
596
603
|
if (modified) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonance-brand-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"description": "MCP Server for Sonance Brand Guidelines and Component Library - gives Claude instant access to brand colors, typography, and UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|