@csszyx/mcp-server 0.10.3 → 0.10.5

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 +30 -8
  2. package/package.json +4 -4
package/llms-full.txt CHANGED
@@ -3588,10 +3588,11 @@ Helper build-time/runtime:
3588
3588
  class not already in the built CSS.
3589
3589
 
3590
3590
  Safelist requires a statically analyzable position (a literal sz, or a szv config
3591
- literal). File-discovery gap: the prescan only scans files containing `sz=`/`sz:`,
3592
- so a standalone szv-config file (no JSX) is skipped → co-locate szv in the
3593
- component file that has a `sz=` usage. For a sibling workspace package, opt it in
3594
- with `compilePackages: ['name']`.
3591
+ literal). File discovery: the prescan scans any file containing `sz=`/`sz:` or a
3592
+ `szv(` declaration, so a standalone szv-config file (no JSX) is still scanned.
3593
+ Co-locating szv in the component file is the recommended layout (tree-shaking
3594
+ unit). For a sibling workspace package, opt it in with
3595
+ `compileSources: ['packages/name']`.
3595
3596
 
3596
3597
  Tree-shaking is content-presence (same as Tailwind), not import-graph. Co-locating
3597
3598
  szv makes the component the shaking unit.
@@ -3707,16 +3708,22 @@ Or exclude the file from csszyx processing entirely before parsing:
3707
3708
  ...csszyx({ exclude: ['src/generated/**', /icon-dump\.tsx$/] })
3708
3709
  ```
3709
3710
 
3710
- ## Monorepo Workspace Packages (compilePackages)
3711
+ ## Monorepo Workspace Sources (compileSources)
3711
3712
 
3712
3713
  `/packages/` is hard-ignored by default (a published library ships pre-extracted
3713
- CSS). To compile `sz` in a monorepo workspace package you author, opt it in by
3714
- directory nameonly `/packages/` is relaxed, `node_modules`/`.next` stay ignored:
3714
+ CSS) and only the build root is pre-scanned. To compile `sz`/`szv` in a monorepo
3715
+ design-system you author under `/packages/` or a sibling outside the build root
3716
+ — opt it in BY PATH. Paths resolve like Vite config paths (relative to
3717
+ `config.root`); pnpm symlinks matched after realpath; `node_modules`/`.next` stay
3718
+ ignored unless a path points into them:
3715
3719
 
3716
3720
  ```js
3717
- ...csszyx({ compilePackages: ['vui'] }) // compiles sz in /packages/vui/**
3721
+ ...csszyx({ compileSources: ['packages/vui', '../libs/ui'] })
3718
3722
  ```
3719
3723
 
3724
+ A non-`/packages/` lib INSIDE the build root needs no config (compiled + scanned
3725
+ automatically); `compileSources` is for `/packages/` or sources OUTSIDE the root.
3726
+
3720
3727
  A `/packages/` file with `sz` that is not opted in is skipped silently (no CSS);
3721
3728
  csszyx warns at build end and lists those files.
3722
3729
 
@@ -3761,10 +3768,25 @@ npx @csszyx/cli migrate src/ # migrate all JSX/TSX/HTML under src/
3761
3768
  npx @csszyx/cli migrate --dry-run # preview changes without writing files
3762
3769
  npx @csszyx/cli migrate --ignore "**/*.test.tsx,**/fixtures/**"
3763
3770
  npx @csszyx/cli migrate --pattern "src/components/**/*.tsx"
3771
+ npx @csszyx/cli migrate --keys-only # upgrade existing csszyx code: normalize sz KEYS only, leave className untouched
3764
3772
  ```
3765
3773
 
3766
3774
  Migration logs are written to `.csszyx/logs/`. Add `.csszyx/` to `.gitignore`.
3767
3775
 
3776
+ ### `--keys-only` — upgrade existing csszyx code (not a Tailwind→sz migration)
3777
+
3778
+ Plain `migrate` converts Tailwind `className` strings into `sz` props — for
3779
+ adopting csszyx. If you ALREADY use csszyx and are bumping a version that renamed
3780
+ sz-prop keys to their canonical form (e.g. the 0.9.10 → 0.10.0 key normalization),
3781
+ use `--keys-only`: it rewrites legacy sz-prop keys to canonical inside `sz={...}`
3782
+ and leaves `className` (and everything else) completely untouched. It only edits
3783
+ JSX/TSX (HTML has no sz objects). This is the safe, surgical upgrade path — it
3784
+ won't touch your hand-written classes.
3785
+
3786
+ ```bash
3787
+ npx @csszyx/cli migrate --keys-only --dry-run # preview the key rewrites first
3788
+ ```
3789
+
3768
3790
  ### Audit — discover unrecognized classes
3769
3791
 
3770
3792
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csszyx/mcp-server",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
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.3",
34
- "@csszyx/cli": "0.10.3",
35
- "@csszyx/unplugin": "0.10.3"
33
+ "@csszyx/cli": "0.10.5",
34
+ "@csszyx/unplugin": "0.10.5",
35
+ "@csszyx/compiler": "0.10.5"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^6.0.3",