@csszyx/mcp-server 0.10.6 → 0.10.7
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 +26 -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,22 @@ 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 < 6; i++) {
|
|
118
|
+
const candidate = path.join(dir, "llms-full.txt");
|
|
119
|
+
if (fs.existsSync(candidate)) {
|
|
120
|
+
return candidate;
|
|
121
|
+
}
|
|
122
|
+
const parent = path.dirname(dir);
|
|
123
|
+
if (parent === dir) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
dir = parent;
|
|
127
|
+
}
|
|
128
|
+
return path.resolve(fileURLToPath(import.meta.url), "../../..", "llms-full.txt");
|
|
129
|
+
}
|
|
130
|
+
const LLMS_FULL_PATH = resolveLlmsFullPath();
|
|
117
131
|
const SETUP_GUIDE = `# csszyx setup
|
|
118
132
|
|
|
119
133
|
Fastest path: run \`csszyx init\` (it does everything below). Manual steps:
|
|
@@ -573,6 +587,15 @@ function handleValidate(input) {
|
|
|
573
587
|
});
|
|
574
588
|
continue;
|
|
575
589
|
}
|
|
590
|
+
const removed = REMOVED_BOOLEAN_SUGAR[key];
|
|
591
|
+
if (removed && input.sz[key] === true) {
|
|
592
|
+
errors.push({
|
|
593
|
+
key,
|
|
594
|
+
message: `'${key}: true' boolean sugar was removed; it emits no class.`,
|
|
595
|
+
suggestion: `Use { ${removed.key}: ${JSON.stringify(removed.value)} } instead.`
|
|
596
|
+
});
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
576
599
|
const isProperty = key in PROPERTY_MAP;
|
|
577
600
|
const isBoolean = BOOLEAN_SHORTHANDS.has(key);
|
|
578
601
|
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.7",
|
|
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/unplugin": "0.10.
|
|
35
|
-
"@csszyx/cli": "0.10.
|
|
33
|
+
"@csszyx/compiler": "0.10.7",
|
|
34
|
+
"@csszyx/unplugin": "0.10.7",
|
|
35
|
+
"@csszyx/cli": "0.10.7"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "^6.0.3",
|