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

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
@@ -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.26";
10
10
 
11
11
  class DocumentationService {
12
12
  docsRoot;
@@ -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.27",
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": "fc5b5e42f115cc8b7fe4d6436defb078e3f36662"
84
84
  }