@pwrs/cem 0.4.5 → 0.5.0

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/README.md +52 -36
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -27,6 +27,43 @@ See more in the [Generate docs][generatedocs]
27
27
 
28
28
  ---
29
29
 
30
+ ### `cem lsp`
31
+
32
+ The `cem lsp` command starts a Language Server Protocol (LSP) server that provides intelligent IDE features for custom elements in HTML and TypeScript files. It offers contextual autocomplete, hover documentation, and other editor enhancements by analyzing your custom elements manifests.
33
+
34
+ **Features:**
35
+ - Tag name and attribute completion for custom elements
36
+ - Slot attribute value completion for direct children of slotted elements
37
+ - Hover documentation with type information
38
+ - **Error detection with autofixes** - Real-time validation with one-click corrections:
39
+ - Slot validation with smart suggestions
40
+ - Tag name validation with typo detection and missing import suggestions
41
+ - Attribute validation against HTML global attributes and custom element schemas
42
+ - Attribute value validation against manifest type definitions (union types, literals, numbers, booleans)
43
+ - Go-to-definition support for jumping to element source code
44
+ - Go-to-references to find all usages of custom elements across your workspace
45
+ - Support for HTML files and TypeScript template literals
46
+ - Automatic manifest discovery and live reloading
47
+
48
+ See more in the [LSP docs][lspdocs]
49
+
50
+ ---
51
+
52
+ ### `cem mcp`
53
+
54
+ The `cem mcp` command starts a Model Context Protocol (MCP) server that provides AI-native access to your custom elements manifest data. This enables intelligent HTML generation, component understanding, and design system compliance for AI assistants.
55
+
56
+ **Features:**
57
+ - **Resources**: Access to schemas, package discovery, element summaries, and accessibility patterns
58
+ - **Tools**: HTML validation, attribute suggestions, HTML generation, and CSS integration guidance
59
+ - **Cross-package discovery**: Multi-manifest support for complex design systems
60
+
61
+ The server transforms your custom elements manifests into structured, actionable context that AI systems can use to generate proper HTML with correct slot usage, appropriate attributes, and design system compliance.
62
+
63
+ See more in the [MCP docs][mcpdocs]
64
+
65
+ ---
66
+
30
67
  ### `cem list`
31
68
 
32
69
  The `cem list` command provides a fast, flexible way to inspect custom elements, their features, and their metadata directly from your manifest file.
@@ -54,28 +91,6 @@ See the [Configuration Reference][configdocs] for more information.
54
91
 
55
92
  ---
56
93
 
57
- ### `cem lsp`
58
-
59
- The `cem lsp` command starts a Language Server Protocol (LSP) server that provides intelligent IDE features for custom elements in HTML and TypeScript files. It offers contextual autocomplete, hover documentation, and other editor enhancements by analyzing your custom elements manifests.
60
-
61
- **Features:**
62
- - Tag name and attribute completion for custom elements
63
- - Slot attribute value completion for direct children of slotted elements
64
- - Hover documentation with type information
65
- - **Error detection with autofixes** - Real-time validation with one-click corrections:
66
- - Slot validation with smart suggestions
67
- - Tag name validation with typo detection and missing import suggestions
68
- - Attribute validation against HTML global attributes and custom element schemas
69
- - Attribute value validation against manifest type definitions (union types, literals, numbers, booleans)
70
- - Go-to-definition support for jumping to element source code
71
- - Go-to-references to find all usages of custom elements across your workspace
72
- - Support for HTML files and TypeScript template literals
73
- - Automatic manifest discovery and live reloading
74
-
75
- See more in the [LSP docs][lspdocs]
76
-
77
- ---
78
-
79
94
  ## Contributing
80
95
 
81
96
  For information on building and testing, please see
@@ -88,17 +103,18 @@ the terms of the [GNU General Public License v3.0][gpl3].
88
103
 
89
104
  © 2025 Benny Powers
90
105
 
91
- [cem]: https://github.com/webcomponents/custom-elements-manifest
92
- [dtcg]: https://tr.designtokens.org/format/
93
- [go]: https://go.dev
94
- [treesitter]: https://tree-sitter.github.io/tree-sitter/
95
- [gpl3]: https://www.gnu.org/licenses/gpl-3.0.html
96
- [contributingmd]: https://bennypowers.github.io/cem/docs/contributing/
97
- [issuenew]: https://github.com/bennypowers/cem/issues/new
98
- [installationdocs]: https://bennypowers.github.io/cem/installation/
99
- [generatedocs]: https://bennypowers.github.io/cem/commands/generate/
100
- [listdocs]: https://bennypowers.github.io/cem/commands/list/
101
- [searchdocs]: https://bennypowers.github.io/cem/commands/search/
102
- [validatedocs]: https://bennypowers.github.io/cem/commands/validate/
103
- [lspdocs]: https://bennypowers.github.io/cem/docs/lsp/
104
- [configdocs]: https://bennypowers.github.io/cem/configuration/
106
+ [cem]: https://github.com/webcomponents/custom-elements-manifest
107
+ [dtcg]: https://tr.designtokens.org/format/
108
+ [go]: https://go.dev
109
+ [treesitter]: https://tree-sitter.github.io/tree-sitter/
110
+ [gpl3]: https://www.gnu.org/licenses/gpl-3.0.html
111
+ [issuenew]: https://github.com/bennypowers/cem/issues/new
112
+ [contributingmd]: https://bennypowers.dev/cem/docs/contributing/
113
+ [installationdocs]: https://bennypowers.dev/cem/docs/installation/
114
+ [generatedocs]: https://bennypowers.dev/cem/docs/commands/generate/
115
+ [listdocs]: https://bennypowers.dev/cem/docs/commands/list/
116
+ [searchdocs]: https://bennypowers.dev/cem/docs/commands/search/
117
+ [validatedocs]: https://bennypowers.dev/cem/docs/commands/validate/
118
+ [lspdocs]: https://bennypowers.dev/cem/docs/lsp/
119
+ [mcpdocs]: https://bennypowers.dev/cem/docs/mcp/
120
+ [configdocs]: https://bennypowers.dev/cem/docs/configuration/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pwrs/cem",
3
- "version": "0.4.5",
3
+ "version": "0.5.0",
4
4
  "description": "CLI tool for generating and working with Custom Elements Manifests",
5
5
  "type": "module",
6
6
  "engines": {
@@ -13,12 +13,12 @@
13
13
  "postinstall": "node ./install-platform-binary.js"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@pwrs/cem-linux-x64": "0.4.5",
17
- "@pwrs/cem-linux-arm64": "0.4.5",
18
- "@pwrs/cem-darwin-x64": "0.4.5",
19
- "@pwrs/cem-darwin-arm64": "0.4.5",
20
- "@pwrs/cem-win32-x64": "0.4.5",
21
- "@pwrs/cem-win32-arm64": "0.4.5"
16
+ "@pwrs/cem-linux-x64": "0.5.0",
17
+ "@pwrs/cem-linux-arm64": "0.5.0",
18
+ "@pwrs/cem-darwin-x64": "0.5.0",
19
+ "@pwrs/cem-darwin-arm64": "0.5.0",
20
+ "@pwrs/cem-win32-x64": "0.5.0",
21
+ "@pwrs/cem-win32-arm64": "0.5.0"
22
22
  },
23
23
  "files": [
24
24
  "bin/cem.js",