@csszyx/mcp-server 0.11.3 → 0.11.4

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 +79 -1
  2. package/package.json +4 -4
package/llms-full.txt CHANGED
@@ -2985,6 +2985,83 @@ Utilities for controlling the alignment of table captions.
2985
2985
 
2986
2986
  ## Tooling
2987
2987
 
2988
+ ### TypeScript Language-Service Plugin (`@csszyx/ts-plugin`)
2989
+
2990
+ Static completion for TypeScript hosts that load project plugins. Not a
2991
+ universal LSP; host support must be verified. Two install channels:
2992
+
2993
+ - **VS Code:** install the `@csszyx/vscode` extension — it bundles the plugin
2994
+ and loads it via `contributes.typescriptServerPlugins`
2995
+ (`enableForWorkspaceTypeScriptVersions: true`). Zero config: no `tsconfig`
2996
+ entry, no TypeScript-version selection, works under bundled and workspace
2997
+ TypeScript, unaffected by pnpm hoisting. Do not tell users to edit `tsconfig`.
2998
+ - **Other hosts** (Neovim `ts_ls`, WebStorm, Zed, or VS Code without the
2999
+ extension): install and add to the leaf `tsconfig`.
3000
+
3001
+ ```bash
3002
+ pnpm add -D @csszyx/ts-plugin typescript
3003
+ ```
3004
+
3005
+ ```jsonc
3006
+ {
3007
+ "compilerOptions": {
3008
+ "plugins": [{ "name": "@csszyx/ts-plugin" }],
3009
+ },
3010
+ }
3011
+ ```
3012
+
3013
+ Recommend `"editor.quickSuggestions": { "strings": "on" }` (VS Code) so quoted
3014
+ sz values keep suggesting while typing — same guidance as Tailwind IntelliSense.
3015
+
3016
+ TypeScript resolves plugins next to the TypeScript install, not the `tsconfig`.
3017
+ Under pnpm the manual path needs `public-hoist-pattern[]=@csszyx/ts-plugin` in
3018
+ `.npmrc` (npm/Yarn flat layout does not). VS Code without the extension also
3019
+ needs "Use Workspace Version".
3020
+
3021
+ **AIX capability contract:**
3022
+
3023
+ - Complete keys and curated values in JSX `sz`, including nested variants and conditional object branches.
3024
+ - Complete CSS keys inside each component `szs` slot object; do not offer CSS keys at the outer slot-name level or on intrinsic-element `szs`.
3025
+ - Complete `szv` styles in `base` and `variants.<axis>.<option>`; complete imported `szr` objects.
3026
+ - Token relationships: a key already assigned in the same object is not suggested again; a nested object under a plain utility property (`p: { … }`) gets NO suggestions — only variant keys take style objects. Structured object VALUES are assisted: color props (`bg`, `color`, `borderColor`, …) offer exactly `{ color, op }` (the documented opacity form), `bgImg` offers `{ gradient, dir, in }`, and the `css` escape hatch (arbitrary CSS properties) is deliberately unassisted. Both the plugin and the extension companion enforce identical verdicts (drift-guarded by tests).
3027
+ - Accept direct, aliased, and namespace imports from `csszyx` / `@csszyx/runtime`; reject local/shadowed/unrelated same-spelled functions.
3028
+ - Insert numeric suggestions without quotes and string suggestions with quotes. Suggestions are not validation: Tailwind 4 numeric values are open-ended.
3029
+ - Preserve TypeScript's base completions. On cancellation, timeout, or internal failure, return the untouched base result.
3030
+
3031
+ Defaults: `enabled: true`, `values: true`, `maxEntries: 512`,
3032
+ `deadlineMs: 20`, `failureThreshold: 3`. Usually emit only `{ "name":
3033
+ "@csszyx/ts-plugin" }`; do not add tuning options without a demonstrated need.
3034
+
3035
+ **Not provided by this plugin:** theme-aware values, hover previews,
3036
+ diagnostics, syntax highlighting, Tailwind config/plugin execution, network, or
3037
+ telemetry. Those capabilities must not be inferred. The plugin is
3038
+ self-contained: its metadata is bundled at build time, so it installs with no
3039
+ runtime dependencies and there is no separate metadata package to install.
3040
+
3041
+ Diagnosis note: if the activation line `[csszyx-ts-plugin] activated` is present
3042
+ but typing letters never opens suggestions while `.`/`'` do, the suggest widget
3043
+ is being suppressed editor-side (TypeScript's own completions are equally
3044
+ affected) — not a plugin fault. Two known causes, in likelihood order: a
3045
+ composing input method — any IME that assembles characters before committing
3046
+ them, such as Vietnamese Telex/VNI, CJK IMEs, or dead-key layouts; its underline
3047
+ appears beneath typed letters and an open list stops filtering, and switching to
3048
+ a plain non-composing layout fixes it — and AI inline suggestions
3049
+ (microsoft/vscode#315373). Verify by typing `Ma` on an empty line.
3050
+
3051
+ Inside `@csszyx/vscode` there is no duplication to reconcile: the extension
3052
+ ships and injects this plugin for TypeScript/JavaScript and serves HTML itself
3053
+ (tsserver does not process HTML). In `auto` mode a trigger-character companion
3054
+ also covers the moments tsserver never auto-opens — `{`/`,` open key items that
3055
+ insert `key:` and chain into value suggestions; `:` (no space required) and
3056
+ space open per-key values, the only path by which numeric values (`p: 4`) get a
3057
+ list. Sessions are partitioned by trigger ownership, so companion and plugin
3058
+ never duplicate. `csszyx.completions` (via the TypeScript `configurePlugin`
3059
+ API): `auto` (default) | `extension` (plugin+companion disabled, extension
3060
+ serves all languages) | `off` (no sz completions). Hover and diagnostics are
3061
+ unaffected. In a value ternary (`p: ok ? 4 : …`) both branches are values of
3062
+ the owning key — a finite conditional is valid sz — so value suggestions
3063
+ continue there by design.
3064
+
2988
3065
  ### VS Code Extension (`@csszyx/vscode`)
2989
3066
 
2990
3067
  IntelliSense, hover, and diagnostics for `sz` props. Supports JSX, TSX, JS, TS, HTML.
@@ -2998,10 +3075,11 @@ IntelliSense, hover, and diagnostics for `sz` props. Supports JSX, TSX, JS, TS,
2998
3075
 
2999
3076
  **Settings:**
3000
3077
 
3078
+ - `csszyx.completions` (default: `auto`) — `auto` | `extension` | `off` (see plugin section)
3001
3079
  - `csszyx.enableDiagnostics` (default: `true`) — toggle unknown-prop warnings
3002
3080
  - `csszyx.enableHover` (default: `true`) — toggle hover preview
3003
3081
 
3004
- **Build:** esbuild → `dist/extension.js` (85KB CJS, zero Babel, uses `@csszyx/compiler/browser`)
3082
+ **Build:** esbuild → `dist/extension.js` (CJS, bundles `@csszyx/tooling-metadata` + `@csszyx/compiler/browser`); ships `@csszyx/ts-plugin` as a packed dependency for the tsserver-plugin contribution.
3005
3083
 
3006
3084
  ### MCP Server (`@csszyx/mcp-server`)
3007
3085
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csszyx/mcp-server",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
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/unplugin": "0.11.3",
34
- "@csszyx/compiler": "0.11.3",
35
- "@csszyx/cli": "0.11.3"
33
+ "@csszyx/compiler": "0.11.4",
34
+ "@csszyx/cli": "0.11.4",
35
+ "@csszyx/unplugin": "0.11.4"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^6.0.3",