@maz-ui/mcp 5.0.0-beta.42 → 5.0.0-beta.46
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/dist/mcp.mjs +1 -1
- package/docs/src/components/maz-checklist.md +10 -10
- package/docs/src/components/maz-sidebar.md +12 -12
- package/docs/src/guide/migration-v5.md +48 -3
- package/package.json +11 -11
package/dist/mcp.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
|
7
7
|
import { resolve, join, dirname } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
|
|
10
|
-
const version = "5.0.0-beta.
|
|
10
|
+
const version = "5.0.0-beta.44";
|
|
11
11
|
|
|
12
12
|
class MetadataExtractor {
|
|
13
13
|
extract(name, type, content, manualTags = []) {
|
|
@@ -163,25 +163,25 @@ You can replace the default search function by providing a custom search functio
|
|
|
163
163
|
:search-function="customEmployeeSearch"
|
|
164
164
|
color="success"
|
|
165
165
|
elevation
|
|
166
|
-
class="max-h-96"
|
|
166
|
+
class="maz:max-h-96"
|
|
167
167
|
>
|
|
168
168
|
<template #item="{ item }">
|
|
169
|
-
<div class="flex w-full items-center gap-4">
|
|
170
|
-
<div class="flex h-12 w-12 flex-none items-center justify-center rounded-full bg-
|
|
169
|
+
<div class="maz:flex maz:w-full maz:items-center maz:gap-4">
|
|
170
|
+
<div class="maz:flex maz:h-12 maz:w-12 maz:flex-none maz:items-center maz:justify-center maz:rounded-full maz:bg-linear-to-br maz:from-primary-500 maz:to-secondary-500 maz:text-white maz:font-semibold maz:text-lg">
|
|
171
171
|
{{ item.initials }}
|
|
172
172
|
</div>
|
|
173
|
-
<div class="flex flex-1 flex-col gap-1">
|
|
174
|
-
<div class="flex items-center gap-2">
|
|
175
|
-
<span class="font-semibold text-normal">{{ item.label }}</span>
|
|
173
|
+
<div class="maz:flex maz:flex-1 maz:flex-col maz:gap-1">
|
|
174
|
+
<div class="maz:flex maz:items-center maz:gap-2">
|
|
175
|
+
<span class="maz:font-semibold maz:text-normal">{{ item.label }}</span>
|
|
176
176
|
<MazBadge :color="item.departmentColor" size="xs">
|
|
177
177
|
{{ item.department }}
|
|
178
178
|
</MazBadge>
|
|
179
179
|
</div>
|
|
180
|
-
<span class="text-muted text-sm">{{ item.email }}</span>
|
|
180
|
+
<span class="maz:text-muted maz:text-sm">{{ item.email }}</span>
|
|
181
181
|
</div>
|
|
182
|
-
<div class="flex flex-none items-center gap-1">
|
|
183
|
-
<MazIcon icon="/star.svg" class="text-warning-500" size="1rem" />
|
|
184
|
-
<span class="text-sm font-medium">{{ item.rating }}</span>
|
|
182
|
+
<div class="maz:flex maz:flex-none maz:items-center maz:gap-1">
|
|
183
|
+
<MazIcon icon="/star.svg" class="maz:text-warning-500" size="1rem" />
|
|
184
|
+
<span class="maz:text-sm maz:font-medium">{{ item.rating }}</span>
|
|
185
185
|
</div>
|
|
186
186
|
</div>
|
|
187
187
|
</template>
|
|
@@ -22,19 +22,19 @@ The following features are planned for a future release and are **not yet availa
|
|
|
22
22
|
|
|
23
23
|
## Sub-components
|
|
24
24
|
|
|
25
|
-
| Component
|
|
26
|
-
|
|
27
|
-
| `MazSidebar`
|
|
28
|
-
| `MazSidebarHeader`
|
|
29
|
-
| `MazSidebarContent`
|
|
30
|
-
| `MazSidebarFooter`
|
|
31
|
-
| `MazSidebarGroup`
|
|
32
|
-
| `MazSidebarSeparator`
|
|
33
|
-
| `MazSidebarMenu`
|
|
34
|
-
| `MazSidebarMenuItem`
|
|
25
|
+
| Component | Role |
|
|
26
|
+
| ---------------------- | --------------------------------------------------------------------- |
|
|
27
|
+
| `MazSidebar` | Root container — provides state context |
|
|
28
|
+
| `MazSidebarHeader` | Fixed top area |
|
|
29
|
+
| `MazSidebarContent` | Scrollable central area |
|
|
30
|
+
| `MazSidebarFooter` | Fixed bottom area |
|
|
31
|
+
| `MazSidebarGroup` | Item grouping with optional label |
|
|
32
|
+
| `MazSidebarSeparator` | Visual divider (`<hr>`) |
|
|
33
|
+
| `MazSidebarMenu` | `<ul>` wrapper with `role="menu"` |
|
|
34
|
+
| `MazSidebarMenuItem` | `<li>` item wrapper |
|
|
35
35
|
| `MazSidebarMenuButton` | Clickable item (link or button), supports icon, label, badge, tooltip |
|
|
36
|
-
| `MazSidebarMenuSub`
|
|
37
|
-
| `MazSidebarTrigger`
|
|
36
|
+
| `MazSidebarMenuSub` | Collapsible sub-menu |
|
|
37
|
+
| `MazSidebarTrigger` | Toggle button (must be a descendant of `MazSidebar`) |
|
|
38
38
|
|
|
39
39
|
## Basic usage
|
|
40
40
|
|
|
@@ -54,11 +54,11 @@ For Cursor, Windsurf, VS Code Copilot, Cline and Claude Desktop, see the [MCP gu
|
|
|
54
54
|
|
|
55
55
|
3. **Apply the easy ones in batch.** The mechanical renames are safe to automate:
|
|
56
56
|
|
|
57
|
-
> Apply the codemod for sections 2, 3, 6 and 14 (CSS subpath, `rounded-size="base"`, `left-icon`/`right-icon`, Nuxt `injectMainCss`). Show me a diff before saving.
|
|
57
|
+
> Apply the codemod for "Required changes" sections 2, 3, 6 and 14 (CSS subpath, `rounded-size="base"`, `left-icon`/`right-icon`, Nuxt `injectMainCss`). Show me a diff before saving.
|
|
58
58
|
|
|
59
59
|
4. **Discuss the judgment calls.** For sections that have more than a rename — `MazIcon` API, `MazChart` `update-mode`, theme preset reshape — let the assistant ask before rewriting:
|
|
60
60
|
|
|
61
|
-
> For sections 4, 8 and 10–12, do not patch automatically. Tell me which of my call sites are affected and propose options.
|
|
61
|
+
> For "Required changes" sections 4, 8 and 10–12, do not patch automatically. Tell me which of my call sites are affected and propose options.
|
|
62
62
|
|
|
63
63
|
5. **Verify.** After patches:
|
|
64
64
|
|
|
@@ -84,7 +84,9 @@ The MCP server is read-only — it ships docs, not code edits — so the assista
|
|
|
84
84
|
7. Rename **`left-icon` / `right-icon`** to **`start-icon` / `end-icon`** (and the matching slots / `--has-*-icon` classes) on `MazBtn`, `MazInput`, `MazLink`, `MazContainer`, `MazSelect`. Same idea for `MazCard`'s `footer-align` and `MazDrawer`'s `variant` — `'left' | 'right'` becomes `'start' | 'end'`.
|
|
85
85
|
8. **`MazChart`** drops `vue-chartjs` (lighter bundle, no eager registration of unused chart types). The `update-mode` prop now defaults to `'none'` — pass `update-mode="default"` if you want animated data updates.
|
|
86
86
|
9. **`MazAvatar` size scale fixed.** A CSS-unit `size` now renders at its real value (`size="2rem"` is a 32px avatar, it was ~96px before). Multiply your unit values by 3 to keep the same render, or switch to a `MazSize` keyword (`'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'`). The upgrade tool does the ×3 rewrite for you on static values.
|
|
87
|
-
10.
|
|
87
|
+
10. Rename **`MazPullToRefresh`**'s `on-click` prop to `on-refresh` (handled by the upgrade tool).
|
|
88
|
+
11. Replace bare **`from 'maz-ui'`** utility imports with **`from '@maz-ui/utils'`** (the root re-export of utils was removed; handled by the upgrade tool). Components/composables/directives/plugins stay on their subpaths; types remain importable from `maz-ui`.
|
|
89
|
+
12. That's it for most apps. Everything else is opt-in.
|
|
88
90
|
|
|
89
91
|
## Prerequisites
|
|
90
92
|
|
|
@@ -597,6 +599,49 @@ The upgrade tool rewrites static `size="<unit>"` values on `<MazAvatar>` automat
|
|
|
597
599
|
rg "<MazAvatar[^>]*\bsize=" src/
|
|
598
600
|
```
|
|
599
601
|
|
|
602
|
+
### 17. `MazPullToRefresh` — `on-click` → `on-refresh`
|
|
603
|
+
|
|
604
|
+
The callback prop of `MazPullToRefresh` was renamed from `on-click` to `on-refresh` to reflect what it actually does: it runs when the refresh is triggered on release, not on a click.
|
|
605
|
+
|
|
606
|
+
```vue
|
|
607
|
+
<!-- v4 -->
|
|
608
|
+
<MazPullToRefresh :on-click="fetchData" />
|
|
609
|
+
|
|
610
|
+
<!-- v5 -->
|
|
611
|
+
<MazPullToRefresh :on-refresh="fetchData" />
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
The upgrade tool rewrites this automatically on `<MazPullToRefresh>` tags (both `on-click` and `onClick`, bound or static).
|
|
615
|
+
|
|
616
|
+
```bash
|
|
617
|
+
# Find usages to update
|
|
618
|
+
rg "<MazPullToRefresh[^>]*\bon-?[Cc]lick" src/
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### 18. Root `maz-ui` import removed for utilities
|
|
622
|
+
|
|
623
|
+
In v4, the bare `maz-ui` entry re-exported `@maz-ui/utils`, so you could write `import { sleep } from 'maz-ui'`. In v5 that root re-export is gone — import helpers from their package directly:
|
|
624
|
+
|
|
625
|
+
```ts
|
|
626
|
+
// v4
|
|
627
|
+
import { sleep, formatDate } from 'maz-ui'
|
|
628
|
+
|
|
629
|
+
// v5
|
|
630
|
+
import { sleep, formatDate } from '@maz-ui/utils'
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
Components, composables, directives and plugins were **already** subpath-only in v4 (`maz-ui/components/MazBtn`, `maz-ui/composables/useToast`, …) and are unchanged. The upgrade tool rewrites the utility imports for you.
|
|
634
|
+
|
|
635
|
+
The `maz-ui` root now exposes **types only** (zero runtime cost), so shared types stay importable from the short path:
|
|
636
|
+
|
|
637
|
+
```ts
|
|
638
|
+
import type { MazColor, MazSize } from 'maz-ui'
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### 19. ESM-only
|
|
642
|
+
|
|
643
|
+
`maz-ui` and its `@maz-ui/*` packages ship **ESM only** (no CommonJS build). This was already the case in v4, but if you consume the library from a CommonJS context (old Jest without ESM, `require()`), use a bundler/test runner with ESM support (Vitest, Jest ≥ 29 with ESM, or native `import`).
|
|
644
|
+
|
|
600
645
|
## Informational changes (probably no action needed)
|
|
601
646
|
|
|
602
647
|
### Theme colors are now emitted as OKLCh
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maz-ui/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.46",
|
|
5
5
|
"description": "Maz-UI ModelContextProtocol Client",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"docs"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"maz-ui": "5.0.0-beta.
|
|
44
|
+
"@maz-ui/utils": "5.0.0-beta.46",
|
|
45
|
+
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
46
|
+
"maz-ui": "5.0.0-beta.46"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
49
|
+
"@maz-ui/eslint-config": "5.0.0-beta.44",
|
|
50
|
+
"@maz-ui/node": "5.0.0-beta.44",
|
|
51
|
+
"@modelcontextprotocol/inspector": "^2.8.0",
|
|
52
|
+
"@swc/core": "1.16.2",
|
|
53
|
+
"prettier": "^3.9.9",
|
|
52
54
|
"ts-node-maintained": "^10.9.5",
|
|
53
|
-
"tsx": "^4.
|
|
54
|
-
"unbuild": "^3.6.1"
|
|
55
|
-
"@maz-ui/eslint-config": "5.0.0-beta.39",
|
|
56
|
-
"@maz-ui/node": "5.0.0-beta.26"
|
|
55
|
+
"tsx": "^4.23.15",
|
|
56
|
+
"unbuild": "^3.6.1"
|
|
57
57
|
},
|
|
58
58
|
"lint-staged": {
|
|
59
59
|
"*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
|