@f-ewald/components 0.6.0 → 1.0.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.
- package/README.md +101 -44
- package/custom-elements.json +2570 -877
- package/dist/calendar-entry.d.ts +33 -0
- package/dist/calendar-entry.d.ts.map +1 -0
- package/dist/calendar-entry.js +64 -0
- package/dist/calendar-entry.js.map +1 -0
- package/dist/calendar-month.d.ts +67 -0
- package/dist/calendar-month.d.ts.map +1 -0
- package/dist/calendar-month.js +455 -0
- package/dist/calendar-month.js.map +1 -0
- package/dist/calendar-year.d.ts +43 -0
- package/dist/calendar-year.d.ts.map +1 -0
- package/dist/calendar-year.js +136 -0
- package/dist/calendar-year.js.map +1 -0
- package/dist/dropdown-button.d.ts +37 -0
- package/dist/dropdown-button.d.ts.map +1 -0
- package/dist/dropdown-button.js +219 -0
- package/dist/dropdown-button.js.map +1 -0
- package/dist/form-select.d.ts +27 -2
- package/dist/form-select.d.ts.map +1 -1
- package/dist/form-select.js +440 -27
- package/dist/form-select.js.map +1 -1
- package/dist/frame-box.d.ts +22 -0
- package/dist/frame-box.d.ts.map +1 -0
- package/dist/frame-box.js +68 -0
- package/dist/frame-box.js.map +1 -0
- package/dist/icon-button.d.ts +27 -0
- package/dist/icon-button.d.ts.map +1 -0
- package/dist/icon-button.js +83 -0
- package/dist/icon-button.js.map +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +1 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/map-circle.d.ts +3 -0
- package/dist/map-circle.d.ts.map +1 -1
- package/dist/map-circle.js +3 -0
- package/dist/map-circle.js.map +1 -1
- package/dist/mcp-server.d.ts +3 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +82 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/popover-panel.d.ts +3 -0
- package/dist/popover-panel.d.ts.map +1 -1
- package/dist/popover-panel.js +11 -0
- package/dist/popover-panel.js.map +1 -1
- package/dist/tokens.css +4 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +3 -0
- package/dist/tokens.js.map +1 -1
- package/dist/utils/calendar.d.ts +77 -0
- package/dist/utils/calendar.d.ts.map +1 -0
- package/dist/utils/calendar.js +135 -0
- package/dist/utils/calendar.js.map +1 -0
- package/docs/calendar-entry.md +53 -0
- package/docs/calendar-month.md +77 -0
- package/docs/calendar-year.md +53 -0
- package/docs/dropdown-button.md +61 -0
- package/docs/form-select.md +21 -3
- package/docs/frame-box.md +43 -0
- package/docs/icon-button.md +52 -0
- package/docs/map-circle.md +4 -0
- package/docs/mcp-evaluation.md +18 -11
- package/docs/popover-panel.md +5 -1
- package/llms.txt +194 -28
- package/package.json +19 -4
- package/dist/map-point.d.ts +0 -31
- package/dist/map-point.d.ts.map +0 -1
- package/dist/map-point.js +0 -83
- package/dist/map-point.js.map +0 -1
- package/docs/map-point.md +0 -44
package/README.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@f-ewald/components)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
|
|
6
|
+
[Documentation](https://f-ewald.github.io/components/) ·
|
|
7
|
+
[Playground](https://f-ewald.github.io/components/playground/)
|
|
8
|
+
|
|
6
9
|
A collection of self-contained [Lit](https://lit.dev) web components sharing a
|
|
7
10
|
Tailwind-inspired design token system. Every component is individually
|
|
8
11
|
importable and ships its own TypeScript types plus a checked-in
|
|
@@ -41,40 +44,45 @@ import "@f-ewald/components/roman-numeral.js";
|
|
|
41
44
|
|
|
42
45
|
| Component | Docs |
|
|
43
46
|
| --- | --- |
|
|
44
|
-
| `<address-autocomplete>` | [
|
|
45
|
-
| `<animate-confetti>` | [
|
|
46
|
-
| `<autocomplete-input>` | [
|
|
47
|
-
| `<
|
|
48
|
-
| `<
|
|
49
|
-
| `<
|
|
50
|
-
| `<
|
|
51
|
-
| `<
|
|
52
|
-
| `<
|
|
53
|
-
| `<
|
|
54
|
-
| `<
|
|
55
|
-
| `<
|
|
56
|
-
| `<
|
|
57
|
-
| `<
|
|
58
|
-
| `<
|
|
59
|
-
| `<
|
|
60
|
-
| `<
|
|
61
|
-
| `<
|
|
62
|
-
| `<
|
|
63
|
-
| `<
|
|
64
|
-
| `<
|
|
65
|
-
| `<
|
|
66
|
-
| `<
|
|
67
|
-
| `<
|
|
68
|
-
| `<
|
|
69
|
-
| `<
|
|
70
|
-
| `<
|
|
71
|
-
| `<
|
|
72
|
-
| `<
|
|
73
|
-
| `<
|
|
74
|
-
| `<
|
|
75
|
-
| `<
|
|
76
|
-
| `<
|
|
77
|
-
| `<
|
|
47
|
+
| `<address-autocomplete>` | [API reference](https://f-ewald.github.io/components/docs/address-autocomplete.html) |
|
|
48
|
+
| `<animate-confetti>` | [API reference](https://f-ewald.github.io/components/docs/animate-confetti.html) |
|
|
49
|
+
| `<autocomplete-input>` | [API reference](https://f-ewald.github.io/components/docs/autocomplete-input.html) |
|
|
50
|
+
| `<calendar-entry>` | [API reference](https://f-ewald.github.io/components/docs/calendar-entry.html) |
|
|
51
|
+
| `<calendar-month>` | [API reference](https://f-ewald.github.io/components/docs/calendar-month.html) |
|
|
52
|
+
| `<calendar-year>` | [API reference](https://f-ewald.github.io/components/docs/calendar-year.html) |
|
|
53
|
+
| `<chat-message>` | [API reference](https://f-ewald.github.io/components/docs/chat-message.html) |
|
|
54
|
+
| `<confirm-dialog>` | [API reference](https://f-ewald.github.io/components/docs/confirm-dialog.html) |
|
|
55
|
+
| `<copy-link-button>` | [API reference](https://f-ewald.github.io/components/docs/copy-link-button.html) |
|
|
56
|
+
| `<data-table>` | [API reference](https://f-ewald.github.io/components/docs/data-table.html) |
|
|
57
|
+
| `<distance-value>` | [API reference](https://f-ewald.github.io/components/docs/distance-value.html) |
|
|
58
|
+
| `<distribution-chart>` | [API reference](https://f-ewald.github.io/components/docs/distribution-chart.html) |
|
|
59
|
+
| `<dropdown-button>` | [API reference](https://f-ewald.github.io/components/docs/dropdown-button.html) |
|
|
60
|
+
| `<editable-text>` | [API reference](https://f-ewald.github.io/components/docs/editable-text.html) |
|
|
61
|
+
| `<form-select>` | [API reference](https://f-ewald.github.io/components/docs/form-select.html) |
|
|
62
|
+
| `<frame-box>` | [API reference](https://f-ewald.github.io/components/docs/frame-box.html) |
|
|
63
|
+
| `<gallery-item>` | [API reference](https://f-ewald.github.io/components/docs/gallery-item.html) |
|
|
64
|
+
| `<gallery-item-variant>` | [API reference](https://f-ewald.github.io/components/docs/gallery-item-variant.html) |
|
|
65
|
+
| `<icon-button>` | [API reference](https://f-ewald.github.io/components/docs/icon-button.html) |
|
|
66
|
+
| `<live-timer>` | [API reference](https://f-ewald.github.io/components/docs/live-timer.html) |
|
|
67
|
+
| `<map-circle>` | [API reference](https://f-ewald.github.io/components/docs/map-circle.html) |
|
|
68
|
+
| `<map-pin>` | [API reference](https://f-ewald.github.io/components/docs/map-pin.html) |
|
|
69
|
+
| `<percent-bar-chart>` | [API reference](https://f-ewald.github.io/components/docs/percent-bar-chart.html) |
|
|
70
|
+
| `<photo-gallery>` | [API reference](https://f-ewald.github.io/components/docs/photo-gallery.html) |
|
|
71
|
+
| `<popover-panel>` | [API reference](https://f-ewald.github.io/components/docs/popover-panel.html) |
|
|
72
|
+
| `<price-history-chart>` | [API reference](https://f-ewald.github.io/components/docs/price-history-chart.html) |
|
|
73
|
+
| `<radio-cards>` | [API reference](https://f-ewald.github.io/components/docs/radio-cards.html) |
|
|
74
|
+
| `<radio-pills>` | [API reference](https://f-ewald.github.io/components/docs/radio-pills.html) |
|
|
75
|
+
| `<relative-time>` | [API reference](https://f-ewald.github.io/components/docs/relative-time.html) |
|
|
76
|
+
| `<reveal-button>` | [API reference](https://f-ewald.github.io/components/docs/reveal-button.html) |
|
|
77
|
+
| `<roman-numeral>` | [API reference](https://f-ewald.github.io/components/docs/roman-numeral.html) |
|
|
78
|
+
| `<slide-panel>` | [API reference](https://f-ewald.github.io/components/docs/slide-panel.html) |
|
|
79
|
+
| `<stat-meter>` | [API reference](https://f-ewald.github.io/components/docs/stat-meter.html) |
|
|
80
|
+
| `<status-pill>` | [API reference](https://f-ewald.github.io/components/docs/status-pill.html) |
|
|
81
|
+
| `<tile-grid>` | [API reference](https://f-ewald.github.io/components/docs/tile-grid.html) |
|
|
82
|
+
| `<toast-notification>` | [API reference](https://f-ewald.github.io/components/docs/toast-notification.html) |
|
|
83
|
+
| `<ui-button>` | [API reference](https://f-ewald.github.io/components/docs/ui-button.html) |
|
|
84
|
+
| `<user-avatar>` | [API reference](https://f-ewald.github.io/components/docs/user-avatar.html) |
|
|
85
|
+
| `<weight-bar-chart>` | [API reference](https://f-ewald.github.io/components/docs/weight-bar-chart.html) |
|
|
78
86
|
|
|
79
87
|
Each doc lists the component's attributes/properties, events, slots, and the
|
|
80
88
|
`--ui-*` CSS custom properties it consumes. For a machine-readable summary of
|
|
@@ -120,6 +128,36 @@ set. Don't reintroduce that pattern.)
|
|
|
120
128
|
|
|
121
129
|
The full token set is defined in [`src/tokens.ts`](./src/tokens.ts).
|
|
122
130
|
|
|
131
|
+
## MCP server
|
|
132
|
+
|
|
133
|
+
`npm run mcp` (or `node dist/mcp-server.js` after `npm run build`) starts a
|
|
134
|
+
stdio [MCP](https://modelcontextprotocol.io) server exposing the component
|
|
135
|
+
catalog to AI coding assistants, with two tools:
|
|
136
|
+
|
|
137
|
+
- `list_components` — every tag + one-line description.
|
|
138
|
+
- `get_component_docs(tag)` — the full generated Markdown doc for one tag
|
|
139
|
+
(install snippet, usage example, attributes/properties, events, slots,
|
|
140
|
+
CSS custom properties).
|
|
141
|
+
|
|
142
|
+
It's read-only over the same `custom-elements.json`/`docs/*.md` this package
|
|
143
|
+
already generates via `npm run docs` — no separate data source to maintain.
|
|
144
|
+
A consuming project wires it up with a `.mcp.json` at its repo root:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"mcpServers": {
|
|
149
|
+
"f-ewald-components": {
|
|
150
|
+
"command": "node",
|
|
151
|
+
"args": ["/absolute/path/to/components/dist/mcp-server.js"]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
See the "MCP server" section in [`CLAUDE.md`](./CLAUDE.md) for more, and
|
|
158
|
+
[`docs/mcp-evaluation.md`](./docs/mcp-evaluation.md) for why this was built
|
|
159
|
+
now rather than earlier.
|
|
160
|
+
|
|
123
161
|
## Playground / development
|
|
124
162
|
|
|
125
163
|
```bash
|
|
@@ -133,8 +171,17 @@ sources are imported directly from `src/`, so edits hot-reload.
|
|
|
133
171
|
|
|
134
172
|
```bash
|
|
135
173
|
npm run build:demo # static build of the playground, into demo-dist/
|
|
174
|
+
npm run build:site # docs + playground Pages artifact, into pages-dist/
|
|
175
|
+
npm run preview:site # preview the exact Pages artifact locally
|
|
176
|
+
npm run test:site # smoke-test the built documentation and playground
|
|
136
177
|
```
|
|
137
178
|
|
|
179
|
+
The combined site is deployed automatically from `main` to
|
|
180
|
+
[GitHub Pages](https://f-ewald.github.io/components/). The workflow reads the
|
|
181
|
+
repository and publishes `pages-dist/`; it has no permission or persisted
|
|
182
|
+
credential capable of changing repository files, branches, tags, or pull
|
|
183
|
+
requests.
|
|
184
|
+
|
|
138
185
|
## Development commands
|
|
139
186
|
|
|
140
187
|
| Command | Purpose |
|
|
@@ -142,10 +189,14 @@ npm run build:demo # static build of the playground, into demo-dist/
|
|
|
142
189
|
| `npm run dev` | Start the Vite playground with HMR. |
|
|
143
190
|
| `npm run build` | Compile `src/` with `tsc` into `dist/`, and generate `dist/tokens.css`. |
|
|
144
191
|
| `npm run build:demo` | Build the static playground into `demo-dist/`. |
|
|
192
|
+
| `npm run build:site` | Build the static documentation and nested playground into `pages-dist/`. |
|
|
193
|
+
| `npm run preview:site` | Preview the built Pages artifact locally. |
|
|
145
194
|
| `npm run icons` | Regenerate `src/icons.ts` from the Heroicons package. |
|
|
146
195
|
| `npm run analyze` | Regenerate `custom-elements.json` via the custom-elements-manifest analyzer. |
|
|
147
196
|
| `npm run docs` | Regenerate the manifest, `docs/*.md`, and `llms.txt`. |
|
|
197
|
+
| `npm run mcp` | Run the MCP server (`dist/mcp-server.js`) directly, for manual testing. |
|
|
148
198
|
| `npm run test` | Run the Playwright suite against the playground. |
|
|
199
|
+
| `npm run test:site` | Run the Playwright smoke suite against `pages-dist/`. |
|
|
149
200
|
|
|
150
201
|
## Contributing
|
|
151
202
|
|
|
@@ -157,25 +208,31 @@ npm run build:demo # static build of the playground, into demo-dist/
|
|
|
157
208
|
the `tsc`-emitted `dist/` output resolves correctly for consumers.
|
|
158
209
|
- Run `npm run docs` after changing any component's public API so the
|
|
159
210
|
generated docs and `llms.txt` stay in sync.
|
|
211
|
+
- `npm run build:site` only reads those checked-in documentation inputs and
|
|
212
|
+
writes ignored `pages-dist/`; it never updates tracked generated files.
|
|
160
213
|
|
|
161
214
|
## Publishing
|
|
162
215
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
npm
|
|
168
|
-
```
|
|
216
|
+
Releases are published automatically by
|
|
217
|
+
[`.github/workflows/npm-publish.yml`](./.github/workflows/npm-publish.yml)
|
|
218
|
+
when a strict `vX.Y.Z` tag is pushed. The workflow validates the tag against
|
|
219
|
+
both package manifests, runs the full `prepublishOnly` gate, and publishes via
|
|
220
|
+
npm Trusted Publishing with provenance—no `NPM_TOKEN` repository secret.
|
|
169
221
|
|
|
170
|
-
|
|
222
|
+
Configure the `@f-ewald/components` npmjs package once with a GitHub Actions
|
|
223
|
+
Trusted Publisher for owner `f-ewald`, repository `components`, workflow
|
|
224
|
+
`npm-publish.yml`, no environment, and **Allowed actions: npm publish**. Then
|
|
225
|
+
release only after all source and generated-doc changes are committed:
|
|
171
226
|
|
|
172
227
|
```bash
|
|
173
228
|
npm version <patch|minor|major>
|
|
174
|
-
|
|
229
|
+
git push origin main --follow-tags
|
|
175
230
|
```
|
|
176
231
|
|
|
177
|
-
`
|
|
178
|
-
|
|
232
|
+
`npm version` must create the matching annotated `vX.Y.Z` tag on the version
|
|
233
|
+
commit; every version bump requires that tag, beginning with `v1.0.0`. The
|
|
234
|
+
initial local `v1.0.0` tag was moved to the release-workflow commit before
|
|
235
|
+
its first push; published tags must never be moved.
|
|
179
236
|
|
|
180
237
|
## License
|
|
181
238
|
|