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

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.d.mts CHANGED
@@ -1,4 +1,127 @@
1
1
 
2
+ interface DocumentationDiagnostics {
3
+ components: {
4
+ total: number;
5
+ withManualDoc: number;
6
+ withGeneratedDoc: number;
7
+ withBothDocs: number;
8
+ };
9
+ guides: {
10
+ total: number;
11
+ list: string[];
12
+ };
13
+ composables: {
14
+ total: number;
15
+ list: string[];
16
+ };
17
+ directives: {
18
+ total: number;
19
+ list: string[];
20
+ };
21
+ plugins: {
22
+ total: number;
23
+ list: string[];
24
+ };
25
+ helpers: {
26
+ total: number;
27
+ list: string[];
28
+ };
29
+ paths: {
30
+ docsRoot: string;
31
+ componentsDir: string;
32
+ generatedDocsDir: string;
33
+ guidesDir: string;
34
+ composablesDir: string;
35
+ directivesDir: string;
36
+ pluginsDir: string;
37
+ helpersDir: string;
38
+ };
39
+ }
40
+ declare class DocumentationService {
41
+ private readonly docsRoot;
42
+ private readonly componentsDir;
43
+ private readonly generatedDocsDir;
44
+ private readonly guidesDir;
45
+ private readonly composablesDir;
46
+ private readonly directivesDir;
47
+ private readonly pluginsDir;
48
+ private readonly helpersDir;
49
+ constructor();
50
+ /**
51
+ * Convert un nom de composant PascalCase vers kebab-case
52
+ * MazBtn -> maz-btn
53
+ */
54
+ private pascalToKebabCase;
55
+ /**
56
+ * Lit un fichier markdown et retourne son contenu ou une chaîne vide
57
+ */
58
+ private readMarkdownFile;
59
+ /**
60
+ * Liste les fichiers markdown dans un répertoire
61
+ */
62
+ private listMarkdownFiles;
63
+ /**
64
+ * Récupère la documentation complète d'un composant (manuelle + générée)
65
+ */
66
+ getComponentDocumentation(componentName: string): string;
67
+ /**
68
+ * Liste tous les composants disponibles
69
+ */
70
+ getAllComponents(): string[];
71
+ /**
72
+ * Récupère la documentation d'un guide
73
+ */
74
+ getGuideDocumentation(guideName: string): string;
75
+ /**
76
+ * Liste tous les guides disponibles
77
+ */
78
+ getAllGuides(): string[];
79
+ /**
80
+ * Récupère la documentation d'un composable
81
+ */
82
+ getComposableDocumentation(composableName: string): string;
83
+ /**
84
+ * Liste tous les composables disponibles
85
+ */
86
+ getAllComposables(): string[];
87
+ /**
88
+ * Récupère la documentation d'une directive
89
+ */
90
+ getDirectiveDocumentation(directiveName: string): string;
91
+ /**
92
+ * Liste toutes les directives disponibles
93
+ */
94
+ getAllDirectives(): string[];
95
+ /**
96
+ * Récupère la documentation d'un plugin
97
+ */
98
+ getPluginDocumentation(pluginName: string): string;
99
+ /**
100
+ * Liste tous les plugins disponibles
101
+ */
102
+ getAllPlugins(): string[];
103
+ /**
104
+ * Récupère la documentation d'un helper
105
+ */
106
+ getHelperDocumentation(helperName: string): string;
107
+ /**
108
+ * Liste tous les helpers disponibles
109
+ */
110
+ getAllHelpers(): string[];
111
+ /**
112
+ * Récupère la vue d'ensemble de la librairie
113
+ */
114
+ getOverview(): string;
115
+ /**
116
+ * Recherche dans toute la documentation
117
+ */
118
+ searchDocumentation(query: string): string[];
119
+ /**
120
+ * Récupère les diagnostics détaillés pour debugging
121
+ */
122
+ getDiagnostics(): DocumentationDiagnostics;
123
+ }
124
+
2
125
  /**
3
126
  * MCP server using official SDK
4
127
  */
@@ -6,6 +129,7 @@ declare class MazUiMcpServer {
6
129
  private server;
7
130
  private documentationService;
8
131
  constructor();
132
+ getDocumentationService(): DocumentationService;
9
133
  private setupHandlers;
10
134
  run(): Promise<void>;
11
135
  }
package/dist/mcp.d.ts CHANGED
@@ -1,4 +1,127 @@
1
1
 
2
+ interface DocumentationDiagnostics {
3
+ components: {
4
+ total: number;
5
+ withManualDoc: number;
6
+ withGeneratedDoc: number;
7
+ withBothDocs: number;
8
+ };
9
+ guides: {
10
+ total: number;
11
+ list: string[];
12
+ };
13
+ composables: {
14
+ total: number;
15
+ list: string[];
16
+ };
17
+ directives: {
18
+ total: number;
19
+ list: string[];
20
+ };
21
+ plugins: {
22
+ total: number;
23
+ list: string[];
24
+ };
25
+ helpers: {
26
+ total: number;
27
+ list: string[];
28
+ };
29
+ paths: {
30
+ docsRoot: string;
31
+ componentsDir: string;
32
+ generatedDocsDir: string;
33
+ guidesDir: string;
34
+ composablesDir: string;
35
+ directivesDir: string;
36
+ pluginsDir: string;
37
+ helpersDir: string;
38
+ };
39
+ }
40
+ declare class DocumentationService {
41
+ private readonly docsRoot;
42
+ private readonly componentsDir;
43
+ private readonly generatedDocsDir;
44
+ private readonly guidesDir;
45
+ private readonly composablesDir;
46
+ private readonly directivesDir;
47
+ private readonly pluginsDir;
48
+ private readonly helpersDir;
49
+ constructor();
50
+ /**
51
+ * Convert un nom de composant PascalCase vers kebab-case
52
+ * MazBtn -> maz-btn
53
+ */
54
+ private pascalToKebabCase;
55
+ /**
56
+ * Lit un fichier markdown et retourne son contenu ou une chaîne vide
57
+ */
58
+ private readMarkdownFile;
59
+ /**
60
+ * Liste les fichiers markdown dans un répertoire
61
+ */
62
+ private listMarkdownFiles;
63
+ /**
64
+ * Récupère la documentation complète d'un composant (manuelle + générée)
65
+ */
66
+ getComponentDocumentation(componentName: string): string;
67
+ /**
68
+ * Liste tous les composants disponibles
69
+ */
70
+ getAllComponents(): string[];
71
+ /**
72
+ * Récupère la documentation d'un guide
73
+ */
74
+ getGuideDocumentation(guideName: string): string;
75
+ /**
76
+ * Liste tous les guides disponibles
77
+ */
78
+ getAllGuides(): string[];
79
+ /**
80
+ * Récupère la documentation d'un composable
81
+ */
82
+ getComposableDocumentation(composableName: string): string;
83
+ /**
84
+ * Liste tous les composables disponibles
85
+ */
86
+ getAllComposables(): string[];
87
+ /**
88
+ * Récupère la documentation d'une directive
89
+ */
90
+ getDirectiveDocumentation(directiveName: string): string;
91
+ /**
92
+ * Liste toutes les directives disponibles
93
+ */
94
+ getAllDirectives(): string[];
95
+ /**
96
+ * Récupère la documentation d'un plugin
97
+ */
98
+ getPluginDocumentation(pluginName: string): string;
99
+ /**
100
+ * Liste tous les plugins disponibles
101
+ */
102
+ getAllPlugins(): string[];
103
+ /**
104
+ * Récupère la documentation d'un helper
105
+ */
106
+ getHelperDocumentation(helperName: string): string;
107
+ /**
108
+ * Liste tous les helpers disponibles
109
+ */
110
+ getAllHelpers(): string[];
111
+ /**
112
+ * Récupère la vue d'ensemble de la librairie
113
+ */
114
+ getOverview(): string;
115
+ /**
116
+ * Recherche dans toute la documentation
117
+ */
118
+ searchDocumentation(query: string): string[];
119
+ /**
120
+ * Récupère les diagnostics détaillés pour debugging
121
+ */
122
+ getDiagnostics(): DocumentationDiagnostics;
123
+ }
124
+
2
125
  /**
3
126
  * MCP server using official SDK
4
127
  */
@@ -6,6 +129,7 @@ declare class MazUiMcpServer {
6
129
  private server;
7
130
  private documentationService;
8
131
  constructor();
132
+ getDocumentationService(): DocumentationService;
9
133
  private setupHandlers;
10
134
  run(): Promise<void>;
11
135
  }
package/dist/mcp.mjs CHANGED
@@ -6,7 +6,7 @@ import { ListResourcesRequestSchema, ReadResourceRequestSchema, ListToolsRequest
6
6
  import { existsSync, readFileSync, readdirSync } from 'node:fs';
7
7
  import { resolve, join } from 'node:path';
8
8
 
9
- const version = "4.0.0-beta.25";
9
+ const version = "4.0.0-beta.27";
10
10
 
11
11
  class DocumentationService {
12
12
  docsRoot;
@@ -18,8 +18,8 @@ class DocumentationService {
18
18
  pluginsDir;
19
19
  helpersDir;
20
20
  constructor() {
21
- const localDocsRoot = resolve(process.cwd(), "docs/src");
22
- const localGeneratedDocsDir = resolve(process.cwd(), "docs/generated-docs");
21
+ const localDocsRoot = resolve(__dirname, "../docs/src");
22
+ const localGeneratedDocsDir = resolve(__dirname, "../docs/generated-docs");
23
23
  this.docsRoot = localDocsRoot;
24
24
  this.generatedDocsDir = localGeneratedDocsDir;
25
25
  this.componentsDir = join(this.docsRoot, "components");
@@ -311,6 +311,9 @@ class MazUiMcpServer {
311
311
  );
312
312
  this.setupHandlers();
313
313
  }
314
+ getDocumentationService() {
315
+ return this.documentationService;
316
+ }
314
317
  setupHandlers() {
315
318
  this.server.setRequestHandler(ListResourcesRequestSchema, () => {
316
319
  const [components, guides, composables, directives, plugins, helpers] = [
@@ -26,7 +26,7 @@
26
26
  | **hide-country-select** | Hide the country selector | `boolean` | No | `false` | - |
27
27
  | **show-code-in-list** | Show country calling code in the country list | `boolean` | No | `false` | - |
28
28
  | **custom-countries-list** | Replace country names | `Record<CountryCode, string>` | No | `undefined` | - |
29
- | **auto-format** | Disabled auto-format when phone is valid | `boolean` | No | `true` | - |
29
+ | **auto-format** | Disabled auto-format when phone is valid | `"blur" \| "typing" \| "disabled" \| false` | No | `'blur'` | - |
30
30
  | **country-locale** | Locale of country list<br/>**Example:** `"fr-FR"` | `string` | No | `undefined` | - |
31
31
  | **validation-error** | Disable validation error UI | `boolean` | No | `true` | - |
32
32
  | **validation-success** | Disable validation success UI | `boolean` | No | `true` | - |
@@ -286,17 +286,43 @@ Let the component automatically detect the user's country.
286
286
  </template>
287
287
  </ComponentDemo>
288
288
 
289
- ## Validation & Formatting
289
+ ## Phone Number Formatting
290
290
 
291
- Control how phone numbers are validated and formatted.
291
+ Control how phone numbers are automatically formatted as users type.
292
292
 
293
293
  <ComponentDemo>
294
294
  <div class="maz-space-y-6">
295
295
  <div>
296
- <h4 class="maz-font-semibold maz-mb-2">Disable Auto-formatting</h4>
297
- <p class="maz-text-sm maz-text-muted maz-mb-2">For countries with multiple valid lengths</p>
296
+ <h4 class="maz-font-semibold maz-mb-2">Format on Blur (Default)</h4>
297
+ <p class="maz-text-sm maz-text-muted maz-mb-2">Shows raw input while typing, formats when field loses focus</p>
298
298
  <MazInputPhoneNumber
299
- :auto-format="false"
299
+ auto-format="blur"
300
+ country-code="US"
301
+ :translations="{
302
+ phoneInput: {
303
+ placeholder: 'Type freely, formats on blur'
304
+ }
305
+ }"
306
+ />
307
+ </div>
308
+ <div>
309
+ <h4 class="maz-font-semibold maz-mb-2">Format While Typing</h4>
310
+ <p class="maz-text-sm maz-text-muted maz-mb-2">Real-time formatting as you type</p>
311
+ <MazInputPhoneNumber
312
+ auto-format="typing"
313
+ country-code="FR"
314
+ :translations="{
315
+ phoneInput: {
316
+ placeholder: 'Formats as you type'
317
+ }
318
+ }"
319
+ />
320
+ </div>
321
+ <div>
322
+ <h4 class="maz-font-semibold maz-mb-2">Disable Formatting</h4>
323
+ <p class="maz-text-sm maz-text-muted maz-mb-2">For countries with multiple valid lengths or custom formatting</p>
324
+ <MazInputPhoneNumber
325
+ auto-format="disabled"
300
326
  country-code="AI"
301
327
  :translations="{
302
328
  phoneInput: {
@@ -305,6 +331,35 @@ Control how phone numbers are validated and formatted.
305
331
  }"
306
332
  />
307
333
  </div>
334
+ </div>
335
+
336
+ <template #code>
337
+
338
+ ```vue
339
+ <template>
340
+ <!-- Format on blur (default) - best UX for most cases -->
341
+ <MazInputPhoneNumber auto-format="blur" />
342
+
343
+ <!-- Format while typing - immediate visual feedback -->
344
+ <MazInputPhoneNumber auto-format="typing" />
345
+
346
+ <!-- Disable formatting - for special cases -->
347
+ <MazInputPhoneNumber auto-format="disabled" />
348
+
349
+ <!-- Legacy boolean support (false = disabled, true = typing) -->
350
+ <MazInputPhoneNumber :auto-format="false" />
351
+ </template>
352
+ ```
353
+
354
+ </template>
355
+ </ComponentDemo>
356
+
357
+ ## Validation States
358
+
359
+ Control the visual validation feedback and success/error indicators.
360
+
361
+ <ComponentDemo>
362
+ <div class="maz-space-y-6">
308
363
  <div>
309
364
  <h4 class="maz-font-semibold maz-mb-2">Hide Validation UI</h4>
310
365
  <p class="maz-text-sm maz-text-muted maz-mb-2">No visual success/error indicators</p>
@@ -329,9 +384,6 @@ Control how phone numbers are validated and formatted.
329
384
 
330
385
  ```vue
331
386
  <template>
332
- <!-- Disable auto-formatting -->
333
- <MazInputPhoneNumber :auto-format="false" />
334
-
335
387
  <!-- Hide validation indicators -->
336
388
  <MazInputPhoneNumber
337
389
  :validation-success="false"
@@ -797,7 +849,7 @@ Common issues and solutions:
797
849
  For countries like Anguilla (AI) with multiple valid number lengths, disable auto-formatting:
798
850
 
799
851
  ```vue
800
- <MazInputPhoneNumber :auto-format="false" country-code="AI" />
852
+ <MazInputPhoneNumber auto-format="disabled" country-code="AI" />
801
853
  ```
802
854
 
803
855
  ### 🌐 Country Detection Not Working
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.26",
4
+ "version": "4.0.0-beta.28",
5
5
  "description": "Maz-UI ModelContextProtocol Client",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -58,8 +58,8 @@
58
58
  "test:unit:coverage": "pnpm generate:docs && vitest run --coverage"
59
59
  },
60
60
  "dependencies": {
61
- "@maz-ui/node": "4.0.0-beta.26",
62
- "@maz-ui/utils": "4.0.0-beta.25",
61
+ "@maz-ui/node": "4.0.0-beta.27",
62
+ "@maz-ui/utils": "4.0.0-beta.27",
63
63
  "@modelcontextprotocol/sdk": "^1.17.1"
64
64
  },
65
65
  "devDependencies": {
@@ -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": "bfbe28abf5a3c3aae95b64833c681ff6cbe5bd42"
83
+ "gitHead": "8e8079bb7ab88530127e9ab875bc77405b87c4fe"
84
84
  }