@uni-design-system/uni-mcp 4.6.0 → 4.7.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/CHANGELOG.md +267 -0
- package/dist/{chunk-GT3T5DVX.js → chunk-JOMMURY6.js} +2936 -445
- package/dist/chunk-JOMMURY6.js.map +1 -0
- package/dist/http.js +1 -1
- package/dist/server.js +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +4 -3
- package/dist/chunk-GT3T5DVX.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# @uni-design-system/uni-mcp
|
|
2
|
+
|
|
3
|
+
## 4.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e706e38`](https://github.com/uni-design-system/uni/commit/e706e3887f47d8821cc1652410ad37a43d52a428) Thanks [@gaenglish](https://github.com/gaenglish)! - `get-changelog`: release notes as a first-class MCP tool, plus a `uni://changelog/{package}` resource.
|
|
8
|
+
|
|
9
|
+
The index now ingests every published package's changesets `CHANGELOG.md` (a new build adapter parses them into structured releases — bump level, headline, full body, commit, dependency bumps). The tool answers "what changed in X?" and "what do I get by upgrading?": `version` returns one release's full notes (`"8.1"` matches every 8.1.x), `since` returns the full notes of every release after an installed version, and no scope returns a compact release digest. `package` accepts npm or short names (`uni-angular` is the default).
|
|
10
|
+
|
|
11
|
+
- [`57a8c4c`](https://github.com/uni-design-system/uni/commit/57a8c4c73c852a6b14c2e2916cad9bd0a1566787) Thanks [@gaenglish](https://github.com/gaenglish)! - `export-dtcg-tokens`: W3C DTCG JSON (Style Dictionary compatible) for a built-in theme's color, radius, and spacing scales, named with Uni token ids — exposing core's existing `emitDtcgTokens` as an MCP tool for external token pipelines. The `UniTheme` JSON from the theme tools remains the lossless primary format.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`e706e38`](https://github.com/uni-design-system/uni/commit/e706e3887f47d8821cc1652410ad37a43d52a428) Thanks [@gaenglish](https://github.com/gaenglish)! - Ship `CHANGELOG.md` in the published packages. The release notes existed only in the repo; an installed package carried no record of what changed, so upgrade questions couldn't be answered from `node_modules`. uni-angular copies it into the ng-packagr `dist` via `assets`; the rest add it to `files`.
|
|
16
|
+
|
|
17
|
+
## 4.6.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [`5414517`](https://github.com/uni-design-system/uni/commit/5414517d52d17943a4730752ab5d90c304c37062) Thanks [@gaenglish](https://github.com/gaenglish)! - Runtime theme JSON: `generate-runtime-theme`, `get-runtime-theme`, and a theme registry endpoint
|
|
22
|
+
|
|
23
|
+
`generate-uni-theme` returns `uni-theme.ts` **source** — codegen by design, and
|
|
24
|
+
the right answer for branding an app permanently. It is the wrong answer when a
|
|
25
|
+
theme needs to apply _now_: an agent had to write a file and rebuild. These tools
|
|
26
|
+
close that gap (ROADMAP Track 1 item 4).
|
|
27
|
+
- **`generate-runtime-theme`** — brand hex color(s) in, a WCAG-AA light+dark pair
|
|
28
|
+
out as validated JSON, ready for `ThemeService.registerTheme(theme, { select:
|
|
29
|
+
true })`. No file, no rebuild.
|
|
30
|
+
- **`get-runtime-theme`** — a theme that ships with Uni as a registerable
|
|
31
|
+
`UniTheme`. Distinct from `get-theme-template`, which returns a flat read-only
|
|
32
|
+
projection of token values rather than the theme object itself.
|
|
33
|
+
- **Both validate before returning.** Every theme is run through uni-core's
|
|
34
|
+
`parseTheme`, so "validated" is checked rather than claimed; a failure comes
|
|
35
|
+
back as a tool error listing every reason.
|
|
36
|
+
- **First tools with an MCP `outputSchema`**, so agents get a machine-readable
|
|
37
|
+
contract instead of parsing prose (opens ROADMAP Track 1 item 6). The theme
|
|
38
|
+
itself is typed as an opaque validated object on purpose — uni-core's
|
|
39
|
+
`parseTheme` stays the single source of truth for theme shape, and a mirrored
|
|
40
|
+
schema here would drift from it.
|
|
41
|
+
- **Payloads elide the built-in icon set** (`dehydrateTheme`), taking a
|
|
42
|
+
light+dark result from ~100 KB to ~30 KB — roughly 7.6k tokens instead of 25k
|
|
43
|
+
per call. Consumers restore them on registration.
|
|
44
|
+
- **New registry endpoint on the HTTP server**: `GET /themes` lists the ids and
|
|
45
|
+
`GET /themes/{id}.json` returns one registerable theme, for apps that fetch a
|
|
46
|
+
theme without speaking MCP. These routes are public, read-only and
|
|
47
|
+
CORS-enabled so a browser can fetch them directly; `/mcp` stays token-guarded
|
|
48
|
+
and same-origin.
|
|
49
|
+
- The server's instructions now carry a routing rule for the four theme tools
|
|
50
|
+
(brand permanently / apply now / inspect values), and the README tool table
|
|
51
|
+
lists `create-icon-tokens`, which shipped undocumented.
|
|
52
|
+
|
|
53
|
+
## 4.5.0
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- [`c2421c0`](https://github.com/uni-design-system/uni/commit/c2421c04d01f36d74b489613d22997553f256d4f) Thanks [@gaenglish](https://github.com/gaenglish)! - Expand `BaseIcons` to 59 icons and add `uni-icon` sizing
|
|
58
|
+
|
|
59
|
+
The 34-icon set shipped in 7.0.0 covered the library's own components but not a
|
|
60
|
+
real application — an app migrating off inline `<svg>` (or off `uni-symbol`, in
|
|
61
|
+
Angular) ran out of names almost immediately. Everything here is additive; all
|
|
62
|
+
34 existing names are unchanged.
|
|
63
|
+
- **25 new icons**, same Material Symbols Outlined 300 source and the same
|
|
64
|
+
`0 -960 960 960` grid as the rest of the set: navigation (`link`, `expand`,
|
|
65
|
+
`gridView`, `listView`), actions (`moreHorizontal`, `copy`, `send`,
|
|
66
|
+
`refresh`, `dragHandle`, `qrCode`), feedback (`star`, `verified`) and
|
|
67
|
+
user/system (`group`, `shieldPerson`, `clock`, `mail`, `chat`, `image`,
|
|
68
|
+
`document`, `payment`, `bank`, `trendingUp`, `extension`, `webhook`,
|
|
69
|
+
`logout`).
|
|
70
|
+
- `moreHorizontal` ships alongside `more` because that one is `more_vert` and
|
|
71
|
+
row-aligned menus need the horizontal kebab.
|
|
72
|
+
- `star` is separate from `favorite`, which is the heart.
|
|
73
|
+
- **`uni-icon` gains an optional `size` input** (`CssLength` — bare numbers are
|
|
74
|
+
px, strings pass through, so `20` and `'1.25rem'` both work). Left unset,
|
|
75
|
+
behaviour is unchanged: the icon fills its container, which is what lets a
|
|
76
|
+
themed control size its own glyph through padding. Set, it applies
|
|
77
|
+
width/height as inline styles, so an explicit size wins over the
|
|
78
|
+
fill-the-container rule regardless of style injection order. This removes the
|
|
79
|
+
per-call-site `width`/`height` CSS rule that replacing an inline `<svg>` with
|
|
80
|
+
`<uni-icon>` would otherwise need.
|
|
81
|
+
- The MCP `create-icon-tokens` tool now lists the built-in icon names above the
|
|
82
|
+
token map it returns. Apps routinely hand-draw their own `close`, `check` or
|
|
83
|
+
`plus`; encoding those into theme tokens works but adds redundant artwork on a
|
|
84
|
+
foreign grid when the theme already ships the glyph. The tool cannot recognise
|
|
85
|
+
a shape, so it hands the caller the list to check against before adding
|
|
86
|
+
anything.
|
|
87
|
+
|
|
88
|
+
## 4.4.0
|
|
89
|
+
|
|
90
|
+
### Minor Changes
|
|
91
|
+
|
|
92
|
+
- [`f7727aa`](https://github.com/uni-design-system/uni/commit/f7727aa8895bd67f285ba4830858f994490bb7f7) Thanks [@gaenglish](https://github.com/gaenglish)! - Replace `BaseIcons` with a normalized 34-icon Material Symbols set
|
|
93
|
+
|
|
94
|
+
The built-in icon set was 11 glyphs drawn from four different grids
|
|
95
|
+
(`0 0 24 24`, `0 0 50 50`, `0 0 64 64`, `0 -960 960 960`), so `checkCircle` and
|
|
96
|
+
`xCircle` rendered as solid filled discs next to a hairline `alertCircle` and an
|
|
97
|
+
oversized `close` — three optical weights in one set.
|
|
98
|
+
- `BaseIcons` is now Material Symbols Outlined at weight 300, every glyph on a
|
|
99
|
+
single `0 -960 960 960` grid, grouped by intent: navigation (`menu`,
|
|
100
|
+
`chevronUp/Down/Left/Right`, `arrowLeft/Right`, `home`, `externalLink`),
|
|
101
|
+
actions (`search`, `close`, `plus`, `minus`, `more`, `delete`, `edit`,
|
|
102
|
+
`download`, `upload`, `share`, `filter`), feedback (`check`, `checkCircle`,
|
|
103
|
+
`xCircle`, `alertCircle`, `info`, `warning`, `lock`) and user/system
|
|
104
|
+
(`profile`, `settings`, `notification`, `favorite`, `help`, `calendar`).
|
|
105
|
+
- All 11 previously shipped names are preserved, so existing `<uni-icon>` call
|
|
106
|
+
sites and theme overrides keep working. Their **appearance changes**: the
|
|
107
|
+
filled `checkCircle`/`xCircle` are now outlined, and the set reads lighter
|
|
108
|
+
overall. `spinner` is carried over verbatim, keyframes intact.
|
|
109
|
+
- New `IconName` and `BaseIconName` types. `IconName` is
|
|
110
|
+
`BaseIconName | (string & {})`, so built-ins autocomplete and typos surface
|
|
111
|
+
while themes can still register arbitrary names via `createTheme({ icons })`.
|
|
112
|
+
`uni-icon`'s `name` input is typed with it instead of `keyof Icons`.
|
|
113
|
+
- **Breaking**: removes the unused `IconToken`, `IconStyle`, `ToggleableIcon`
|
|
114
|
+
and `IconConfig` exports. Nothing in the library referenced them and
|
|
115
|
+
`IconToken`'s 60-name union contradicted the actual `BaseIcons` keys. Use
|
|
116
|
+
`IconName` instead.
|
|
117
|
+
- New exported `svgToIconUri(svg, options?)` — the supported way to bring your
|
|
118
|
+
own icons (a brand set, a designer handoff) into a theme. It normalizes the
|
|
119
|
+
source (drops the xml declaration, comments and fixed `width`/`height` so the
|
|
120
|
+
mask scales), percent-encodes it, and **rejects artwork that cannot survive
|
|
121
|
+
masking**: no `viewBox`, an embedded raster `<image>`, an external reference,
|
|
122
|
+
a gradient/pattern fill, or more than one paint color. That last one is the
|
|
123
|
+
trap worth naming — masks use the alpha channel, so a multi-color logo
|
|
124
|
+
flattens to a silhouette in `currentColor`; pass `{ allowMultiColor: true }`
|
|
125
|
+
when that is intended. `createTheme({ icons })` merges the result over
|
|
126
|
+
`BaseIcons` per name, so a built-in name reskins and a new name is added.
|
|
127
|
+
- New MCP tool `create-icon-tokens`, the agent-facing front end to
|
|
128
|
+
`svgToIconUri`: hand it a project's inline `<svg>` (or a brand set) and it
|
|
129
|
+
returns a paste-ready `icons` map for `uni-theme.ts`. It encodes via the same
|
|
130
|
+
helper, so tokens are byte-identical to the built-in set, and adds the
|
|
131
|
+
set-level checks a per-icon helper cannot make — which names override
|
|
132
|
+
built-ins, and whether the artwork mixes viewBox grids. Bad artwork is
|
|
133
|
+
reported per icon rather than failing the batch, and re-running is safe
|
|
134
|
+
(already-encoded URIs pass through). The server instructions now point agents
|
|
135
|
+
at it whenever they encounter inline SVG.
|
|
136
|
+
- `BaseIcons` is generated by `scripts/generate-icons.mjs` (`pnpm icons:generate`),
|
|
137
|
+
which fetches from the canonical Material Symbols source and validates every
|
|
138
|
+
glyph before writing — a malformed path, an off-grid viewBox or geometry
|
|
139
|
+
outside the grid aborts the run. `pnpm icons:check` verifies the committed
|
|
140
|
+
file without writing. Add or change icons in that script's manifest and
|
|
141
|
+
regenerate; the file is not hand-edited. `icon.records.spec.ts` asserts the
|
|
142
|
+
same invariants against the committed output.
|
|
143
|
+
|
|
144
|
+
## 4.3.0
|
|
145
|
+
|
|
146
|
+
### Minor Changes
|
|
147
|
+
|
|
148
|
+
- [`076202d`](https://github.com/uni-design-system/uni/commit/076202d367d6393df685fde5906671d1a34e5a1b) Thanks [@gaenglish](https://github.com/gaenglish)! - MDX guidelines adapter — authored docs now reach AI agents
|
|
149
|
+
- New build adapter parses each component's co-located `.mdx` docs page into the
|
|
150
|
+
index's previously-empty `guidelines` field: the `## Overview` prose becomes
|
|
151
|
+
`whenToUse`, and optional `## Do` / `## Don't` / `## Accessibility` bullet sections
|
|
152
|
+
map to their fields — so guidelines are authored in the same file the Storybook
|
|
153
|
+
sidebar shows, with JSX/import scaffolding stripped.
|
|
154
|
+
- 48 components gain guidelines immediately; `get-guidelines` and `uni://guidelines/*`
|
|
155
|
+
now answer with real when-to-use guidance (including the canonical selector forms
|
|
156
|
+
from the 6.0 unification).
|
|
157
|
+
- MDX↔component matching: shared basename first (`tabs.mdx` → `tabs.component.ts`),
|
|
158
|
+
same-directory fallback for group docs.
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- [`4bfb057`](https://github.com/uni-design-system/uni/commit/4bfb057c55651c0375e7f35dd6f804e8d5c69e88) Thanks [@gaenglish](https://github.com/gaenglish)! - Canonical MDX docs structure across the entire library
|
|
163
|
+
- Component docs pages now follow one flow (spec in AGENTS.md): imports → Overview →
|
|
164
|
+
Usage (the compact playground: story + source + knobs) → named variation examples →
|
|
165
|
+
**Theme options** → Accessibility → Do/Don't. Property/API/Methods/Events tables are
|
|
166
|
+
retired — the playground's controls are the API reference.
|
|
167
|
+
- New `ThemeOptions` docs block renders a component's per-theme option tokens live from
|
|
168
|
+
the active Storybook theme (with color swatches), distinguishing per-theme options
|
|
169
|
+
from per-instance inputs; data-table's raw `ThemeDataBlock` dump is replaced.
|
|
170
|
+
- All ~55 component pages conform: the 7 form-control pages (200–390 lines of legacy
|
|
171
|
+
API tables) rewritten; empty Overviews authored (card, tag, icon-button, scroll-area,
|
|
172
|
+
expand-area, data-table); accessibility bullets added across navigation, feedback,
|
|
173
|
+
and form components.
|
|
174
|
+
- The MCP index now carries when-to-use guidance for 55 of 70 components (was 41) and
|
|
175
|
+
accessibility guidance for 36 (was 21) — the remainder are subcomponents documented
|
|
176
|
+
on their parent pages and internal directives.
|
|
177
|
+
|
|
178
|
+
## 4.2.0
|
|
179
|
+
|
|
180
|
+
### Minor Changes
|
|
181
|
+
|
|
182
|
+
- [`fea0b2e`](https://github.com/uni-design-system/uni/commit/fea0b2e78da327f3acea144958af2d0dbbefb699) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix invisible icons; icons become first-class theme primitives
|
|
183
|
+
- **Bug**: `uni-icon` resolves icons from `theme.icons`, but every theme shipped
|
|
184
|
+
`icons: {}` — the icon record was never wired in, so all icons (dialog close, button
|
|
185
|
+
spinner, search/clear affordances) rendered nothing.
|
|
186
|
+
- **Fix + pattern**: the default icon set now lives in core (`BaseIcons`, in
|
|
187
|
+
`concepts/iconography`) and `createTheme` merges a theme's `icons` over it — themes
|
|
188
|
+
can override or add icons under any name (inline SVG data URIs, masked with
|
|
189
|
+
`currentColor` so they recolor with the theme). The angular `icons` record re-exports
|
|
190
|
+
`BaseIcons` (deprecated).
|
|
191
|
+
- `uni-icon` also sets the standard `mask-image` (was webkit-only, so icons were
|
|
192
|
+
invisible in Firefox regardless) and renders nothing for unknown names instead of a
|
|
193
|
+
broken `url("undefined")`.
|
|
194
|
+
- The emitted `uni-theme.ts` gains an editable `icons` section, and the MCP's
|
|
195
|
+
`generate-uni-theme` guidance instructs agents: never inline SVG in components —
|
|
196
|
+
define an icon once in the theme's `icons` map and render it via `<uni-icon>`.
|
|
197
|
+
|
|
198
|
+
## 4.1.2
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- [`ffb9692`](https://github.com/uni-design-system/uni/commit/ffb9692b6b6000a04f0ec3fd06b196818b5cf1c8) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix published index losing its Storybook examples, and keep the index in sync
|
|
203
|
+
- `uni-mcp@4.1.x` shipped with **0 examples**: the package build regenerated the index in
|
|
204
|
+
CI, where `storybook-static` (gitignored) doesn't exist, silently overwriting the
|
|
205
|
+
committed 107-example index before bundling. `build` is now `tsup` only — the committed
|
|
206
|
+
`uni-index.json` is the single source of truth and is bundled as-is.
|
|
207
|
+
- The index is regenerated once per release instead: the changesets `version` step
|
|
208
|
+
(`pnpm version-packages`) builds Storybook and reruns `build-index` after the version
|
|
209
|
+
bump, so the refreshed index lands reviewably in the Version Packages PR.
|
|
210
|
+
- `build-index` now fails loudly when it finds zero examples, so an example-less index
|
|
211
|
+
can never ship silently again.
|
|
212
|
+
- Index refreshed to v5.1.0: includes the new component option tokens
|
|
213
|
+
(`button.behavior.borderRadius`/`typeface`, `card.behavior.borderRadius`), the nine
|
|
214
|
+
Theme Builder presets' generation updates, and all 107 examples.
|
|
215
|
+
|
|
216
|
+
## 4.1.1
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- [`f2951db`](https://github.com/uni-design-system/uni/commit/f2951db7f6267f29b56d127151ff843d445c40a4) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix `ng add` against real published packages (found by fresh `ng new` e2e):
|
|
221
|
+
- The schematic bundle is CJS, but ng-packagr stamps `"type": "module"` into the
|
|
222
|
+
published package.json, so Node loaded it as ESM and the CLI reported "no ng add
|
|
223
|
+
actions". A nested `schematics/package.json` (`"type": "commonjs"`) scopes the
|
|
224
|
+
bundle back to CJS.
|
|
225
|
+
- The emitted `uni-theme.ts` used dot access on `Colors` (which has an index
|
|
226
|
+
signature), failing under `ng new`'s strict `noPropertyAccessFromIndexSignature`.
|
|
227
|
+
The emitter (and the MCP tool's guidance) now uses bracket access throughout.
|
|
228
|
+
- `uni-angular`'s peer range on `uni-core` is now `workspace:^` (publishes as `^5.x`)
|
|
229
|
+
instead of `workspace:*` (published as an exact pin). Alongside changesets'
|
|
230
|
+
`onlyUpdatePeerDependentsWhenOutOfRange`, this stops minor releases from being
|
|
231
|
+
inflated to majors by the peer-dependents rule — the cause of the 4.0.0 and 5.0.0
|
|
232
|
+
version jumps.
|
|
233
|
+
|
|
234
|
+
## 4.1.0
|
|
235
|
+
|
|
236
|
+
### Minor Changes
|
|
237
|
+
|
|
238
|
+
- [`f7f0bdd`](https://github.com/uni-design-system/uni/commit/f7f0bdddfac855955e022a852c2bfdccf8013a7b) Thanks [@gaenglish](https://github.com/gaenglish)! - OKLCH theme generation engine (`concepts/generation`)
|
|
239
|
+
- New `generateThemes(input)` / `generateUniThemes(input)`: brand seed(s) in, complete
|
|
240
|
+
WCAG-AA light+dark `Colors` pair out, with a machine-readable `ContrastReport`
|
|
241
|
+
(110 checked pairs per theme pair). Pure and deterministic.
|
|
242
|
+
- All palette math moved from HSL to perceptual OKLCH: uniform lightness slots across
|
|
243
|
+
hues, per-category chroma model (`CategoryChroma`), dark-mode accent chroma decoupling
|
|
244
|
+
(C ≤ 0.16), and a contrast guard-rail that adjusts lightness only — never hue.
|
|
245
|
+
- Brand colors ride as soft `targets` (kept verbatim when already AA, lightness-adjusted
|
|
246
|
+
when not) alongside the existing hard `brand` pins; accepted by `generatePalette`,
|
|
247
|
+
`createThemeFromPalette`, and Angular's `BrandPaletteConfig`.
|
|
248
|
+
- Semantic inks re-tuned per role: error 27°/C 0.20, warn 55°/C 0.18 (rotated off amber —
|
|
249
|
+
dark yellow reads brown), success 152°/C 0.16.
|
|
250
|
+
- `createTheme` accepts optional `radii`/`shadows` overrides; `ShapeRadii` presets
|
|
251
|
+
(`sharp` / `modern` / `playful`) emitted via the `shape` generation input.
|
|
252
|
+
- Theme Builder ships nine curated AA-clean presets built on soft targets.
|
|
253
|
+
- Deprecated (thin wrappers/tables retained): `uniColor`, `randomRangeValue`,
|
|
254
|
+
`CategorySaturation`, `CategoryLightness`. `schemeHues` moved to `color.utils`.
|
|
255
|
+
- `createTheme` deep-merges optional `borders` and `components` overrides over its
|
|
256
|
+
derived defaults — themes can define custom named primitives and rewire per-component
|
|
257
|
+
options without restating untouched sections.
|
|
258
|
+
- New `emitThemeFile()` renders a static `uni-theme.ts` — literal colors, visible border
|
|
259
|
+
primitives, sparse component overrides — the editable source of truth; the engine
|
|
260
|
+
never ships to the browser.
|
|
261
|
+
- New `ng add @uni-design-system/uni-angular` schematic: installs the peer set, writes
|
|
262
|
+
the generated theme file, registers `UNI_THEMES` in `app.config.ts`, adds typeface
|
|
263
|
+
links, scaffolds a themed smoke test, and prints the contrast summary.
|
|
264
|
+
- New MCP tool `generate-uni-theme`: returns the static theme file content, provider
|
|
265
|
+
snippet, and contrast report, with agent guidance to edit the file for restyling.
|
|
266
|
+
- `uni-core` gains its first Vitest suite, including a 1,080-seed contrast property
|
|
267
|
+
corpus with zero tolerance in both modes; the schematic gets its own spec suite.
|