@schemyx/mcp 0.1.10 → 0.1.11
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/codebase-scanner/bundle.d.ts +1 -0
- package/dist/codebase-scanner/bundle.js +16 -5
- package/dist/codebase-scanner/bundle.js.map +1 -1
- package/dist/codebase-scanner/index.d.ts +3 -0
- package/dist/codebase-scanner/index.js +4 -0
- package/dist/codebase-scanner/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -150,6 +150,7 @@ export declare function looksLikeCssLength(value: string): boolean;
|
|
|
150
150
|
export declare function tailwindShadowValue(base: string): string;
|
|
151
151
|
export declare function bootstrapDeclarationsForClass(className: string, styleContext?: StyleResolutionContext): ResolvedStyleDeclaration[];
|
|
152
152
|
export declare function isBootstrapClass(className: string): boolean;
|
|
153
|
+
export declare function isStrongBootstrapSignalClass(className: string): boolean;
|
|
153
154
|
export declare function bootstrapResponsivePrefixes(className: string): string[];
|
|
154
155
|
export declare function stripBootstrapResponsiveInfix(className: string): string;
|
|
155
156
|
export declare function bootstrapComponentDeclarations(base: string): Array<{
|
|
@@ -63,6 +63,7 @@ exports.looksLikeCssLength = looksLikeCssLength;
|
|
|
63
63
|
exports.tailwindShadowValue = tailwindShadowValue;
|
|
64
64
|
exports.bootstrapDeclarationsForClass = bootstrapDeclarationsForClass;
|
|
65
65
|
exports.isBootstrapClass = isBootstrapClass;
|
|
66
|
+
exports.isStrongBootstrapSignalClass = isStrongBootstrapSignalClass;
|
|
66
67
|
exports.bootstrapResponsivePrefixes = bootstrapResponsivePrefixes;
|
|
67
68
|
exports.stripBootstrapResponsiveInfix = stripBootstrapResponsiveInfix;
|
|
68
69
|
exports.bootstrapComponentDeclarations = bootstrapComponentDeclarations;
|
|
@@ -1661,6 +1662,10 @@ function detectProjectStyleSystems(files) {
|
|
|
1661
1662
|
const dependencyText = files.flatMap((file) => file.dependencies).join(' ').toLowerCase();
|
|
1662
1663
|
const importText = files.flatMap((file) => file.imports).join(' ').toLowerCase();
|
|
1663
1664
|
const pathText = files.map((file) => file.relPath).join(' ').toLowerCase();
|
|
1665
|
+
const strongBootstrapClassCount = allClasses.filter(isStrongBootstrapSignalClass).length;
|
|
1666
|
+
const hasBootstrapDependency = /\bbootstrap\b/.test(dependencyText) ||
|
|
1667
|
+
/\bbootstrap\b/.test(importText) ||
|
|
1668
|
+
/bootstrap(?:\.min)?\.css|bootstrap(?:\.bundle)?(?:\.min)?\.js/.test(pathText);
|
|
1664
1669
|
if (files.some((file) => file.cssRules.length || file.cssVariableValues.length || file.cssClasses.length)) {
|
|
1665
1670
|
systems.add('raw-css');
|
|
1666
1671
|
}
|
|
@@ -1670,9 +1675,7 @@ function detectProjectStyleSystems(files) {
|
|
|
1670
1675
|
/tailwind\.config|tailwind-theme|@tailwind/.test(pathText)) {
|
|
1671
1676
|
systems.add('tailwind');
|
|
1672
1677
|
}
|
|
1673
|
-
if (
|
|
1674
|
-
/\bbootstrap\b/.test(dependencyText) ||
|
|
1675
|
-
/\bbootstrap\b/.test(importText)) {
|
|
1678
|
+
if (hasBootstrapDependency || strongBootstrapClassCount >= 3) {
|
|
1676
1679
|
systems.add('bootstrap');
|
|
1677
1680
|
}
|
|
1678
1681
|
return Array.from(systems).length ? Array.from(systems) : ['unknown'];
|
|
@@ -1741,6 +1744,7 @@ function resolveCssValueTokens(value, cssVariables) {
|
|
|
1741
1744
|
}
|
|
1742
1745
|
function resolveUiClassDeclarations(classes, styleContext) {
|
|
1743
1746
|
const declarations = [];
|
|
1747
|
+
const bootstrapEnabled = styleContext?.detectedStyleSystems.includes('bootstrap') ?? true;
|
|
1744
1748
|
for (const className of classes) {
|
|
1745
1749
|
const candidates = (0, utils_1.unique)([className, (0, utils_1.classBase)(className), (0, utils_1.classBase)(className).replace(/^!/, '')]);
|
|
1746
1750
|
for (const candidate of candidates) {
|
|
@@ -1750,7 +1754,9 @@ function resolveUiClassDeclarations(classes, styleContext) {
|
|
|
1750
1754
|
})));
|
|
1751
1755
|
}
|
|
1752
1756
|
declarations.push(...tailwindDeclarationsForClass(className, styleContext));
|
|
1753
|
-
|
|
1757
|
+
if (bootstrapEnabled) {
|
|
1758
|
+
declarations.push(...bootstrapDeclarationsForClass(className, styleContext));
|
|
1759
|
+
}
|
|
1754
1760
|
}
|
|
1755
1761
|
return (0, utils_1.uniqueBy)(declarations, (declaration) => [
|
|
1756
1762
|
declaration.className,
|
|
@@ -2212,6 +2218,10 @@ function isBootstrapClass(className) {
|
|
|
2212
2218
|
const base = stripBootstrapResponsiveInfix((0, utils_1.classBase)(className));
|
|
2213
2219
|
return /^(?:container|container-fluid|row|col|col-\d+|card|card-(?:body|title|text|header|footer)|btn|btn-(?:primary|secondary|success|danger|warning|info|light|dark|link|outline-primary|outline-secondary|outline-success|outline-danger|outline-warning|outline-info|outline-light|outline-dark)|badge|rounded|rounded-\d|rounded-pill|rounded-circle|border|border-\d|border-(?:0|top|end|bottom|start|primary|secondary|success|danger|warning|info|light|dark|white)|bg-|text-|fw-|fs-|lh-|display-|lead|small|d-|flex-|justify-content-|align-items-|align-self-|order-|m[stebxy]?-|p[stebxy]?-|gap-|w-|h-|mw-|mh-|min-vh-|min-vw-|vw-|vh-|form-|input-group|navbar|nav|nav-|list-group|modal|alert|shadow|overflow-|position-|top-|bottom-|start-|end-|translate-middle|visually-hidden)/.test(base);
|
|
2214
2220
|
}
|
|
2221
|
+
function isStrongBootstrapSignalClass(className) {
|
|
2222
|
+
const base = stripBootstrapResponsiveInfix((0, utils_1.classBase)(className));
|
|
2223
|
+
return /^(?:container-fluid|row|col(?:-\d+)?|offset-\d+|card(?:-(?:body|title|text|header|footer|img(?:-top|-bottom)?))?|btn(?:-(?:primary|secondary|success|danger|warning|info|light|dark|link|outline-primary|outline-secondary|outline-success|outline-danger|outline-warning|outline-info|outline-light|outline-dark))?|badge(?:-(?:pill|rounded-pill))?|form-(?:control|select|check|label|text|range|switch|floating)|input-group(?:-(?:text|sm|lg))?|navbar(?:-(?:brand|nav|toggler|collapse|expand(?:-[a-z]+)?))?|nav-(?:item|link|tabs|pills|underline)|list-group(?:-item)?|modal(?:-(?:dialog|content|header|body|footer|title))?|alert(?:-(?:primary|secondary|success|danger|warning|info|light|dark))?|dropdown(?:-(?:menu|item|toggle|divider))?|accordion(?:-(?:item|header|button|collapse|body))?|carousel(?:-(?:item|inner|control-prev|control-next))?|d-(?:none|block|inline|inline-block|flex|grid)|justify-content-(?:start|end|center|between|around|evenly)|align-items-(?:start|end|center|baseline|stretch)|align-self-(?:start|end|center|baseline|stretch)|rounded-(?:pill|circle)|text-bg-(?:primary|secondary|success|danger|warning|info|light|dark)|visually-hidden)$/.test(base);
|
|
2224
|
+
}
|
|
2215
2225
|
function bootstrapResponsivePrefixes(className) {
|
|
2216
2226
|
const match = className.match(/^(?:d|col|offset|order|m[stebxy]?|p[stebxy]?|gap|text|float|flex|justify-content|align-items|align-self)-((?:sm|md|lg|xl|xxl))-/);
|
|
2217
2227
|
return match ? [match[1]] : [];
|
|
@@ -2487,7 +2497,8 @@ function createStyleSystemEvidence(classes, declarations, styleContext) {
|
|
|
2487
2497
|
if (tailwindDeclarationsForClass(className, styleContext).length || isLikelyTailwindClass(className)) {
|
|
2488
2498
|
systems.add('tailwind');
|
|
2489
2499
|
}
|
|
2490
|
-
if (
|
|
2500
|
+
if ((styleContext?.detectedStyleSystems.includes('bootstrap') ?? true) &&
|
|
2501
|
+
(bootstrapDeclarationsForClass(className, styleContext).length || isBootstrapClass(className))) {
|
|
2491
2502
|
systems.add('bootstrap');
|
|
2492
2503
|
}
|
|
2493
2504
|
if (!systems.size) {
|