@csszyx/mcp-server 0.14.4 → 0.15.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/dist/index.mjs +8 -2
- package/llms-full.txt +19 -3
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -140,6 +140,8 @@ Fastest path: run \`csszyx init\` (it does everything below). Manual steps:
|
|
|
140
140
|
\`\`\`bash
|
|
141
141
|
pnpm add csszyx @csszyx/runtime
|
|
142
142
|
pnpm add -D @csszyx/types @csszyx/cli tailwindcss
|
|
143
|
+
# Next.js only: the configs below name @csszyx/unplugin by package
|
|
144
|
+
pnpm add @csszyx/unplugin
|
|
143
145
|
\`\`\`
|
|
144
146
|
\`@csszyx/runtime\` and \`@csszyx/types\` MUST be DIRECT dependencies: the
|
|
145
147
|
transform injects a bare \`import { _szMerge } from '@csszyx/runtime'\`, and
|
|
@@ -170,13 +172,17 @@ export default {
|
|
|
170
172
|
// next.config.mjs
|
|
171
173
|
import { csszyxTurbopack } from '@csszyx/unplugin/next';
|
|
172
174
|
export default {
|
|
173
|
-
turbopack: csszyxTurbopack(
|
|
175
|
+
turbopack: csszyxTurbopack(),
|
|
174
176
|
};
|
|
175
177
|
\`\`\`
|
|
176
178
|
- Do NOT set an \`as\` field on the loader rule \u2014 the helper omits it; an \`as\`
|
|
177
179
|
makes the loader output self-match into \`./X.tsx.tsx\` (Module not found).
|
|
178
180
|
- Keep the safelist fresh: \`csszyx next watch\` (dev) and \`csszyx next prebuild\`
|
|
179
|
-
before \`next build --turbopack\`.
|
|
181
|
+
before \`next build --turbopack\`.
|
|
182
|
+
- List \`'@csszyx/unplugin/postcss': {}\` BEFORE \`'@tailwindcss/postcss'\` in
|
|
183
|
+
\`postcss.config.mjs\`: it points Tailwind at \`.csszyx/csszyx-classes.txt\`. Do
|
|
184
|
+
not write \`@source\` for the safelist by hand; a stylesheet still naming the
|
|
185
|
+
old \`csszyx-classes.html\` fails the build with the fix.
|
|
180
186
|
|
|
181
187
|
## 3. Tailwind v4 entry
|
|
182
188
|
\`\`\`css
|
package/llms-full.txt
CHANGED
|
@@ -367,7 +367,7 @@ value position — `p`, `bg`, `m`, `w`, `text`, …, not just font-size):
|
|
|
367
367
|
|
|
368
368
|
- `{ '[ & > span ]': (etc) }` -> `[&>span]:(etc)` — whitespace in arbitrary selector keys is stripped
|
|
369
369
|
- Values never need brackets: `{ w: 'calc(100% - 20px)' }` -> `w-[calc(100%_-_20px)]` — the compiler auto-wraps arbitrary values
|
|
370
|
-
-
|
|
370
|
+
- Matching does not depend on user formatting.
|
|
371
371
|
|
|
372
372
|
## Complex Selectors & Modifiers
|
|
373
373
|
|
|
@@ -4076,8 +4076,12 @@ utility names should not be readable in the production bundle.
|
|
|
4076
4076
|
```
|
|
4077
4077
|
|
|
4078
4078
|
Output: `<div class="z y x" />` — the CSS `.z { padding: 1rem }` etc. is injected
|
|
4079
|
-
automatically.
|
|
4080
|
-
|
|
4079
|
+
automatically. The runtime map is registered from a module inside the JS bundle on
|
|
4080
|
+
every lane (virtual module on vite/rollup, generated `.csszyx/` file on webpack), so
|
|
4081
|
+
the built HTML carries no executable inline script and a strict CSP
|
|
4082
|
+
(`script-src 'self'`) needs no exception. There is no delivery option;
|
|
4083
|
+
`production.mangleMapDelivery` was removed. `window.__csszyx` is opt-in via
|
|
4084
|
+
`production.mangleDebugGlobal: true`; helpers read the registry directly.
|
|
4081
4085
|
|
|
4082
4086
|
If an `sz`-generated utility also appears as a static string or template quasi in a
|
|
4083
4087
|
source-level `class` or `className` attribute/property (including a `clsx(...)`
|
|
@@ -4269,9 +4273,21 @@ npx @csszyx/cli migrate --resolve-todos .csszyx-todo.json
|
|
|
4269
4273
|
|
|
4270
4274
|
Reads `.csszyx-todo.json` and applies it during migration.
|
|
4271
4275
|
`--resolve-todos` is **read-only**: it never writes to the todo file.
|
|
4276
|
+
On a file an earlier pass already migrated, the classes the map decides merge into the
|
|
4277
|
+
element's existing `sz={{ … }}` object; a key that object already sets is left alone and
|
|
4278
|
+
reported, and undecided classes keep their `@sz-todo` marker.
|
|
4272
4279
|
Still-unresolved classes appear in the console and log only.
|
|
4273
4280
|
Re-run `--audit` to get a fresh snapshot when ready.
|
|
4274
4281
|
|
|
4282
|
+
### What migrate needs
|
|
4283
|
+
|
|
4284
|
+
`migrate` runs on the native engine and needs the `@csszyx/core-<platform>` package for
|
|
4285
|
+
your platform, which npm installs automatically on Linux, macOS and Windows for x64 and
|
|
4286
|
+
arm64. There is no second implementation behind it, so on a platform with no prebuilt
|
|
4287
|
+
binary — or after an install that skipped optional packages — migrate reports that the
|
|
4288
|
+
platform package is missing instead of producing different output. Building and the
|
|
4289
|
+
runtime are unaffected: those fall back to the WASM engine that ships in the package.
|
|
4290
|
+
|
|
4275
4291
|
### `--inject-todos` — mark unrecognized classes in code
|
|
4276
4292
|
|
|
4277
4293
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
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": "^4.4.3",
|
|
33
|
-
"@csszyx/cli": "0.
|
|
34
|
-
"@csszyx/
|
|
35
|
-
"@csszyx/
|
|
33
|
+
"@csszyx/cli": "0.15.0",
|
|
34
|
+
"@csszyx/compiler": "0.15.0",
|
|
35
|
+
"@csszyx/unplugin": "0.15.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.20.1",
|