@maz-ui/mcp 4.0.0-beta.28 → 4.0.0-beta.30

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 CHANGED
@@ -4,10 +4,12 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
4
4
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
5
5
  import { ListResourcesRequestSchema, ReadResourceRequestSchema, ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
6
6
  import { existsSync, readFileSync, readdirSync } from 'node:fs';
7
- import { resolve, join } from 'node:path';
7
+ import { resolve, dirname, join } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
8
9
 
9
- const version = "4.0.0-beta.27";
10
+ const version = "4.0.0-beta.29";
10
11
 
12
+ const _dirname = dirname(fileURLToPath(import.meta.url));
11
13
  class DocumentationService {
12
14
  docsRoot;
13
15
  componentsDir;
@@ -18,8 +20,8 @@ class DocumentationService {
18
20
  pluginsDir;
19
21
  helpersDir;
20
22
  constructor() {
21
- const localDocsRoot = resolve(__dirname, "../docs/src");
22
- const localGeneratedDocsDir = resolve(__dirname, "../docs/generated-docs");
23
+ const localDocsRoot = resolve(_dirname, "../docs/src");
24
+ const localGeneratedDocsDir = resolve(_dirname, "../docs/generated-docs");
23
25
  this.docsRoot = localDocsRoot;
24
26
  this.generatedDocsDir = localGeneratedDocsDir;
25
27
  this.componentsDir = join(this.docsRoot, "components");
@@ -15,13 +15,13 @@ head:
15
15
 
16
16
  - 🌱 **Tree-shaking improvements** - Import only what you need
17
17
  - 🛠️ **TypeScript-first** - Full type safety out of the box
18
- - 🎨 **Theming system** - Customizable themes and dark mode support (4 presets available)
19
- - 🌐 **Internationalization** - Locale management and tree-shakable imports
20
- - 🎨 **Icon library** - Comprehensive collection of SVG icons designed for performance and flexibility
21
- - 🧰 **Nuxt module** - Effortless Maz-UI integration with auto-imports
22
18
  - 🚀 **Performance optimizations** - Tree-shaking benefits and maximum optimization
23
- - 🛠️ **Enhanced accessibility** - WCAG 2.1 AA compliant
24
19
  - 🆕 **New components** - MazPopover & MazSelectCountry
20
+ - 🎨 **Theming system** - Customizable themes and dark mode support (4 presets available) - [@maz-ui/themes](./themes.md)
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 (300+ icons) - [@maz-ui/icons](./icons.md)
23
+ - 🧰 **Nuxt module** - Effortless Maz-UI integration with auto-imports - [@maz-ui/nuxt](./nuxt.md)
24
+ - 🤖 **MCP** - Connect your IA agents to the documentation - [@maz-ui/mcp](./mcp.md)
25
25
 
26
26
  :::
27
27
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: Install maz-ui with Nuxt
3
- description: The ultimate Nuxt module for Maz-UI - zero-config setup with auto-imports, theming, and powerful features out of the box
3
+ description: The ultimate Nuxt module for Maz-UI - zero-config setup with auto-imports, theming, internationalization and powerful features out of the box
4
4
  ---
5
5
 
6
6
  # {{ $frontmatter.title }}
7
7
 
8
- Transform your Nuxt application with the most comprehensive Vue.js UI library integration. **Maz-UI Nuxt Module** provides zero-configuration setup, intelligent auto-imports, and powerful theming capabilities.
8
+ Transform your Nuxt application with the most comprehensive Vue.js UI library integration. **Maz-UI Nuxt Module** provides zero-configuration setup, intelligent auto-imports, powerful theming capabilities and internationalization.
9
9
 
10
10
  ## Why Choose Maz-UI for Nuxt?
11
11
 
@@ -136,12 +136,12 @@ export default defineNuxtConfig({
136
136
  },
137
137
  },
138
138
 
139
- // 🧩 Components
139
+ // Components
140
140
  components: {
141
141
  autoImport: true, // All components globally available
142
142
  },
143
143
 
144
- // 🔌 Plugins (not enabled by default)
144
+ // Plugins (not enabled by default)
145
145
  plugins: {
146
146
  aos: true,
147
147
  dialog: true,
@@ -149,7 +149,7 @@ export default defineNuxtConfig({
149
149
  wait: true,
150
150
  },
151
151
 
152
- // 🎪 Composables (enabled by default)
152
+ // Composables (enabled by default)
153
153
  composables: {
154
154
  useFormValidator: true,
155
155
  useFreezeValue: true,
@@ -160,7 +160,7 @@ export default defineNuxtConfig({
160
160
  useStringMatching: false,
161
161
  },
162
162
 
163
- // 🎯 Directives (not enabled by default)
163
+ // Directives (not enabled by default)
164
164
  directives: {
165
165
  vTooltip: true,
166
166
  vLazyImg: true,
@@ -240,11 +240,68 @@ const theme = {
240
240
  }
241
241
  ```
242
242
 
243
- **Theme Strategies Explained:**
243
+ ## Theme Strategies Explained
244
244
 
245
- - **`hybrid`** (recommended): Critical CSS inlined, full CSS loaded asynchronously
246
- - **`runtime`**: CSS generated and injected on client-side
247
- - **`buildtime`**: CSS generated at build time and included in bundle
245
+ ### Hybrid (Recommended)
246
+
247
+ The hybrid strategy combines optimal performance with zero FOUC (Flash of Unstyled Content):
248
+
249
+ - **Critical CSS injected immediately** - Essential theme variables are inlined on server side to prevent visual flash (on client side if SSR is not enabled)
250
+ - **Full CSS loaded asynchronously** - Complete theme CSS is injected on client side using `requestIdleCallback` with 100ms timeout, avoiding main thread blocking
251
+ - **SSR-optimized** - When SSR is enabled, critical CSS is inlined during server rendering for instant theming
252
+
253
+ ```ts
254
+ export default defineNuxtConfig({
255
+ mazUi: {
256
+ theme: {
257
+ strategy: 'hybrid' // Recommended for most use cases
258
+ }
259
+ }
260
+ })
261
+ ```
262
+
263
+ ### Runtime
264
+
265
+ Immediate CSS injection strategy:
266
+
267
+ - **Critical CSS on server side** - Essential theme variables are injected during SSR
268
+ - **Full CSS on client side** - Complete theme CSS is injected immediately on client-side hydration
269
+ - **⚠️ Performance impact** - Immediate injection can block the main thread during hydration
270
+
271
+ ```ts
272
+ export default defineNuxtConfig({
273
+ mazUi: {
274
+ theme: {
275
+ strategy: 'runtime' // Use when you need immediate full styling
276
+ }
277
+ }
278
+ })
279
+ ```
280
+
281
+ ### Buildtime
282
+
283
+ Build-time CSS generation strategy:
284
+
285
+ - **No runtime injection** - CSS is generated at build time and must be included manually
286
+ - **Consumer responsibility** - You must handle CSS inclusion in your build process and HTML
287
+ - **Optimal performance** - No client-side CSS generation overhead
288
+ - **Static themes only** - Best for applications without dynamic theme switching
289
+
290
+ ```ts
291
+ export default defineNuxtConfig({
292
+ mazUi: {
293
+ theme: {
294
+ strategy: 'buildtime' // For static sites with predefined themes
295
+ }
296
+ }
297
+ })
298
+ ```
299
+
300
+ ::: info SSR Behavior
301
+ The behavior of `hybrid` and `runtime` strategies depends on your Nuxt SSR configuration:
302
+ - **With SSR**: Critical CSS is injected during server rendering, full CSS handled on client
303
+ - **SPA mode**: All CSS injection happens on client-side as described in the [themes documentation](/guide/themes#rendering-strategies)
304
+ :::
248
305
 
249
306
  ### Components
250
307
 
@@ -9,15 +9,15 @@ description: Modern and performant theme system for Maz-UI with TypeScript, HSL
9
9
 
10
10
  <NpmBadge package="@maz-ui/themes"></NpmBadge>
11
11
 
12
- ## Features
12
+ ## Features
13
13
 
14
- - 🎨 **Modern HSL CSS Variables** - Maximum flexibility with colors
15
- - 🌓 **Smart Dark Mode** - Automatic support with `prefers-color-scheme`
16
- - 🚀 **Automatic Generation** - Color scales (50-950) created automatically
17
- - **Performance Strategies** - Runtime, build-time or hybrid according to your needs
18
- - 🛡️ **Strict TypeScript** - Complete types for perfect DX
19
- - 🎯 **Zero FOUC** - Critical CSS injected inline to avoid flashes
20
- - 🔧 **Flexible Presets** - Ready-to-use and customizable configurations
14
+ - **Modern HSL CSS Variables** - Maximum flexibility with colors
15
+ - **Smart Dark Mode** - Automatic support with `prefers-color-scheme`
16
+ - **Automatic Generation** - Color scales (50-950) created automatically
17
+ - **Performance Strategies** - Runtime, build-time or hybrid according to your needs
18
+ - **Strict TypeScript** - Complete types for perfect DX
19
+ - **Zero FOUC** - Critical CSS injected inline to avoid flashes
20
+ - **Flexible Presets** - Ready-to-use and customizable configurations
21
21
 
22
22
  ## Quick Usage
23
23
 
@@ -290,9 +290,11 @@ The hybrid strategy combines the best of both worlds:
290
290
  The full CSS is injected via `requestIdleCallback` with a 100ms timeout, allowing the browser to prioritize critical tasks while ensuring fast loading of complete styling.
291
291
 
292
292
  ```typescript
293
+ import { mazUi } from '@maz-ui/themes/presets'
294
+
293
295
  app.use(MazUi, {
294
296
  theme: {
295
- preset: 'maz-ui',
297
+ preset: mazUi,
296
298
  strategy: 'hybrid'
297
299
  }
298
300
  })
@@ -306,9 +308,11 @@ CSS generated (critical and full) injected immediately.
306
308
  - **Main thread blocking** - Immediate injection can impact performance
307
309
 
308
310
  ```typescript
311
+ import { mazUi } from '@maz-ui/themes/presets'
312
+
309
313
  app.use(MazUi, {
310
314
  theme: {
311
- preset: 'maz-ui',
315
+ preset: mazUi,
312
316
  strategy: 'runtime'
313
317
  }
314
318
  })
@@ -320,9 +324,11 @@ CSS generated at build-time and included in the bundle.
320
324
  Optimal for static sites without theme changes.
321
325
 
322
326
  ```typescript
327
+ import { mazUi } from '@maz-ui/themes/presets'
328
+
323
329
  app.use(MazUi, {
324
330
  theme: {
325
- preset: 'maz-ui',
331
+ preset: mazUi,
326
332
  strategy: 'buildtime'
327
333
  }
328
334
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/mcp",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.28",
4
+ "version": "4.0.0-beta.30",
5
5
  "description": "Maz-UI ModelContextProtocol Client",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -68,6 +68,7 @@
68
68
  "@swc/core": "1.13.3",
69
69
  "@types/node": "^24.2.0",
70
70
  "@vitest/coverage-v8": "^3.2.4",
71
+ "docs": "4.0.0-beta.30",
71
72
  "eslint": "^9.26.0",
72
73
  "lint-staged": "^16.1.4",
73
74
  "prettier": "^3.5.3",
@@ -80,5 +81,5 @@
80
81
  "lint-staged": {
81
82
  "*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
82
83
  },
83
- "gitHead": "8e8079bb7ab88530127e9ab875bc77405b87c4fe"
84
+ "gitHead": "564a15499b7be5e6fe292e836361cff0a0fc68db"
84
85
  }