@csszyx/mcp-server 0.17.0 → 0.17.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/llms-full.txt +9 -3
- package/package.json +6 -6
package/llms-full.txt
CHANGED
|
@@ -250,6 +250,11 @@ canonical key or replacement shape. A truly unknown key is different: it warns
|
|
|
250
250
|
but still emits a kebab-case candidate so an intentional Tailwind `@utility`
|
|
251
251
|
can serve it.
|
|
252
252
|
|
|
253
|
+
Diagnostics retain the statically resolved objects inside conditional branches,
|
|
254
|
+
ternary spreads and sz arrays. Shared source properties are reported once, without
|
|
255
|
+
changing emitted classes. Unresolved spreads still have incomplete key/value
|
|
256
|
+
checking: a fallback warning does not mean their readable properties are clean.
|
|
257
|
+
|
|
253
258
|
## Type safety — unknown keys are TypeScript errors
|
|
254
259
|
|
|
255
260
|
The `sz` prop type is **closed**: a key that is not a known sz prop or variant is a
|
|
@@ -688,6 +693,7 @@ Strategy for static analysis vs runtime generation.
|
|
|
688
693
|
| **Variable reference** | ❌ Not applicable | ✅ **Build time** | `sz={myVar}` — pass variable directly when no override needed. Compiler resolves the binding to its object literal initializer (incl. `as const`, `satisfies`, explicit type annotation). |
|
|
689
694
|
| **Object Spread** | ❌ Fails spread | ✅ **Static Analysis** | `sz={{ ...baseProps, key: val }}` — use spread only when overriding/adding; last key wins. Resolved at build time for local literals. Multiple/nested spreads supported. Imported vars fall back to `_sz()` — no crash. When runtime `sz` emits CSS variables beside one direct object-literal JSX prop spread, or one conditional with object-literal branches, generated variables merge into every branch's `style`; unresolved/multiple JSX spreads retain a collision diagnostic. |
|
|
690
695
|
| **Array variable items** | ❌ Not applicable | ✅ **Build time** | `sz={[varA, varB]}` and `sz={[varA, cond && varB]}` — LATER WINS composition. All-static-object arrays deep-merge at build (later leaf wins per key path, sibling keys survive) into one className; arrays with strings/conditions/dynamic elements emit `_szcn(...)` — a compiler-injected helper (`_` = generated code, never hand-authored; the unmemoized twin of `szcn`) applying the same later-wins rule per property group at runtime. Finite ternary elements and finite conditional object properties compile to conditional class strings; only truly dynamic elements (e.g. a forwarded `szsc` slot) pass through `_szPart` (string passthrough / sz-object compile). |
|
|
696
|
+
| **Two `sz` attributes** | ❌ Not applicable | ✅ **Build time** | `<div sz={a} sz={b} />` is read as `sz={[a, b]}` — later wins per property, one className, an authored `className` first. Every shape folds: two arrays join their elements; a ternary or a runtime value becomes one element of the composition. JSX compilers would pass the duplicate through as a duplicate object key, where the last silently replaces the first. Reported as a nudge — write the array so the order is on the page. |
|
|
691
697
|
| **Ternary variable branches** | ❌ Not applicable | ✅ **Build time** | `sz={cond ? varA : varB}` — both branches compiled to static strings when variables are local literals. A branch spelled `undefined`, `null`, `false`, or `{}` is the EMPTY style and compiles to no classes, so `sz={cond ? varA : undefined}` folds just like `: {}`. A chain — `a ? x : b ? y : z` — compiles too, up to 8 tests; the emitted expression keeps the same nesting, so each test is only reached when every test before it was falsy. Past 8 the attribute keeps the runtime path. |
|
|
692
698
|
| **Guarded style (`&&`)** | ❌ Not applicable | ✅ **Build time** | `sz={cond && varA}` compiles to the ternary it already is, because a falsy left operand is the empty style. `sz={a \|\| varA}` does NOT compile: `\|\|` yields its LEFT operand when the test passes, and that value can be a style the fold would drop. |
|
|
693
699
|
| **Chained variables** | ❌ Not applicable | ✅ **Build time** | `const b = { ...a, key: val }; <div sz={b} />` — compiler resolves the chain recursively. |
|
|
@@ -2906,9 +2912,9 @@ Controlling inline-size (logical equivalent of width). Added in Tailwind v4.2.
|
|
|
2906
2912
|
|
|
2907
2913
|
Component-like utility for fixing an element's width to the current breakpoint.
|
|
2908
2914
|
|
|
2909
|
-
| Concept | CSS Rule
|
|
2910
|
-
| :--------- |
|
|
2911
|
-
| **Enable** | `width: 100%; max-width:
|
|
2915
|
+
| Concept | CSS Rule | Tailwind v4 Class | `sz` Prop (Object Syntax) | Note |
|
|
2916
|
+
| :--------- | :---------------------------------------------------------- | :---------------- | :------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2917
|
+
| **Enable** | `width: 100%; max-width: <breakpoint> (at each breakpoint)` | `container` | `{ container: true }` | **Top-level prop**. `maxW` does not accept `container`: it resolves against the `--container-*` scale, where no `container` key exists, so `{ maxW: 'container' }` emits `max-w-container` and styles nothing. |
|
|
2912
2918
|
|
|
2913
2919
|
## Typography Plugin (Prose)
|
|
2914
2920
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/mcp-server",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.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",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"node": "^22.18.0 || >=24.11.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@csszyx/cli": "0.17.
|
|
32
|
-
"@csszyx/compiler": "0.17.
|
|
33
|
-
"@csszyx/unplugin": "0.17.
|
|
31
|
+
"@csszyx/cli": "0.17.1",
|
|
32
|
+
"@csszyx/compiler": "0.17.1",
|
|
33
|
+
"@csszyx/unplugin": "0.17.1",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
35
|
-
"zod": "^4.4
|
|
35
|
+
"zod": "^4.5.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.20.1",
|
|
39
|
-
"tsx": "^4.23.
|
|
39
|
+
"tsx": "^4.23.13",
|
|
40
40
|
"typescript": "^6.0.3",
|
|
41
41
|
"unbuild": "^3.6.1",
|
|
42
42
|
"vitest": "^4.1.11"
|