@master/css-mcp 2.0.0-rc.88 → 2.0.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 +47 -22
- package/dist/bin/index.js +4 -5
- package/dist/classes.js +153 -168
- package/dist/compare.js +99 -83
- package/dist/context.d.ts +5 -10
- package/dist/context.js +28 -10
- package/dist/design-system-schema.js +97 -0
- package/dist/directives.js +59 -109
- package/dist/document.js +2 -10
- package/dist/format.js +67 -56
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -3
- package/dist/internal/src/workspace.js +70 -0
- package/dist/language.js +27 -23
- package/dist/lint.js +86 -96
- package/dist/manifest-query.js +40 -100
- package/dist/manifest-summary.js +15 -35
- package/dist/output-schema.js +207 -0
- package/dist/preview-write-lock.js +90 -0
- package/dist/project-comparison-schema.js +59 -0
- package/dist/project.js +77 -18
- package/dist/result.js +67 -8
- package/dist/scan.js +93 -73
- package/dist/semantic-schema.js +286 -0
- package/dist/server.d.ts +10 -9
- package/dist/server.js +123 -111
- package/dist/setup.js +28 -29
- package/dist/source-schema.js +141 -0
- package/dist/suggest.js +22 -0
- package/dist/tooling-session.js +27 -0
- package/package.json +63 -73
- package/LICENSE +0 -21
- package/dist/classes.d.ts +0 -236
- package/dist/compare.d.ts +0 -70
- package/dist/contributor.d.ts +0 -149
- package/dist/contributor.js +0 -499
- package/dist/directives.d.ts +0 -132
- package/dist/document.d.ts +0 -24
- package/dist/format.d.ts +0 -56
- package/dist/language.d.ts +0 -24
- package/dist/lint.d.ts +0 -55
- package/dist/manifest-query.d.ts +0 -148
- package/dist/manifest-summary.d.ts +0 -47
- package/dist/project.d.ts +0 -31
- package/dist/result.d.ts +0 -8
- package/dist/scan.d.ts +0 -156
- package/dist/setup.d.ts +0 -67
package/dist/directives.d.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
//#region src/directives.d.ts
|
|
3
|
-
interface InspectDirectivesOptions {
|
|
4
|
-
content?: string;
|
|
5
|
-
filePath?: string;
|
|
6
|
-
entryPath?: string;
|
|
7
|
-
preserveNativeCSS?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare function inspectDirectives(context: MasterCSSMCPContext, options: InspectDirectivesOptions): Promise<{
|
|
10
|
-
manifest: {
|
|
11
|
-
settings: import("~/packages/engine/src").MasterCSSManifestSettings;
|
|
12
|
-
counts: {
|
|
13
|
-
variables: number;
|
|
14
|
-
variableNamespaces: number;
|
|
15
|
-
utilities: number;
|
|
16
|
-
variants: number;
|
|
17
|
-
conditions: number;
|
|
18
|
-
breakpointConditions: number;
|
|
19
|
-
containerConditions: number;
|
|
20
|
-
selectors: number;
|
|
21
|
-
animations: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
directives: {
|
|
25
|
-
manifestInput: {
|
|
26
|
-
keys: string[];
|
|
27
|
-
counts: {
|
|
28
|
-
settings: number;
|
|
29
|
-
variables: number;
|
|
30
|
-
utilities: number;
|
|
31
|
-
variants: number;
|
|
32
|
-
conditions: number;
|
|
33
|
-
selectors: number;
|
|
34
|
-
animations: number;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
classNames: string[];
|
|
38
|
-
nativeClassNames: string[];
|
|
39
|
-
styleDefinitions: number;
|
|
40
|
-
extractionPolicy: import("~/packages/schema/src/css-directives").CSSDirectiveExtractionPolicy;
|
|
41
|
-
};
|
|
42
|
-
css: {
|
|
43
|
-
bytes: number;
|
|
44
|
-
nativeBytes: number;
|
|
45
|
-
generatedBytes: number;
|
|
46
|
-
};
|
|
47
|
-
dependencies: string[];
|
|
48
|
-
warnings: string[];
|
|
49
|
-
version: number;
|
|
50
|
-
root: string;
|
|
51
|
-
status: string;
|
|
52
|
-
input: {
|
|
53
|
-
filePath: string;
|
|
54
|
-
name: string;
|
|
55
|
-
mode: string;
|
|
56
|
-
};
|
|
57
|
-
directiveEntries: {
|
|
58
|
-
name: import("@master/css-lexer").CSSDirectiveRangeName;
|
|
59
|
-
range: {
|
|
60
|
-
start: number;
|
|
61
|
-
end: number;
|
|
62
|
-
};
|
|
63
|
-
loc: {
|
|
64
|
-
start: import("vscode-languageserver-textdocument").Position;
|
|
65
|
-
end: import("vscode-languageserver-textdocument").Position;
|
|
66
|
-
};
|
|
67
|
-
prelude: string;
|
|
68
|
-
hasBlock: boolean;
|
|
69
|
-
quotedStrings: number;
|
|
70
|
-
}[];
|
|
71
|
-
diagnostics: {
|
|
72
|
-
code: string;
|
|
73
|
-
severity: 'warning';
|
|
74
|
-
message: string;
|
|
75
|
-
source: string;
|
|
76
|
-
sourceKind: string;
|
|
77
|
-
filePath: string;
|
|
78
|
-
}[];
|
|
79
|
-
summary: {
|
|
80
|
-
status: string;
|
|
81
|
-
directives: number;
|
|
82
|
-
classNames: number;
|
|
83
|
-
nativeClassNames: number;
|
|
84
|
-
dependencies: number;
|
|
85
|
-
warnings: number;
|
|
86
|
-
cssBytes: number;
|
|
87
|
-
errors?: undefined;
|
|
88
|
-
};
|
|
89
|
-
} | {
|
|
90
|
-
version: number;
|
|
91
|
-
root: string;
|
|
92
|
-
status: string;
|
|
93
|
-
input: {
|
|
94
|
-
name?: undefined;
|
|
95
|
-
filePath: string;
|
|
96
|
-
mode: string;
|
|
97
|
-
};
|
|
98
|
-
directiveEntries: {
|
|
99
|
-
name: import("@master/css-lexer").CSSDirectiveRangeName;
|
|
100
|
-
range: {
|
|
101
|
-
start: number;
|
|
102
|
-
end: number;
|
|
103
|
-
};
|
|
104
|
-
loc: {
|
|
105
|
-
start: import("vscode-languageserver-textdocument").Position;
|
|
106
|
-
end: import("vscode-languageserver-textdocument").Position;
|
|
107
|
-
};
|
|
108
|
-
prelude: string;
|
|
109
|
-
hasBlock: boolean;
|
|
110
|
-
quotedStrings: number;
|
|
111
|
-
}[];
|
|
112
|
-
diagnostics: {
|
|
113
|
-
code: string;
|
|
114
|
-
severity: 'error';
|
|
115
|
-
message: string;
|
|
116
|
-
source: string;
|
|
117
|
-
sourceKind: string;
|
|
118
|
-
filePath: string;
|
|
119
|
-
}[];
|
|
120
|
-
summary: {
|
|
121
|
-
status: string;
|
|
122
|
-
directives: number;
|
|
123
|
-
classNames: number;
|
|
124
|
-
nativeClassNames: number;
|
|
125
|
-
dependencies: number;
|
|
126
|
-
warnings: number;
|
|
127
|
-
errors: number;
|
|
128
|
-
cssBytes: number;
|
|
129
|
-
};
|
|
130
|
-
}>;
|
|
131
|
-
//#endregion
|
|
132
|
-
export { InspectDirectivesOptions, inspectDirectives };
|
package/dist/document.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
2
|
-
//#region src/document.d.ts
|
|
3
|
-
interface Position {
|
|
4
|
-
line: number;
|
|
5
|
-
character: number;
|
|
6
|
-
}
|
|
7
|
-
interface Range {
|
|
8
|
-
start: Position;
|
|
9
|
-
end: Position;
|
|
10
|
-
}
|
|
11
|
-
interface TextEdit {
|
|
12
|
-
range: Range;
|
|
13
|
-
newText: string;
|
|
14
|
-
}
|
|
15
|
-
declare const languageByExtension: Record<string, string>;
|
|
16
|
-
declare function getLanguageId(filePath: string): string;
|
|
17
|
-
declare function createMCPTextDocument(filePath: string, content: string): TextDocument;
|
|
18
|
-
declare function toOffsetRange(document: TextDocument, range?: Range): {
|
|
19
|
-
start: number;
|
|
20
|
-
end: number;
|
|
21
|
-
} | undefined;
|
|
22
|
-
declare function applyTextEdits(content: string, document: TextDocument, edits: TextEdit[]): string;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { Position, Range, TextEdit, applyTextEdits, createMCPTextDocument, getLanguageId, languageByExtension, toOffsetRange };
|
package/dist/format.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
import { Range, TextEdit } from "./document.js";
|
|
3
|
-
//#region src/format.d.ts
|
|
4
|
-
interface PreviewDirectiveFormatOptions {
|
|
5
|
-
content?: string;
|
|
6
|
-
filePath?: string;
|
|
7
|
-
patterns?: string[];
|
|
8
|
-
range?: Range;
|
|
9
|
-
ttlMs?: number;
|
|
10
|
-
}
|
|
11
|
-
declare function previewDirectiveFormat(context: MasterCSSMCPContext, options?: PreviewDirectiveFormatOptions): Promise<{
|
|
12
|
-
version: number;
|
|
13
|
-
root: string;
|
|
14
|
-
mode: string;
|
|
15
|
-
files: {
|
|
16
|
-
filePath: string;
|
|
17
|
-
languageId: string;
|
|
18
|
-
edits: TextEdit[];
|
|
19
|
-
changed: boolean;
|
|
20
|
-
beforeBytes: number;
|
|
21
|
-
afterBytes: number;
|
|
22
|
-
}[];
|
|
23
|
-
formatted: string;
|
|
24
|
-
summary: {
|
|
25
|
-
files: number;
|
|
26
|
-
changed: number;
|
|
27
|
-
edits: number;
|
|
28
|
-
};
|
|
29
|
-
inputs?: undefined;
|
|
30
|
-
preview?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
formatted?: undefined;
|
|
33
|
-
version: number;
|
|
34
|
-
root: string;
|
|
35
|
-
mode: string;
|
|
36
|
-
inputs: {
|
|
37
|
-
patterns: string[];
|
|
38
|
-
files: string[];
|
|
39
|
-
};
|
|
40
|
-
preview: import("./context.js").PreviewResult;
|
|
41
|
-
files: {
|
|
42
|
-
filePath: string;
|
|
43
|
-
languageId: string;
|
|
44
|
-
edits: TextEdit[];
|
|
45
|
-
changed: boolean;
|
|
46
|
-
beforeBytes: number;
|
|
47
|
-
afterBytes: number;
|
|
48
|
-
}[];
|
|
49
|
-
summary: {
|
|
50
|
-
files: number;
|
|
51
|
-
changed: number;
|
|
52
|
-
edits: number;
|
|
53
|
-
};
|
|
54
|
-
}>;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { PreviewDirectiveFormatOptions, previewDirectiveFormat };
|
package/dist/language.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
//#region src/language.d.ts
|
|
3
|
-
interface SuggestSyntaxOptions {
|
|
4
|
-
content: string;
|
|
5
|
-
filePath: string;
|
|
6
|
-
position: {
|
|
7
|
-
line: number;
|
|
8
|
-
character: number;
|
|
9
|
-
};
|
|
10
|
-
triggerCharacter?: string;
|
|
11
|
-
limit?: number;
|
|
12
|
-
}
|
|
13
|
-
declare function suggestSyntax(context: MasterCSSMCPContext, options: SuggestSyntaxOptions): Promise<{
|
|
14
|
-
manifest: {
|
|
15
|
-
status: "error" | "loaded";
|
|
16
|
-
entries: string[];
|
|
17
|
-
error?: string | undefined;
|
|
18
|
-
};
|
|
19
|
-
completions: import("vscode-languageserver-protocol").CompletionItem[];
|
|
20
|
-
total: number;
|
|
21
|
-
hover: import("vscode-languageserver-protocol").Hover | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { SuggestSyntaxOptions, suggestSyntax };
|
package/dist/lint.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { MasterCSSLintFileResult, MasterCSSLintSourceDiagnostic } from "@master/css-lint";
|
|
2
|
-
import MasterCSSMCPContext from "./context.js";
|
|
3
|
-
//#region src/lint.d.ts
|
|
4
|
-
interface LintProjectOptions {
|
|
5
|
-
patterns?: string[];
|
|
6
|
-
rules?: string;
|
|
7
|
-
}
|
|
8
|
-
interface LintContentOptions {
|
|
9
|
-
content: string;
|
|
10
|
-
filePath: string;
|
|
11
|
-
rules?: string;
|
|
12
|
-
}
|
|
13
|
-
interface PreviewFixesOptions extends LintProjectOptions {
|
|
14
|
-
includeDirectiveFixes?: boolean;
|
|
15
|
-
ttlMs?: number;
|
|
16
|
-
}
|
|
17
|
-
declare function lintProject(context: MasterCSSMCPContext, options?: LintProjectOptions): Promise<{
|
|
18
|
-
version: number;
|
|
19
|
-
root: string;
|
|
20
|
-
manifest: {
|
|
21
|
-
status: "error" | "loaded";
|
|
22
|
-
entries: string[];
|
|
23
|
-
diagnostics: MasterCSSLintSourceDiagnostic[];
|
|
24
|
-
};
|
|
25
|
-
files: MasterCSSLintFileResult[];
|
|
26
|
-
summary: import("@master/css-lint").MasterCSSLintSummary;
|
|
27
|
-
}>;
|
|
28
|
-
declare function lintContent(context: MasterCSSMCPContext, options: LintContentOptions): Promise<{
|
|
29
|
-
version: number;
|
|
30
|
-
root: string;
|
|
31
|
-
manifest: {
|
|
32
|
-
status: "error" | "loaded";
|
|
33
|
-
entries: string[];
|
|
34
|
-
diagnostics: MasterCSSLintSourceDiagnostic[];
|
|
35
|
-
};
|
|
36
|
-
files: MasterCSSLintFileResult[];
|
|
37
|
-
summary: import("@master/css-lint").MasterCSSLintSummary;
|
|
38
|
-
}>;
|
|
39
|
-
declare function previewLintFixes(context: MasterCSSMCPContext, options?: PreviewFixesOptions): Promise<{
|
|
40
|
-
mode: string;
|
|
41
|
-
preview: import("./context.js").PreviewResult;
|
|
42
|
-
lint: {
|
|
43
|
-
version: number;
|
|
44
|
-
root: string;
|
|
45
|
-
manifest: {
|
|
46
|
-
status: "error" | "loaded";
|
|
47
|
-
entries: string[];
|
|
48
|
-
diagnostics: MasterCSSLintSourceDiagnostic[];
|
|
49
|
-
};
|
|
50
|
-
files: MasterCSSLintFileResult[];
|
|
51
|
-
summary: import("@master/css-lint").MasterCSSLintSummary;
|
|
52
|
-
};
|
|
53
|
-
}>;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { LintContentOptions, LintProjectOptions, PreviewFixesOptions, lintContent, lintProject, previewLintFixes };
|
package/dist/manifest-query.d.ts
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
//#region src/manifest-query.d.ts
|
|
3
|
-
type ManifestQueryKind = 'all' | 'token' | 'utility' | 'variant' | 'mode' | 'condition' | 'alias';
|
|
4
|
-
interface ManifestQueryOptions {
|
|
5
|
-
query?: string;
|
|
6
|
-
kind?: ManifestQueryKind;
|
|
7
|
-
namespace?: string;
|
|
8
|
-
limit?: number;
|
|
9
|
-
}
|
|
10
|
-
declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQueryOptions): Promise<{
|
|
11
|
-
version: number;
|
|
12
|
-
root: string;
|
|
13
|
-
manifest: {
|
|
14
|
-
status: "error";
|
|
15
|
-
entries: string[];
|
|
16
|
-
error: string;
|
|
17
|
-
summary?: undefined;
|
|
18
|
-
};
|
|
19
|
-
inputs: {
|
|
20
|
-
query: string | undefined;
|
|
21
|
-
kind: ManifestQueryKind;
|
|
22
|
-
namespace: string | undefined;
|
|
23
|
-
limit: number;
|
|
24
|
-
};
|
|
25
|
-
results: {
|
|
26
|
-
tokens: never[];
|
|
27
|
-
utilities: never[];
|
|
28
|
-
variants: never[];
|
|
29
|
-
modes: never[];
|
|
30
|
-
conditions: never[];
|
|
31
|
-
aliases: never[];
|
|
32
|
-
};
|
|
33
|
-
diagnostics: {
|
|
34
|
-
code: string;
|
|
35
|
-
severity: 'error';
|
|
36
|
-
message: string;
|
|
37
|
-
source: string;
|
|
38
|
-
sourceKind: string;
|
|
39
|
-
}[];
|
|
40
|
-
summary: {
|
|
41
|
-
total: number;
|
|
42
|
-
returned: number;
|
|
43
|
-
status: string;
|
|
44
|
-
tokens?: undefined;
|
|
45
|
-
utilities?: undefined;
|
|
46
|
-
variants?: undefined;
|
|
47
|
-
modes?: undefined;
|
|
48
|
-
conditions?: undefined;
|
|
49
|
-
aliases?: undefined;
|
|
50
|
-
};
|
|
51
|
-
} | {
|
|
52
|
-
diagnostics?: undefined;
|
|
53
|
-
version: number;
|
|
54
|
-
root: string;
|
|
55
|
-
manifest: {
|
|
56
|
-
error?: undefined;
|
|
57
|
-
status: "loaded";
|
|
58
|
-
entries: string[];
|
|
59
|
-
summary: {
|
|
60
|
-
settings: import("@master/css-engine").MasterCSSManifestSettings;
|
|
61
|
-
counts: {
|
|
62
|
-
variables: number;
|
|
63
|
-
variableNamespaces: number;
|
|
64
|
-
utilities: number;
|
|
65
|
-
variants: number;
|
|
66
|
-
conditions: number;
|
|
67
|
-
breakpointConditions: number;
|
|
68
|
-
containerConditions: number;
|
|
69
|
-
selectors: number;
|
|
70
|
-
animations: number;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
inputs: {
|
|
75
|
-
query: string | undefined;
|
|
76
|
-
kind: ManifestQueryKind;
|
|
77
|
-
namespace: string | undefined;
|
|
78
|
-
limit: number;
|
|
79
|
-
};
|
|
80
|
-
results: {
|
|
81
|
-
tokens: {
|
|
82
|
-
name: string;
|
|
83
|
-
key: string;
|
|
84
|
-
namespace: string;
|
|
85
|
-
type: "number" | "string";
|
|
86
|
-
value: import("@master/css-engine").MasterCSSManifestVariableValue | undefined;
|
|
87
|
-
numeric?: import("@master/css-engine").MasterCSSManifestVariableNumericValue | undefined;
|
|
88
|
-
modes?: string[] | undefined;
|
|
89
|
-
inline?: boolean | undefined;
|
|
90
|
-
static?: boolean | undefined;
|
|
91
|
-
}[];
|
|
92
|
-
utilities: {
|
|
93
|
-
id: string;
|
|
94
|
-
name?: string | undefined;
|
|
95
|
-
key?: string | undefined;
|
|
96
|
-
subkey?: string | undefined;
|
|
97
|
-
keys?: string[] | undefined;
|
|
98
|
-
namespaces?: string[] | undefined;
|
|
99
|
-
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName | undefined;
|
|
100
|
-
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
101
|
-
emitType: "declarations" | "property" | "static" | "template";
|
|
102
|
-
aliasGroups?: string[] | undefined;
|
|
103
|
-
variableAliasRefs?: string[] | undefined;
|
|
104
|
-
}[];
|
|
105
|
-
variants: {
|
|
106
|
-
token: import("@master/css-engine").MasterCSSManifestVariantToken;
|
|
107
|
-
branches: number;
|
|
108
|
-
layers: (import("@master/css-engine").MasterCSSManifestUtilityLayerName | undefined)[];
|
|
109
|
-
}[];
|
|
110
|
-
modes: {
|
|
111
|
-
name: string;
|
|
112
|
-
default: boolean;
|
|
113
|
-
trigger: import("@master/css-engine").MasterCSSManifestModeTrigger | undefined;
|
|
114
|
-
}[];
|
|
115
|
-
conditions: {
|
|
116
|
-
name: string;
|
|
117
|
-
id: import("@master/css-engine").MasterCSSManifestConditionIdentifier;
|
|
118
|
-
nodes: number;
|
|
119
|
-
}[];
|
|
120
|
-
aliases: ({
|
|
121
|
-
utility: string;
|
|
122
|
-
key: string;
|
|
123
|
-
name: string;
|
|
124
|
-
type: 'variable-alias';
|
|
125
|
-
} | {
|
|
126
|
-
utility: string;
|
|
127
|
-
ref: string;
|
|
128
|
-
type: 'variable-alias-ref';
|
|
129
|
-
} | {
|
|
130
|
-
utility: string;
|
|
131
|
-
group: string;
|
|
132
|
-
type: 'alias-group';
|
|
133
|
-
})[];
|
|
134
|
-
};
|
|
135
|
-
summary: {
|
|
136
|
-
total: number;
|
|
137
|
-
returned: number;
|
|
138
|
-
tokens: number;
|
|
139
|
-
utilities: number;
|
|
140
|
-
variants: number;
|
|
141
|
-
modes: number;
|
|
142
|
-
conditions: number;
|
|
143
|
-
aliases: number;
|
|
144
|
-
status: string;
|
|
145
|
-
};
|
|
146
|
-
}>;
|
|
147
|
-
//#endregion
|
|
148
|
-
export { ManifestQueryKind, ManifestQueryOptions, queryManifest };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { MasterCSSManifest, MasterCSSManifestConditions, MasterCSSManifestUtility, MasterCSSManifestVariableEntry } from "@master/css-engine";
|
|
2
|
-
//#region src/manifest-summary.d.ts
|
|
3
|
-
declare function summarizeManifest(manifest: MasterCSSManifest): {
|
|
4
|
-
settings: import("@master/css-engine").MasterCSSManifestSettings;
|
|
5
|
-
counts: {
|
|
6
|
-
variables: number;
|
|
7
|
-
variableNamespaces: number;
|
|
8
|
-
utilities: number;
|
|
9
|
-
variants: number;
|
|
10
|
-
conditions: number;
|
|
11
|
-
breakpointConditions: number;
|
|
12
|
-
containerConditions: number;
|
|
13
|
-
selectors: number;
|
|
14
|
-
animations: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
declare function compactVariable(variable: MasterCSSManifestVariableEntry): {
|
|
18
|
-
name: string;
|
|
19
|
-
key: string;
|
|
20
|
-
namespace: string;
|
|
21
|
-
type: "number" | "string";
|
|
22
|
-
value: import("@master/css-engine").MasterCSSManifestVariableValue | undefined;
|
|
23
|
-
numeric?: import("@master/css-engine").MasterCSSManifestVariableNumericValue | undefined;
|
|
24
|
-
modes?: string[] | undefined;
|
|
25
|
-
inline?: boolean | undefined;
|
|
26
|
-
static?: boolean | undefined;
|
|
27
|
-
};
|
|
28
|
-
declare function compactUtility(utility: MasterCSSManifestUtility): {
|
|
29
|
-
id: string;
|
|
30
|
-
name?: string | undefined;
|
|
31
|
-
key?: string | undefined;
|
|
32
|
-
subkey?: string | undefined;
|
|
33
|
-
keys?: string[] | undefined;
|
|
34
|
-
namespaces?: string[] | undefined;
|
|
35
|
-
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName | undefined;
|
|
36
|
-
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
37
|
-
emitType: "declarations" | "property" | "static" | "template";
|
|
38
|
-
aliasGroups?: string[] | undefined;
|
|
39
|
-
variableAliasRefs?: string[] | undefined;
|
|
40
|
-
};
|
|
41
|
-
declare function compactConditions(conditions: MasterCSSManifestConditions | undefined): {
|
|
42
|
-
name: string;
|
|
43
|
-
id: import("@master/css-engine").MasterCSSManifestConditionIdentifier;
|
|
44
|
-
nodes: number;
|
|
45
|
-
}[];
|
|
46
|
-
//#endregion
|
|
47
|
-
export { compactConditions, compactUtility, compactVariable, summarizeManifest };
|
package/dist/project.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
//#region src/project.d.ts
|
|
3
|
-
declare function loadWorkspaceManifest(context: MasterCSSMCPContext): Promise<{
|
|
4
|
-
status: 'loaded';
|
|
5
|
-
manifest: import("~/packages/engine/src").MasterCSSManifest;
|
|
6
|
-
entries: string[];
|
|
7
|
-
dependencies: string[];
|
|
8
|
-
warnings: string[];
|
|
9
|
-
error?: undefined;
|
|
10
|
-
} | {
|
|
11
|
-
manifest?: undefined;
|
|
12
|
-
status: 'error';
|
|
13
|
-
entries: string[];
|
|
14
|
-
dependencies: string[];
|
|
15
|
-
warnings: string[];
|
|
16
|
-
error: string;
|
|
17
|
-
}>;
|
|
18
|
-
declare function getWorkspaceInfo(context: MasterCSSMCPContext): Promise<{
|
|
19
|
-
root: string;
|
|
20
|
-
roots: string[];
|
|
21
|
-
packages: import("@master/css-project/workspace").MasterCSSWorkspacePackageResolution;
|
|
22
|
-
manifest: {
|
|
23
|
-
status: "error" | "loaded";
|
|
24
|
-
entries: string[];
|
|
25
|
-
dependencies: string[];
|
|
26
|
-
warnings: string[];
|
|
27
|
-
error?: string | undefined;
|
|
28
|
-
};
|
|
29
|
-
}>;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { getWorkspaceInfo, loadWorkspaceManifest };
|
package/dist/result.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CallToolResult, ReadResourceResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
//#region src/result.d.ts
|
|
3
|
-
declare function toJSONText(value: unknown): string;
|
|
4
|
-
declare function jsonToolResult(value: unknown): CallToolResult;
|
|
5
|
-
declare function jsonResourceResult(uri: URL | string, value: unknown): ReadResourceResult;
|
|
6
|
-
declare function getErrorMessage(error: unknown): string;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { getErrorMessage, jsonResourceResult, jsonToolResult, toJSONText };
|
package/dist/scan.d.ts
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
//#region src/scan.d.ts
|
|
3
|
-
interface ScanProjectOptions {
|
|
4
|
-
patterns?: string[];
|
|
5
|
-
classes?: string[];
|
|
6
|
-
includeCss?: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface RenderCSSOptions {
|
|
9
|
-
html?: string;
|
|
10
|
-
classList?: string;
|
|
11
|
-
}
|
|
12
|
-
interface InspectClassOptions {
|
|
13
|
-
className: string;
|
|
14
|
-
mode?: string;
|
|
15
|
-
}
|
|
16
|
-
declare function resolveSourceFiles(context: MasterCSSMCPContext, patterns?: string[], ignore?: string[]): Promise<string[]>;
|
|
17
|
-
declare function scanProject(context: MasterCSSMCPContext, options?: ScanProjectOptions): Promise<{
|
|
18
|
-
version: typeof import("@master/css-diagnostics").MASTER_CSS_INSPECTION_REPORT_VERSION;
|
|
19
|
-
cwd: string;
|
|
20
|
-
inputs: {
|
|
21
|
-
patterns: string[];
|
|
22
|
-
files: string[];
|
|
23
|
-
classes: string[];
|
|
24
|
-
};
|
|
25
|
-
scanner: {
|
|
26
|
-
counts: {
|
|
27
|
-
latent: number;
|
|
28
|
-
valid: number;
|
|
29
|
-
invalid: number;
|
|
30
|
-
native: number;
|
|
31
|
-
usedNative: number;
|
|
32
|
-
safelist: number;
|
|
33
|
-
blocklist: number;
|
|
34
|
-
};
|
|
35
|
-
classes: {
|
|
36
|
-
latent: string[];
|
|
37
|
-
valid: string[];
|
|
38
|
-
invalid: string[];
|
|
39
|
-
native: string[];
|
|
40
|
-
usedNative: string[];
|
|
41
|
-
safelist: string[];
|
|
42
|
-
blocklist: string[];
|
|
43
|
-
};
|
|
44
|
-
resetDependencies: string[];
|
|
45
|
-
};
|
|
46
|
-
stylesheets: {
|
|
47
|
-
entries: import("@master/css-diagnostics").MasterCSSStylesheetInspection[];
|
|
48
|
-
dependencies: string[];
|
|
49
|
-
warnings: string[];
|
|
50
|
-
errors: import("@master/css-diagnostics").MasterCSSStylesheetError[];
|
|
51
|
-
};
|
|
52
|
-
css: {
|
|
53
|
-
bytes: number;
|
|
54
|
-
included: boolean;
|
|
55
|
-
text?: string;
|
|
56
|
-
emittedGlobals: {
|
|
57
|
-
variables: number;
|
|
58
|
-
animations: number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
missingCSS: {
|
|
62
|
-
checked: string[];
|
|
63
|
-
present: import("@master/css-diagnostics").MasterCSSMissingCSSResult[];
|
|
64
|
-
missing: import("@master/css-diagnostics").MasterCSSMissingCSSResult[];
|
|
65
|
-
};
|
|
66
|
-
files: import("@master/css-diagnostics").MasterCSSSourceInspection[];
|
|
67
|
-
diagnostics: import("@master/css-diagnostics").MasterCSSInspectionDiagnostic[];
|
|
68
|
-
summary: {
|
|
69
|
-
files: number;
|
|
70
|
-
stylesheets: number;
|
|
71
|
-
diagnostics: number;
|
|
72
|
-
errors: number;
|
|
73
|
-
warnings: number;
|
|
74
|
-
missingCSS: number;
|
|
75
|
-
invalidClasses: number;
|
|
76
|
-
};
|
|
77
|
-
root: string;
|
|
78
|
-
manifest: {
|
|
79
|
-
status: "error" | "loaded";
|
|
80
|
-
entries: string[];
|
|
81
|
-
dependencies: string[];
|
|
82
|
-
warnings: string[];
|
|
83
|
-
error?: string | undefined;
|
|
84
|
-
};
|
|
85
|
-
}>;
|
|
86
|
-
declare function renderCSS(context: MasterCSSMCPContext, options: RenderCSSOptions): Promise<{
|
|
87
|
-
manifest: {
|
|
88
|
-
status: "error" | "loaded";
|
|
89
|
-
entries: string[];
|
|
90
|
-
error?: string | undefined;
|
|
91
|
-
};
|
|
92
|
-
classes: string[];
|
|
93
|
-
invalid: string[];
|
|
94
|
-
css: {
|
|
95
|
-
bytes: number;
|
|
96
|
-
text: string;
|
|
97
|
-
};
|
|
98
|
-
}>;
|
|
99
|
-
declare function inspectClass(context: MasterCSSMCPContext, options: InspectClassOptions): Promise<{
|
|
100
|
-
manifest: {
|
|
101
|
-
status: "error" | "loaded";
|
|
102
|
-
entries: string[];
|
|
103
|
-
error?: string | undefined;
|
|
104
|
-
};
|
|
105
|
-
className: string;
|
|
106
|
-
mode: string | undefined;
|
|
107
|
-
valid: boolean;
|
|
108
|
-
base: string;
|
|
109
|
-
suffix: string;
|
|
110
|
-
key: string | undefined;
|
|
111
|
-
value: string | undefined;
|
|
112
|
-
keyToken: string | undefined;
|
|
113
|
-
valueToken: string | undefined;
|
|
114
|
-
stateToken: string | undefined;
|
|
115
|
-
important: boolean | undefined;
|
|
116
|
-
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
117
|
-
variables: {
|
|
118
|
-
key: string;
|
|
119
|
-
variable: import("~/packages/language/src").Variable;
|
|
120
|
-
}[];
|
|
121
|
-
rules: {
|
|
122
|
-
className: string;
|
|
123
|
-
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName;
|
|
124
|
-
type: import("~/packages/language/src").UtilityType;
|
|
125
|
-
text: string;
|
|
126
|
-
}[];
|
|
127
|
-
css: string;
|
|
128
|
-
}>;
|
|
129
|
-
declare function previewGeneratedCSS(context: MasterCSSMCPContext, options: ScanProjectOptions & {
|
|
130
|
-
outputPath: string;
|
|
131
|
-
ttlMs?: number;
|
|
132
|
-
}): Promise<{
|
|
133
|
-
mode: string;
|
|
134
|
-
outputPath: string;
|
|
135
|
-
preview: import("./context.js").PreviewResult;
|
|
136
|
-
scan: {
|
|
137
|
-
summary: {
|
|
138
|
-
files: number;
|
|
139
|
-
stylesheets: number;
|
|
140
|
-
diagnostics: number;
|
|
141
|
-
errors: number;
|
|
142
|
-
warnings: number;
|
|
143
|
-
missingCSS: number;
|
|
144
|
-
invalidClasses: number;
|
|
145
|
-
};
|
|
146
|
-
css: {
|
|
147
|
-
bytes: number;
|
|
148
|
-
emittedGlobals: {
|
|
149
|
-
variables: number;
|
|
150
|
-
animations: number;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
}>;
|
|
155
|
-
//#endregion
|
|
156
|
-
export { InspectClassOptions, RenderCSSOptions, ScanProjectOptions, inspectClass, previewGeneratedCSS, renderCSS, resolveSourceFiles, scanProject };
|