@maz-ui/mcp 4.7.0-beta.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/dist/mcp.mjs +1 -1
- package/docs/generated-docs/maz-avatar.doc.md +1 -1
- package/docs/generated-docs/maz-card.doc.md +1 -1
- package/docs/generated-docs/maz-link.doc.md +20 -20
- package/docs/generated-docs/maz-ui-provider.doc.md +4 -4
- package/docs/src/guide/maz-ui-provider.md +40 -12
- package/docs/src/guide/themes.md +0 -1
- package/docs/src/guide/vue.md +5 -0
- package/package.json +3 -3
package/dist/mcp.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
|
7
7
|
import { resolve, dirname, join } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
|
|
10
|
-
const version = "4.
|
|
10
|
+
const version = "4.7.0-beta.1";
|
|
11
11
|
|
|
12
12
|
const _dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
13
|
class DocumentationService {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **src** | The source of the image | `string \| null` | No | `undefined` | - |
|
|
8
8
|
| **caption** | The caption of the avatar | `string \| null` | No | `undefined` | - |
|
|
9
9
|
| **href** | The link of the avatar | `string` | No | `undefined` | - |
|
|
10
|
-
| **to** | The link (router-link) of the avatar
|
|
10
|
+
| **to** | The link (router-link or nuxt-link) of the avatar | `string \| Record` | No | `undefined` | - |
|
|
11
11
|
| **alt** | The alt of the image | `string` | No | `'avatar image'` | - |
|
|
12
12
|
| **target** | The target of the link | `string` | No | `'_self'` | - |
|
|
13
13
|
| **size** | The size of the avatar | `string` | No | `undefined` | - |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
| ------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5
5
|
| **orientation** | Card variant: Must be `column \| row \| row-reverse \| column-reverse` | `"column" \| "row" \| "row-reverse" \| "column-reverse"` | No | `undefined` |
|
|
6
6
|
| **href** | Make card a link (footer area excluded) | `string` | No | `undefined` |
|
|
7
|
-
| **to** | Make card a link with a router-link (footer area excluded)
|
|
7
|
+
| **to** | Make card a link with a router-link or nuxt-link (footer area excluded) | `Native type` | No | `undefined` |
|
|
8
8
|
| **href-target** | Target option of link: Muse be one of `_blank \| _self \| _parent \| _top \| framename` | `"_blank" \| "_self" \| "_parent" \| "_top" \| string` | No | `undefined` |
|
|
9
9
|
| **footer-align** | Footer text alignment: `right \| left` | `"right" \| "left"` | No | `undefined` |
|
|
10
10
|
| **gallery** | Images gallery props options (see `MazGallery` component) | `MazGalleryProps` | No | `` { displayedCount: 3, remaining: false, zoom: !href && !to, width: 200, height: 150 }` If `href` or `to` is set, `zoom` is set to `false `` |
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description
|
|
4
|
-
| ------------------- |
|
|
5
|
-
| **class** | The class attribute of the link
|
|
6
|
-
| **style** | The style attribute of the link
|
|
7
|
-
| **as** | The component to use for the link - if not provided, it will be `router-link` if `to` is provided, will be `a` if `href` is provided, otherwise it will be `button`, you can force the component to be used with `as` prop | `string \| "a" \| "router-link" \| "nuxt-link" \| "button"` | No | `depends on the provided props` | `a', 'router-link', 'nuxt-link', 'button` |
|
|
8
|
-
| **id** | The id of the link
|
|
9
|
-
| **title** | The title of the link
|
|
10
|
-
| **href** | The href of the link
|
|
11
|
-
| **to** | The route location (router-link) of the link
|
|
12
|
-
| **color** | The color of the link
|
|
13
|
-
| **target** | The target of the link
|
|
14
|
-
| **download** | The download of the link
|
|
15
|
-
| **rel** | The rel of the link
|
|
16
|
-
| **aria-label** | The aria-label of the link
|
|
17
|
-
| **underline** | Add an underline to the link
|
|
18
|
-
| **underline-hover** | Add an underline only on hover
|
|
19
|
-
| **auto-external** | Add an external icon to the link if target is '\_blank'
|
|
20
|
-
| **left-icon** | The name of the icon or component to display on the left of the text `@type` `{string \| FunctionalComponent \| ComponentPublicInstance \| Component}`
|
|
21
|
-
| **right-icon** | The name of the icon or component to display on the right of the text `@type` `{string \| FunctionalComponent \| ComponentPublicInstance \| Component}`
|
|
22
|
-
| **disabled** | The disabled state of the link if the component is a button
|
|
3
|
+
| Name | Description | Type | Required | Default | Possible values |
|
|
4
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
5
|
+
| **class** | The class attribute of the link | `Native type` | No | `undefined` | - |
|
|
6
|
+
| **style** | The style attribute of the link | `Native type` | No | `undefined` | - |
|
|
7
|
+
| **as** | The component to use for the link - if not provided, it will be `router-link` or `nuxt-link` if `to` is provided, will be `a` if `href` is provided, otherwise it will be `button`, you can force the component to be used with `as` prop | `string \| "a" \| "router-link" \| "nuxt-link" \| "button" \| "RouterLink" \| "NuxtLink"` | No | `depends on the provided props` | `a', 'router-link', 'nuxt-link', 'button` |
|
|
8
|
+
| **id** | The id of the link | `string` | No | `undefined` | - |
|
|
9
|
+
| **title** | The title of the link | `string` | No | `undefined` | - |
|
|
10
|
+
| **href** | The href of the link | `string` | No | `undefined` | - |
|
|
11
|
+
| **to** | The route location (router-link) of the link | `RouteLocationRaw` | No | `undefined` | - |
|
|
12
|
+
| **color** | The color of the link | `MazColor \| "muted" \| "background" \| "inherit"` | No | `primary' When 'none', the link will not have any color, so it will inherit the color of the parent` | - |
|
|
13
|
+
| **target** | The target of the link | `"_blank" \| "_self" \| "_parent" \| "_top" \| string` | No | `_self` | `_blank', '_self', '_parent', '_top` |
|
|
14
|
+
| **download** | The download of the link | `string` | No | `undefined` | - |
|
|
15
|
+
| **rel** | The rel of the link | `string` | No | `undefined` | - |
|
|
16
|
+
| **aria-label** | The aria-label of the link | `string` | No | `undefined` | - |
|
|
17
|
+
| **underline** | Add an underline to the link | `boolean` | No | `false` | - |
|
|
18
|
+
| **underline-hover** | Add an underline only on hover | `boolean` | No | `true` | - |
|
|
19
|
+
| **auto-external** | Add an external icon to the link if target is '\_blank' | `boolean` | No | `true` | - |
|
|
20
|
+
| **left-icon** | The name of the icon or component to display on the left of the text `@type` `{string \| FunctionalComponent \| ComponentPublicInstance \| Component}` | `string \| IconComponent` | No | `undefined` | - |
|
|
21
|
+
| **right-icon** | The name of the icon or component to display on the right of the text `@type` `{string \| FunctionalComponent \| ComponentPublicInstance \| Component}` | `string \| IconComponent` | No | `undefined` | - |
|
|
22
|
+
| **disabled** | The disabled state of the link if the component is a button | `boolean` | No | `false` | - |
|
|
23
23
|
|
|
24
24
|
## Slots
|
|
25
25
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
## Props
|
|
2
2
|
|
|
3
|
-
| Name | Description
|
|
4
|
-
| ---------------- |
|
|
5
|
-
| **theme** |
|
|
6
|
-
| **translations** |
|
|
3
|
+
| Name | Description | Type | Required |
|
|
4
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- |
|
|
5
|
+
| **theme** | | `intersection` | Yes |
|
|
6
|
+
| **translations** | Must include `locale` and at least the messages for that locale in `messages`<br/>**Example:** `{ locale: 'fr', messages: { fr: { ... } } }` | `MazUiProviderTranslations` | Yes |
|
|
7
7
|
|
|
8
8
|
## Slots
|
|
9
9
|
|
|
@@ -88,16 +88,16 @@ The entire Maz-UI setup is now code-split into the Dashboard chunk.
|
|
|
88
88
|
|
|
89
89
|
## Props
|
|
90
90
|
|
|
91
|
-
| Prop | Type | Required |
|
|
92
|
-
|
|
93
|
-
| `theme` | `
|
|
94
|
-
| `translations` | `
|
|
91
|
+
| Prop | Type | Required | Description |
|
|
92
|
+
|------|------|----------|-------------|
|
|
93
|
+
| `theme` | `object` | Yes | Theme configuration. Must include `preset`. See [Theming](./themes.md) for details. |
|
|
94
|
+
| `translations` | `object` | Yes | Translations configuration. Must include `locale` and `messages` with at least the current locale's messages. See [Translations](./translations.md) for details. |
|
|
95
95
|
|
|
96
|
-
###
|
|
96
|
+
### theme
|
|
97
97
|
|
|
98
98
|
```typescript
|
|
99
|
-
interface
|
|
100
|
-
preset
|
|
99
|
+
interface ThemeOptions {
|
|
100
|
+
preset: ThemePreset // Required - Theme preset (mazUi, ocean, pristine, obsidian, or custom)
|
|
101
101
|
overrides?: ThemePresetOverrides // Partial overrides for colors, foundation, etc.
|
|
102
102
|
strategy?: 'runtime' | 'buildtime' | 'hybrid' // CSS generation strategy (default: 'hybrid')
|
|
103
103
|
darkModeStrategy?: 'class' | 'media' // Dark mode handling (default: 'class')
|
|
@@ -106,17 +106,36 @@ interface MazUiThemeOptions {
|
|
|
106
106
|
}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
::: warning Why is preset required?
|
|
110
|
+
Providing the theme preset synchronously avoids FOUC (Flash of Unstyled Content). Without a preset, components would render without their CSS variables until the theme loads, causing a visible flash.
|
|
111
|
+
:::
|
|
112
|
+
|
|
113
|
+
### translations
|
|
110
114
|
|
|
111
115
|
```typescript
|
|
112
|
-
interface
|
|
113
|
-
locale
|
|
116
|
+
interface TranslationsOptions {
|
|
117
|
+
locale: string // Required - Active locale (e.g. 'fr')
|
|
118
|
+
messages: MazUiTranslationsMessages // Required - Must contain at least the locale's messages
|
|
114
119
|
fallbackLocale?: string // Fallback locale (default: 'en')
|
|
115
120
|
preloadFallback?: boolean // Preload fallback locale (default: true)
|
|
116
|
-
messages?: MazUiTranslationsMessages // Locale messages (static objects or lazy loaders)
|
|
117
121
|
}
|
|
118
122
|
```
|
|
119
123
|
|
|
124
|
+
::: warning Why are locale and messages required?
|
|
125
|
+
By default, Maz-UI does not bundle any translations to keep your bundle small. Translation files are loaded asynchronously on demand.
|
|
126
|
+
|
|
127
|
+
If you don't provide the messages for the current locale synchronously, components like `MazInputPhoneNumber` will briefly show translation keys (e.g. `inputPhoneNumber.countrySelect.placeholder`) instead of actual text until the async loading completes.
|
|
128
|
+
|
|
129
|
+
Providing messages upfront avoids this flash:
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
import { fr } from '@maz-ui/translations'
|
|
133
|
+
|
|
134
|
+
// Messages for 'fr' are available immediately -- no flash
|
|
135
|
+
const translations = { locale: 'fr', messages: { fr } }
|
|
136
|
+
```
|
|
137
|
+
:::
|
|
138
|
+
|
|
120
139
|
## Plugin vs Provider
|
|
121
140
|
|
|
122
141
|
| | Plugin (`MazUi`) | Component (`MazUiProvider`) |
|
|
@@ -148,13 +167,22 @@ If you use both the plugin and the provider, **the provider takes precedence in
|
|
|
148
167
|
```vue
|
|
149
168
|
<!-- App.vue -->
|
|
150
169
|
<!-- Plugin provides global defaults -->
|
|
170
|
+
<script setup lang="ts">
|
|
171
|
+
import { MazUiProvider } from 'maz-ui/components'
|
|
172
|
+
import { ocean } from '@maz-ui/themes/presets/ocean'
|
|
173
|
+
import { en } from '@maz-ui/translations'
|
|
174
|
+
</script>
|
|
175
|
+
|
|
151
176
|
<template>
|
|
152
177
|
<div>
|
|
153
178
|
<!-- Uses plugin theme (mazUi preset) -->
|
|
154
179
|
<MazBtn color="primary">Global Theme</MazBtn>
|
|
155
180
|
|
|
156
181
|
<!-- Provider overrides in this subtree -->
|
|
157
|
-
<MazUiProvider
|
|
182
|
+
<MazUiProvider
|
|
183
|
+
:theme="{ preset: ocean }"
|
|
184
|
+
:translations="{ locale: 'en', messages: { en } }"
|
|
185
|
+
>
|
|
158
186
|
<!-- Uses ocean preset -->
|
|
159
187
|
<MazBtn color="primary">Ocean Theme</MazBtn>
|
|
160
188
|
</MazUiProvider>
|
package/docs/src/guide/themes.md
CHANGED
package/docs/src/guide/vue.md
CHANGED
|
@@ -55,6 +55,11 @@ app.use(MazUi, {
|
|
|
55
55
|
})
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
::: tip Why provide preset and messages?
|
|
59
|
+
- **`preset`** -- Providing the theme preset synchronously avoids FOUC (Flash of Unstyled Content). Without it, components render without their CSS variables until the theme loads.
|
|
60
|
+
- **`messages`** -- By default, Maz-UI does not bundle any translations. If you don't provide messages for the current locale, components will briefly show raw translation keys instead of actual text until the async loading completes.
|
|
61
|
+
:::
|
|
62
|
+
|
|
58
63
|
## Advanced Integration
|
|
59
64
|
|
|
60
65
|
You must the MazUi plugin to initialize the theme and translations.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maz-ui/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.7.0
|
|
4
|
+
"version": "4.7.0",
|
|
5
5
|
"description": "Maz-UI ModelContextProtocol Client",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
45
45
|
"@maz-ui/node": "4.6.1",
|
|
46
|
-
"@maz-ui/utils": "4.7.0
|
|
46
|
+
"@maz-ui/utils": "4.7.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@modelcontextprotocol/inspector": "^0.20.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ts-node-maintained": "^10.9.5",
|
|
55
55
|
"tsx": "^4.21.0",
|
|
56
56
|
"unbuild": "^3.6.1",
|
|
57
|
-
"@maz-ui/eslint-config": "4.7.0
|
|
57
|
+
"@maz-ui/eslint-config": "4.7.0"
|
|
58
58
|
},
|
|
59
59
|
"lint-staged": {
|
|
60
60
|
"*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
|