@maz-ui/mcp 4.1.1 → 4.1.2
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/blog/v4.md +276 -0
- package/docs/src/components/maz-slider.md +3 -2
- package/docs/src/guide/getting-started.md +2 -2
- package/docs/src/guide/icon-set.md +46 -12
- package/docs/src/guide/icons.md +2 -2
- package/docs/src/guide/migration-v4.md +66 -61
- package/docs/src/index.md +2 -2
- package/package.json +5 -5
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.1.1
|
|
10
|
+
const version = "4.1.1";
|
|
11
11
|
|
|
12
12
|
const _dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
13
|
class DocumentationService {
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Maz-UI v4.0.0 - The Complete Rebuild
|
|
3
|
+
description: Discover the complete rebuild of Maz-UI - now with modular architecture, advanced tree-shaking, comprehensive theming system, and performance optimizations that will transform your Vue & Nuxt development experience.
|
|
4
|
+
date: 2024-12-15
|
|
5
|
+
author: Louis Mazel
|
|
6
|
+
layout: doc
|
|
7
|
+
head:
|
|
8
|
+
- - meta
|
|
9
|
+
- name: keywords
|
|
10
|
+
content: vue ui library, vue components, nuxt ui, maz-ui v4, tree-shaking, theming, typescript, performance
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<img src="./../public/img/post-layer.png" alt="Maz-UI v4.0.0" class="maz-rounded maz-w-full maz-mb-12" />
|
|
14
|
+
|
|
15
|
+
# Maz-UI v4.0.0 - The Complete Rebuild
|
|
16
|
+
|
|
17
|
+
After months of development, I'm announcing **Maz-UI v4.0.0** — a complete architectural rebuild focused on performance, modularity, and developer experience.
|
|
18
|
+
|
|
19
|
+
## Why I Built v4.0.0
|
|
20
|
+
|
|
21
|
+
Modern applications require better performance, smaller bundle sizes, and improved developer tooling. Maz-UI v3 served its purpose, but I wanted to address these requirements with a ground-up rebuild.
|
|
22
|
+
|
|
23
|
+
**The goals were:** Better tree-shaking, modular architecture, and enhanced TypeScript support.
|
|
24
|
+
|
|
25
|
+
## What's New
|
|
26
|
+
|
|
27
|
+
### Modular Architecture
|
|
28
|
+
|
|
29
|
+
Maz-UI v4 uses a monorepo structure where every component, composable, directive, and utility can be imported independently. This gives you better control over your bundle size.
|
|
30
|
+
|
|
31
|
+
### Bundle Size Improvements
|
|
32
|
+
|
|
33
|
+
Optimal tree-shaking implementation results in **60-90% bundle size reductions** compared to v3. You can now import exactly what you need.
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
// Before v4: Large bundle with unused code
|
|
37
|
+
import * as MazUI from 'maz-ui'
|
|
38
|
+
|
|
39
|
+
// v4: Surgical imports for minimal bundles
|
|
40
|
+
import MazBtn from 'maz-ui/components/MazBtn'
|
|
41
|
+
import { useToast } from 'maz-ui/composables'
|
|
42
|
+
import { formatCurrency } from 'maz-ui/utils'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Theme System
|
|
46
|
+
|
|
47
|
+
#### Four Theme Presets
|
|
48
|
+
|
|
49
|
+
Choose from four pre-built themes:
|
|
50
|
+
|
|
51
|
+
- **Maz-UI**: Vibrant and modern with signature Maz-UI aesthetics
|
|
52
|
+
- **Pristine**: Minimalist elegance
|
|
53
|
+
- **Ocean**: Fresh aquatic theme with deep blues and coral accents
|
|
54
|
+
- **Obsidian**: Sophisticated dark theme focused on readability
|
|
55
|
+
|
|
56
|
+
#### HSL CSS Variables & Smart Dark Mode
|
|
57
|
+
|
|
58
|
+
The theming system uses HSL variables for flexibility, with automatic color scale generation (50-950) and dark mode support.
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { MazUi } from 'maz-ui/plugins/maz-ui'
|
|
62
|
+
import { ocean } from '@maz-ui/themes/presets'
|
|
63
|
+
|
|
64
|
+
app.use(MazUi, {
|
|
65
|
+
theme: {
|
|
66
|
+
preset: ocean,
|
|
67
|
+
strategy: 'hybrid', // Optimal performance
|
|
68
|
+
darkModeStrategy: 'class'
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Internationalization
|
|
74
|
+
|
|
75
|
+
#### Multi-language Support
|
|
76
|
+
|
|
77
|
+
Support for 9 languages: English, French, German, Spanish, Italian, Portuguese, Japanese, and Chinese, with custom language integration.
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { MazUi } from 'maz-ui/plugins/maz-ui'
|
|
81
|
+
import { fr, en } from '@maz-ui/translations'
|
|
82
|
+
|
|
83
|
+
app.use(MazUi, {
|
|
84
|
+
translations: {
|
|
85
|
+
locale: 'fr',
|
|
86
|
+
fallbackLocale: 'en',
|
|
87
|
+
messages: { fr, en }
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Specialized Ecosystem Packages
|
|
93
|
+
|
|
94
|
+
- **@maz-ui/icons** - 840+ Icons
|
|
95
|
+
SVG icon library with Vue components, direct SVG files, and auto-import support.
|
|
96
|
+
|
|
97
|
+
- **@maz-ui/nuxt** - Nuxt Integration
|
|
98
|
+
Nuxt module with auto-imports and SSR support.
|
|
99
|
+
|
|
100
|
+
- **@maz-ui/themes** - Theming System
|
|
101
|
+
Pre-built theme collections and design tokens.
|
|
102
|
+
|
|
103
|
+
- **@maz-ui/translations** - Internationalization
|
|
104
|
+
Lightweight i18n system for Maz-UI components.
|
|
105
|
+
|
|
106
|
+
- **@maz-ui/mcp** - MCP Server
|
|
107
|
+
Model Context Protocol server that connects AI agents to Maz-UI documentation.
|
|
108
|
+
|
|
109
|
+
### New & Enhanced Components
|
|
110
|
+
|
|
111
|
+
- **MazPopover** - Overlay Component
|
|
112
|
+
Popover with positioning, trigger modes, and accessibility features.
|
|
113
|
+
|
|
114
|
+
- **MazSelectCountry** - Country Selector
|
|
115
|
+
Country/language selector with i18n support and flag display.
|
|
116
|
+
|
|
117
|
+
- **MazLink** - Link Component
|
|
118
|
+
Replaces `MazBtn variant="link"` with auto-external detection and icons.
|
|
119
|
+
|
|
120
|
+
- **MazExpandAnimation** - CSS Grid Animations
|
|
121
|
+
Replaces `MazTransitionExpand` with v-model control and timing functions.
|
|
122
|
+
|
|
123
|
+
- **MazDropzone** - File Upload
|
|
124
|
+
Rewritten without external dependencies, featuring auto-upload and event handling.
|
|
125
|
+
|
|
126
|
+
## Performance Improvements
|
|
127
|
+
|
|
128
|
+
| Metric | v3.x | v4.0.0 | Improvement |
|
|
129
|
+
|--------|------|--------|-------------|
|
|
130
|
+
| **Bundle Size** | ~500KB | ~50-200KB | **60-90%** reduction |
|
|
131
|
+
| **Tree-shaking** | Limited | Optimal | Perfect granular imports |
|
|
132
|
+
| **TypeScript** | Good | Excellent | Strict types with auto-completion |
|
|
133
|
+
| **Build Speed** | Standard | Enhanced | Faster compilation |
|
|
134
|
+
|
|
135
|
+
## Developer Experience
|
|
136
|
+
|
|
137
|
+
### TypeScript-First Architecture
|
|
138
|
+
|
|
139
|
+
All components, composables, and utilities include TypeScript definitions with IDE auto-completion. Types are prefixed with `Maz` for consistency.
|
|
140
|
+
|
|
141
|
+
### Auto-Import Resolvers
|
|
142
|
+
|
|
143
|
+
Integration with `unplugin-vue-components` and `unplugin-auto-import` for auto-imports.
|
|
144
|
+
|
|
145
|
+
### Composable-Based Architecture
|
|
146
|
+
|
|
147
|
+
Several utilities are now Vue composables:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
// Before: Utility function
|
|
151
|
+
import { idleTimeout } from 'maz-ui'
|
|
152
|
+
|
|
153
|
+
// v4: Vue composable with reactive state
|
|
154
|
+
import { useIdleTimeout } from 'maz-ui/composables'
|
|
155
|
+
const { isIdle } = useIdleTimeout({ timeout: 5000 })
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Enhanced Development Tools
|
|
159
|
+
|
|
160
|
+
- Nuxt DevTools integration
|
|
161
|
+
- Interactive documentation with live examples
|
|
162
|
+
- Comprehensive migration guides
|
|
163
|
+
- MCP server for AI-assisted development
|
|
164
|
+
|
|
165
|
+
## Key Features
|
|
166
|
+
|
|
167
|
+
### Modular
|
|
168
|
+
|
|
169
|
+
Import individual components without the entire library. Tree-shaking ensures minimal bundle size.
|
|
170
|
+
|
|
171
|
+
### SSR Compatible
|
|
172
|
+
|
|
173
|
+
Compatible with Nuxt and server-side rendering.
|
|
174
|
+
|
|
175
|
+
### TypeScript Support
|
|
176
|
+
|
|
177
|
+
Built with TypeScript with auto-completion and type safety.
|
|
178
|
+
|
|
179
|
+
### Theming System
|
|
180
|
+
|
|
181
|
+
HSL-based theming with CSS custom properties and multiple rendering strategies.
|
|
182
|
+
|
|
183
|
+
### Dark Mode
|
|
184
|
+
|
|
185
|
+
Components support light and dark themes with system preference detection.
|
|
186
|
+
|
|
187
|
+
### Complete Ecosystem
|
|
188
|
+
|
|
189
|
+
Components, plugins, directives, composables, and utilities.
|
|
190
|
+
|
|
191
|
+
## Getting Started
|
|
192
|
+
|
|
193
|
+
### For Vue Projects
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
npm install maz-ui@4.0.0
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
// main.ts
|
|
201
|
+
import { createApp } from 'vue'
|
|
202
|
+
import { MazUi } from 'maz-ui/plugins/maz-ui'
|
|
203
|
+
import { mazUi } from '@maz-ui/themes/presets'
|
|
204
|
+
import { fr } from '@maz-ui/translations'
|
|
205
|
+
import 'maz-ui/styles'
|
|
206
|
+
|
|
207
|
+
const app = createApp(App)
|
|
208
|
+
|
|
209
|
+
app.use(MazUi, {
|
|
210
|
+
theme: { preset: mazUi },
|
|
211
|
+
translations: {
|
|
212
|
+
locale: 'fr',
|
|
213
|
+
fallbackLocale: 'en',
|
|
214
|
+
messages: { fr }
|
|
215
|
+
}
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
app.mount('#app')
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### For Nuxt Projects
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
npm install @maz-ui/nuxt
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
// nuxt.config.ts
|
|
229
|
+
export default defineNuxtConfig({
|
|
230
|
+
modules: ['@maz-ui/nuxt'],
|
|
231
|
+
})
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Migration Resources
|
|
235
|
+
|
|
236
|
+
To help with migration from v3 to v4:
|
|
237
|
+
|
|
238
|
+
- **[Complete Migration Guide](../guide/migration-v4.md)** - Step-by-step migration instructions
|
|
239
|
+
- **[MCP Integration](../guide/mcp.md)** - Connect AI agents for migration assistance
|
|
240
|
+
- **[Interactive Examples](../index.md)** - Live demonstrations of new features
|
|
241
|
+
- **[Community Support](https://github.com/LouisMazel/maz-ui/discussions)** - Get help from the community
|
|
242
|
+
|
|
243
|
+
## Summary
|
|
244
|
+
|
|
245
|
+
Maz-UI v4.0.0 is a complete rebuild focusing on performance, modularity, and developer experience. The new architecture provides better tree-shaking, smaller bundles, and improved TypeScript support.
|
|
246
|
+
|
|
247
|
+
Whether you're building a small project or large application, v4 offers the components and tools you need with better performance characteristics.
|
|
248
|
+
|
|
249
|
+
## Essential Links
|
|
250
|
+
|
|
251
|
+
- **[Get Started](/guide/getting-started)** - Installation and setup
|
|
252
|
+
- **[View Components](/components/maz-btn)** - Explore 50+ components
|
|
253
|
+
- **[Migration Guide](/guide/migration-v4)** - Upgrade from v3.x
|
|
254
|
+
- **[GitHub Repository](https://github.com/LouisMazel/maz-ui)** - Source code & issues
|
|
255
|
+
- **[Changelog](https://github.com/LouisMazel/maz-ui/blob/master/CHANGELOG.md)** - Detailed release notes
|
|
256
|
+
- **[v3 Documentation](https://v3.maz-ui.com)** - Legacy version support
|
|
257
|
+
|
|
258
|
+
## Get Started
|
|
259
|
+
|
|
260
|
+
**Ready to try Maz-UI v4.0.0?**
|
|
261
|
+
|
|
262
|
+
<div class="maz-flex maz-gap-4 maz-mt-8 maz-flex-wrap">
|
|
263
|
+
<MazBtn href="https://maz-ui.com/guide/getting-started" size="lg">
|
|
264
|
+
Get Started Now
|
|
265
|
+
</MazBtn>
|
|
266
|
+
<MazBtn href="https://maz-ui.com/guide/migration-v4" color="background" outlined size="lg">
|
|
267
|
+
Migration Guide
|
|
268
|
+
</MazBtn>
|
|
269
|
+
<MazBtn href="https://github.com/LouisMazel/maz-ui" color="background" outlined size="lg" target="blank">
|
|
270
|
+
View on GitHub
|
|
271
|
+
</MazBtn>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
*Feel free to share your feedback and contribute to the project on GitHub.*
|
|
@@ -29,10 +29,10 @@ const sliderValue = ref(50)
|
|
|
29
29
|
|
|
30
30
|
### Step
|
|
31
31
|
|
|
32
|
-
<MazSlider v-model="
|
|
32
|
+
<MazSlider v-model="sliderStepValue" :step="10" class="vp-raw" />
|
|
33
33
|
|
|
34
34
|
```html
|
|
35
|
-
<MazSlider v-model="
|
|
35
|
+
<MazSlider v-model="value" :step="10" class="vp-raw" />
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### Multiple sliders & labels
|
|
@@ -181,6 +181,7 @@ const multipleSilders = ref([25, 50, 75])
|
|
|
181
181
|
<script lang="ts" setup>
|
|
182
182
|
import { ref } from 'vue'
|
|
183
183
|
const sliderValue = ref(50)
|
|
184
|
+
const sliderStepValue = ref(50)
|
|
184
185
|
const multipleSilders = ref([25, 50, 75])
|
|
185
186
|
const multipleSildersLabels = ['Small', 'Middle', 'Big']
|
|
186
187
|
|
|
@@ -19,7 +19,7 @@ head:
|
|
|
19
19
|
- 🆕 **New components** - MazPopover & MazSelectCountry
|
|
20
20
|
- 🎨 **Theming system** - Customizable themes and dark mode support (4 presets available) - [@maz-ui/themes](./themes.md)
|
|
21
21
|
- 🌐 **Internationalization** - Locale management and tree-shakable imports - [@maz-ui/translations](./translations.md)
|
|
22
|
-
- 🎨 **Icon library** - Comprehensive collection of SVG icons designed for performance and flexibility (
|
|
22
|
+
- 🎨 **Icon library** - Comprehensive collection of SVG icons designed for performance and flexibility (400+ icons) - [@maz-ui/icons](./icons.md)
|
|
23
23
|
- 🧰 **Nuxt module** - Effortless Maz-UI integration with auto-imports - [@maz-ui/nuxt](./nuxt.md)
|
|
24
24
|
- 🤖 **MCP** - Connect your IA agents to the documentation - [@maz-ui/mcp](./mcp.md)
|
|
25
25
|
|
|
@@ -131,7 +131,7 @@ npm install @maz-ui/icons
|
|
|
131
131
|
|
|
132
132
|
**Features:**
|
|
133
133
|
|
|
134
|
-
-
|
|
134
|
+
- 840+ icons
|
|
135
135
|
- Usable as Vue components (e.g. `<MazStar />`)
|
|
136
136
|
- Tree-shakable imports
|
|
137
137
|
- Multiple sizes and variants
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Icon Set (
|
|
1
|
+
# Icon Set (840+ icons)
|
|
2
2
|
|
|
3
|
-
The library includes **
|
|
3
|
+
The library includes **840+ carefully**
|
|
4
4
|
|
|
5
5
|
## Icon Naming Convention
|
|
6
6
|
|
|
@@ -16,13 +16,16 @@ All icons follow a consistent naming pattern:
|
|
|
16
16
|
<div class="maz-flex maz-gap-2 maz-items-start">
|
|
17
17
|
<MazInput v-model="search" label="Search icon" @update:model-value="search = $event.trim()" :left-icon="MazIcons.MazMagnifyingGlass" class="flex-1" :assistive-text="`${filteredIcons.length} icons found`" />
|
|
18
18
|
</div>
|
|
19
|
+
<MazTabs v-model="currentTab">
|
|
20
|
+
<MazTabsBar :items="tabs" />
|
|
21
|
+
</MazTabs>
|
|
19
22
|
<div class="maz-grid maz-grid-cols-3 maz-gap-2">
|
|
20
|
-
<div v-for="icon in filteredIcons" :key="icon.
|
|
21
|
-
<Component :is="icon.
|
|
22
|
-
<span class="maz-text-xs maz-text-muted maz-truncate">{{ icon.
|
|
23
|
+
<div v-for="icon in filteredIcons" :key="icon.name" class="maz-flex maz-flex-col maz-items-center maz-gap-3 maz-text-center maz-border maz-border-solid maz-border-divider maz-rounded maz-p-4 maz-truncate hover:maz-bg-surface-600/50 dark:hover:maz-bg-surface-400">
|
|
24
|
+
<Component :is="icon.component" class="maz-size-8" />
|
|
25
|
+
<span class="maz-text-xs maz-text-muted maz-truncate">{{ icon.name }}</span>
|
|
23
26
|
<div class="maz-flex maz-flex-row maz-gap-2 maz-w-full">
|
|
24
|
-
<MazBtn v-tooltip="'Copy Name'" class="maz-flex-1" size="xs" color="background" outlined @click="copyIcon(icon.
|
|
25
|
-
<MazBtn v-tooltip="'Copy Import'" class="maz-flex-1" size="xs" color="background" outlined @click="copyIconImport(icon.
|
|
27
|
+
<MazBtn v-tooltip="{ text: 'Copy Name', panelClass: 'maz-text-xs' }" class="maz-flex-1" size="xs" color="background" outlined @click="copyIcon(icon.name)" :icon="MazClipboardDocument" />
|
|
28
|
+
<MazBtn v-tooltip="{ text: 'Copy Import', panelClass: 'maz-text-xs' }" class="maz-flex-1" size="xs" color="background" outlined @click="copyIconImport(icon.name)" :icon="MazClipboardDocumentList" />
|
|
26
29
|
</div>
|
|
27
30
|
</div>
|
|
28
31
|
</div>
|
|
@@ -36,20 +39,51 @@ import { vTooltip } from 'maz-ui/directives/vTooltip'
|
|
|
36
39
|
import { MazClipboardDocument, MazClipboardDocumentList } from '@maz-ui/icons'
|
|
37
40
|
|
|
38
41
|
const MazIcons = await import('@maz-ui/icons')
|
|
39
|
-
const { success} = useToast()
|
|
40
42
|
|
|
41
43
|
const icons = Object.entries(MazIcons).sort(([nameA, _], [nameB, __]) => nameA.localeCompare(nameB)).map(([name, component]) => ({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
name,
|
|
45
|
+
component,
|
|
44
46
|
}))
|
|
45
47
|
|
|
48
|
+
const { commonIcons, flags, flagsSquare, all } = icons.reduce((acc, iconComponent) => {
|
|
49
|
+
if (iconComponent.name.startsWith('MazFlagSquare')) {
|
|
50
|
+
acc.flagsSquare.push(iconComponent)
|
|
51
|
+
}
|
|
52
|
+
else if (iconComponent.name.startsWith('MazFlag') && iconComponent.name.length >= 8) acc.flags.push(iconComponent)
|
|
53
|
+
else if (iconComponent.name.startsWith('Maz')) acc.commonIcons.push(iconComponent)
|
|
54
|
+
|
|
55
|
+
acc.all.push(iconComponent)
|
|
56
|
+
|
|
57
|
+
return acc
|
|
58
|
+
}, {
|
|
59
|
+
commonIcons: [],
|
|
60
|
+
flags: [],
|
|
61
|
+
flagsSquare: [],
|
|
62
|
+
all: [],
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const currentTab = ref(1)
|
|
66
|
+
|
|
67
|
+
const tabs = [
|
|
68
|
+
{ label: 'All', badge: { color: 'secondary', content: all.length, roundedSize: 'full' } },
|
|
69
|
+
{ label: 'Icons', badge: { color: 'secondary', content: commonIcons.length, roundedSize: 'full' } },
|
|
70
|
+
{ label: 'Flags', badge: { color: 'secondary', content: flags.length, roundedSize: 'full' } },
|
|
71
|
+
{ label: 'Flags Square', badge: { color: 'secondary', content: flagsSquare.length, roundedSize: 'full' } },
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
const { success } = useToast()
|
|
75
|
+
|
|
46
76
|
const search = ref()
|
|
47
77
|
|
|
48
78
|
const filteredIcons = computed(() => {
|
|
79
|
+
const _currentTab = currentTab.value
|
|
80
|
+
|
|
81
|
+
const baseIcons = _currentTab === 1 ? all : _currentTab === 2 ? commonIcons : _currentTab === 3 ? flags : _currentTab === 4 ? flagsSquare : all
|
|
82
|
+
|
|
49
83
|
const _search = search.value?.toLowerCase().replace(/\s/g, '')
|
|
50
|
-
if (!_search) return
|
|
84
|
+
if (!_search) return baseIcons
|
|
51
85
|
|
|
52
|
-
return
|
|
86
|
+
return baseIcons.filter(icon => icon.name.toLowerCase().includes(_search) || _search.includes(icon.name.toLowerCase()))
|
|
53
87
|
})
|
|
54
88
|
|
|
55
89
|
const copyIcon = (icon) => {
|
package/docs/src/guide/icons.md
CHANGED
|
@@ -4,7 +4,7 @@ A comprehensive collection of **328 beautiful SVG icons** ready for use in your
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **840+ icons** - All icons are available [in the icon set page](./icon-set.md)
|
|
8
8
|
- **Multiple usage patterns** - Direct SVG files, Vue components, or auto-import
|
|
9
9
|
- **TypeScript support** - Full type definitions included
|
|
10
10
|
- **Tree-shakeable** - Import only the icons you need
|
|
@@ -270,7 +270,7 @@ All icons support CSS custom properties for advanced styling:
|
|
|
270
270
|
|
|
271
271
|
## Available Icons
|
|
272
272
|
|
|
273
|
-
The library includes **
|
|
273
|
+
The library includes **840+ carefully** covering all common use cases:
|
|
274
274
|
|
|
275
275
|
### Icon Naming Convention
|
|
276
276
|
|
|
@@ -5,7 +5,11 @@ description: Complete guide to migrate from Maz-UI v3.x to v4.0.0 - Modular arch
|
|
|
5
5
|
|
|
6
6
|
# {{ $frontmatter.title }}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Maz-UI v4.0.0 isn’t just an update — it’s a complete rebuild designed to give developers more flexibility and simplicity.
|
|
9
|
+
|
|
10
|
+
The library is now split into independent packages, allowing you to install and use only what you need.\
|
|
11
|
+
The theme system has been redesigned to make customizing and managing multiple themes easier, while the internationalization system offers full control over translations.\
|
|
12
|
+
Performance has also been significantly improved thanks to optimal tree-shaking, more efficient minification, and a modernized architecture.
|
|
9
13
|
|
|
10
14
|
::: tip Connected to Maz-UI MCP
|
|
11
15
|
|
|
@@ -17,12 +21,12 @@ Follow the [MCP](/guide/mcp) guide to connect your AI assistant to Maz-UI's docu
|
|
|
17
21
|
|
|
18
22
|
### Architectural Revolution
|
|
19
23
|
|
|
20
|
-
v4.0.0 isn't just an update, it's a **complete rebuild** that transforms Maz-UI into a modern
|
|
24
|
+
v4.0.0 isn't just an update, it's a **complete rebuild** that transforms Maz-UI into a modern and performant library:
|
|
21
25
|
|
|
22
26
|
#### Optimized Tree-Shaking
|
|
23
27
|
|
|
24
28
|
- **Dramatic bundle reduction**: 60-90% size reduction
|
|
25
|
-
- **Granular imports**: Every component, directive, and utility is individually importable
|
|
29
|
+
- **Granular imports**: Every component, composables, plugins, directive, and utility is individually importable
|
|
26
30
|
- **Modern bundlers**: Perfect compatibility with Vite, Webpack 5, Rollup
|
|
27
31
|
|
|
28
32
|
#### Modular Architecture
|
|
@@ -35,15 +39,16 @@ v4.0.0 isn't just an update, it's a **complete rebuild** that transforms Maz-UI
|
|
|
35
39
|
|
|
36
40
|
- **Predefined presets**: `mazUi`, `obsidian`, `ocean`, `pristine`
|
|
37
41
|
- **Dynamic CSS Variables**: Automatic CSS variable generation
|
|
38
|
-
- **Intelligent dark mode**: Configurable strategies for dark mode
|
|
42
|
+
- **Intelligent dark mode**: Configurable strategies for dark mode based on system preferences and user choice stored in cookies
|
|
39
43
|
|
|
40
44
|
#### Complete Internationalization
|
|
41
45
|
|
|
42
|
-
- **9 supported languages**: EN, FR, DE, ES, IT, PT, JA, ZH-CN
|
|
46
|
+
- **9 supported languages by default**: EN, FR, DE, ES, IT, PT, JA, ZH-CN
|
|
47
|
+
- **Add your own languages**: Easy integration of custom translations
|
|
43
48
|
- **Translation system**: Vue plugin and dedicated composables
|
|
44
49
|
- **Automatic fallback**: Smart handling of missing translations
|
|
45
50
|
|
|
46
|
-
#### New Components
|
|
51
|
+
#### New Components or refactored
|
|
47
52
|
|
|
48
53
|
- **MazLink**: Modern link component replacing `MazBtn variant="link"`
|
|
49
54
|
- **MazExpandAnimation**: CSS Grid expansion animation (replaces `MazTransitionExpand`)
|
|
@@ -63,10 +68,10 @@ v4.0.0 separates functionality into specialized packages for better modularity:
|
|
|
63
68
|
| **@maz-ui/themes** | Theme system and presets | New |
|
|
64
69
|
| **@maz-ui/translations** | i18n translations | New |
|
|
65
70
|
| **@maz-ui/utils** | JavaScript/TypeScript utilities | New |
|
|
66
|
-
| **@maz-ui/icons** | SVG icons (
|
|
67
|
-
| **@maz-ui/cli** | CLI for theme generation |
|
|
68
|
-
| **@maz-ui/nuxt** | Nuxt 3 module |
|
|
69
|
-
| **@maz-ui/mcp** | MCP server for IA agent |
|
|
71
|
+
| **@maz-ui/icons** | SVG icons and flags (840+ icons) | New |
|
|
72
|
+
| **@maz-ui/cli** | CLI for theme generation | Renamed |
|
|
73
|
+
| **@maz-ui/nuxt** | Nuxt 3 module | New |
|
|
74
|
+
| **@maz-ui/mcp** | MCP server for IA agent | New |
|
|
70
75
|
|
|
71
76
|
## Migration Checklist
|
|
72
77
|
|
|
@@ -88,10 +93,10 @@ npm uninstall dropzone
|
|
|
88
93
|
|
|
89
94
|
**Updated peer dependencies:**
|
|
90
95
|
- **Vue**: `^3.5.0` (was `^3.0.0`)
|
|
91
|
-
- **unplugin-vue-components**: `>=28.0.0`
|
|
92
|
-
- **unplugin-auto-import**: `>=19.0.0`
|
|
96
|
+
- **unplugin-vue-components**: `>=28.0.0`
|
|
97
|
+
- **unplugin-auto-import**: `>=19.0.0`
|
|
93
98
|
|
|
94
|
-
###
|
|
99
|
+
### Vue users - Plugin configuration
|
|
95
100
|
|
|
96
101
|
**NEW**: v4.0.0 introduces a mandatory Vue plugin for configuration.
|
|
97
102
|
|
|
@@ -123,7 +128,7 @@ import App from './App.vue'
|
|
|
123
128
|
|
|
124
129
|
const app = createApp(App)
|
|
125
130
|
|
|
126
|
-
//
|
|
131
|
+
// NEW: MazUi plugin required
|
|
127
132
|
app.use(MazUi, {
|
|
128
133
|
// Theme configuration (optional)
|
|
129
134
|
theme: {
|
|
@@ -142,7 +147,7 @@ app.use(MazUi, {
|
|
|
142
147
|
app.mount('#app')
|
|
143
148
|
```
|
|
144
149
|
|
|
145
|
-
###
|
|
150
|
+
### Nuxt users - Module Configuration
|
|
146
151
|
|
|
147
152
|
**NEW**: Dedicated Nuxt module with simplified API.
|
|
148
153
|
|
|
@@ -163,9 +168,9 @@ export default defineNuxtConfig({
|
|
|
163
168
|
```typescript
|
|
164
169
|
// nuxt.config.ts
|
|
165
170
|
export default defineNuxtConfig({
|
|
166
|
-
modules: ['@maz-ui/nuxt'], //
|
|
171
|
+
modules: ['@maz-ui/nuxt'], // New package
|
|
167
172
|
mazUi: {
|
|
168
|
-
//
|
|
173
|
+
// New configuration API
|
|
169
174
|
theme: {
|
|
170
175
|
preset: 'maz-ui',
|
|
171
176
|
strategy: 'hybrid',
|
|
@@ -190,7 +195,7 @@ export default defineNuxtConfig({
|
|
|
190
195
|
})
|
|
191
196
|
```
|
|
192
197
|
|
|
193
|
-
###
|
|
198
|
+
### Import Migration
|
|
194
199
|
|
|
195
200
|
**MAJOR CHANGE**: New modular import structure.
|
|
196
201
|
|
|
@@ -463,7 +468,7 @@ import { MazDialogPromise } from 'maz-ui'
|
|
|
463
468
|
import { MazDialogConfirm } from 'maz-ui'
|
|
464
469
|
```
|
|
465
470
|
|
|
466
|
-
##
|
|
471
|
+
## Composable Changes
|
|
467
472
|
|
|
468
473
|
### useDialog - API Changes
|
|
469
474
|
|
|
@@ -829,69 +834,69 @@ app.use(MazUi)
|
|
|
829
834
|
|
|
830
835
|
### Dependencies
|
|
831
836
|
|
|
832
|
-
-
|
|
833
|
-
-
|
|
834
|
-
-
|
|
835
|
-
-
|
|
836
|
-
-
|
|
837
|
+
- <MazCheckbox> Update maz-ui to v4.0.0+ </MazCheckbox>
|
|
838
|
+
- <MazCheckbox> Remove `dropzone` dependency </MazCheckbox>
|
|
839
|
+
- <MazCheckbox> Update Vue to v3.5+ </MazCheckbox>
|
|
840
|
+
- <MazCheckbox> Update unplugin-auto-import to v19+ </MazCheckbox>
|
|
841
|
+
- <MazCheckbox> Update unplugin-vue-components to v28+ </MazCheckbox>
|
|
837
842
|
|
|
838
843
|
### Configuration
|
|
839
844
|
|
|
840
|
-
-
|
|
841
|
-
-
|
|
842
|
-
-
|
|
843
|
-
-
|
|
845
|
+
- <MazCheckbox> Add MazUi plugin in main.ts </MazCheckbox>
|
|
846
|
+
- <MazCheckbox> Configure theme with new system </MazCheckbox>
|
|
847
|
+
- <MazCheckbox> Configure translations with new system </MazCheckbox>
|
|
848
|
+
- <MazCheckbox> Migrate Nuxt configuration to @maz-ui/nuxt (if using Nuxt) </MazCheckbox>
|
|
844
849
|
|
|
845
850
|
### Imports
|
|
846
851
|
|
|
847
|
-
-
|
|
848
|
-
-
|
|
849
|
-
-
|
|
850
|
-
-
|
|
852
|
+
- <MazCheckbox> Migrate plugin imports to `maz-ui/plugins/*` </MazCheckbox>
|
|
853
|
+
- <MazCheckbox> Migrate directive imports to `maz-ui/directives/*` </MazCheckbox>
|
|
854
|
+
- <MazCheckbox> Migrate composable imports to `maz-ui/composables/*` </MazCheckbox>
|
|
855
|
+
- <MazCheckbox> Update utility imports (e.g. currency → formatCurrency, etc.) </MazCheckbox>
|
|
851
856
|
|
|
852
857
|
### Components
|
|
853
858
|
|
|
854
|
-
-
|
|
855
|
-
-
|
|
856
|
-
-
|
|
857
|
-
-
|
|
858
|
-
-
|
|
859
|
-
-
|
|
860
|
-
-
|
|
861
|
-
-
|
|
862
|
-
-
|
|
859
|
+
- <MazCheckbox> Replace `MazBtn variant="link"` with `MazLink` </MazCheckbox>
|
|
860
|
+
- <MazCheckbox> Update `MazBtn outline` to `outlined` </MazCheckbox>
|
|
861
|
+
- <MazCheckbox> Rename `MazPhoneNumberInput` to `MazInputPhoneNumber` </MazCheckbox>
|
|
862
|
+
- <MazCheckbox> Rename `MazPicker` to `MazDatePicker` </MazCheckbox>
|
|
863
|
+
- <MazCheckbox> Replace `MazTransitionExpand` with `MazExpandAnimation` </MazCheckbox>
|
|
864
|
+
- <MazCheckbox> Update `MazDropdown`/`MazSelect` position props </MazCheckbox>
|
|
865
|
+
- <MazCheckbox> Rename `MazDialogPromise` to `MazDialogConfirm` </MazCheckbox>
|
|
866
|
+
- <MazCheckbox> Check new `MazDropzone` props </MazCheckbox>
|
|
867
|
+
- <MazCheckbox> Rename `MazPicker` to `MazDatePicker` </MazCheckbox>
|
|
863
868
|
|
|
864
869
|
### API Changes
|
|
865
870
|
|
|
866
|
-
-
|
|
867
|
-
-
|
|
868
|
-
-
|
|
869
|
-
-
|
|
870
|
-
-
|
|
871
|
+
- <MazCheckbox> Migrate `useDialog` from Promise to callback API </MazCheckbox>
|
|
872
|
+
- <MazCheckbox> Rename `useLanguageDisplayNames` to `useDisplayNames` </MazCheckbox>
|
|
873
|
+
- <MazCheckbox> Update `@update` to `@data` in `MazInputPhoneNumber` </MazCheckbox>
|
|
874
|
+
- <MazCheckbox> Replace removed colors (theme → contrast, danger → destructive) </MazCheckbox>
|
|
875
|
+
- <MazCheckbox> Remove `v-closable` directive usage </MazCheckbox>
|
|
871
876
|
|
|
872
877
|
### Helpers to Composables
|
|
873
878
|
|
|
874
|
-
-
|
|
875
|
-
-
|
|
876
|
-
-
|
|
877
|
-
-
|
|
878
|
-
-
|
|
879
|
+
- <MazCheckbox> Migrate `idleTimeout` to `useIdleTimeout` </MazCheckbox>
|
|
880
|
+
- <MazCheckbox> Migrate `userVisibility` to `useUserVisibility` </MazCheckbox>
|
|
881
|
+
- <MazCheckbox> Migrate `mountComponent` to `useMountComponent` </MazCheckbox>
|
|
882
|
+
- <MazCheckbox> Migrate `injectStrict` to `useInjectStrict` </MazCheckbox>
|
|
883
|
+
- <MazCheckbox> Migrate `freezeValue` to `useFreezeValue` </MazCheckbox>
|
|
879
884
|
|
|
880
885
|
### TypeScript
|
|
881
886
|
|
|
882
|
-
-
|
|
883
|
-
-
|
|
884
|
-
-
|
|
887
|
+
- <MazCheckbox> Update all type imports to use `Maz` prefix </MazCheckbox>
|
|
888
|
+
- <MazCheckbox> Update prop type imports (e.g. Props → MazBtnProps) </MazCheckbox>
|
|
889
|
+
- <MazCheckbox> Update generic types (e.g. Color → MazColor, Size → MazSize) </MazCheckbox>
|
|
885
890
|
|
|
886
891
|
### Testing and Validation
|
|
887
892
|
|
|
888
|
-
-
|
|
889
|
-
-
|
|
890
|
-
-
|
|
891
|
-
-
|
|
892
|
-
-
|
|
893
|
-
-
|
|
894
|
-
-
|
|
893
|
+
- <MazCheckbox> Test TypeScript compilation </MazCheckbox>
|
|
894
|
+
- <MazCheckbox> Test production build </MazCheckbox>
|
|
895
|
+
- <MazCheckbox> Check bundle size </MazCheckbox>
|
|
896
|
+
- <MazCheckbox> Run unit tests </MazCheckbox>
|
|
897
|
+
- <MazCheckbox> Test in development and production </MazCheckbox>
|
|
898
|
+
- <MazCheckbox> Test SSR/Nuxt if applicable </MazCheckbox>
|
|
899
|
+
- <MazCheckbox> Validate critical functionality </MazCheckbox>
|
|
895
900
|
|
|
896
901
|
## Additional Resources
|
|
897
902
|
|
package/docs/src/index.md
CHANGED
|
@@ -20,8 +20,8 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
|
|
|
20
20
|
Discover the latest major release with improved performance, better tree-shaking, and enhanced TypeScript support, advanced theming, translations, icons set and more.
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
|
-
<div class="maz-flex maz-gap-2 maz-justify-center maz-flex-wrap">
|
|
24
|
-
<MazBtn href="https://v3.maz-ui.com" color="contrast" outlined class="dark maz-w-full mob-l:maz-w-auto"
|
|
23
|
+
<div class="maz-flex maz-gap-2 maz-justify-center maz-flex-wrap maz-flex-col-reverse mob-l:maz-flex-row">
|
|
24
|
+
<MazBtn href="https://v3.maz-ui.com" color="contrast" outlined class="dark maz-w-full mob-l:maz-w-auto">
|
|
25
25
|
V3 documentation
|
|
26
26
|
</MazBtn>
|
|
27
27
|
<MazBtn href="https://github.com/LouisMazel/maz-ui/blob/master/CHANGELOG.md" color="contrast" outlined class="dark maz-w-full mob-l:maz-w-auto" target="blank">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maz-ui/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.2",
|
|
5
5
|
"description": "Maz-UI ModelContextProtocol Client",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"test:unit:coverage": "pnpm generate:docs && vitest run --coverage"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@maz-ui/node": "4.1.
|
|
62
|
-
"@maz-ui/utils": "4.1.
|
|
61
|
+
"@maz-ui/node": "4.1.2",
|
|
62
|
+
"@maz-ui/utils": "4.1.2",
|
|
63
63
|
"@modelcontextprotocol/sdk": "^1.17.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@maz-ui/eslint-config": "4.1.
|
|
66
|
+
"@maz-ui/eslint-config": "4.1.2",
|
|
67
67
|
"@modelcontextprotocol/inspector": "^0.16.2",
|
|
68
68
|
"@swc/core": "1.13.3",
|
|
69
69
|
"@types/node": "^24.2.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"lint-staged": {
|
|
81
81
|
"*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "7be37c69c61b31f83699a61039b407ff196facc4"
|
|
84
84
|
}
|