@csszyx/mcp-server 0.14.0 → 0.14.1
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 +3 -3
- package/llms-full.txt +24 -5
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
7
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
8
8
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
-
import { sortStrings, SPECIAL_VARIANTS, KNOWN_VARIANTS, PROPERTY_MAP, transform, transformSource, SUGGESTION_MAP, BOOLEAN_SHORTHANDS, REMOVED_BOOLEAN_SUGAR } from '@csszyx/compiler';
|
|
9
|
+
import { sortStrings, SPECIAL_VARIANTS, KNOWN_VARIANTS, PROPERTY_MAP, transform, transformSource, SUGGESTION_MAP, BOOLEAN_SHORTHANDS, REMOVED_BOOLEAN_SUGAR, KNOWN_SPECIAL_PROPERTIES } 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';
|
|
@@ -669,8 +669,8 @@ function validateEntry(key, value) {
|
|
|
669
669
|
suggestion: `Use { ${removed.key}: ${JSON.stringify(removed.value)} } instead.`
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
|
-
const isSpecial = ["
|
|
673
|
-
const isKnown = key in PROPERTY_MAP || BOOLEAN_SHORTHANDS.has(key) || KNOWN_VARIANTS.has(key) || isSpecial;
|
|
672
|
+
const isSpecial = ["@container", "*"].includes(key) || key.startsWith("@") || key.startsWith("[");
|
|
673
|
+
const isKnown = key in PROPERTY_MAP || BOOLEAN_SHORTHANDS.has(key) || KNOWN_SPECIAL_PROPERTIES.has(key) || KNOWN_VARIANTS.has(key) || isSpecial;
|
|
674
674
|
return isKnown ? void 0 : {
|
|
675
675
|
key,
|
|
676
676
|
message: `Unknown prop '${key}'. Not a valid sz key, variant, or special prop.`
|
package/llms-full.txt
CHANGED
|
@@ -244,6 +244,12 @@ sz={{ '@container': true, '@md': { display: 'flex' } }}
|
|
|
244
244
|
{ p: 4, bg: 'blue-500', display: 'flex', flexDir: 'col', w: '333px', mt: 4, text: 'lg' }
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
+
Known CSS-name aliases and removed migration keys are rejected rather than
|
|
248
|
+
auto-mapped: the compiler warns and emits no class. Rename the source to the
|
|
249
|
+
canonical key or replacement shape. A truly unknown key is different: it warns
|
|
250
|
+
but still emits a kebab-case candidate so an intentional Tailwind `@utility`
|
|
251
|
+
can serve it.
|
|
252
|
+
|
|
247
253
|
## Type safety — unknown keys are TypeScript errors
|
|
248
254
|
|
|
249
255
|
The `sz` prop type is **closed**: a key that is not a known sz prop or variant is a
|
|
@@ -1257,7 +1263,9 @@ moved into their layer (`{ maskLinear: { from } }` etc.), `maskShape` moved to
|
|
|
1257
1263
|
`{ maskRadial: { shape } }`, `maskVia` was removed with no equivalent (Tailwind
|
|
1258
1264
|
has no via stop for masks), and gradient layer values on `mask`
|
|
1259
1265
|
(`{ mask: 'linear-45' }`) moved to the layer keys. `mask` carries only a direct
|
|
1260
|
-
mask-image: `none`, `url(…)`, a CSS variable, or an arbitrary value.
|
|
1266
|
+
mask-image: `none`, `url(…)`, a CSS variable, or an arbitrary value. The
|
|
1267
|
+
compiler warns and emits no class for every removed flat key; it never preserves
|
|
1268
|
+
them as custom-utility fallbacks.
|
|
1261
1269
|
|
|
1262
1270
|
### mask-image: Gradient Masks
|
|
1263
1271
|
|
|
@@ -3069,11 +3077,20 @@ needs "Use Workspace Version".
|
|
|
3069
3077
|
- Insert numeric suggestions without quotes and string suggestions with quotes. Suggestions are not validation: Tailwind 4 numeric values are open-ended.
|
|
3070
3078
|
- Preserve TypeScript's base completions. On cancellation, timeout, or internal failure, return the untouched base result.
|
|
3071
3079
|
|
|
3072
|
-
Defaults: `enabled: true`, `values: true`, `
|
|
3073
|
-
`deadlineMs: 20`, `failureThreshold: 3`. Usually emit only `{ "name":
|
|
3080
|
+
Defaults: `enabled: true`, `values: true`, `themeValues: false`,
|
|
3081
|
+
`maxEntries: 512`, `deadlineMs: 20`, `failureThreshold: 3`. Usually emit only `{ "name":
|
|
3074
3082
|
"@csszyx/ts-plugin" }`; do not add tuning options without a demonstrated need.
|
|
3075
3083
|
|
|
3076
|
-
**
|
|
3084
|
+
**Theme preview:** `themeValues: true` adds custom colors, spacings, fonts,
|
|
3085
|
+
text sizes, font weights, radii, shadows, and breakpoint keys from the leaf
|
|
3086
|
+
project's generated `.csszyx/theme.d.ts`. The declaration must already belong
|
|
3087
|
+
to the TypeScript Program. Parsing is AST-based and bounded (128 KiB source,
|
|
3088
|
+
2,000 tokens, 128 characters per token); missing/malformed input fails open.
|
|
3089
|
+
The plugin performs no CSS/filesystem scan, direct I/O, watcher, network, or
|
|
3090
|
+
Tailwind/config execution. VS Code extension users set
|
|
3091
|
+
`csszyx.themeValues: true`; the default remains off during host certification.
|
|
3092
|
+
|
|
3093
|
+
**Not provided by this plugin:** hover previews,
|
|
3077
3094
|
diagnostics, syntax highlighting, Tailwind config/plugin execution, network, or
|
|
3078
3095
|
telemetry. Those capabilities must not be inferred. The plugin is
|
|
3079
3096
|
self-contained: its metadata is bundled at build time, so it installs with no
|
|
@@ -3111,7 +3128,9 @@ IntelliSense, hover, and diagnostics for `sz` props. Supports JSX, TSX, JS, TS,
|
|
|
3111
3128
|
|
|
3112
3129
|
- Key + value completions inside `sz={{ ... }}` (variant-aware, depth 1 and 2)
|
|
3113
3130
|
- Hover preview — shows generated Tailwind className + inline CSS variables via `transform()`
|
|
3114
|
-
- Diagnostics — unknown prop keys flagged as warnings;
|
|
3131
|
+
- Diagnostics — unknown prop keys flagged as warnings; removed aliases receive
|
|
3132
|
+
canonical migration hints (for example `padding` → `p`) and emit no class,
|
|
3133
|
+
while intentional custom keys remain available to Tailwind `@utility`
|
|
3115
3134
|
- TextMate grammar injection — syntax highlighting for `sz` attribute
|
|
3116
3135
|
|
|
3117
3136
|
**Settings:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/mcp-server",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
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,13 +30,13 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
32
32
|
"zod": "^4.4.3",
|
|
33
|
-
"@csszyx/cli": "0.14.
|
|
34
|
-
"@csszyx/
|
|
35
|
-
"@csszyx/
|
|
33
|
+
"@csszyx/cli": "0.14.1",
|
|
34
|
+
"@csszyx/compiler": "0.14.1",
|
|
35
|
+
"@csszyx/unplugin": "0.14.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.20.1",
|
|
39
|
-
"tsx": "^4.23.
|
|
39
|
+
"tsx": "^4.23.11",
|
|
40
40
|
"typescript": "^6.0.3",
|
|
41
41
|
"unbuild": "^3.6.1",
|
|
42
42
|
"vitest": "^4.1.10"
|