@getchomp/mcp 0.0.0-stage → 0.2.43
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/LICENSE +21 -0
- package/README.md +15 -2
- package/dist/conventionsReference.d.ts +84 -0
- package/dist/conventionsReference.js +313 -0
- package/dist/designSystem/astScanner.d.ts +153 -0
- package/dist/designSystem/astScanner.js +2014 -0
- package/dist/designSystem/baseline.d.ts +65 -0
- package/dist/designSystem/baseline.js +136 -0
- package/dist/designSystem/color.d.ts +35 -0
- package/dist/designSystem/color.js +265 -0
- package/dist/designSystem/config.d.ts +183 -0
- package/dist/designSystem/config.js +469 -0
- package/dist/designSystem/contrast.d.ts +55 -0
- package/dist/designSystem/contrast.js +377 -0
- package/dist/designSystem/cssParser.d.ts +63 -0
- package/dist/designSystem/cssParser.js +469 -0
- package/dist/designSystem/merges.d.ts +57 -0
- package/dist/designSystem/merges.js +94 -0
- package/dist/designSystem/preprocessors.d.ts +46 -0
- package/dist/designSystem/preprocessors.js +1108 -0
- package/dist/designSystem/presentation.d.ts +45 -0
- package/dist/designSystem/presentation.js +796 -0
- package/dist/designSystem/styleVectors.d.ts +27 -0
- package/dist/designSystem/styleVectors.js +484 -0
- package/dist/designSystem/tokens.d.ts +39 -0
- package/dist/designSystem/tokens.js +409 -0
- package/dist/designSystem/topology.d.ts +64 -0
- package/dist/designSystem/topology.js +254 -0
- package/dist/designSystem/types.d.ts +857 -0
- package/dist/designSystem/types.js +113 -0
- package/dist/designSystem/typography.d.ts +25 -0
- package/dist/designSystem/typography.js +244 -0
- package/dist/designSystem/uiShapes.d.ts +74 -0
- package/dist/designSystem/uiShapes.js +285 -0
- package/dist/designSystem/valueClusters.d.ts +76 -0
- package/dist/designSystem/valueClusters.js +281 -0
- package/dist/designSystemPlugin.d.ts +321 -0
- package/dist/designSystemPlugin.js +4730 -0
- package/dist/enrichNodesPlugin.d.ts +160 -0
- package/dist/enrichNodesPlugin.js +957 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +1298 -0
- package/dist/intelligence.d.ts +502 -0
- package/dist/intelligence.js +3058 -0
- package/dist/pluginRunner.d.ts +364 -0
- package/dist/pluginRunner.js +1096 -0
- package/dist/plugins/design-system/index.d.ts +14 -0
- package/dist/plugins/design-system/index.js +241 -0
- package/dist/plugins/enrich-nodes/index.d.ts +388 -0
- package/dist/plugins/enrich-nodes/index.js +697 -0
- package/dist/plugins/index.d.ts +15 -0
- package/dist/plugins/index.js +20 -0
- package/dist/plugins/local-shims/index.d.ts +121 -0
- package/dist/plugins/local-shims/index.js +237 -0
- package/dist/shimsPlugin.d.ts +134 -0
- package/dist/shimsPlugin.js +1392 -0
- package/package.json +39 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* packages/mcp/src/designSystem/presentation.ts
|
|
3
|
+
*
|
|
4
|
+
* Builds the Plugin Presentation Contract (`@getchomp/core` → `pluginPresentation.ts`) for the
|
|
5
|
+
* design-system plugin: what the HUD card and the package / component inspector sections show.
|
|
6
|
+
* The UI renders this generically; nothing here knows about React and nothing in the UI knows
|
|
7
|
+
* about design-system payload keys ([PAT-VIS-36], [PAT-DS-11]).
|
|
8
|
+
*
|
|
9
|
+
* Every number is traceable: findings carry counts, truncation is stated (`totalCount`),
|
|
10
|
+
* and "no evidence" is `null` / "n/a", never zero.
|
|
11
|
+
*/
|
|
12
|
+
import { type PluginPresentation } from "@getchomp/core";
|
|
13
|
+
import type { EntityOverlayInput } from "@getchomp/db";
|
|
14
|
+
import type { ComponentDesignProfile, DesignSystemAnalysisReport } from "./types.js";
|
|
15
|
+
import type { FindingRecord } from "./baseline.js";
|
|
16
|
+
export declare function buildPackagePresentation(report: DesignSystemAnalysisReport, shortKey: string, packageScore: {
|
|
17
|
+
score: number | null;
|
|
18
|
+
grade: string;
|
|
19
|
+
notes: string[];
|
|
20
|
+
}, pillars: {
|
|
21
|
+
tokenAdherence: number | null;
|
|
22
|
+
atomAdoption: number | null;
|
|
23
|
+
dryness: number | null;
|
|
24
|
+
encapsulation: number | null;
|
|
25
|
+
}, _baseline: {
|
|
26
|
+
path: string;
|
|
27
|
+
} | null, _records: FindingRecord[]): PluginPresentation;
|
|
28
|
+
export declare function buildComponentPresentation(profile: ComponentDesignProfile, report: DesignSystemAnalysisReport): PluginPresentation | null;
|
|
29
|
+
/**
|
|
30
|
+
* Attaches `payload.presentation` to the overlays produced by `analyzeRepositoryDesignSystem`.
|
|
31
|
+
* Package overlays get the rich package view; component overlays get their own findings.
|
|
32
|
+
*/
|
|
33
|
+
export declare function attachDesignSystemPresentations(report: DesignSystemAnalysisReport, overlays: EntityOverlayInput[], baseline: {
|
|
34
|
+
path: string;
|
|
35
|
+
} | null, records: FindingRecord[], measuresFor: (shortKey: string) => {
|
|
36
|
+
score: number | null;
|
|
37
|
+
grade: string;
|
|
38
|
+
notes: string[];
|
|
39
|
+
pillars: {
|
|
40
|
+
tokenAdherence: number | null;
|
|
41
|
+
atomAdoption: number | null;
|
|
42
|
+
dryness: number | null;
|
|
43
|
+
encapsulation: number | null;
|
|
44
|
+
};
|
|
45
|
+
}): void;
|