@csszyx/mcp-server 0.10.6 → 0.10.8
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.mjs +30 -3
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
7
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
8
8
|
import fs from 'node:fs';
|
|
9
|
-
import { SPECIAL_VARIANTS, KNOWN_VARIANTS, PROPERTY_MAP, transform, SUGGESTION_MAP, BOOLEAN_SHORTHANDS } from '@csszyx/compiler';
|
|
9
|
+
import { SPECIAL_VARIANTS, KNOWN_VARIANTS, PROPERTY_MAP, transform, SUGGESTION_MAP, BOOLEAN_SHORTHANDS, REMOVED_BOOLEAN_SUGAR } from '@csszyx/compiler';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import { migrateSource, classNameToSzObject } from '@csszyx/cli';
|
|
12
12
|
import { parseThemeBlocks, hasTokens } from '@csszyx/unplugin';
|
|
@@ -112,8 +112,26 @@ Key csszyx syntax:
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
function resolveLlmsFullPath() {
|
|
116
|
+
let dir = path.dirname(fileURLToPath(import.meta.url));
|
|
117
|
+
for (let i = 0; i < 8; i++) {
|
|
118
|
+
for (const candidate of [
|
|
119
|
+
path.join(dir, "llms-full.txt"),
|
|
120
|
+
path.join(dir, "apps", "docs", "public", "llms-full.txt")
|
|
121
|
+
]) {
|
|
122
|
+
if (fs.existsSync(candidate)) {
|
|
123
|
+
return candidate;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const parent = path.dirname(dir);
|
|
127
|
+
if (parent === dir) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
dir = parent;
|
|
131
|
+
}
|
|
132
|
+
return path.resolve(fileURLToPath(import.meta.url), "../../..", "llms-full.txt");
|
|
133
|
+
}
|
|
134
|
+
const LLMS_FULL_PATH = resolveLlmsFullPath();
|
|
117
135
|
const SETUP_GUIDE = `# csszyx setup
|
|
118
136
|
|
|
119
137
|
Fastest path: run \`csszyx init\` (it does everything below). Manual steps:
|
|
@@ -573,6 +591,15 @@ function handleValidate(input) {
|
|
|
573
591
|
});
|
|
574
592
|
continue;
|
|
575
593
|
}
|
|
594
|
+
const removed = REMOVED_BOOLEAN_SUGAR[key];
|
|
595
|
+
if (removed && input.sz[key] === true) {
|
|
596
|
+
errors.push({
|
|
597
|
+
key,
|
|
598
|
+
message: `'${key}: true' boolean sugar was removed; it emits no class.`,
|
|
599
|
+
suggestion: `Use { ${removed.key}: ${JSON.stringify(removed.value)} } instead.`
|
|
600
|
+
});
|
|
601
|
+
continue;
|
|
602
|
+
}
|
|
576
603
|
const isProperty = key in PROPERTY_MAP;
|
|
577
604
|
const isBoolean = BOOLEAN_SHORTHANDS.has(key);
|
|
578
605
|
const isVariant = KNOWN_VARIANTS.has(key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/mcp-server",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for csszyx — enables AI agents to understand and generate sz props",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
32
32
|
"zod": "^3.23.8",
|
|
33
|
-
"@csszyx/compiler": "0.10.
|
|
34
|
-
"@csszyx/
|
|
35
|
-
"@csszyx/
|
|
33
|
+
"@csszyx/compiler": "0.10.8",
|
|
34
|
+
"@csszyx/cli": "0.10.8",
|
|
35
|
+
"@csszyx/unplugin": "0.10.8"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "^6.0.3",
|