@sky.ui/mcp 0.0.1 → 0.0.2

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 (43) hide show
  1. package/README.md +191 -182
  2. package/data/chart-api-sections.json +4184 -4184
  3. package/data/reactivity-readme-snapshot.json +1 -1
  4. package/data/theme-authoring-contract.json +598 -598
  5. package/dist/catalog.d.ts.map +1 -1
  6. package/dist/catalog.js +40 -29
  7. package/dist/catalog.js.map +1 -1
  8. package/dist/cem.d.ts +1 -1
  9. package/dist/cem.d.ts.map +1 -1
  10. package/dist/cem.js +5 -11
  11. package/dist/cem.js.map +1 -1
  12. package/dist/docs-read.js +6 -6
  13. package/dist/docs.js +4 -4
  14. package/dist/framework-wrappers.d.ts.map +1 -1
  15. package/dist/framework-wrappers.js +4 -8
  16. package/dist/framework-wrappers.js.map +1 -1
  17. package/dist/mcp-runtime-status.js +2 -2
  18. package/dist/package-resolve.d.ts +10 -0
  19. package/dist/package-resolve.d.ts.map +1 -0
  20. package/dist/package-resolve.js +87 -0
  21. package/dist/package-resolve.js.map +1 -0
  22. package/dist/reactivity-info.d.ts.map +1 -1
  23. package/dist/reactivity-info.js +4 -11
  24. package/dist/reactivity-info.js.map +1 -1
  25. package/dist/server.js +4 -4
  26. package/dist/source-read.d.ts.map +1 -1
  27. package/dist/source-read.js +6 -10
  28. package/dist/source-read.js.map +1 -1
  29. package/dist/utils-suggestion-grounding.d.ts.map +1 -1
  30. package/dist/utils-suggestion-grounding.js +4 -11
  31. package/dist/utils-suggestion-grounding.js.map +1 -1
  32. package/docs/agent-recipe-example-site.md +91 -91
  33. package/docs/ai-design-mcp-blueprint.md +75 -75
  34. package/docs/cross-model-mcp-playbook.md +127 -127
  35. package/docs/example-site-and-mcp-training.md +82 -82
  36. package/docs/mcp-capability-status.md +51 -51
  37. package/docs/mcp-tooling-roadmap.md +36 -36
  38. package/docs/sky-chart-option-api.md +47 -47
  39. package/docs/starter-prompt.md +17 -17
  40. package/docs/theme-config-guide.md +178 -178
  41. package/docs/utils-usage-guide.md +112 -110
  42. package/docs/vue-wrapper-v-model.md +36 -36
  43. package/package.json +72 -63
@@ -1,110 +1,112 @@
1
- # Using @sky.ui/utils
2
-
3
- Sky UI utilities are **JIT CSS classes** you add in HTML/JSX/Vue/Lit templates (`class` / `className`). A **PostCSS plugin** scans your project, reads **`skyui.config.js`**, and emits only the CSS you use.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install @sky.ui/utils postcss
9
- ```
10
-
11
- Register in PostCSS (exact wiring depends on your bundler use MCP **`get_project_guide`** with `kind: setup`):
12
-
13
- ```js
14
- import skyui from '@sky.ui/utils/postcss';
15
-
16
- export default {
17
- plugins: [skyui()]
18
- };
19
- ```
20
-
21
- **Peer dependency:** `postcss` >= 8.4.
22
-
23
- ## Public imports
24
-
25
- | Import | Use |
26
- | --- | --- |
27
- | `@sky.ui/utils` / `@sky.ui/utils/postcss` | PostCSS plugin (**`SkyUIPlugin`**) |
28
- | `@sky.ui/utils/vite` | Vite integration |
29
- | `@sky.ui/utils/css-data` | VS Code `css.customData` silences “Unknown at rule” for `@apply` / `@skyui` |
30
- | `@sky.ui/utils/suggestion-engine` | Editor completions (optional) |
31
- | `@sky.ui/utils/prettier-plugin` | Sort class strings in `class` / `@apply` |
32
- | `@sky.ui/utils/runtime` | Browser **`skyui`** helper for static pages |
33
-
34
- ## `skyui.config.js`
35
-
36
- Typical fields:
37
-
38
- | Field | Purpose |
39
- | --- | --- |
40
- | `content` | Globs of files to scan for class names |
41
- | `safelist` | Classes always generated (strings or `{ pattern, variants }`) |
42
- | `plugins` | Built-ins such as `@skyuicss/forms`, `@skyuicss/typography`, `@skyuicss/container-queries` |
43
- | `theme` / `theme.extend` | Colors, spacing, screens, `preflight`, `formsStrategy`, animations |
44
- | `breakpoints` | Screen map for `sm:`, `md:`, |
45
-
46
- The plugin discovers config by walking up from the processed CSS file.
47
-
48
- ## VS Code CSS validation
49
-
50
- Add to `.vscode/settings.json` so `@apply` and `@skyui` are not flagged as unknown at-rules:
51
-
52
- ```json
53
- {
54
- "css.customData": ["./node_modules/@sky.ui/utils/skyui.css-data.json"]
55
- }
56
- ```
57
-
58
- Or install the **Sky UI IntelliSense** extension (bundles the same custom data).
59
-
60
- ## CSS layers and `@skyui` directives
61
-
62
- Declare layer order once:
63
-
64
- ```css
65
- @layer skyui.base, skyui.components, skyui.utilities;
66
- @skyui utilities;
67
- ```
68
-
69
- | Directive | Purpose |
70
- | --- | --- |
71
- | `@apply` | Compose utilities inside component CSS |
72
- | `@skyui theme { … }` | CSS-first design tokens |
73
- | `@skyui source "glob"` | Extra scan paths |
74
- | `@skyui source inline("a b")` | Safelist in CSS |
75
- | `@skyui reference` | Tokens only in scoped styles (pair with global utilities) |
76
- | `@skyui utility` / `@skyui variant` | Custom utility or variant |
77
- | `@skyui plugin "…"` | Load a plugin spec |
78
-
79
- ## Built-in plugins (`@skyuicss/*`)
80
-
81
- | Spec | Role |
82
- | --- | --- |
83
- | `@skyuicss/forms` | Form control utilities; optional `formsStrategy`: `class` \| `base` \| `both` |
84
- | `@skyuicss/typography` | `prose` utilities (`--sky-prose-*` variables) |
85
- | `@skyuicss/container-queries` | Container-query variants from theme screens |
86
-
87
- Short aliases: `forms`, `typography`, `container-queries`.
88
-
89
- ## Preflight
90
-
91
- `theme.preflight`: `true` | `"minimal"` | `"full"` — optional base reset in `@layer skyui.base` (default off).
92
-
93
- ## Variants (common families)
94
-
95
- Responsive (`sm:`, `md:`, `max-sm:`), dark/light, state (`hover:`, `focus:`, `disabled:`), `not-*`, `group-*` / `peer-*`, `starting:`, `aria-*`, arbitrary (`has-[…]:`, `[&…]:`).
96
-
97
- Use MCP **`utility_classes`** (`operation: variant_prefixes`) for the full prefix list, **`search_classes`** to browse names, **`check_class`** to validate a token.
98
-
99
- ## Theme alignment with components
100
-
101
- Use MCP **`get_theme`** — start with **`operation: guide`**, then **`fields`** / **`field`** for `userTheme` paths, and **`operation: variables`** for emitted **`--sky-*`** names. Align `skyui.config` `theme.extend` with tokens from **`@sky.ui/core`**. Prefer utility classes for layout/spacing/typography around **`<sky-*>`** elements.
102
-
103
- ## Styling workflow for assistants
104
-
105
- 1. **`get_project_guide`** install + bundler wiring
106
- 2. **`utility_classes`** — validate and discover class names
107
- 3. **`get_theme`** — token names for custom theme keys
108
- 4. **`get_docs`** — `packages/mcp/docs/utils-usage-guide.md` (this file) when needed
109
-
110
- Prefer utility `class` / `className` over large hand-written CSS unless the user asks otherwise.
1
+ # Using @sky.ui/utils
2
+
3
+ Sky UI utilities are **JIT CSS classes** you add in HTML/JSX/Vue/Lit templates (`class` / `className`). A **PostCSS plugin** scans your project, reads **`skyui.config.js`**, and emits only the CSS you use.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install "@sky.ui/utils" postcss
9
+ ```
10
+
11
+ > Quote scoped names (`"@sky.ui/…"`)required in PowerShell.
12
+
13
+ Register in PostCSS (exact wiring depends on your bundler — use MCP **`get_project_guide`** with `kind: setup`):
14
+
15
+ ```js
16
+ import skyui from '@sky.ui/utils/postcss';
17
+
18
+ export default {
19
+ plugins: [skyui()]
20
+ };
21
+ ```
22
+
23
+ **Peer dependency:** `postcss` >= 8.4.
24
+
25
+ ## Public imports
26
+
27
+ | Import | Use |
28
+ | --- | --- |
29
+ | `@sky.ui/utils` / `@sky.ui/utils/postcss` | PostCSS plugin (**`SkyUIPlugin`**) |
30
+ | `@sky.ui/utils/vite` | Vite integration |
31
+ | `@sky.ui/utils/css-data` | VS Code `css.customData` silences “Unknown at rule” for `@apply` / `@skyui` |
32
+ | `@sky.ui/utils/suggestion-engine` | Editor completions (optional) |
33
+ | `@sky.ui/utils/prettier-plugin` | Sort class strings in `class` / `@apply` |
34
+ | `@sky.ui/utils/runtime` | Browser **`skyui`** helper for static pages |
35
+
36
+ ## `skyui.config.js`
37
+
38
+ Typical fields:
39
+
40
+ | Field | Purpose |
41
+ | --- | --- |
42
+ | `content` | Globs of files to scan for class names |
43
+ | `safelist` | Classes always generated (strings or `{ pattern, variants }`) |
44
+ | `plugins` | Built-ins such as `@skyuicss/forms`, `@skyuicss/typography`, `@skyuicss/container-queries` |
45
+ | `theme` / `theme.extend` | Colors, spacing, screens, `preflight`, `formsStrategy`, animations |
46
+ | `breakpoints` | Screen map for `sm:`, `md:`, |
47
+
48
+ The plugin discovers config by walking up from the processed CSS file.
49
+
50
+ ## VS Code CSS validation
51
+
52
+ Add to `.vscode/settings.json` so `@apply` and `@skyui` are not flagged as unknown at-rules:
53
+
54
+ ```json
55
+ {
56
+ "css.customData": ["./node_modules/@sky.ui/utils/skyui.css-data.json"]
57
+ }
58
+ ```
59
+
60
+ Or install the **Sky UI IntelliSense** extension (bundles the same custom data).
61
+
62
+ ## CSS layers and `@skyui` directives
63
+
64
+ Declare layer order once:
65
+
66
+ ```css
67
+ @layer skyui.base, skyui.components, skyui.utilities;
68
+ @skyui utilities;
69
+ ```
70
+
71
+ | Directive | Purpose |
72
+ | --- | --- |
73
+ | `@apply` | Compose utilities inside component CSS |
74
+ | `@skyui theme { … }` | CSS-first design tokens |
75
+ | `@skyui source "glob"` | Extra scan paths |
76
+ | `@skyui source inline("a b")` | Safelist in CSS |
77
+ | `@skyui reference` | Tokens only in scoped styles (pair with global utilities) |
78
+ | `@skyui utility` / `@skyui variant` | Custom utility or variant |
79
+ | `@skyui plugin "…"` | Load a plugin spec |
80
+
81
+ ## Built-in plugins (`@skyuicss/*`)
82
+
83
+ | Spec | Role |
84
+ | --- | --- |
85
+ | `@skyuicss/forms` | Form control utilities; optional `formsStrategy`: `class` \| `base` \| `both` |
86
+ | `@skyuicss/typography` | `prose` utilities (`--sky-prose-*` variables) |
87
+ | `@skyuicss/container-queries` | Container-query variants from theme screens |
88
+
89
+ Short aliases: `forms`, `typography`, `container-queries`.
90
+
91
+ ## Preflight
92
+
93
+ `theme.preflight`: `true` | `"minimal"` | `"full"` — optional base reset in `@layer skyui.base` (default off).
94
+
95
+ ## Variants (common families)
96
+
97
+ Responsive (`sm:`, `md:`, `max-sm:`), dark/light, state (`hover:`, `focus:`, `disabled:`), `not-*`, `group-*` / `peer-*`, `starting:`, `aria-*`, arbitrary (`has-[…]:`, `[&…]:`).
98
+
99
+ Use MCP **`utility_classes`** (`operation: variant_prefixes`) for the full prefix list, **`search_classes`** to browse names, **`check_class`** to validate a token.
100
+
101
+ ## Theme alignment with components
102
+
103
+ Use MCP **`get_theme`** — start with **`operation: guide`**, then **`fields`** / **`field`** for `userTheme` paths, and **`operation: variables`** for emitted **`--sky-*`** names. Align `skyui.config` `theme.extend` with tokens from **`@sky.ui/core`**. Prefer utility classes for layout/spacing/typography around **`<sky-*>`** elements.
104
+
105
+ ## Styling workflow for assistants
106
+
107
+ 1. **`get_project_guide`** — install + bundler wiring
108
+ 2. **`utility_classes`** — validate and discover class names
109
+ 3. **`get_theme`** — token names for custom theme keys
110
+ 4. **`get_docs`** `packages/mcp/docs/utils-usage-guide.md` (this file) when needed
111
+
112
+ Prefer utility `class` / `className` over large hand-written CSS unless the user asks otherwise.
@@ -1,36 +1,36 @@
1
- # Vue wrappers: `v-model` support and usage
2
-
3
- ## When `v-model` works
4
-
5
- Use `v-model` on a `@sky.ui/vue` wrapper **when that component is documented for two-way binding**—confirm the primary value prop and update event in **`get_sky_component_docs`** (props/events surfaces).
6
-
7
- If the component does **not** document a two-way pair, treat it as **one-way**: bind with `:prop` / `@event` using the names from those tools. Do not assume `v-model` matches other UI libraries.
8
-
9
- ## Usage patterns
10
-
11
- **Default `v-model`** — when the primary bound prop is the default for that component (often `modelValue` / `value`-style APIs exposed to Vue):
12
-
13
- ```vue
14
- <SkyExample v-model="selected" />
15
- ```
16
-
17
- **Named `v-model`** — when you bind a specific prop (replace `propName` with the actual prop from docs):
18
-
19
- ```vue
20
- <SkyExample v-model:propName="selected" />
21
- ```
22
-
23
- **Explicit two-way** — use the prop and event names from docs (`get_component_events`). Payload is on **`CustomEvent.detail`**:
24
-
25
- ```vue
26
- <SkyExample :foo="state" @foo-changed="onFooChanged" />
27
- ```
28
-
29
- ```ts
30
- function onFooChanged(e: Event) {
31
- const detail = (e as CustomEvent).detail;
32
- // Map detail to local state using the shape documented for this component.
33
- }
34
- ```
35
-
36
- Sky UI elements expose **`CustomEvent`** payloads on **`detail`**; wrappers follow the same contract where two-way binding applies.
1
+ # Vue wrappers: `v-model` support and usage
2
+
3
+ ## When `v-model` works
4
+
5
+ Use `v-model` on a `@sky.ui/vue` wrapper **when that component is documented for two-way binding**—confirm the primary value prop and update event in **`get_sky_component_docs`** (props/events surfaces).
6
+
7
+ If the component does **not** document a two-way pair, treat it as **one-way**: bind with `:prop` / `@event` using the names from those tools. Do not assume `v-model` matches other UI libraries.
8
+
9
+ ## Usage patterns
10
+
11
+ **Default `v-model`** — when the primary bound prop is the default for that component (often `modelValue` / `value`-style APIs exposed to Vue):
12
+
13
+ ```vue
14
+ <SkyExample v-model="selected" />
15
+ ```
16
+
17
+ **Named `v-model`** — when you bind a specific prop (replace `propName` with the actual prop from docs):
18
+
19
+ ```vue
20
+ <SkyExample v-model:propName="selected" />
21
+ ```
22
+
23
+ **Explicit two-way** — use the prop and event names from docs (`get_component_events`). Payload is on **`CustomEvent.detail`**:
24
+
25
+ ```vue
26
+ <SkyExample :foo="state" @foo-changed="onFooChanged" />
27
+ ```
28
+
29
+ ```ts
30
+ function onFooChanged(e: Event) {
31
+ const detail = (e as CustomEvent).detail;
32
+ // Map detail to local state using the shape documented for this component.
33
+ }
34
+ ```
35
+
36
+ Sky UI elements expose **`CustomEvent`** payloads on **`detail`**; wrappers follow the same contract where two-way binding applies.
package/package.json CHANGED
@@ -1,63 +1,72 @@
1
- {
2
- "name": "@sky.ui/mcp",
3
- "version": "0.0.1",
4
- "private": false,
5
- "description": "MCP server for Sky UI — component catalog, docs, theme tokens, and live snippets from library.sky-ui.com for AI coding assistants.",
6
- "type": "module",
7
- "bin": {
8
- "sky-ui-mcp": "dist/mcp-stdio-entry.js"
9
- },
10
- "exports": {
11
- ".": "./dist/server.js",
12
- "./docs": "./dist/docs.js",
13
- "./package.json": "./package.json"
14
- },
15
- "license": "SEE LICENSE IN LICENSE.md",
16
- "files": [
17
- "dist",
18
- "data",
19
- "docs",
20
- "README.md",
21
- "LICENSE.md"
22
- ],
23
- "scripts": {
24
- "build": "node ./scripts/gen-chart-api-sections.mjs && node ./scripts/gen-utils-suggestion-fallback.mjs && node ./scripts/gen-reactivity-readme-snapshot.mjs && tsc -p tsconfig.json && node ./scripts/verify-mcp-tool-parity.mjs && node ./scripts/validate-guideline-component-refs.mjs && node ./scripts/scan-guideline-banned-patterns.mjs && npm run check:guideline-coverage",
25
- "start": "node ./dist/mcp-stdio-entry.js",
26
- "dev": "tsx ./src/server.ts",
27
- "serve:post": "tsx ./src/post-endpoint-server.ts",
28
- "serve:post:dist": "node ./dist/post-endpoint-server.js",
29
- "check:guideline-coverage": "node ./scripts/check-guideline-coverage.mjs",
30
- "check:guideline-coverage:strict": "node ./scripts/check-guideline-coverage.mjs --strict",
31
- "check:guideline-banned-patterns": "node ./scripts/scan-guideline-banned-patterns.mjs",
32
- "clean": "rimraf dist"
33
- },
34
- "dependencies": {
35
- "@fastify/cors": "^11.2.0",
36
- "@fastify/rate-limit": "^10.3.0",
37
- "@modelcontextprotocol/sdk": "^1.29.0",
38
- "fastify": "^5.8.5",
39
- "typescript": "^5.9.3",
40
- "zod": "^3.25.0"
41
- },
42
- "peerDependencies": {
43
- "@sky.ui/core": ">=0.0.1",
44
- "@sky.ui/utils": ">=0.0.1"
45
- },
46
- "peerDependenciesMeta": {
47
- "@sky.ui/utils": {
48
- "optional": true
49
- }
50
- },
51
- "devDependencies": {
52
- "@types/node": "^22.10.0",
53
- "rimraf": "^6.1.2",
54
- "tsx": "^4.19.0"
55
- },
56
- "engines": {
57
- "node": ">=18"
58
- },
59
- "publishConfig": {
60
- "access": "public",
61
- "registry": "https://registry.npmjs.org/"
62
- }
63
- }
1
+ {
2
+ "name": "@sky.ui/mcp",
3
+ "version": "0.0.2",
4
+ "private": false,
5
+ "description": "MCP server for Sky UI — component catalog, docs, theme tokens, and live snippets from library.sky-ui.com for AI coding assistants.",
6
+ "type": "module",
7
+ "bin": {
8
+ "sky-ui-mcp": "dist/mcp-stdio-entry.js"
9
+ },
10
+ "exports": {
11
+ ".": "./dist/server.js",
12
+ "./docs": "./dist/docs.js",
13
+ "./package.json": "./package.json"
14
+ },
15
+ "license": "SEE LICENSE IN LICENSE.md",
16
+ "files": [
17
+ "dist",
18
+ "data",
19
+ "docs",
20
+ "README.md",
21
+ "LICENSE.md"
22
+ ],
23
+ "scripts": {
24
+ "build": "node ./scripts/gen-chart-api-sections.mjs && node ./scripts/gen-utils-suggestion-fallback.mjs && node ./scripts/gen-reactivity-readme-snapshot.mjs && tsc -p tsconfig.json && node ./scripts/verify-mcp-tool-parity.mjs && node ./scripts/validate-guideline-component-refs.mjs && node ./scripts/scan-guideline-banned-patterns.mjs && npm run check:guideline-coverage",
25
+ "start": "node ./dist/mcp-stdio-entry.js",
26
+ "dev": "tsx ./src/server.ts",
27
+ "serve:post": "tsx ./src/post-endpoint-server.ts",
28
+ "serve:post:dist": "node ./dist/post-endpoint-server.js",
29
+ "check:guideline-coverage": "node ./scripts/check-guideline-coverage.mjs",
30
+ "check:guideline-coverage:strict": "node ./scripts/check-guideline-coverage.mjs --strict",
31
+ "check:guideline-banned-patterns": "node ./scripts/scan-guideline-banned-patterns.mjs",
32
+ "clean": "rimraf dist"
33
+ },
34
+ "dependencies": {
35
+ "@fastify/cors": "^11.2.0",
36
+ "@fastify/rate-limit": "^10.3.0",
37
+ "@modelcontextprotocol/sdk": "^1.29.0",
38
+ "fastify": "^5.8.5",
39
+ "typescript": "^5.9.3",
40
+ "zod": "^3.25.0"
41
+ },
42
+ "peerDependencies": {
43
+ "@sky.ui/core": ">=0.0.1",
44
+ "@sky.ui/utils": ">=0.0.1"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "@sky.ui/utils": {
48
+ "optional": true
49
+ }
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^22.10.0",
53
+ "rimraf": "^6.1.2",
54
+ "tsx": "^4.19.0"
55
+ },
56
+ "engines": {
57
+ "node": ">=18"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public",
61
+ "registry": "https://registry.npmjs.org/"
62
+ },
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "git+https://gitlab.com/sky_ui/sky-ui.git",
66
+ "directory": "packages/mcp"
67
+ },
68
+ "bugs": {
69
+ "url": "https://gitlab.com/sky_ui/sky-ui/-/issues"
70
+ },
71
+ "homepage": "https://library.sky-ui.com"
72
+ }