@master/css-mcp 2.0.0-rc.85 → 2.0.0-rc.86
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 +1 -1
- package/dist/classes.d.ts +23 -24
- package/dist/compare.d.ts +2 -3
- package/dist/contributor.d.ts +20 -21
- package/dist/directives.d.ts +26 -27
- package/dist/directives.js +1 -1
- package/dist/document.d.ts +0 -1
- package/dist/format.d.ts +1 -2
- package/dist/format.js +2 -1
- package/dist/language.d.ts +2 -3
- package/dist/lint.d.ts +3 -4
- package/dist/manifest-query.d.ts +30 -31
- package/dist/manifest-query.js +9 -9
- package/dist/manifest-summary.d.ts +22 -23
- package/dist/manifest-summary.js +6 -6
- package/dist/project.d.ts +6 -7
- package/dist/result.d.ts +0 -1
- package/dist/scan.d.ts +15 -16
- package/dist/server.d.ts +0 -1
- package/dist/server.js +2 -2
- package/dist/setup.d.ts +5 -6
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Use an absolute `--root` path so the server resolves the intended workspace.
|
|
|
43
43
|
| `mastercss_inspect_directives` | Inspect CSS-first directives and report manifest, dependency, warning, and CSS effects. |
|
|
44
44
|
| `mastercss_render_css` | Generate CSS from HTML or a class list. |
|
|
45
45
|
| `mastercss_scan_project` | Scan sources, check optional classes, and report scanner state, stylesheet entries, generated CSS metadata, and missing CSS diagnostics. |
|
|
46
|
-
| `mastercss_manifest_query` | Query active manifest tokens, utilities, variants, modes,
|
|
46
|
+
| `mastercss_manifest_query` | Query active manifest tokens, utilities, variants, modes, conditions, and aliases. |
|
|
47
47
|
| `mastercss_css_compare` | Compare generated CSS for before/after class lists, HTML fragments, or source buffers. |
|
|
48
48
|
| `mastercss_lint_project` | Run class-list diagnostics for workspace files without writing files. |
|
|
49
49
|
| `mastercss_lint_content` | Run class-list diagnostics on an in-memory source buffer without writing files. |
|
package/dist/classes.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/classes.d.ts
|
|
4
3
|
interface ExtractClassesOptions {
|
|
5
4
|
content?: string;
|
|
@@ -17,9 +16,9 @@ declare function extractClasses(context: MasterCSSMCPContext, options?: ExtractC
|
|
|
17
16
|
version: number;
|
|
18
17
|
root: string;
|
|
19
18
|
manifest: {
|
|
20
|
-
error
|
|
21
|
-
status: "loaded" | "error";
|
|
19
|
+
status: "error" | "loaded";
|
|
22
20
|
entries: string[];
|
|
21
|
+
error?: string | undefined;
|
|
23
22
|
};
|
|
24
23
|
inputs: {
|
|
25
24
|
mode: string;
|
|
@@ -58,15 +57,15 @@ declare function extractClasses(context: MasterCSSMCPContext, options?: ExtractC
|
|
|
58
57
|
valueToken: string | undefined;
|
|
59
58
|
stateToken: string | undefined;
|
|
60
59
|
important: boolean | undefined;
|
|
61
|
-
matcherTypes: ("
|
|
60
|
+
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
62
61
|
variables: {
|
|
63
62
|
key: string;
|
|
64
|
-
variable: import("
|
|
63
|
+
variable: import("~/packages/language/src").Variable;
|
|
65
64
|
}[];
|
|
66
65
|
rules: {
|
|
67
66
|
className: string;
|
|
68
67
|
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName;
|
|
69
|
-
type: import("
|
|
68
|
+
type: import("~/packages/language/src").UtilityType;
|
|
70
69
|
}[];
|
|
71
70
|
};
|
|
72
71
|
}[];
|
|
@@ -84,15 +83,15 @@ declare function extractClasses(context: MasterCSSMCPContext, options?: ExtractC
|
|
|
84
83
|
version: number;
|
|
85
84
|
root: string;
|
|
86
85
|
manifest: {
|
|
87
|
-
error
|
|
88
|
-
status: "loaded" | "error";
|
|
86
|
+
status: "error" | "loaded";
|
|
89
87
|
entries: string[];
|
|
88
|
+
error?: string | undefined;
|
|
90
89
|
};
|
|
91
90
|
inputs: {
|
|
91
|
+
filePath?: undefined;
|
|
92
92
|
mode: string;
|
|
93
93
|
patterns: string[];
|
|
94
94
|
files: string[];
|
|
95
|
-
filePath?: undefined;
|
|
96
95
|
};
|
|
97
96
|
files: {
|
|
98
97
|
filePath: string;
|
|
@@ -125,15 +124,15 @@ declare function extractClasses(context: MasterCSSMCPContext, options?: ExtractC
|
|
|
125
124
|
valueToken: string | undefined;
|
|
126
125
|
stateToken: string | undefined;
|
|
127
126
|
important: boolean | undefined;
|
|
128
|
-
matcherTypes: ("
|
|
127
|
+
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
129
128
|
variables: {
|
|
130
129
|
key: string;
|
|
131
|
-
variable: import("
|
|
130
|
+
variable: import("~/packages/language/src").Variable;
|
|
132
131
|
}[];
|
|
133
132
|
rules: {
|
|
134
133
|
className: string;
|
|
135
134
|
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName;
|
|
136
|
-
type: import("
|
|
135
|
+
type: import("~/packages/language/src").UtilityType;
|
|
137
136
|
}[];
|
|
138
137
|
};
|
|
139
138
|
}[];
|
|
@@ -149,7 +148,7 @@ declare function extractClasses(context: MasterCSSMCPContext, options?: ExtractC
|
|
|
149
148
|
blocklist: number;
|
|
150
149
|
};
|
|
151
150
|
};
|
|
152
|
-
diagnostics: import("
|
|
151
|
+
diagnostics: import("~/packages/diagnostics/src").MasterCSSInspectionDiagnostic[];
|
|
153
152
|
summary: {
|
|
154
153
|
files: number;
|
|
155
154
|
classes: number;
|
|
@@ -162,9 +161,9 @@ declare function traceClass(context: MasterCSSMCPContext, options: TraceClassOpt
|
|
|
162
161
|
version: number;
|
|
163
162
|
root: string;
|
|
164
163
|
manifest: {
|
|
165
|
-
error
|
|
166
|
-
status: "loaded" | "error";
|
|
164
|
+
status: "error" | "loaded";
|
|
167
165
|
entries: string[];
|
|
166
|
+
error?: string | undefined;
|
|
168
167
|
};
|
|
169
168
|
inputs: {
|
|
170
169
|
className: string;
|
|
@@ -172,8 +171,8 @@ declare function traceClass(context: MasterCSSMCPContext, options: TraceClassOpt
|
|
|
172
171
|
mode: string | undefined;
|
|
173
172
|
};
|
|
174
173
|
className: string;
|
|
175
|
-
status: "
|
|
176
|
-
reason: "
|
|
174
|
+
status: "missing" | "present";
|
|
175
|
+
reason: "blocklisted" | "generated" | "invalid" | "native-css" | "not-detected" | "safelist";
|
|
177
176
|
detected: boolean;
|
|
178
177
|
occurrences: {
|
|
179
178
|
filePath: string;
|
|
@@ -190,15 +189,15 @@ declare function traceClass(context: MasterCSSMCPContext, options: TraceClassOpt
|
|
|
190
189
|
valueToken: string | undefined;
|
|
191
190
|
stateToken: string | undefined;
|
|
192
191
|
important: boolean | undefined;
|
|
193
|
-
matcherTypes: ("
|
|
192
|
+
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
194
193
|
variables: {
|
|
195
194
|
key: string;
|
|
196
|
-
variable: import("
|
|
195
|
+
variable: import("~/packages/language/src").Variable;
|
|
197
196
|
}[];
|
|
198
197
|
rules: {
|
|
199
198
|
className: string;
|
|
200
199
|
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName;
|
|
201
|
-
type: import("
|
|
200
|
+
type: import("~/packages/language/src").UtilityType;
|
|
202
201
|
}[];
|
|
203
202
|
};
|
|
204
203
|
scanner: {
|
|
@@ -215,18 +214,18 @@ declare function traceClass(context: MasterCSSMCPContext, options: TraceClassOpt
|
|
|
215
214
|
blocklist: boolean;
|
|
216
215
|
};
|
|
217
216
|
css: {
|
|
218
|
-
text?: string | undefined;
|
|
219
217
|
included: boolean;
|
|
220
218
|
bytes: number;
|
|
221
219
|
emittedGlobals: {
|
|
222
220
|
variables: number;
|
|
223
221
|
animations: number;
|
|
224
222
|
};
|
|
223
|
+
text?: string | undefined;
|
|
225
224
|
};
|
|
226
|
-
diagnostics: import("
|
|
225
|
+
diagnostics: import("~/packages/diagnostics/src").MasterCSSInspectionDiagnostic[];
|
|
227
226
|
summary: {
|
|
228
|
-
status: "
|
|
229
|
-
reason: "
|
|
227
|
+
status: "missing" | "present";
|
|
228
|
+
reason: "blocklisted" | "generated" | "invalid" | "native-css" | "not-detected" | "safelist";
|
|
230
229
|
detected: boolean;
|
|
231
230
|
valid: boolean;
|
|
232
231
|
rules: number;
|
package/dist/compare.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/compare.d.ts
|
|
4
3
|
interface CompareCSSOptions {
|
|
5
4
|
beforeClassList?: string;
|
|
@@ -14,9 +13,9 @@ declare function compareCSS(context: MasterCSSMCPContext, options: CompareCSSOpt
|
|
|
14
13
|
version: number;
|
|
15
14
|
root: string;
|
|
16
15
|
manifest: {
|
|
17
|
-
error
|
|
18
|
-
status: "loaded" | "error";
|
|
16
|
+
status: "error" | "loaded";
|
|
19
17
|
entries: string[];
|
|
18
|
+
error?: string | undefined;
|
|
20
19
|
};
|
|
21
20
|
inputs: {
|
|
22
21
|
filePath: string;
|
package/dist/contributor.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/contributor.d.ts
|
|
4
3
|
interface ContributorInput {
|
|
5
4
|
paths?: string[];
|
|
@@ -28,31 +27,36 @@ interface Risk {
|
|
|
28
27
|
paths: string[];
|
|
29
28
|
}
|
|
30
29
|
declare function getPackageGraph(context: MasterCSSMCPContext, input?: PackageGraphInput): Promise<{
|
|
30
|
+
status: "limited" | "loaded";
|
|
31
|
+
reason: string;
|
|
32
|
+
version: number;
|
|
33
|
+
audience: string;
|
|
34
|
+
root: string;
|
|
31
35
|
packages: WorkspacePackage[];
|
|
32
36
|
summary: {
|
|
33
37
|
packages: number;
|
|
34
38
|
workspacePackages: number;
|
|
35
39
|
examples: number;
|
|
36
40
|
};
|
|
37
|
-
|
|
41
|
+
}>;
|
|
42
|
+
declare function getRepoContext(context: MasterCSSMCPContext, input?: ContributorInput): Promise<{
|
|
43
|
+
status: "limited" | "loaded";
|
|
38
44
|
reason: string;
|
|
39
45
|
version: number;
|
|
40
46
|
audience: string;
|
|
41
47
|
root: string;
|
|
42
|
-
}>;
|
|
43
|
-
declare function getRepoContext(context: MasterCSSMCPContext, input?: ContributorInput): Promise<{
|
|
44
48
|
inputs: {
|
|
45
49
|
task: string | null;
|
|
46
50
|
paths: string[];
|
|
47
51
|
hasDiff: boolean;
|
|
48
52
|
};
|
|
49
53
|
affectedPackages: {
|
|
50
|
-
matchedPaths: string[];
|
|
51
54
|
name: string;
|
|
52
55
|
path: string;
|
|
53
|
-
kind: WorkspacePackage[
|
|
56
|
+
kind: WorkspacePackage['kind'] | 'agent-docs' | 'repo-root';
|
|
54
57
|
packageJSON?: string;
|
|
55
58
|
aiNotes?: string | null;
|
|
59
|
+
matchedPaths: string[];
|
|
56
60
|
}[];
|
|
57
61
|
context: {
|
|
58
62
|
files: string[];
|
|
@@ -65,29 +69,24 @@ declare function getRepoContext(context: MasterCSSMCPContext, input?: Contributo
|
|
|
65
69
|
reason: string;
|
|
66
70
|
}[];
|
|
67
71
|
};
|
|
68
|
-
status: "loaded" | "limited";
|
|
69
|
-
reason: string;
|
|
70
|
-
version: number;
|
|
71
|
-
audience: string;
|
|
72
|
-
root: string;
|
|
73
72
|
} | {
|
|
74
73
|
version: number;
|
|
75
74
|
audience: string;
|
|
76
75
|
root: string;
|
|
77
|
-
status:
|
|
76
|
+
status: 'error';
|
|
78
77
|
error: string;
|
|
79
78
|
}>;
|
|
80
79
|
declare function getChangeImpact(context: MasterCSSMCPContext, input?: ContributorInput): Promise<{
|
|
81
80
|
version: number;
|
|
82
81
|
audience: string;
|
|
83
82
|
root: string;
|
|
84
|
-
status:
|
|
83
|
+
status: 'error';
|
|
85
84
|
error: string;
|
|
86
85
|
} | {
|
|
87
86
|
version: number;
|
|
88
87
|
audience: string;
|
|
89
88
|
root: string;
|
|
90
|
-
status: "
|
|
89
|
+
status: "limited" | "loaded";
|
|
91
90
|
reason: string;
|
|
92
91
|
inputs: {
|
|
93
92
|
task: string | null;
|
|
@@ -95,12 +94,12 @@ declare function getChangeImpact(context: MasterCSSMCPContext, input?: Contribut
|
|
|
95
94
|
hasDiff: boolean;
|
|
96
95
|
};
|
|
97
96
|
affectedPackages: {
|
|
98
|
-
matchedPaths: string[];
|
|
99
97
|
name: string;
|
|
100
98
|
path: string;
|
|
101
|
-
kind: WorkspacePackage[
|
|
99
|
+
kind: WorkspacePackage['kind'] | 'agent-docs' | 'repo-root';
|
|
102
100
|
packageJSON?: string;
|
|
103
101
|
aiNotes?: string | null;
|
|
102
|
+
matchedPaths: string[];
|
|
104
103
|
}[];
|
|
105
104
|
risks: Risk[];
|
|
106
105
|
summary: {
|
|
@@ -113,13 +112,13 @@ declare function getTestRouter(context: MasterCSSMCPContext, input?: Contributor
|
|
|
113
112
|
version: number;
|
|
114
113
|
audience: string;
|
|
115
114
|
root: string;
|
|
116
|
-
status:
|
|
115
|
+
status: 'error';
|
|
117
116
|
error: string;
|
|
118
117
|
} | {
|
|
119
118
|
version: number;
|
|
120
119
|
audience: string;
|
|
121
120
|
root: string;
|
|
122
|
-
status: "
|
|
121
|
+
status: "limited" | "loaded";
|
|
123
122
|
reason: string;
|
|
124
123
|
inputs: {
|
|
125
124
|
task: string | null;
|
|
@@ -127,12 +126,12 @@ declare function getTestRouter(context: MasterCSSMCPContext, input?: Contributor
|
|
|
127
126
|
hasDiff: boolean;
|
|
128
127
|
};
|
|
129
128
|
affectedPackages: {
|
|
130
|
-
matchedPaths: string[];
|
|
131
129
|
name: string;
|
|
132
130
|
path: string;
|
|
133
|
-
kind: WorkspacePackage[
|
|
131
|
+
kind: WorkspacePackage['kind'] | 'agent-docs' | 'repo-root';
|
|
134
132
|
packageJSON?: string;
|
|
135
133
|
aiNotes?: string | null;
|
|
134
|
+
matchedPaths: string[];
|
|
136
135
|
}[];
|
|
137
136
|
validation: {
|
|
138
137
|
commands: {
|
|
@@ -142,7 +141,7 @@ declare function getTestRouter(context: MasterCSSMCPContext, input?: Contributor
|
|
|
142
141
|
};
|
|
143
142
|
risks: {
|
|
144
143
|
id: string;
|
|
145
|
-
severity: "
|
|
144
|
+
severity: "high" | "info" | "warning";
|
|
146
145
|
reason: string;
|
|
147
146
|
}[];
|
|
148
147
|
}>;
|
package/dist/directives.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/directives.d.ts
|
|
4
3
|
interface InspectDirectivesOptions {
|
|
5
4
|
content?: string;
|
|
@@ -8,34 +7,16 @@ interface InspectDirectivesOptions {
|
|
|
8
7
|
preserveNativeCSS?: boolean;
|
|
9
8
|
}
|
|
10
9
|
declare function inspectDirectives(context: MasterCSSMCPContext, options: InspectDirectivesOptions): Promise<{
|
|
11
|
-
diagnostics: {
|
|
12
|
-
code: string;
|
|
13
|
-
severity: "warning";
|
|
14
|
-
message: string;
|
|
15
|
-
source: string;
|
|
16
|
-
sourceKind: string;
|
|
17
|
-
filePath: string;
|
|
18
|
-
}[];
|
|
19
|
-
summary: {
|
|
20
|
-
status: string;
|
|
21
|
-
directives: number;
|
|
22
|
-
classNames: number;
|
|
23
|
-
nativeClassNames: number;
|
|
24
|
-
dependencies: number;
|
|
25
|
-
warnings: number;
|
|
26
|
-
cssBytes: number;
|
|
27
|
-
errors?: undefined;
|
|
28
|
-
};
|
|
29
10
|
manifest: {
|
|
30
|
-
settings: import("
|
|
11
|
+
settings: import("~/packages/engine/src").MasterCSSManifestSettings;
|
|
31
12
|
counts: {
|
|
32
13
|
variables: number;
|
|
33
14
|
variableNamespaces: number;
|
|
34
15
|
utilities: number;
|
|
35
16
|
variants: number;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
conditions: number;
|
|
18
|
+
breakpointConditions: number;
|
|
19
|
+
containerConditions: number;
|
|
39
20
|
selectors: number;
|
|
40
21
|
animations: number;
|
|
41
22
|
};
|
|
@@ -48,7 +29,7 @@ declare function inspectDirectives(context: MasterCSSMCPContext, options: Inspec
|
|
|
48
29
|
variables: number;
|
|
49
30
|
utilities: number;
|
|
50
31
|
variants: number;
|
|
51
|
-
|
|
32
|
+
conditions: number;
|
|
52
33
|
selectors: number;
|
|
53
34
|
animations: number;
|
|
54
35
|
};
|
|
@@ -56,7 +37,7 @@ declare function inspectDirectives(context: MasterCSSMCPContext, options: Inspec
|
|
|
56
37
|
classNames: string[];
|
|
57
38
|
nativeClassNames: string[];
|
|
58
39
|
styleDefinitions: number;
|
|
59
|
-
extractionPolicy: import("
|
|
40
|
+
extractionPolicy: import("~/packages/schema/src/css-directives").CSSDirectiveExtractionPolicy;
|
|
60
41
|
};
|
|
61
42
|
css: {
|
|
62
43
|
bytes: number;
|
|
@@ -87,14 +68,32 @@ declare function inspectDirectives(context: MasterCSSMCPContext, options: Inspec
|
|
|
87
68
|
hasBlock: boolean;
|
|
88
69
|
quotedStrings: number;
|
|
89
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
|
+
};
|
|
90
89
|
} | {
|
|
91
90
|
version: number;
|
|
92
91
|
root: string;
|
|
93
92
|
status: string;
|
|
94
93
|
input: {
|
|
94
|
+
name?: undefined;
|
|
95
95
|
filePath: string;
|
|
96
96
|
mode: string;
|
|
97
|
-
name?: undefined;
|
|
98
97
|
};
|
|
99
98
|
directiveEntries: {
|
|
100
99
|
name: import("@master/css-lexer").CSSDirectiveRangeName;
|
|
@@ -112,7 +111,7 @@ declare function inspectDirectives(context: MasterCSSMCPContext, options: Inspec
|
|
|
112
111
|
}[];
|
|
113
112
|
diagnostics: {
|
|
114
113
|
code: string;
|
|
115
|
-
severity:
|
|
114
|
+
severity: 'error';
|
|
116
115
|
message: string;
|
|
117
116
|
source: string;
|
|
118
117
|
sourceKind: string;
|
package/dist/directives.js
CHANGED
|
@@ -36,7 +36,7 @@ function summarizeManifestInput(input) {
|
|
|
36
36
|
variables: countObjectKeys(manifestInput.variables),
|
|
37
37
|
utilities: Array.isArray(manifestInput.utilities) ? manifestInput.utilities.length : countObjectKeys(manifestInput.utilities),
|
|
38
38
|
variants: Array.isArray(manifestInput.variants) ? manifestInput.variants.length : countObjectKeys(manifestInput.variants),
|
|
39
|
-
|
|
39
|
+
conditions: countObjectKeys(manifestInput.conditions),
|
|
40
40
|
selectors: countObjectKeys(manifestInput.selectors),
|
|
41
41
|
animations: countObjectKeys(manifestInput.animations)
|
|
42
42
|
}
|
package/dist/document.d.ts
CHANGED
package/dist/format.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
2
|
import { Range, TextEdit } from "./document.js";
|
|
3
|
-
|
|
4
3
|
//#region src/format.d.ts
|
|
5
4
|
interface PreviewDirectiveFormatOptions {
|
|
6
5
|
content?: string;
|
|
@@ -30,6 +29,7 @@ declare function previewDirectiveFormat(context: MasterCSSMCPContext, options?:
|
|
|
30
29
|
inputs?: undefined;
|
|
31
30
|
preview?: undefined;
|
|
32
31
|
} | {
|
|
32
|
+
formatted?: undefined;
|
|
33
33
|
version: number;
|
|
34
34
|
root: string;
|
|
35
35
|
mode: string;
|
|
@@ -51,7 +51,6 @@ declare function previewDirectiveFormat(context: MasterCSSMCPContext, options?:
|
|
|
51
51
|
changed: number;
|
|
52
52
|
edits: number;
|
|
53
53
|
};
|
|
54
|
-
formatted?: undefined;
|
|
55
54
|
}>;
|
|
56
55
|
//#endregion
|
|
57
56
|
export { PreviewDirectiveFormatOptions, previewDirectiveFormat };
|
package/dist/format.js
CHANGED
|
@@ -46,7 +46,8 @@ async function previewDirectiveFormat(context, options = {}) {
|
|
|
46
46
|
}
|
|
47
47
|
const files = await resolveSourceFiles(context, options.patterns ?? DEFAULT_DIRECTIVE_FORMAT_PATTERNS);
|
|
48
48
|
const formattedFiles = await Promise.all(files.map(async (filePath) => {
|
|
49
|
-
|
|
49
|
+
const content = await readFile(filePath, "utf8");
|
|
50
|
+
return formatContent(service, filePath, content, options.range);
|
|
50
51
|
}));
|
|
51
52
|
const preview = await context.createPreview(formattedFiles.filter((file) => file.changed).map((file) => ({
|
|
52
53
|
filePath: file.filePath,
|
package/dist/language.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/language.d.ts
|
|
4
3
|
interface SuggestSyntaxOptions {
|
|
5
4
|
content: string;
|
|
@@ -13,9 +12,9 @@ interface SuggestSyntaxOptions {
|
|
|
13
12
|
}
|
|
14
13
|
declare function suggestSyntax(context: MasterCSSMCPContext, options: SuggestSyntaxOptions): Promise<{
|
|
15
14
|
manifest: {
|
|
16
|
-
error
|
|
17
|
-
status: "loaded" | "error";
|
|
15
|
+
status: "error" | "loaded";
|
|
18
16
|
entries: string[];
|
|
17
|
+
error?: string | undefined;
|
|
19
18
|
};
|
|
20
19
|
completions: import("vscode-languageserver-protocol").CompletionItem[];
|
|
21
20
|
total: number;
|
package/dist/lint.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MasterCSSLintFileResult, MasterCSSLintSourceDiagnostic } from "@master/css-lint";
|
|
2
2
|
import MasterCSSMCPContext from "./context.js";
|
|
3
|
-
|
|
4
3
|
//#region src/lint.d.ts
|
|
5
4
|
interface LintProjectOptions {
|
|
6
5
|
patterns?: string[];
|
|
@@ -19,7 +18,7 @@ declare function lintProject(context: MasterCSSMCPContext, options?: LintProject
|
|
|
19
18
|
version: number;
|
|
20
19
|
root: string;
|
|
21
20
|
manifest: {
|
|
22
|
-
status: "
|
|
21
|
+
status: "error" | "loaded";
|
|
23
22
|
entries: string[];
|
|
24
23
|
diagnostics: MasterCSSLintSourceDiagnostic[];
|
|
25
24
|
};
|
|
@@ -30,7 +29,7 @@ declare function lintContent(context: MasterCSSMCPContext, options: LintContentO
|
|
|
30
29
|
version: number;
|
|
31
30
|
root: string;
|
|
32
31
|
manifest: {
|
|
33
|
-
status: "
|
|
32
|
+
status: "error" | "loaded";
|
|
34
33
|
entries: string[];
|
|
35
34
|
diagnostics: MasterCSSLintSourceDiagnostic[];
|
|
36
35
|
};
|
|
@@ -44,7 +43,7 @@ declare function previewLintFixes(context: MasterCSSMCPContext, options?: Previe
|
|
|
44
43
|
version: number;
|
|
45
44
|
root: string;
|
|
46
45
|
manifest: {
|
|
47
|
-
status: "
|
|
46
|
+
status: "error" | "loaded";
|
|
48
47
|
entries: string[];
|
|
49
48
|
diagnostics: MasterCSSLintSourceDiagnostic[];
|
|
50
49
|
};
|
package/dist/manifest-query.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/manifest-query.d.ts
|
|
4
|
-
type ManifestQueryKind = 'all' | 'token' | 'utility' | 'variant' | 'mode' | '
|
|
3
|
+
type ManifestQueryKind = 'all' | 'token' | 'utility' | 'variant' | 'mode' | 'condition' | 'alias';
|
|
5
4
|
interface ManifestQueryOptions {
|
|
6
5
|
query?: string;
|
|
7
6
|
kind?: ManifestQueryKind;
|
|
@@ -28,12 +27,12 @@ declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQ
|
|
|
28
27
|
utilities: never[];
|
|
29
28
|
variants: never[];
|
|
30
29
|
modes: never[];
|
|
31
|
-
|
|
30
|
+
conditions: never[];
|
|
32
31
|
aliases: never[];
|
|
33
32
|
};
|
|
34
33
|
diagnostics: {
|
|
35
34
|
code: string;
|
|
36
|
-
severity:
|
|
35
|
+
severity: 'error';
|
|
37
36
|
message: string;
|
|
38
37
|
source: string;
|
|
39
38
|
sourceKind: string;
|
|
@@ -46,13 +45,15 @@ declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQ
|
|
|
46
45
|
utilities?: undefined;
|
|
47
46
|
variants?: undefined;
|
|
48
47
|
modes?: undefined;
|
|
49
|
-
|
|
48
|
+
conditions?: undefined;
|
|
50
49
|
aliases?: undefined;
|
|
51
50
|
};
|
|
52
51
|
} | {
|
|
52
|
+
diagnostics?: undefined;
|
|
53
53
|
version: number;
|
|
54
54
|
root: string;
|
|
55
55
|
manifest: {
|
|
56
|
+
error?: undefined;
|
|
56
57
|
status: "loaded";
|
|
57
58
|
entries: string[];
|
|
58
59
|
summary: {
|
|
@@ -62,14 +63,13 @@ declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQ
|
|
|
62
63
|
variableNamespaces: number;
|
|
63
64
|
utilities: number;
|
|
64
65
|
variants: number;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
conditions: number;
|
|
67
|
+
breakpointConditions: number;
|
|
68
|
+
containerConditions: number;
|
|
68
69
|
selectors: number;
|
|
69
70
|
animations: number;
|
|
70
71
|
};
|
|
71
72
|
};
|
|
72
|
-
error?: undefined;
|
|
73
73
|
};
|
|
74
74
|
inputs: {
|
|
75
75
|
query: string | undefined;
|
|
@@ -79,28 +79,28 @@ declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQ
|
|
|
79
79
|
};
|
|
80
80
|
results: {
|
|
81
81
|
tokens: {
|
|
82
|
-
static?: boolean | undefined;
|
|
83
|
-
inline?: boolean | undefined;
|
|
84
|
-
modes?: string[] | undefined;
|
|
85
|
-
numeric?: import("@master/css-engine").MasterCSSManifestVariableNumericValue | undefined;
|
|
86
82
|
name: string;
|
|
87
83
|
key: string;
|
|
88
84
|
namespace: string;
|
|
89
|
-
type: "
|
|
85
|
+
type: "number" | "string";
|
|
90
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
91
|
}[];
|
|
92
92
|
utilities: {
|
|
93
|
-
variableAliasRefs?: string[] | undefined;
|
|
94
|
-
aliasGroups?: string[] | undefined;
|
|
95
|
-
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName | undefined;
|
|
96
|
-
matcherTypes: ("static" | "pattern" | "key" | "variable" | "value")[];
|
|
97
|
-
emitType: "static" | "declarations" | "template" | "property";
|
|
98
|
-
namespaces?: string[] | undefined;
|
|
99
|
-
keys?: string[] | undefined;
|
|
100
|
-
subkey?: string | undefined;
|
|
101
|
-
key?: string | undefined;
|
|
102
|
-
name?: string | undefined;
|
|
103
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
104
|
}[];
|
|
105
105
|
variants: {
|
|
106
106
|
token: import("@master/css-engine").MasterCSSManifestVariantToken;
|
|
@@ -112,24 +112,24 @@ declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQ
|
|
|
112
112
|
default: boolean;
|
|
113
113
|
trigger: import("@master/css-engine").MasterCSSManifestModeTrigger | undefined;
|
|
114
114
|
}[];
|
|
115
|
-
|
|
115
|
+
conditions: {
|
|
116
116
|
name: string;
|
|
117
|
-
id: import("@master/css-engine").
|
|
117
|
+
id: import("@master/css-engine").MasterCSSManifestConditionIdentifier;
|
|
118
118
|
nodes: number;
|
|
119
119
|
}[];
|
|
120
120
|
aliases: ({
|
|
121
121
|
utility: string;
|
|
122
122
|
key: string;
|
|
123
123
|
name: string;
|
|
124
|
-
type:
|
|
124
|
+
type: 'variable-alias';
|
|
125
125
|
} | {
|
|
126
126
|
utility: string;
|
|
127
127
|
ref: string;
|
|
128
|
-
type:
|
|
128
|
+
type: 'variable-alias-ref';
|
|
129
129
|
} | {
|
|
130
130
|
utility: string;
|
|
131
131
|
group: string;
|
|
132
|
-
type:
|
|
132
|
+
type: 'alias-group';
|
|
133
133
|
})[];
|
|
134
134
|
};
|
|
135
135
|
summary: {
|
|
@@ -139,11 +139,10 @@ declare function queryManifest(context: MasterCSSMCPContext, options?: ManifestQ
|
|
|
139
139
|
utilities: number;
|
|
140
140
|
variants: number;
|
|
141
141
|
modes: number;
|
|
142
|
-
|
|
142
|
+
conditions: number;
|
|
143
143
|
aliases: number;
|
|
144
144
|
status: string;
|
|
145
145
|
};
|
|
146
|
-
diagnostics?: undefined;
|
|
147
146
|
}>;
|
|
148
147
|
//#endregion
|
|
149
148
|
export { ManifestQueryKind, ManifestQueryOptions, queryManifest };
|
package/dist/manifest-query.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadWorkspaceManifest } from "./project.js";
|
|
2
|
-
import {
|
|
2
|
+
import { compactConditions, compactUtility, compactVariable, summarizeManifest } from "./manifest-summary.js";
|
|
3
3
|
import { flattenMasterCSSManifestVariables } from "@master/css-engine";
|
|
4
4
|
//#region src/manifest-query.ts
|
|
5
5
|
const MANIFEST_QUERY_VERSION = 1;
|
|
@@ -52,7 +52,7 @@ async function queryManifest(context, options = {}) {
|
|
|
52
52
|
utilities: [],
|
|
53
53
|
variants: [],
|
|
54
54
|
modes: [],
|
|
55
|
-
|
|
55
|
+
conditions: [],
|
|
56
56
|
aliases: []
|
|
57
57
|
},
|
|
58
58
|
diagnostics: [{
|
|
@@ -86,10 +86,10 @@ async function queryManifest(context, options = {}) {
|
|
|
86
86
|
default: mode === activeManifest.settings?.defaultMode,
|
|
87
87
|
trigger: activeManifest.settings?.modeTrigger
|
|
88
88
|
}));
|
|
89
|
-
const
|
|
90
|
-
...
|
|
91
|
-
...
|
|
92
|
-
...
|
|
89
|
+
const conditions = [
|
|
90
|
+
...compactConditions(activeManifest.conditions),
|
|
91
|
+
...compactConditions(activeManifest.breakpointConditions),
|
|
92
|
+
...compactConditions(activeManifest.containerConditions)
|
|
93
93
|
].filter((rule) => matchesAny([rule.name, rule.id], query));
|
|
94
94
|
const aliases = (activeManifest.utilities || []).flatMap((utility) => [
|
|
95
95
|
...(utility.variableAliases || []).map(([key, name]) => ({
|
|
@@ -114,7 +114,7 @@ async function queryManifest(context, options = {}) {
|
|
|
114
114
|
utilities: kind === "all" || kind === "utility" ? utilities : [],
|
|
115
115
|
variants: kind === "all" || kind === "variant" ? variants : [],
|
|
116
116
|
modes: kind === "all" || kind === "mode" ? modes : [],
|
|
117
|
-
|
|
117
|
+
conditions: kind === "all" || kind === "condition" ? conditions : [],
|
|
118
118
|
aliases: kind === "all" || kind === "alias" ? aliases : []
|
|
119
119
|
};
|
|
120
120
|
const limitedResults = {
|
|
@@ -122,7 +122,7 @@ async function queryManifest(context, options = {}) {
|
|
|
122
122
|
utilities: limitResults(allResults.utilities, limit),
|
|
123
123
|
variants: limitResults(allResults.variants, limit),
|
|
124
124
|
modes: limitResults(allResults.modes, limit),
|
|
125
|
-
|
|
125
|
+
conditions: limitResults(allResults.conditions, limit),
|
|
126
126
|
aliases: limitResults(allResults.aliases, limit)
|
|
127
127
|
};
|
|
128
128
|
const total = Object.values(allResults).reduce((count, items) => count + items.length, 0);
|
|
@@ -149,7 +149,7 @@ async function queryManifest(context, options = {}) {
|
|
|
149
149
|
utilities: utilities.length,
|
|
150
150
|
variants: variants.length,
|
|
151
151
|
modes: modes.length,
|
|
152
|
-
|
|
152
|
+
conditions: conditions.length,
|
|
153
153
|
aliases: aliases.length,
|
|
154
154
|
status: "ok"
|
|
155
155
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { MasterCSSManifest,
|
|
2
|
-
|
|
1
|
+
import { MasterCSSManifest, MasterCSSManifestConditions, MasterCSSManifestUtility, MasterCSSManifestVariableEntry } from "@master/css-engine";
|
|
3
2
|
//#region src/manifest-summary.d.ts
|
|
4
3
|
declare function summarizeManifest(manifest: MasterCSSManifest): {
|
|
5
4
|
settings: import("@master/css-engine").MasterCSSManifestSettings;
|
|
@@ -8,41 +7,41 @@ declare function summarizeManifest(manifest: MasterCSSManifest): {
|
|
|
8
7
|
variableNamespaces: number;
|
|
9
8
|
utilities: number;
|
|
10
9
|
variants: number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
conditions: number;
|
|
11
|
+
breakpointConditions: number;
|
|
12
|
+
containerConditions: number;
|
|
14
13
|
selectors: number;
|
|
15
14
|
animations: number;
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
17
|
declare function compactVariable(variable: MasterCSSManifestVariableEntry): {
|
|
19
|
-
static?: boolean | undefined;
|
|
20
|
-
inline?: boolean | undefined;
|
|
21
|
-
modes?: string[] | undefined;
|
|
22
|
-
numeric?: import("@master/css-engine").MasterCSSManifestVariableNumericValue | undefined;
|
|
23
18
|
name: string;
|
|
24
19
|
key: string;
|
|
25
20
|
namespace: string;
|
|
26
|
-
type: "
|
|
21
|
+
type: "number" | "string";
|
|
27
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;
|
|
28
27
|
};
|
|
29
28
|
declare function compactUtility(utility: MasterCSSManifestUtility): {
|
|
30
|
-
variableAliasRefs?: string[] | undefined;
|
|
31
|
-
aliasGroups?: string[] | undefined;
|
|
32
|
-
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName | undefined;
|
|
33
|
-
matcherTypes: ("static" | "pattern" | "key" | "variable" | "value")[];
|
|
34
|
-
emitType: "static" | "declarations" | "template" | "property";
|
|
35
|
-
namespaces?: string[] | undefined;
|
|
36
|
-
keys?: string[] | undefined;
|
|
37
|
-
subkey?: string | undefined;
|
|
38
|
-
key?: string | undefined;
|
|
39
|
-
name?: string | undefined;
|
|
40
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;
|
|
41
40
|
};
|
|
42
|
-
declare function
|
|
41
|
+
declare function compactConditions(conditions: MasterCSSManifestConditions | undefined): {
|
|
43
42
|
name: string;
|
|
44
|
-
id: import("@master/css-engine").
|
|
43
|
+
id: import("@master/css-engine").MasterCSSManifestConditionIdentifier;
|
|
45
44
|
nodes: number;
|
|
46
45
|
}[];
|
|
47
46
|
//#endregion
|
|
48
|
-
export {
|
|
47
|
+
export { compactConditions, compactUtility, compactVariable, summarizeManifest };
|
package/dist/manifest-summary.js
CHANGED
|
@@ -9,9 +9,9 @@ function summarizeManifest(manifest) {
|
|
|
9
9
|
variableNamespaces: Object.keys(manifest.variables || {}).length,
|
|
10
10
|
utilities: manifest.utilities?.length ?? 0,
|
|
11
11
|
variants: manifest.variants?.length ?? 0,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
conditions: Object.keys(manifest.conditions || {}).length,
|
|
13
|
+
breakpointConditions: Object.keys(manifest.breakpointConditions || {}).length,
|
|
14
|
+
containerConditions: Object.keys(manifest.containerConditions || {}).length,
|
|
15
15
|
selectors: Object.keys(manifest.selectors || {}).length,
|
|
16
16
|
animations: Object.keys(manifest.animations || {}).length
|
|
17
17
|
}
|
|
@@ -45,12 +45,12 @@ function compactUtility(utility) {
|
|
|
45
45
|
...utility.variableAliasRefs?.length ? { variableAliasRefs: utility.variableAliasRefs } : {}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return Object.entries(
|
|
48
|
+
function compactConditions(conditions) {
|
|
49
|
+
return Object.entries(conditions || {}).map(([name, rule]) => ({
|
|
50
50
|
name,
|
|
51
51
|
id: rule.id,
|
|
52
52
|
nodes: rule.nodes.length
|
|
53
53
|
}));
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
export {
|
|
56
|
+
export { compactConditions, compactUtility, compactVariable, summarizeManifest };
|
package/dist/project.d.ts
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/project.d.ts
|
|
4
3
|
declare function loadWorkspaceManifest(context: MasterCSSMCPContext): Promise<{
|
|
5
|
-
status:
|
|
6
|
-
manifest: import("
|
|
4
|
+
status: 'loaded';
|
|
5
|
+
manifest: import("~/packages/engine/src").MasterCSSManifest;
|
|
7
6
|
entries: string[];
|
|
8
7
|
dependencies: string[];
|
|
9
8
|
warnings: string[];
|
|
10
9
|
error?: undefined;
|
|
11
10
|
} | {
|
|
12
|
-
|
|
11
|
+
manifest?: undefined;
|
|
12
|
+
status: 'error';
|
|
13
13
|
entries: string[];
|
|
14
14
|
dependencies: string[];
|
|
15
15
|
warnings: string[];
|
|
16
16
|
error: string;
|
|
17
|
-
manifest?: undefined;
|
|
18
17
|
}>;
|
|
19
18
|
declare function getWorkspaceInfo(context: MasterCSSMCPContext): Promise<{
|
|
20
19
|
root: string;
|
|
21
20
|
roots: string[];
|
|
22
21
|
packages: import("@master/css-project/workspace").MasterCSSWorkspacePackageResolution;
|
|
23
22
|
manifest: {
|
|
24
|
-
error
|
|
25
|
-
status: "loaded" | "error";
|
|
23
|
+
status: "error" | "loaded";
|
|
26
24
|
entries: string[];
|
|
27
25
|
dependencies: string[];
|
|
28
26
|
warnings: string[];
|
|
27
|
+
error?: string | undefined;
|
|
29
28
|
};
|
|
30
29
|
}>;
|
|
31
30
|
//#endregion
|
package/dist/result.d.ts
CHANGED
package/dist/scan.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/scan.d.ts
|
|
4
3
|
interface ScanProjectOptions {
|
|
5
4
|
patterns?: string[];
|
|
@@ -16,14 +15,6 @@ interface InspectClassOptions {
|
|
|
16
15
|
}
|
|
17
16
|
declare function resolveSourceFiles(context: MasterCSSMCPContext, patterns?: string[], ignore?: string[]): Promise<string[]>;
|
|
18
17
|
declare function scanProject(context: MasterCSSMCPContext, options?: ScanProjectOptions): Promise<{
|
|
19
|
-
root: string;
|
|
20
|
-
manifest: {
|
|
21
|
-
error?: string | undefined;
|
|
22
|
-
status: "loaded" | "error";
|
|
23
|
-
entries: string[];
|
|
24
|
-
dependencies: string[];
|
|
25
|
-
warnings: string[];
|
|
26
|
-
};
|
|
27
18
|
version: typeof import("@master/css-diagnostics").MASTER_CSS_INSPECTION_REPORT_VERSION;
|
|
28
19
|
cwd: string;
|
|
29
20
|
inputs: {
|
|
@@ -83,12 +74,20 @@ declare function scanProject(context: MasterCSSMCPContext, options?: ScanProject
|
|
|
83
74
|
missingCSS: number;
|
|
84
75
|
invalidClasses: number;
|
|
85
76
|
};
|
|
77
|
+
root: string;
|
|
78
|
+
manifest: {
|
|
79
|
+
status: "error" | "loaded";
|
|
80
|
+
entries: string[];
|
|
81
|
+
dependencies: string[];
|
|
82
|
+
warnings: string[];
|
|
83
|
+
error?: string | undefined;
|
|
84
|
+
};
|
|
86
85
|
}>;
|
|
87
86
|
declare function renderCSS(context: MasterCSSMCPContext, options: RenderCSSOptions): Promise<{
|
|
88
87
|
manifest: {
|
|
89
|
-
error
|
|
90
|
-
status: "loaded" | "error";
|
|
88
|
+
status: "error" | "loaded";
|
|
91
89
|
entries: string[];
|
|
90
|
+
error?: string | undefined;
|
|
92
91
|
};
|
|
93
92
|
classes: string[];
|
|
94
93
|
invalid: string[];
|
|
@@ -99,9 +98,9 @@ declare function renderCSS(context: MasterCSSMCPContext, options: RenderCSSOptio
|
|
|
99
98
|
}>;
|
|
100
99
|
declare function inspectClass(context: MasterCSSMCPContext, options: InspectClassOptions): Promise<{
|
|
101
100
|
manifest: {
|
|
102
|
-
error
|
|
103
|
-
status: "loaded" | "error";
|
|
101
|
+
status: "error" | "loaded";
|
|
104
102
|
entries: string[];
|
|
103
|
+
error?: string | undefined;
|
|
105
104
|
};
|
|
106
105
|
className: string;
|
|
107
106
|
mode: string | undefined;
|
|
@@ -114,15 +113,15 @@ declare function inspectClass(context: MasterCSSMCPContext, options: InspectClas
|
|
|
114
113
|
valueToken: string | undefined;
|
|
115
114
|
stateToken: string | undefined;
|
|
116
115
|
important: boolean | undefined;
|
|
117
|
-
matcherTypes: ("
|
|
116
|
+
matcherTypes: ("key" | "pattern" | "static" | "value" | "variable")[];
|
|
118
117
|
variables: {
|
|
119
118
|
key: string;
|
|
120
|
-
variable: import("
|
|
119
|
+
variable: import("~/packages/language/src").Variable;
|
|
121
120
|
}[];
|
|
122
121
|
rules: {
|
|
123
122
|
className: string;
|
|
124
123
|
layer: import("@master/css-engine").MasterCSSManifestUtilityLayerName;
|
|
125
|
-
type: import("
|
|
124
|
+
type: import("~/packages/language/src").UtilityType;
|
|
126
125
|
text: string;
|
|
127
126
|
}[];
|
|
128
127
|
css: string;
|
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
|
@@ -271,7 +271,7 @@ function registerTools(server, context) {
|
|
|
271
271
|
}, async (input) => jsonToolResult(await getPackageGraph(context, input)));
|
|
272
272
|
server.registerTool("mastercss_manifest_query", {
|
|
273
273
|
title: "Query Master CSS Manifest",
|
|
274
|
-
description: "Query active manifest tokens, utilities, variants, modes,
|
|
274
|
+
description: "Query active manifest tokens, utilities, variants, modes, conditions, and aliases.",
|
|
275
275
|
inputSchema: {
|
|
276
276
|
query: z.string().optional(),
|
|
277
277
|
kind: z.enum([
|
|
@@ -280,7 +280,7 @@ function registerTools(server, context) {
|
|
|
280
280
|
"utility",
|
|
281
281
|
"variant",
|
|
282
282
|
"mode",
|
|
283
|
-
"
|
|
283
|
+
"condition",
|
|
284
284
|
"alias"
|
|
285
285
|
]).optional(),
|
|
286
286
|
namespace: z.string().optional(),
|
package/dist/setup.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MasterCSSMCPContext from "./context.js";
|
|
2
|
-
|
|
3
2
|
//#region src/setup.d.ts
|
|
4
3
|
type SetupDiagnosticSeverity = 'error' | 'warning' | 'info';
|
|
5
4
|
interface SetupDiagnostic {
|
|
@@ -21,9 +20,9 @@ declare function auditSetup(context: MasterCSSMCPContext): Promise<{
|
|
|
21
20
|
inferred: string;
|
|
22
21
|
};
|
|
23
22
|
packageJSON: {
|
|
24
|
-
error?: string | undefined;
|
|
25
23
|
filePath: string;
|
|
26
24
|
loaded: boolean;
|
|
25
|
+
error?: string | undefined;
|
|
27
26
|
};
|
|
28
27
|
packages: {
|
|
29
28
|
declared: {
|
|
@@ -37,20 +36,20 @@ declare function auditSetup(context: MasterCSSMCPContext): Promise<{
|
|
|
37
36
|
resolved: import("@master/css-project/workspace").MasterCSSWorkspacePackageResolution;
|
|
38
37
|
};
|
|
39
38
|
integrations: ({
|
|
40
|
-
type:
|
|
39
|
+
type: 'package';
|
|
41
40
|
name: string;
|
|
42
41
|
version: string;
|
|
43
42
|
} | {
|
|
44
|
-
type:
|
|
43
|
+
type: 'script';
|
|
45
44
|
name: string;
|
|
46
45
|
command: string;
|
|
47
46
|
})[];
|
|
48
47
|
manifest: {
|
|
49
|
-
error
|
|
50
|
-
status: "loaded" | "error";
|
|
48
|
+
status: "error" | "loaded";
|
|
51
49
|
entries: string[];
|
|
52
50
|
dependencies: string[];
|
|
53
51
|
warnings: string[];
|
|
52
|
+
error?: string | undefined;
|
|
54
53
|
};
|
|
55
54
|
diagnostics: SetupDiagnostic[];
|
|
56
55
|
summary: {
|
package/package.json
CHANGED
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"fast-glob": "^3.3.3",
|
|
54
54
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
55
55
|
"zod": "^4.4.3",
|
|
56
|
-
"@master/css-
|
|
57
|
-
"@master/css-
|
|
58
|
-
"@master/css-
|
|
59
|
-
"@master/css-
|
|
60
|
-
"@master/css-
|
|
61
|
-
"@master/css-
|
|
62
|
-
"@master/css-
|
|
63
|
-
"@master/css-
|
|
64
|
-
"@master/css-validator": "^2.0.0-rc.
|
|
65
|
-
"@master/css-
|
|
56
|
+
"@master/css-engine": "^2.0.0-rc.86",
|
|
57
|
+
"@master/css-diagnostics": "^2.0.0-rc.86",
|
|
58
|
+
"@master/css-compiler": "^2.0.0-rc.86",
|
|
59
|
+
"@master/css-lexer": "^2.0.0-rc.86",
|
|
60
|
+
"@master/css-language-service": "^2.0.0-rc.86",
|
|
61
|
+
"@master/css-lint": "^2.0.0-rc.86",
|
|
62
|
+
"@master/css-server": "^2.0.0-rc.86",
|
|
63
|
+
"@master/css-project": "^2.0.0-rc.86",
|
|
64
|
+
"@master/css-validator": "^2.0.0-rc.86",
|
|
65
|
+
"@master/css-preset": "^2.0.0-rc.86"
|
|
66
66
|
},
|
|
67
|
-
"version": "2.0.0-rc.
|
|
67
|
+
"version": "2.0.0-rc.86",
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "tsdown --config ../../shared/tsdown-package.config.ts",
|
|
70
70
|
"dev": "tsdown --config ../../shared/tsdown-package.config.ts --watch",
|