@csszyx/mcp-server 0.10.0 → 0.10.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.
Files changed (2) hide show
  1. package/llms-full.txt +37 -13
  2. package/package.json +4 -4
package/llms-full.txt CHANGED
@@ -248,11 +248,15 @@ compile error, so typos and legacy CSS-property names are caught by `tsc` (run
248
248
  `tsc --noEmit` in CI to enforce it).
249
249
 
250
250
  ```tsx
251
- { bgColor: 'red-500' } // ❌ tsc error — unknown key; canonical is { bg: 'red-500' }
251
+ {
252
+ bgColor: "red-500";
253
+ } // ❌ tsc error — unknown key; canonical is { bg: 'red-500' }
252
254
 
253
255
  // Forcing a brand-new Tailwind utility csszyx has no key for yet — opt out explicitly:
254
256
  // @ts-expect-error - forward-compat utility not yet in csszyx
255
- { someNewUtility: 'x' } // ✅ allowed; the runtime still emits the class
257
+ {
258
+ someNewUtility: "x";
259
+ } // ✅ allowed; the runtime still emits the class
256
260
  ```
257
261
 
258
262
  Arbitrary variants are allowed by pattern: `{ '@container': {…} }`, `{ 'min-[320px]': {…} }`,
@@ -260,7 +264,9 @@ Arbitrary variants are allowed by pattern: `{ '@container': {…} }`, `{ 'min-[3
260
264
  Tailwind `@theme` and csszyx auto-generates the type:
261
265
 
262
266
  ```css
263
- @theme { --breakpoint-tablet: 40rem; } /* → { tablet: { p: 6 } } now type-checks */
267
+ @theme {
268
+ --breakpoint-tablet: 40rem;
269
+ } /* → { tablet: { p: 6 } } now type-checks */
264
270
  ```
265
271
 
266
272
  ## Full Snippets Reference
@@ -3511,29 +3517,47 @@ import { __szColorVar } from "csszyx/lite";
3511
3517
  When a caller passes one flat `className` to a component that renders nested elements, `splitBox` partitions it at the CSS box-model border line so each element gets the classes that act on it. Pure string functions, framework-agnostic. The class-token → box-role map is generated from the compiler's property tables (never drifts).
3512
3518
 
3513
3519
  ```tsx
3514
- import { splitBox, classify, has, pick, omit, stripSzProps } from '@csszyx/runtime';
3520
+ import {
3521
+ splitBox,
3522
+ splitBoxSz,
3523
+ classify,
3524
+ has,
3525
+ pick,
3526
+ omit,
3527
+ stripSzProps,
3528
+ } from "@csszyx/runtime";
3515
3529
 
3516
3530
  // Partition: outer = border-outward (margin/position/border/sizing/bg/shadow/transform/visibility),
3517
3531
  // inner = border-inward (padding/overflow/display/layout/gap/text/paint-inside/interactivity)
3518
- const { outer, inner } = splitBox('m-4 px-2 md:flex');
3532
+ const { outer, inner } = splitBox("m-4 px-2 md:flex");
3519
3533
  // outer: "m-4" inner: "px-2 md:flex"
3520
3534
 
3521
3535
  // Override any default per call (BoxSelector = box-role | category | class-prefix | { category: value })
3522
- splitBox('overflow-hidden p-4', { outer: ['overflow'] });
3536
+ splitBox("overflow-hidden p-4", { outer: ["overflow"] });
3523
3537
  // outer: "overflow-hidden" inner: "p-4"
3524
3538
 
3525
3539
  // Toolkit: csszyx owns the truth (box-role/category), your project owns the rule
3526
- classify('inset-ring-2'); // { role: 'inner', category: 'ring' }
3527
- has('p-2 overflow-y-auto', 'overflow'); // true
3528
- pick('m-4 text-sm', 'text'); // "text-sm"
3529
- omit('p-2 overflow-y-auto flex', 'overflow'); // "p-2 flex"
3540
+ classify("inset-ring-2"); // { role: 'inner', category: 'ring' }
3541
+ has("p-2 overflow-y-auto", "overflow"); // true
3542
+ pick("m-4 text-sm", "text"); // "text-sm"
3543
+ omit("p-2 overflow-y-auto flex", "overflow"); // "p-2 flex"
3530
3544
 
3531
3545
  // A scroller scrolls only when the outer frame clips (project-owned dependency rule)
3532
- const dep = has(outer, { overflow: 'hidden' }) ? 'overflow-y-auto h-full' : '';
3546
+ const dep = has(outer, { overflow: "hidden" }) ? "overflow-y-auto h-full" : "";
3547
+
3548
+ // sz-OBJECT routing: splitBoxSz partitions an sz OBJECT (not a className) into
3549
+ // { outer, inner } sz objects — keeps a szv-based component sz-native and routes
3550
+ // each key to the same side its class would (splitBoxSz(x) ≡ splitBox(compile(x))).
3551
+ splitBoxSz({ m: 4, px: 2 }); // { outer: { m: 4 }, inner: { px: 2 } }
3552
+ splitBoxSz({ gap: 2, hover: { px: 1 }, md: { m: 4 } }); // variants route by inner prop; split when they disagree
3553
+ splitBoxSz({ grow: 2, self: "center" }, { outer: ["grow", "self"] }); // force flex-item utils to the frame
3554
+ // classifySzKey(key) / hasSz / pickSz / omitSz — the sz-object toolkit twins
3533
3555
 
3534
3556
  // stripSzProps: drop sz before forwarding ...rest to the DOM (guards uncompiled files
3535
3557
  // whose raw sz would leak as sz="[object Object]"; dev-warns once on a raw-object sz)
3536
- function Box({ sz, ...rest }) { return <div {...stripSzProps(rest)} />; }
3558
+ function Box({ sz, ...rest }) {
3559
+ return <div {...stripSzProps(rest)} />;
3560
+ }
3537
3561
  ```
3538
3562
 
3539
3563
  ## Security — untrusted sz
@@ -3541,7 +3565,7 @@ function Box({ sz, ...rest }) { return <div {...stripSzProps(rest)} />; }
3541
3565
  csszyx is safe-by-default for AUTHORED sz (compiled to class strings at build time). When sz comes from UNTRUSTED input (JSON-driven UI, CMS, user data), it controls keys and values that reach the runtime CSS pipeline — purify it.
3542
3566
 
3543
3567
  ```tsx
3544
- import { dynamic, purifySz } from '@csszyx/dynamic';
3568
+ import { dynamic, purifySz } from "@csszyx/dynamic";
3545
3569
  // stripSzProps is exported from '@csszyx/runtime'
3546
3570
 
3547
3571
  // Untrusted sz → dynamic() runtime CSS: purify first (allowlist + value sanitize + proto guard)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csszyx/mcp-server",
3
- "version": "0.10.0",
3
+ "version": "0.10.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,9 +30,9 @@
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "zod": "^3.23.8",
33
- "@csszyx/cli": "0.10.0",
34
- "@csszyx/unplugin": "0.10.0",
35
- "@csszyx/compiler": "0.10.0"
33
+ "@csszyx/compiler": "0.10.1",
34
+ "@csszyx/cli": "0.10.1",
35
+ "@csszyx/unplugin": "0.10.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^6.0.3",