@pwrs/cem 0.9.2 → 0.9.3

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/package.json +8 -8
  2. package/README.md +0 -178
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pwrs/cem",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "CLI tool for generating and working with Custom Elements Manifests",
5
5
  "type": "module",
6
6
  "engines": {
@@ -13,16 +13,16 @@
13
13
  "postinstall": "node ./install-platform-binary.js"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@pwrs/cem-linux-x64": "0.9.2",
17
- "@pwrs/cem-linux-arm64": "0.9.2",
18
- "@pwrs/cem-darwin-x64": "0.9.2",
19
- "@pwrs/cem-darwin-arm64": "0.9.2",
20
- "@pwrs/cem-win32-x64": "0.9.2",
21
- "@pwrs/cem-win32-arm64": "0.9.2"
16
+ "@pwrs/cem-linux-x64": "0.9.0",
17
+ "@pwrs/cem-linux-arm64": "0.9.0",
18
+ "@pwrs/cem-darwin-x64": "0.9.0",
19
+ "@pwrs/cem-darwin-arm64": "0.9.0",
20
+ "@pwrs/cem-win32-x64": "0.9.0",
21
+ "@pwrs/cem-win32-arm64": "0.9.0"
22
22
  },
23
23
  "files": [
24
24
  "bin/cem.js",
25
25
  "install-platform-binary.js",
26
26
  "README.md"
27
27
  ]
28
- }
28
+ }
package/README.md DELETED
@@ -1,178 +0,0 @@
1
- # `cem` - Custom Elements Manifest Multitool
2
-
3
- **cem** is a command-line tool for generating and querying
4
- [Custom Elements Manifest][cem] files. It can analyze your codebase and generate
5
- rich metadata for your custom elements, facilitating documentation, tooling, and
6
- integration. It can also query that manifest for information about your package
7
-
8
- ## Installation
9
-
10
- ```sh
11
- npm install --save-dev @pwrs/cem
12
- ```
13
-
14
- For more options, see [Installation docs][installationdocs]
15
-
16
- ## Features
17
-
18
- ### `cem generate`
19
-
20
- > [!NOTE]
21
- > `cem generate` best supports LitElements written in idiomatic style with
22
- > TypeScript decorators. There is rudimentary support for `extends HTMLElement`,
23
- > but it is not a high priority for development. If you need something more
24
- > specific [open an issue][issuenew].
25
-
26
- See more in the [Generate docs][generatedocs]
27
-
28
- ---
29
-
30
- ### `cem serve`
31
-
32
- The `cem serve` command starts a development server specifically for custom element development. It provides an opinionated, manifest-driven workflow with live reload, interactive knobs for testing attributes and properties, and a PatternFly-designed UI for component isolation.
33
-
34
- **Features:**
35
- - Live reload with WebSocket-based updates
36
- - Interactive knobs auto-generated from manifest
37
- - TypeScript transformation on-the-fly
38
- - Automatic import map generation
39
- - npm workspaces support for monorepos
40
- - Demo discovery from manifest `demos` field
41
- - Multiple rendering modes: full UI, shadow DOM, or chromeless (for testing/embedding)
42
-
43
- **Rendering Modes:**
44
- - **Light** (default): Full PatternFly UI with sidebar, knobs, logs, and event monitoring
45
- - **Shadow**: Same UI as light, but renders demos in Shadow DOM for testing shadow root behavior
46
- - **Chromeless**: Minimal HTML with live reload only - no UI chrome. Perfect for Playwright tests, isolated development, embedding in docs, or capturing clean screenshots
47
-
48
- ```bash
49
- # Full UI with development tools
50
- cem serve
51
-
52
- # Shadow DOM testing
53
- cem serve --rendering=shadow
54
-
55
- # Chromeless for automated testing
56
- cem serve --rendering=chromeless
57
- ```
58
-
59
- See more in the [Serve docs][servedocs]
60
-
61
- ---
62
-
63
- ### `cem lsp`
64
-
65
- 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.
66
-
67
- **Features:**
68
- - Tag name and attribute completion for custom elements
69
- - Slot attribute value completion for direct children of slotted elements
70
- - Hover documentation with type information
71
- - **Error detection with autofixes** - Real-time validation with one-click corrections:
72
- - Slot validation with smart suggestions
73
- - Tag name validation with typo detection and missing import suggestions
74
- - Attribute validation against HTML global attributes and custom element schemas
75
- - Attribute value validation against manifest type definitions (union types, literals, numbers, booleans)
76
- - Go-to-definition support for jumping to element source code
77
- - Go-to-references to find all usages of custom elements across your workspace
78
- - Support for HTML files and TypeScript template literals
79
- - Automatic manifest discovery and live reloading
80
-
81
- **IDE Extensions:**
82
- - [VSCode](extensions/vscode/)
83
- - [Zed](extensions/zed/)
84
- - [Claude Code](extensions/claude-code/)
85
-
86
- See more in the [LSP docs][lspdocs]
87
-
88
- ---
89
-
90
- ### `cem mcp`
91
-
92
- 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.
93
-
94
- **Features:**
95
- - **Resources**: Access to schemas, package discovery, element summaries, and accessibility patterns
96
- - **Tools**: HTML validation, attribute suggestions, HTML generation, and CSS integration guidance
97
- - **Cross-package discovery**: Multi-manifest support for complex design systems
98
-
99
- 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.
100
-
101
- See more in the [MCP docs][mcpdocs]
102
-
103
- ---
104
-
105
- ### `cem list`
106
-
107
- The `cem list` command provides a fast, flexible way to inspect custom elements, their features, and their metadata directly from your manifest file.
108
- With `cem list`, you can quickly explore and audit your custom elements API surface, making it easier to document, test, and share your components.
109
-
110
- See more in the [List docs][listdocs]
111
-
112
- ---
113
-
114
- ### `cem search`
115
-
116
- The `cem search` command allows you to search through your custom elements manifest for any element by keyword or regex pattern. Search through names, descriptions, summaries, and labels of all manifest items including tags, modules, attributes, slots, CSS properties, CSS states, CSS parts, events, methods, demos, functions, variables, and more.
117
-
118
- See more in the [Search docs][searchdocs]
119
-
120
- ---
121
-
122
- ### `cem validate`
123
-
124
- The `cem validate` command validates your `custom-elements.json` file against the official JSON schema and provides intelligent warnings for potentially inappropriate manifest content. Beyond basic schema validation, it analyzes your manifest for lifecycle methods, private implementations, and other patterns that shouldn't be part of your public API documentation.
125
-
126
- See more in the [Validate docs][validatedocs]
127
-
128
- See the [Configuration Reference][configdocs] for more information.
129
-
130
- ---
131
-
132
- ## Examples
133
-
134
- The `examples/` directory contains fully-runnable example projects that demonstrate CEM features at different complexity levels. Each example serves as both test fixtures and user-facing documentation.
135
-
136
- - [Minimal][minimal]: the simplest possible `<hello-world>` custom element - perfect for getting started. **Start here** if you're new to CEM
137
- - [Vanilla][vanilla]: web components without frameworks - pure JavaScript and DOM.
138
- - [Intermediate][intermediate]: real-world UI component library; multiple components, demo discovery with HTML microdata
139
- - [Kitchen Sink][kitchensink]: comprehensive feature showcase with demos and design tokens integration
140
- - [TypeScript Paths][typescriptpaths]: various build configuration patterns like `src/` → `dist/`
141
-
142
- See each example project's README for more info.
143
-
144
- ---
145
-
146
- ## Contributing
147
-
148
- For information on building and testing, please see
149
- [CONTRIBUTING.md][contributingmd].
150
-
151
- ## License
152
-
153
- This program is free software: you can redistribute it and/or modify it under
154
- the terms of the [GNU General Public License v3.0][gpl3].
155
-
156
- &copy; 2025 Benny Powers
157
-
158
- [cem]: https://github.com/webcomponents/custom-elements-manifest
159
- [dtcg]: https://tr.designtokens.org/format/
160
- [go]: https://go.dev
161
- [treesitter]: https://tree-sitter.github.io/tree-sitter/
162
- [gpl3]: https://www.gnu.org/licenses/gpl-3.0.html
163
- [issuenew]: https://github.com/bennypowers/cem/issues/new
164
- [contributingmd]: https://bennypowers.dev/cem/docs/contributing/
165
- [installationdocs]: https://bennypowers.dev/cem/docs/installation/
166
- [generatedocs]: https://bennypowers.dev/cem/docs/commands/generate/
167
- [listdocs]: https://bennypowers.dev/cem/docs/commands/list/
168
- [searchdocs]: https://bennypowers.dev/cem/docs/commands/search/
169
- [validatedocs]: https://bennypowers.dev/cem/docs/commands/validate/
170
- [servedocs]: https://bennypowers.dev/cem/docs/commands/serve/
171
- [lspdocs]: https://bennypowers.dev/cem/docs/lsp/
172
- [mcpdocs]: https://bennypowers.dev/cem/docs/mcp/
173
- [configdocs]: https://bennypowers.dev/cem/docs/configuration/
174
- [minimal]: examples/minimal/
175
- [vanilla]: examples/vanilla/
176
- [intermediate]: examples/intermediate/
177
- [kitchensink]: examples/kitchen-sink/
178
- [typescriptpaths]: examples/typescript-paths/