@maz-ui/mcp 5.0.0-beta.3 → 5.0.0-beta.31

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.
Files changed (151) hide show
  1. package/README.md +1 -1
  2. package/dist/mcp.d.mts +22 -9
  3. package/dist/mcp.d.ts +22 -9
  4. package/dist/mcp.mjs +160 -83
  5. package/docs/generated-docs/maz-avatar.doc.md +30 -30
  6. package/docs/generated-docs/maz-btn.doc.md +3 -2
  7. package/docs/generated-docs/maz-checkbox.doc.md +16 -17
  8. package/docs/generated-docs/maz-circular-progress-bar.doc.md +1 -1
  9. package/docs/generated-docs/maz-code-highlight.doc.md +11 -0
  10. package/docs/generated-docs/maz-container.doc.md +1 -0
  11. package/docs/generated-docs/maz-date-picker.doc.md +41 -41
  12. package/docs/generated-docs/maz-drawer.doc.md +7 -8
  13. package/docs/generated-docs/maz-dropdown.doc.md +3 -0
  14. package/docs/generated-docs/maz-expand-animation.doc.md +4 -4
  15. package/docs/generated-docs/maz-fullscreen-loader.doc.md +5 -5
  16. package/docs/generated-docs/maz-gallery.doc.md +15 -15
  17. package/docs/generated-docs/maz-input-code.doc.md +16 -16
  18. package/docs/generated-docs/maz-input-phone-number.doc.md +42 -38
  19. package/docs/generated-docs/maz-input-price.doc.md +14 -14
  20. package/docs/generated-docs/maz-input-tags.doc.md +16 -16
  21. package/docs/generated-docs/maz-input.doc.md +33 -33
  22. package/docs/generated-docs/maz-lazy-img.doc.md +14 -14
  23. package/docs/generated-docs/maz-loading-bar.doc.md +4 -4
  24. package/docs/generated-docs/maz-markdown-editor.doc.md +65 -0
  25. package/docs/generated-docs/maz-popover.doc.md +1 -1
  26. package/docs/generated-docs/maz-pull-to-refresh.doc.md +10 -10
  27. package/docs/generated-docs/maz-radio-buttons.doc.md +17 -17
  28. package/docs/generated-docs/maz-radio.doc.md +16 -16
  29. package/docs/generated-docs/maz-reading-progress-bar.doc.md +4 -4
  30. package/docs/generated-docs/maz-sidebar-content.doc.md +5 -0
  31. package/docs/generated-docs/maz-sidebar-footer.doc.md +5 -0
  32. package/docs/generated-docs/maz-sidebar-group.doc.md +11 -0
  33. package/docs/generated-docs/maz-sidebar-header.doc.md +5 -0
  34. package/docs/generated-docs/maz-sidebar-menu-button.doc.md +27 -0
  35. package/docs/generated-docs/maz-sidebar-menu-item.doc.md +5 -0
  36. package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +16 -0
  37. package/docs/generated-docs/maz-sidebar-menu.doc.md +5 -0
  38. package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
  39. package/docs/generated-docs/maz-sidebar-trigger.doc.md +5 -0
  40. package/docs/generated-docs/maz-sidebar.doc.md +36 -0
  41. package/docs/generated-docs/maz-slider.doc.md +1 -1
  42. package/docs/generated-docs/maz-spinner.doc.md +4 -4
  43. package/docs/generated-docs/maz-switch.doc.md +14 -14
  44. package/docs/generated-docs/maz-table.doc.md +5 -5
  45. package/docs/generated-docs/maz-textarea.doc.md +25 -24
  46. package/docs/generated-docs/maz-ticker.doc.md +1 -1
  47. package/docs/generated-docs/maz-timeline.doc.md +4 -4
  48. package/docs/generated-docs/maz-window-mockup.doc.md +23 -0
  49. package/docs/src/blog/v4.md +1 -1
  50. package/docs/src/blog/v5.md +5 -7
  51. package/docs/src/components/maz-avatar.md +29 -0
  52. package/docs/src/components/maz-btn.md +1 -1
  53. package/docs/src/components/maz-code-highlight.md +233 -0
  54. package/docs/src/components/maz-container.md +2 -2
  55. package/docs/src/components/maz-date-picker.md +1 -1
  56. package/docs/src/components/maz-dialog.md +46 -0
  57. package/docs/src/components/maz-dropdown.md +32 -16
  58. package/docs/src/components/maz-icon.md +2 -2
  59. package/docs/src/components/maz-input-phone-number.md +106 -103
  60. package/docs/src/components/maz-markdown-editor.md +369 -0
  61. package/docs/src/components/maz-sidebar.md +719 -0
  62. package/docs/src/components/maz-textarea.md +27 -1
  63. package/docs/src/components/maz-timeline.md +60 -0
  64. package/docs/src/components/maz-window-mockup.md +249 -0
  65. package/docs/src/composables/use-form-validator.md +50 -11
  66. package/docs/src/directives/click-outside.md +8 -15
  67. package/docs/src/directives/fullscreen-img.md +1 -1
  68. package/docs/src/directives/lazy-img.md +5 -5
  69. package/docs/src/directives/tooltip.md +24 -1
  70. package/docs/src/directives/zoom-img.md +1 -1
  71. package/docs/src/ecosystem/eslint-config.md +95 -1
  72. package/docs/src/{guide/icons.md → ecosystem/icons/index.md} +1 -1
  73. package/docs/src/ecosystem/node/exec-promise.md +87 -0
  74. package/docs/src/ecosystem/node/index.md +53 -0
  75. package/docs/src/ecosystem/node/logger.md +146 -0
  76. package/docs/src/ecosystem/node/print-banner.md +93 -0
  77. package/docs/src/{guide → ecosystem}/nuxt.md +81 -47
  78. package/docs/src/{guide → ecosystem}/themes.md +153 -72
  79. package/docs/src/{guide → ecosystem}/translations.md +1 -1
  80. package/docs/src/ecosystem/utils/camel-case.md +31 -0
  81. package/docs/src/{helpers → ecosystem/utils}/capitalize.md +2 -3
  82. package/docs/src/ecosystem/utils/check-availability.md +79 -0
  83. package/docs/src/ecosystem/utils/cookie.md +80 -0
  84. package/docs/src/{helpers → ecosystem/utils}/currency.md +2 -2
  85. package/docs/src/{helpers → ecosystem/utils}/date.md +2 -2
  86. package/docs/src/ecosystem/utils/debounce-callback.md +38 -0
  87. package/docs/src/ecosystem/utils/debounce-id.md +69 -0
  88. package/docs/src/ecosystem/utils/debounce.md +65 -0
  89. package/docs/src/ecosystem/utils/fetch-locale-ip.md +33 -0
  90. package/docs/src/ecosystem/utils/format-json.md +33 -0
  91. package/docs/src/ecosystem/utils/format-phone-number.md +37 -0
  92. package/docs/src/ecosystem/utils/get-browser-locale.md +29 -0
  93. package/docs/src/ecosystem/utils/get-error-message.md +39 -0
  94. package/docs/src/ecosystem/utils/idle-timeout.md +90 -0
  95. package/docs/src/ecosystem/utils/index.md +60 -0
  96. package/docs/src/ecosystem/utils/is-client.md +32 -0
  97. package/docs/src/ecosystem/utils/is-equal.md +38 -0
  98. package/docs/src/ecosystem/utils/is-server.md +31 -0
  99. package/docs/src/ecosystem/utils/is-standalone-mode.md +43 -0
  100. package/docs/src/ecosystem/utils/kebab-case.md +36 -0
  101. package/docs/src/ecosystem/utils/normalize-string.md +77 -0
  102. package/docs/src/{helpers → ecosystem/utils}/number.md +2 -2
  103. package/docs/src/ecosystem/utils/pascal-case.md +35 -0
  104. package/docs/src/ecosystem/utils/script-loader.md +77 -0
  105. package/docs/src/ecosystem/utils/sleep.md +59 -0
  106. package/docs/src/ecosystem/utils/snake-case.md +36 -0
  107. package/docs/src/ecosystem/utils/swipe-handler.md +91 -0
  108. package/docs/src/ecosystem/utils/textarea-autogrow.md +41 -0
  109. package/docs/src/ecosystem/utils/throttle-id.md +48 -0
  110. package/docs/src/ecosystem/utils/throttle.md +57 -0
  111. package/docs/src/ecosystem/utils/truthy-filter.md +31 -0
  112. package/docs/src/ecosystem/utils/types/deep-key-of.md +48 -0
  113. package/docs/src/ecosystem/utils/types/deep-partial.md +42 -0
  114. package/docs/src/ecosystem/utils/types/deep-required.md +39 -0
  115. package/docs/src/ecosystem/utils/types/flatten-object-keys.md +44 -0
  116. package/docs/src/ecosystem/utils/types/generic-instance-type.md +42 -0
  117. package/docs/src/ecosystem/utils/types/infer-maybe-ref.md +35 -0
  118. package/docs/src/ecosystem/utils/upper-first.md +32 -0
  119. package/docs/src/ecosystem/utils/user-visibility.md +69 -0
  120. package/docs/src/guide/getting-started.md +15 -13
  121. package/docs/src/guide/global-defaults.md +101 -0
  122. package/docs/src/guide/maz-ui-provider.md +6 -3
  123. package/docs/src/guide/migration-v4.md +13 -9
  124. package/docs/src/guide/migration-v5.md +112 -13
  125. package/docs/src/guide/resolvers.md +7 -7
  126. package/docs/src/guide/tailwind.md +4 -0
  127. package/docs/src/guide/vue.md +4 -4
  128. package/docs/src/index.md +12 -12
  129. package/docs/src/plugins/aos.md +1 -1
  130. package/docs/src/plugins/wait.md +1 -1
  131. package/package.json +8 -7
  132. package/docs/src/helpers/camel-case.md +0 -14
  133. package/docs/src/helpers/check-availability.md +0 -14
  134. package/docs/src/helpers/debounce-callback.md +0 -14
  135. package/docs/src/helpers/debounce-id.md +0 -14
  136. package/docs/src/helpers/debounce.md +0 -14
  137. package/docs/src/helpers/is-client.md +0 -14
  138. package/docs/src/helpers/is-equal.md +0 -14
  139. package/docs/src/helpers/is-standalone-mode.md +0 -14
  140. package/docs/src/helpers/kebab-case.md +0 -14
  141. package/docs/src/helpers/normalize-string.md +0 -14
  142. package/docs/src/helpers/pascal-case.md +0 -14
  143. package/docs/src/helpers/script-loader.md +0 -14
  144. package/docs/src/helpers/sleep.md +0 -14
  145. package/docs/src/helpers/snake-case.md +0 -14
  146. package/docs/src/helpers/throttle-id.md +0 -14
  147. package/docs/src/helpers/throttle.md +0 -14
  148. /package/docs/src/{guide → ecosystem/icons}/icon-set.md +0 -0
  149. /package/docs/src/{guide → ecosystem}/mcp.md +0 -0
  150. /package/docs/src/{helpers → ecosystem/utils}/country-code-to-unicode-flag.md +0 -0
  151. /package/docs/src/{helpers → ecosystem/utils}/get-country-flag-url.md +0 -0
@@ -13,7 +13,7 @@ Performance has also been significantly improved thanks to optimal tree-shaking,
13
13
 
14
14
  ::: tip Connected to Maz-UI MCP
15
15
 
16
- Follow the [MCP](/guide/mcp) guide to connect your AI assistant to Maz-UI's documentation for a smooth migration process.
16
+ Follow the [MCP](/ecosystem/mcp) guide to connect your AI assistant to Maz-UI's documentation for a smooth migration process.
17
17
 
18
18
  :::
19
19
 
@@ -41,6 +41,10 @@ v4.0.0 isn't just an update, it's a **complete rebuild** that transforms Maz-UI
41
41
  - **Dynamic CSS Variables**: Automatic CSS variable generation
42
42
  - **Intelligent dark mode**: Configurable strategies for dark mode based on system preferences and user choice stored in cookies
43
43
 
44
+ ::: tip Theming further evolved in v5
45
+ The theme system has been rewritten on top of native `light-dark()` + `color-scheme` + `color-mix(in oklch)` in v5. If you are upgrading past v4, see the dedicated [v5 migration guide](./migration-v5.md#theming-native-css-rewrite-new-non-breaking-by-default) for the full theming changes (new `lightClass`, `Promise<void>` returns, removed JS helpers).
46
+ :::
47
+
44
48
  #### Complete Internationalization
45
49
 
46
50
  - **9 supported languages by default**: EN, FR, DE, ES, IT, PT, JA, ZH-CN
@@ -688,12 +692,12 @@ app.use(MazUi, {
688
692
  <script setup>
689
693
  import { useTheme } from 'maz-ui/composables'
690
694
 
691
- const { isDark, toggleDarkMode, setTheme } = useTheme()
695
+ const { isDark, toggleDarkMode, updateTheme } = useTheme()
692
696
 
693
697
  // Change theme
694
- setTheme('ocean')
698
+ updateTheme('ocean')
695
699
 
696
- // Toggle dark mode
700
+ // Toggle dark mode (v5: returns Promise<void>, optional { animate } param)
697
701
  toggleDarkMode()
698
702
  </script>
699
703
 
@@ -704,7 +708,7 @@ toggleDarkMode()
704
708
  </template>
705
709
  ```
706
710
 
707
- **📖 Complete documentation:** [Theme Guide](/guide/themes)
711
+ **📖 Complete documentation:** [Theme Guide](/ecosystem/themes)
708
712
 
709
713
  ## Translation System
710
714
 
@@ -744,7 +748,7 @@ setLocale('fr')
744
748
  </template>
745
749
  ```
746
750
 
747
- **📖 Complete documentation:** [Translation Guide](/guide/translations)
751
+ **📖 Complete documentation:** [Translation Guide](/ecosystem/translations)
748
752
 
749
753
  ## Common Errors and Solutions
750
754
 
@@ -901,10 +905,10 @@ app.use(MazUi)
901
905
  ## Additional Resources
902
906
 
903
907
  - **[Official v4 Documentation](https://maz-ui.com)** - Complete documentation
904
- - **[Theme Guide](/guide/themes)** - Advanced theme system
905
- - **[Translation Guide](/guide/translations)** - Internationalization
908
+ - **[Theme Guide](/ecosystem/themes)** - Advanced theme system
909
+ - **[Translation Guide](/ecosystem/translations)** - Internationalization
906
910
  - **[Vue Installation Guide](/guide/vue)** - Vue setup
907
- - **[Nuxt Installation Guide](/guide/nuxt)** - Nuxt setup
911
+ - **[Nuxt Installation Guide](/ecosystem/nuxt)** - Nuxt setup
908
912
  - **[Resolvers Guide](/guide/resolvers)** - Smart auto-imports
909
913
  - **[Complete Changelog](https://github.com/LouisMazel/maz-ui/blob/master/CHANGELOG.md)** - All changes
910
914
 
@@ -23,7 +23,7 @@ npx @maz-ui/upgrade ./ --dry-run
23
23
  npx @maz-ui/upgrade ./
24
24
  ```
25
25
 
26
- It rewrites: CSS subpath imports (`maz-ui/styles` `maz-ui/style.css`), `left-icon`/`right-icon` → `start-icon`/`end-icon` (props, slots, `--has-*-icon` classes), `footer-align`/`variant` direction values, `color="background"` / `active-color="background"` → `surface`, `rounded-size="base"` → `md`, `--maz-background` / `--maz-border` CSS vars → `--maz-surface` / `--maz-divider`, `hsl(var(--maz-X))` collapse, Nuxt `injectMainCss` `injectCss`, theme `strategy: 'hybrid'` → `'runtime'`, drops the removed theme options (`injectCriticalCSS`, `injectFullCSS`, `injectAllCSSOnServer`), and renames `colors.{light,dark}.background` → `surface` / `.border` → `divider` inside custom presets. It also bumps every `maz-ui` and `@maz-ui/*` entry in your `package.json` files to `^5.0.0` and runs the right `<pm> install` for you (detected from your lockfile — pnpm, yarn, bun, npm). Pass `--no-install` if you want to skip the install step.
26
+ It handles the mechanical part of the migration (CSS subpath imports, prop renames, CSS var renames, the `MazAvatar` size scale fix, Nuxt config keys, custom preset color keys, and `package.json` version bumps)
27
27
 
28
28
  What it can't decide for you: the `MazIcon` API simplification (section 4), `MazBadge` numeric size mapping (section 9), `foundation.radius` → `scales.rounded.md` reshape (section 11) and `MazChart` `update-mode` defaults (section 8). Those are best handled with the MCP server below.
29
29
 
@@ -83,7 +83,8 @@ The MCP server is read-only — it ships docs, not code edits — so the assista
83
83
  6. **`MazIcon` API simplified** — drop `name`, `path` and `src` props; use a single `icon` prop that accepts a Vue component, a URL/`data:` URI, or a raw SVG string.
84
84
  7. Rename **`left-icon` / `right-icon`** to **`start-icon` / `end-icon`** (and the matching slots / `--has-*-icon` classes) on `MazBtn`, `MazInput`, `MazLink`, `MazContainer`, `MazSelect`. Same idea for `MazCard`'s `footer-align` and `MazDrawer`'s `variant` — `'left' | 'right'` becomes `'start' | 'end'`.
85
85
  8. **`MazChart`** drops `vue-chartjs` (lighter bundle, no eager registration of unused chart types). The `update-mode` prop now defaults to `'none'` — pass `update-mode="default"` if you want animated data updates.
86
- 9. That's it for most apps. Everything else is opt-in.
86
+ 9. **`MazAvatar` size scale fixed.** A CSS-unit `size` now renders at its real value (`size="2rem"` is a 32px avatar, it was ~96px before). Multiply your unit values by 3 to keep the same render, or switch to a `MazSize` keyword (`'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'`). The upgrade tool does the ×3 rewrite for you on static values.
87
+ 10. That's it for most apps. Everything else is opt-in.
87
88
 
88
89
  ## Prerequisites
89
90
 
@@ -553,11 +554,54 @@ The components that exposed `color="background"` in their public prop now use `c
553
554
  rg "color\s*=\s*['\"]background['\"]" src/
554
555
  ```
555
556
 
557
+ ### 16. `MazAvatar` size scale fixed + `MazSize` keywords
558
+
559
+ `MazAvatar`'s `size` prop now accepts the standard `MazSize` keywords on top of CSS units, and a long-standing scale bug is fixed.
560
+
561
+ **The scale bug:** the avatar wrapper is sized at `3em` of a root `font-size: size`, so a CSS-unit `size` rendered the avatar **3x larger** than the value you passed. `size="2rem"` produced a ~96px avatar instead of 32px. In v5 the value is honored 1:1 - `size="2rem"` is a 32px avatar.
562
+
563
+ **New `MazSize` keywords** (aligned with `MazBtn`, `MazInput`, ...):
564
+
565
+ | Keyword | Rendered size |
566
+ | --- | --- |
567
+ | `mini` | 24px |
568
+ | `xs` | 32px |
569
+ | `sm` | 40px |
570
+ | `md` | 48px (matches the old default) |
571
+ | `lg` | 56px |
572
+ | `xl` | 64px |
573
+
574
+ ```vue
575
+ <!-- v5 - keyword sizes -->
576
+ <MazAvatar size="sm" />
577
+ <MazAvatar size="lg" />
578
+ ```
579
+
580
+ Custom CSS units still work - you just need to triple the value to keep the exact rendering you had in v4:
581
+
582
+ ```vue
583
+ <!-- v4 - rendered ~96px -->
584
+ <MazAvatar size="2rem" />
585
+
586
+ <!-- v5 - same ~96px render -->
587
+ <MazAvatar size="6rem" />
588
+ <!-- or adopt the corrected scale / a keyword -->
589
+ <MazAvatar size="2rem" />
590
+ <MazAvatar size="xl" />
591
+ ```
592
+
593
+ The upgrade tool rewrites static `size="<unit>"` values on `<MazAvatar>` automatically (every CSS unit is supported). Bound expressions (`:size="…"`) can't be rewritten safely - they are left untouched and listed at the end of the run so you can check them by hand.
594
+
595
+ ```bash
596
+ # Find avatars still passing a size you may want to review
597
+ rg "<MazAvatar[^>]*\bsize=" src/
598
+ ```
599
+
556
600
  ## Informational changes (probably no action needed)
557
601
 
558
602
  ### Theme colors are now emitted as OKLCh
559
603
 
560
- `@maz-ui/themes` now ships its bundled presets (`mazUi`, `ocean`, `pristine`, `obsidian`) in `oklch()` form, and the dynamic color scale generator (`generateColorScale`, `adjustColorLightness`, `getContrastColor`) steps in OKLCh space and emits `oklch(L C H)` strings. The runtime CSS variables (`--maz-primary`, `--maz-primary-100`, …) therefore hold OKLCh colors.
604
+ `@maz-ui/themes` now ships its bundled presets (`mazUi`, `ocean`, `pristine`, `obsidian`, `nova`) in `oklch()` form, and the runtime CSS variables (`--maz-primary`, `--maz-primary-100`, ) therefore hold OKLCh colors. The 50–950 scale is derived in CSS via OKLCh relative color syntax `oklch(from var(--maz-X) clamp(0, calc(l ± offset), 1) calc(c * mult) h)` — perceptually uniform, chroma-preserving, and live-reactive to base color overrides.
561
605
 
562
606
  This is **transparent for consumers**:
563
607
 
@@ -568,16 +612,8 @@ This is **transparent for consumers**:
568
612
 
569
613
  You only need to do something if you were:
570
614
 
571
- - **Reading the channel format** of a color from `--maz-*` in JS — the value used to be an `hsl(...)` string, it's now an `oklch(...)` string. Use `getComputedStyle(...).getPropertyValue(...)` and a CSS color parser if you need channels.
572
- - **Calling `adjustColorLightness`** directly — the `adjustment` parameter is now in OKLCh L units (`0..1`) instead of HSL L percentage (`0..100`). Divide your existing values by 100.
573
-
574
- ```ts
575
- // v4: HSL L percentage
576
- adjustColorLightness('hsl(210 50% 40%)', 20) // → 'hsl(210 50% 60%)'
577
-
578
- // v5: OKLCh L (0..1)
579
- adjustColorLightness('hsl(210 50% 40%)', 0.2) // → 'oklch(0.65 0.108 232.62)'
580
- ```
615
+ - **Reading the channel format** of a color from `--maz-*` in JS — the value used to be an `hsl(...)` string, it's now an `oklch(...)` string (and at runtime the base may resolve through `light-dark()`). Use `getComputedStyle(...).getPropertyValue(...)` and a CSS color parser if you need channels.
616
+ - **Calling the legacy JS palette helpers** (`generateColorScale`, `adjustColorLightness`, `getContrastColor`, `parseHSL`) these exports were removed in v5. See [BREAKING removed exports](#breaking-removed-exports) for replacements.
581
617
 
582
618
  Why the switch: OKLCh is perceptually uniform, so generated scales (`primary-50` → `primary-950`) ramp consistently across hues — yellow-700 won't look muddy compared to blue-700 anymore. It also unlocks Display P3 colors when you author a vivid preset.
583
619
 
@@ -615,6 +651,69 @@ Four bundled presets remain (`mazUi`, `pristine`, `ocean`, `obsidian`) plus a ne
615
651
 
616
652
  Switching to one of the bundled presets does not require any code change beyond the preset name. If you depended on the previous (washed-out gray) `secondary` color in a custom theme, override it back via `colors.{light,dark}.secondary` in your preset.
617
653
 
654
+ ### Theming: native CSS rewrite (new — non-breaking by default)
655
+
656
+ The `@maz-ui/themes` CSS pipeline was rewritten to lean on native CSS instead of JS:
657
+
658
+ - Base colors are now emitted as a single `--maz-X: light-dark(L, D)` declaration. The browser resolves it for you.
659
+ - Color scales `--maz-X-50` through `--maz-X-950` are derived via OKLCh relative color syntax at runtime, so any override on the base color cascades through the whole scale automatically (and preserves its chroma).
660
+ - `:root` declares `color-scheme: light dark` so native widgets (scrollbars, native `<select>`, date pickers, autofill) follow the active mode out of the box.
661
+ - A `<meta name="color-scheme">` tag is **automatically injected** at boot (Vue + Nuxt SSR). No user action — prevents the Flash of inAccurate coloR Theme.
662
+
663
+ Consumer-visible CSS surface is unchanged: `var(--maz-primary)`, `--maz-primary-500`, Tailwind utilities `bg-primary/60`, `bg-primary-500`, etc. all keep working.
664
+
665
+ #### `lightClass` (new — optional, default `'light'`)
666
+
667
+ Mirror of `darkClass`. When `colorMode === 'light'` and `darkModeStrategy === 'class'`, this class is added to `<html>` to force `color-scheme: only light`. Default `'light'` — set to `false`/custom string if it clashes with an existing class in your app:
668
+
669
+ ```ts
670
+ app.use(MazUi, {
671
+ theme: {
672
+ preset: mazUi,
673
+ darkClass: 'dark',
674
+ lightClass: 'light', // new
675
+ },
676
+ })
677
+ ```
678
+
679
+ Non-breaking: if you never explicitly forced light, nothing changes.
680
+
681
+ #### `setColorMode` / `toggleDarkMode` now return `Promise<void>`
682
+
683
+ Both functions are now async to support the optional `{ animate: true }` parameter (View Transitions). Existing callers that ignored the return value keep working — `await` is only required when you need to chain.
684
+
685
+ ```ts
686
+ const { setColorMode, toggleDarkMode } = useTheme()
687
+
688
+ // Existing v4 call — still works, return value ignored
689
+ setColorMode('dark')
690
+ toggleDarkMode()
691
+
692
+ // v5 — await to chain after the change is applied
693
+ await setColorMode('dark')
694
+
695
+ // v5 — animated full-page switch via document.startViewTransition()
696
+ await toggleDarkMode({ animate: true })
697
+ await setColorMode('dark', { animate: true })
698
+ ```
699
+
700
+ The View Transitions glue is lazy-imported — when `animate` is not used, it stays out of your boot bundle. Browsers that don't support the API apply the change immediately with no animation.
701
+
702
+ #### BREAKING — removed exports
703
+
704
+ The JS-based palette generator is gone. The following helpers used to be exported from `@maz-ui/themes` and **no longer exist** in v5:
705
+
706
+ | Removed export | Replacement |
707
+ | --- | --- |
708
+ | `generateColorScale(base, mode)` | The scale is now generated in CSS via `oklch(from var(--maz-X) clamp(0, calc(l ± offset), 1) calc(c * mult) h)`. Read the live value from `--maz-X-{50..950}`, or replicate the formula inline. |
709
+ | `parseHSL(value)` | Use a CSS color parser or `parseColorAsOklch` from `@maz-ui/themes/utils/color-conversions`. |
710
+ | `adjustColorLightness(color, amount)` | Inline with `oklch(from <color> calc(l + N) c h)` to shift lightness while preserving chroma and hue. |
711
+ | `getContrastColor(color)` | Use the preset's `*-foreground` token, which is what components consume internally. |
712
+
713
+ `colorToHex`, `parseColorAsOklch` and `formatAsOklch` are **preserved**, now exported from `@maz-ui/themes/utils/color-conversions`.
714
+
715
+ If you were importing any of the removed helpers from `@maz-ui/themes`, replace them before upgrading.
716
+
618
717
  ### Preset name persistence (new — opt-out, no breaking change)
619
718
 
620
719
  `@maz-ui/themes` now persists the active preset name in a `maz-preset` cookie (1-year TTL, `SameSite=Lax`) — same shape as the existing `maz-color-mode` cookie:
@@ -12,7 +12,7 @@ head:
12
12
  Supercharge your Vue development with Maz-UI's intelligent auto-import resolvers. Never write import statements again while maintaining perfect tree-shaking and TypeScript support.
13
13
 
14
14
  ::: tip Vue Only Feature
15
- Auto-import resolvers are designed for Vue projects using build tools like Vite or Webpack. For Nuxt users, everything is already integrated in the [@maz-ui/nuxt module](/guide/nuxt).
15
+ Auto-import resolvers are designed for Vue projects using build tools like Vite or Webpack. For Nuxt users, everything is already integrated in the [@maz-ui/nuxt module](/ecosystem/nuxt).
16
16
  :::
17
17
 
18
18
  ## Why Use Auto-Import Resolvers?
@@ -229,7 +229,7 @@ function showSuccess() {
229
229
 
230
230
  | Category | Composables |
231
231
  | -------------------- | --------------------------------------------------- |
232
- | **UI Management** | [`useToast`](./../composables/use-toast.md), [`useDialog`](./../composables/use-dialog.md), [`useTheme`](./../guide/themes.md#usetheme-composable-api), [`useWait`](./../composables/use-wait.md) |
232
+ | **UI Management** | [`useToast`](./../composables/use-toast.md), [`useDialog`](./../composables/use-dialog.md), [`useTheme`](./../ecosystem/themes.md#usetheme-composable-api), [`useWait`](./../composables/use-wait.md) |
233
233
  | **Responsive** | [`useBreakpoints`](./../composables/use-breakpoints.md), [`useWindowSize`](./../composables/use-window-size.md) |
234
234
  | **User Interaction** | [`useUserVisibility`](./../composables/use-user-visibility.md), [`useIdleTimeout`](./../composables/use-idle-timeout.md), [`useSwipe`](./../composables/use-swipe.md) |
235
235
  | **Form Handling** | [`useFormValidator`](./../composables/use-form-validator.md) |
@@ -237,10 +237,10 @@ function showSuccess() {
237
237
 
238
238
  **Most used available formatters and utilities:**
239
239
 
240
- | Category | Utilities/Formatters |
241
- | -------------------- | --------------------------------------------------- |
242
- | **Formatters** | [`formatCurrency`](./../helpers/currency.md), [`formatDate`](./../helpers/date.md), [`sleep`](./../helpers/sleep.md) |
243
- | **Utilities** | [`debounce`](./../helpers/debounce.md), [`throttle`](./../helpers/throttle.md), [`isEqual`](./../helpers/is-equal.md) |
240
+ | Category | Utilities/Formatters |
241
+ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
242
+ | **Formatters** | [`formatCurrency`](./../ecosystem/utils/currency.md), [`formatDate`](./../ecosystem/utils/date.md), [`sleep`](./../ecosystem/utils/sleep.md) |
243
+ | **Utilities** | [`debounce`](./../ecosystem/utils/debounce.md), [`throttle`](./../ecosystem/utils/throttle.md), [`isEqual`](./../ecosystem/utils/is-equal.md) |
244
244
 
245
245
  ## Advanced Configuration
246
246
 
@@ -670,7 +670,7 @@ const toast = useToast()
670
670
 
671
671
  - [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) - The underlying auto-import system
672
672
  - [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import) - Auto-import for composables and utilities
673
- - [Nuxt Module](/guide/nuxt) - All auto-imports included out of the box
673
+ - [Nuxt Module](/ecosystem/nuxt) - All auto-imports included out of the box
674
674
 
675
675
  ---
676
676
 
@@ -47,6 +47,10 @@ Each one comes with `bg-X`, `text-X`, `border-X`, an 11-step scale (`bg-X-50`
47
47
  <div class="bg-success-100 text-success-700">Saved!</div>
48
48
  ```
49
49
 
50
+ ::: info Alpha utilities and scales in v5
51
+ `bg-primary/60`, `text-primary/40`, `border-primary/50` and the rest of Tailwind's alpha syntax continue to work unchanged. In v5 the 50–950 scales are derived in CSS via OKLCh relative color syntax and the base colors are resolved through `light-dark()`, but this is invisible at the utility level — your Tailwind classes don't change.
52
+ :::
53
+
50
54
  ### Neutral & surface colors
51
55
 
52
56
  These don't have a foreground variant — they're typically used for backgrounds, text, borders or overlays directly. Each one still ships an 11-step scale.
@@ -81,7 +81,7 @@ app.use(MazUi, {
81
81
  /**
82
82
  * Theme configuration (optional if you are using the default theme)
83
83
  * More information in dedicated documentation
84
- * @see https://maz-ui.com/guide/themes
84
+ * @see https://maz-ui.com/ecosystem/themes
85
85
  */
86
86
  theme: {
87
87
  preset: mazUi, // 'ocean' | 'pristine' | 'obsidian' | 'nova'
@@ -103,7 +103,7 @@ app.use(MazUi, {
103
103
  /**
104
104
  * Translations configuration (optional if you are using english)
105
105
  * More information in dedicated documentation
106
- * @see https://maz-ui.com/guide/translations
106
+ * @see https://maz-ui.com/ecosystem/translations
107
107
  */
108
108
  translations: {
109
109
  locale: 'fr',
@@ -143,11 +143,11 @@ function handleClick() {
143
143
 
144
144
  ## Theming
145
145
 
146
- More information in the [theme documentation](/guide/themes).
146
+ More information in the [theme documentation](/ecosystem/themes).
147
147
 
148
148
  ## Translations
149
149
 
150
- More information in the [translations documentation](/guide/translations).
150
+ More information in the [translations documentation](/ecosystem/translations).
151
151
 
152
152
  ## Plugins
153
153
 
package/docs/src/index.md CHANGED
@@ -219,7 +219,7 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
219
219
  This library is written in Typescript, so all types and declarations are directly available.
220
220
  </p>
221
221
  </MazCardSpotlight>
222
- <a href="/guide/themes" class="maz:flex">
222
+ <a href="/ecosystem/themes" class="maz:flex">
223
223
  <MazCardSpotlight class="maz:w-full" content-class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
224
224
  <span class="maz:py-1 maz:px-2 maz:bg-surface-600 maz:dark:bg-surface-400 maz:rounded-md maz:text-2xl">
225
225
  💄
@@ -229,7 +229,7 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
229
229
  Created with TailwindCSS | Optimized CSS file sizes | Complies with all CSS best practices | Use your theme easily.
230
230
  </p>
231
231
  <div class="maz:flex-1"></div>
232
- <MazBtn color="surface" outlined size="sm" block href="/guide/themes">Discover</MazBtn>
232
+ <MazBtn color="surface" outlined size="sm" block href="/ecosystem/themes">Discover</MazBtn>
233
233
  </MazCardSpotlight>
234
234
  </a>
235
235
  <a href="/guide/dark-mode" class="maz:flex">
@@ -265,7 +265,7 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
265
265
  <h2 class="maz:text-2xl maz:font-bold maz:mb-8">Ecosystem</h2>
266
266
 
267
267
  <div class="maz:grid maz:grid-cols-1 maz:tab-m:grid-cols-2 maz:gap-4">
268
- <a href="/guide/nuxt" class="maz:flex">
268
+ <a href="/ecosystem/nuxt" class="maz:flex">
269
269
  <MazCardSpotlight class="maz:w-full" color="accent" content-class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
270
270
  <div class="maz:flex maz:items-start maz:gap-2 maz:justify-between maz:w-full">
271
271
  <span class="maz:py-1 maz:px-2 maz:bg-surface-600 maz:dark:bg-surface-400 maz:rounded-md maz:text-2xl">
@@ -278,10 +278,10 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
278
278
  Official Nuxt module with auto-imports, optimized builds, and seamless SSR support. Zero configuration required.
279
279
  </p>
280
280
  <div class="maz:flex-1"></div>
281
- <MazBtn color="surface" outlined size="sm" block href="/guide/nuxt">Discover</MazBtn>
281
+ <MazBtn color="surface" outlined size="sm" block href="/ecosystem/nuxt">Discover</MazBtn>
282
282
  </MazCardSpotlight>
283
283
  </a>
284
- <a href="/guide/icons" class="maz:flex">
284
+ <a href="/ecosystem/icons/" class="maz:flex">
285
285
  <MazCardSpotlight class="maz:w-full" color="accent" content-class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
286
286
  <div class="maz:flex maz:items-start maz:gap-2 maz:justify-between maz:w-full">
287
287
  <span class="maz:py-1 maz:px-2 maz:bg-surface-600 maz:dark:bg-surface-400 maz:rounded-md maz:text-2xl">
@@ -294,10 +294,10 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
294
294
  860+ beautiful SVG icons ready for Vue. Multiple usage patterns: components, direct SVG files, raw SVG strings or auto-import.
295
295
  </p>
296
296
  <div class="maz:flex-1"></div>
297
- <MazBtn color="surface" outlined size="sm" block href="/guide/icons">Discover</MazBtn>
297
+ <MazBtn color="surface" outlined size="sm" block href="/ecosystem/icons/">Discover</MazBtn>
298
298
  </MazCardSpotlight>
299
299
  </a>
300
- <a href="/guide/translations" class="maz:flex">
300
+ <a href="/ecosystem/translations" class="maz:flex">
301
301
  <MazCardSpotlight class="maz:w-full" color="accent" content-class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
302
302
  <div class="maz:flex maz:items-start maz:gap-2 maz:justify-between maz:w-full">
303
303
  <span class="maz:py-1 maz:px-2 maz:bg-surface-600 maz:dark:bg-surface-400 maz:rounded-md maz:text-2xl">
@@ -310,10 +310,10 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
310
310
  Simple internationalization system for Maz-UI components. Translate your interface into any language with ease.
311
311
  </p>
312
312
  <div class="maz:flex-1"></div>
313
- <MazBtn color="surface" outlined size="sm" block href="/guide/translations">Discover</MazBtn>
313
+ <MazBtn color="surface" outlined size="sm" block href="/ecosystem/translations">Discover</MazBtn>
314
314
  </MazCardSpotlight>
315
315
  </a>
316
- <a href="/guide/themes" class="maz:flex">
316
+ <a href="/ecosystem/themes" class="maz:flex">
317
317
  <MazCardSpotlight class="maz:w-full" color="accent" content-class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
318
318
  <div class="maz:flex maz:items-start maz:gap-2 maz:justify-between maz:w-full">
319
319
  <span class="maz:py-1 maz:px-2 maz:bg-surface-600 maz:dark:bg-surface-400 maz:rounded-md maz:text-2xl">
@@ -326,10 +326,10 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
326
326
  Pre-built theme collections and design tokens for rapid UI development. Ready-to-use color schemes and styles.
327
327
  </p>
328
328
  <div class="maz:flex-1"></div>
329
- <MazBtn color="surface" outlined size="sm" block href="/guide/themes">Discover</MazBtn>
329
+ <MazBtn color="surface" outlined size="sm" block href="/ecosystem/themes">Discover</MazBtn>
330
330
  </MazCardSpotlight>
331
331
  </a>
332
- <a href="/guide/mcp" class="maz:flex">
332
+ <a href="/ecosystem/mcp" class="maz:flex">
333
333
  <MazCardSpotlight class="maz:w-full" color="accent" content-class="maz:flex maz:flex-col maz:gap-2 maz:items-start">
334
334
  <div class="maz:flex maz:items-start maz:gap-2 maz:justify-between maz:w-full">
335
335
  <span class="maz:py-1 maz:px-2 maz:bg-surface-600 maz:dark:bg-surface-400 maz:rounded-md maz:text-2xl">
@@ -342,7 +342,7 @@ description: Build amazing interfaces with Maz-UI - standalone components & tool
342
342
  Provides a Model Context Protocol (MCP) server that exposes Maz-UI documentation to AI agents. This server enables AI agents to generate code and assist developers in using Maz-UI.
343
343
  </p>
344
344
  <div class="maz:flex-1"></div>
345
- <MazBtn color="surface" outlined size="sm" block href="/guide/mcp">Discover</MazBtn>
345
+ <MazBtn color="surface" outlined size="sm" block href="/ecosystem/mcp">Discover</MazBtn>
346
346
  </MazCardSpotlight>
347
347
  </a>
348
348
  </div>
@@ -231,7 +231,7 @@ You can choose one of these timing function to animate elements nicely:
231
231
  ## Nuxt
232
232
 
233
233
  ::: tip
234
- For **NuxtJS v3** and higher, use the dedicated Nuxt module to take advantage of auto-imports of components, plugins, composables and css files: [Nuxt Module Documentation](./../guide/nuxt.md)
234
+ For **NuxtJS v3** and higher, use the dedicated Nuxt module to take advantage of auto-imports of components, plugins, composables and css files: [Nuxt Module Documentation](./../ecosystem/nuxt.md)
235
235
  :::
236
236
 
237
237
  Should be executed on client side
@@ -46,7 +46,7 @@ export default defineNuxtConfig({
46
46
 
47
47
  <br />
48
48
 
49
- <div v-if="submitted" style="padding: 20px; background-color: var(--maz-surface-300); border-radius: 10px; margin-top: 1rem;">
49
+ <div v-if="submitted" style="padding: 20px; background-color: var(--maz-color-surface-300); border-radius: 10px; margin-top: 1rem;">
50
50
  Data Submitted
51
51
  </div>
52
52
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/mcp",
3
3
  "type": "module",
4
- "version": "5.0.0-beta.3",
4
+ "version": "5.0.0-beta.31",
5
5
  "description": "Maz-UI ModelContextProtocol Client",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -42,17 +42,18 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "@modelcontextprotocol/sdk": "^1.29.0",
45
- "@maz-ui/utils": "5.0.0-beta.3",
46
- "@maz-ui/node": "5.0.0-beta.3"
45
+ "@maz-ui/utils": "5.0.0-beta.28",
46
+ "maz-ui": "5.0.0-beta.31"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@modelcontextprotocol/inspector": "^0.21.2",
50
- "@swc/core": "1.15.33",
51
- "prettier": "^3.8.3",
50
+ "@swc/core": "1.15.40",
51
+ "prettier": "^3.8.4",
52
52
  "ts-node-maintained": "^10.9.5",
53
- "tsx": "^4.21.0",
53
+ "tsx": "^4.22.3",
54
54
  "unbuild": "^3.6.1",
55
- "@maz-ui/eslint-config": "5.0.0-beta.3"
55
+ "@maz-ui/eslint-config": "5.0.0-beta.28",
56
+ "@maz-ui/node": "5.0.0-beta.26"
56
57
  },
57
58
  "lint-staged": {
58
59
  "*.{js,ts,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix"
@@ -1,14 +0,0 @@
1
- ---
2
- title: camelCase
3
- description: Utility method to convert a string to camel case
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: checkAvailability
3
- description: Utility method to execute a call back when the awaited data is available with timeout and check interval
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: debounceCallback
3
- description: Utility method to debounce a function call and execute a callback
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: debounceId
3
- description: Utility method to debounce a function call and execute a callback with an identifier
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: debounce
3
- description: Utility method to debounce a function call
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: isClient
3
- description: Utility method to check if your are on client side
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: isEqual
3
- description: Utility method to check if two values are equal with deep comparison (Array, Object, string, anything)
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: isStandaloneMode
3
- description: Utility method to check if the browser is in standalone mode
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: kebabCase
3
- description: Utility method to convert a string to kebab case
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: normalizeString
3
- description: Utility method to normalize string with options
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::
@@ -1,14 +0,0 @@
1
- ---
2
- title: pascalCase
3
- description: Utility method to convert a string to pascal case
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
-
12
- TO DO
13
-
14
- :::