@maz-ui/mcp 5.1.0 → 5.2.0-beta.0

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 (37) hide show
  1. package/README.md +9 -2
  2. package/dist/chunks/files.mjs +70 -0
  3. package/dist/chunks/index.mjs +28535 -0
  4. package/dist/chunks/prompt.mjs +280 -0
  5. package/dist/chunks/theme.mjs +14789 -0
  6. package/dist/cli.mjs +9 -11
  7. package/dist/index.d.mts +90 -5
  8. package/dist/index.d.ts +90 -5
  9. package/dist/index.mjs +13 -11
  10. package/dist/shared/mcp.Ccxm-Aoc.mjs +3312 -0
  11. package/dist/shared/mcp.D3_Fk0U3.mjs +34563 -0
  12. package/docs/agents/agents-md.md +32 -17
  13. package/docs/agents/claude-rule.md +32 -17
  14. package/docs/components/maz-alert.md +1 -1
  15. package/docs/components/maz-bottom-sheet.md +1 -1
  16. package/docs/components/maz-btn.md +3 -3
  17. package/docs/components/maz-card.md +1 -1
  18. package/docs/components/maz-container.md +2 -2
  19. package/docs/components/maz-dialog-confirm.md +2 -2
  20. package/docs/components/maz-dropdown.md +1 -1
  21. package/docs/components/maz-dropzone.md +1 -1
  22. package/docs/components/maz-icon.md +2 -2
  23. package/docs/components/maz-input.md +2 -2
  24. package/docs/components/maz-link.md +3 -3
  25. package/docs/components/maz-sidebar-menu-button.md +1 -1
  26. package/docs/components/maz-sidebar-menu-sub.md +1 -1
  27. package/docs/components/maz-sidebar.md +2 -2
  28. package/docs/composables/use-dialog.md +2 -1
  29. package/docs/ecosystem/icons/index.md +29 -26
  30. package/docs/ecosystem/mcp.md +47 -2
  31. package/docs/ecosystem/node/setup-agents.md +76 -3
  32. package/docs/guide/ai-agents.md +52 -18
  33. package/docs/manifest.json +1 -1
  34. package/docs/plugins/dialog.md +9 -5
  35. package/docs/rules.md +32 -17
  36. package/package.json +28 -12
  37. package/dist/shared/mcp.BFjMMLqy.mjs +0 -2973
@@ -1,41 +1,56 @@
1
1
  ## maz-ui
2
2
 
3
- This project is built with **maz-ui** and its ecosystem (`@maz-ui/themes`, `@maz-ui/icons`, `@maz-ui/utils`, `@maz-ui/translations`, `@maz-ui/nuxt`). Reuse what it provides instead of re-implementing it: most UI elements, helpers, icons and styles you need already exist.
3
+ This project is built with **maz-ui** and its ecosystem. Reuse what it provides instead of re-implementing it: most UI elements, helpers, icons and styles you need already exist.
4
4
 
5
5
  ### Look it up before you write it
6
6
 
7
- Before creating a component, composable, helper, icon or style, check what maz-ui offers:
7
+ - **MCP server `maz-ui`** (when available): `search_docs` (describe the need: "confirm before delete"), `get_component_api`, `find_icons`, `get_theme_tokens`, `get_doc`, `review_code`.
8
+ - **Version-matched docs** in `node_modules/maz-ui/docs/` (start with `README.md`; in a monorepo, the `maz-ui` of the app).
8
9
 
9
- - **MCP server `maz-ui`** (when available): `search_docs` (describe the need: "confirm before delete", "phone input"), `get_component_api` (exact props, events, slots), `find_icons`, `get_theme_tokens` (Tailwind classes of the project and of maz-ui), `get_doc`, `review_code`.
10
- - **Version-matched docs** in `node_modules/maz-ui/docs/` (start with `README.md`; in a monorepo, resolve `maz-ui` from the app package). Read the relevant page before using an API.
10
+ Never guess an API: only use documented props, events, slots and imports.
11
11
 
12
- Never guess an API: only use props, events, slots and imports that are documented.
12
+ ### Which package for what
13
+
14
+ `maz-ui` (components, composables, directives, plugins), `@maz-ui/themes` (brand colors, fonts, dark mode), `@maz-ui/icons` (icons, logos, flags), `@maz-ui/utils` (helpers), `@maz-ui/translations` (texts of the components), `@maz-ui/nuxt` (Nuxt module).
13
15
 
14
16
  ### Components
15
17
 
16
- - Use `Maz*` components instead of native elements or hand-made widgets: `MazBtn` (not `<button>`), `MazInput`, `MazSelect`, `MazCheckbox`, `MazSwitch`, `MazTextarea`, `MazDialog`, `MazDialogConfirm`, `MazDrawer`, `MazBottomSheet`, `MazPopover`, `MazDropdown`, `MazTabs`, `MazTable`, `MazCard`, `MazAvatar`, `MazBadge`, `MazAlert`, `MazSkeleton`, `MazSpinner`, `MazDatePicker`, `MazInputPhoneNumber`, `MazDropzone`, `MazStepper`, `MazSidebar`, `MazPagination`...
18
+ - Use `Maz*` components instead of native elements or hand-made widgets: `MazBtn` (not `<button>`), `MazLink`, `MazInput`, `MazSelect`, `MazCheckbox`, `MazDialog`, `MazDrawer`, `MazPopover`, `MazDropdown`, `MazTabs`, `MazTable`, `MazCard`, `MazAvatar`, `MazBadge`, `MazAlert`, `MazDatePicker`, `MazInputPhoneNumber`, `MazDropzone`, `MazPagination`...
17
19
  - Prop values are typed: colors are `primary | secondary | accent | info | success | warning | destructive | contrast | transparent` (plus `surface` on some components), sizes `mini | xs | sm | md | lg | xl`.
18
- - Feedback and overlays: `useToast()` for notifications, `useDialog()` or `MazDialogConfirm` for confirmations, `useWait()` for loading states.
20
+ - A button with only an icon needs an `aria-label`.
21
+
22
+ ### Feedback, overlays and forms
23
+
24
+ - `useToast()` for notifications, `useDialog()` or `MazDialogConfirm` for confirmations, `useWait()` for loading states, `MazSkeleton` / `MazSpinner` while data loads.
25
+ - These composables need their plugin. Vue: `app.use(ToastPlugin)` from `maz-ui/plugins/toast` (`DialogPlugin`, `WaitPlugin`, `AosPlugin` likewise). Nuxt: `mazUi: { plugins: { toast: true } }`, off by default like the directives (`mazUi.directives.vTooltip`, or import the directive).
19
26
  - Forms: `useFormValidator` / `useFormField` with your Standard Schema library (Zod, Valibot, ArkType).
20
27
 
21
28
  ### Icons
22
29
 
23
- Use `@maz-ui/icons` (860+ icons: `MazTrash`, `MazXMark`, `MazMagnifyingGlass`, `MazFlagFR`, `MazLogoVue`...). Never inline SVG or add another icon library. Pass icon components to icon props: `<MazBtn :start-icon="MazTrash">`.
30
+ Use `@maz-ui/icons`, never inline SVG nor another icon library. Pick the format by usage:
31
+
32
+ - **Icon props** (`<MazBtn :start-icon>`, `<MazIcon :icon>`...): the raw SVG string, the lightest, `@maz-ui/icons/raw/MazTrash`.
33
+ - **Directly in a template**: the component, `@maz-ui/icons/static/MazTrash`, then `<MazTrash class="size-5 text-muted" />` (size and color from the text: `1em`, `currentColor`).
34
+ - **Not visible at first render** (`v-if`, menus, dialogs, tabs): the lazy component, `@maz-ui/icons/lazy/MazTrash`. Never for icons visible on load: each one is an extra request.
35
+ - `<img>` or CSS only for multicolor icons (flags, logos): `@maz-ui/icons/svg/<name>.svg`, the text color does not apply there.
24
36
 
25
- ### Helpers and composables
37
+ ### Helpers
26
38
 
27
- Use `@maz-ui/utils` and maz-ui composables instead of lodash, VueUse or hand-written code: `debounce`, `throttle`, `sleep`, `isEqual`, `capitalize`, `formatCurrency`, `formatDate`, `formatNumber`, `formatPhoneNumber`, `getCookie`/`setCookie`, `useBreakpoints`, `useWindowSize`, `useTimer`, `useIdleTimeout`, `useSwipe`, `vClickOutside`, `vTooltip`, `vLazyImg`...
39
+ Use `@maz-ui/utils/helpers/<name>` and the maz-ui composables instead of lodash, VueUse or hand-written code: `debounce`, `throttle`, `sleep`, `isEqual`, `formatCurrency`, `formatDate`, `formatNumber`, `formatPhoneNumber`, `capitalize`, `normalizeString`, `getCookie` / `setCookie`, `useBreakpoints`, `useWindowSize`, `useTimer`, `useIdleTimeout`, `useSwipe`, `vClickOutside`, `vTooltip`, `vLazyImg`...
40
+
41
+ ### Texts and languages
42
+
43
+ The texts built in the components come from `@maz-ui/translations`: change the language with `useTranslations().setLocale('fr')` and customize the texts in its options, not in every component.
28
44
 
29
45
  ### Styling with Tailwind
30
46
 
31
47
  The maz-ui theme is exposed to Tailwind (`@import 'maz-ui/tailwindcss/theme.css'`) and the project usually extends it. Only use theme tokens:
32
48
 
33
- - **Project tokens first**: the Tailwind entry of the project (the CSS file that imports `maz-ui/tailwindcss/theme.css`) adds its own `@theme` tokens (fonts, animations, colors...), `@custom-variant` and `@utility`, and the `definePreset` file sets the brand values of the maz-ui tokens. `get_theme_tokens` lists both; without the MCP server, read these files. When a value is missing, add a token to the project `@theme` and use its class instead of an arbitrary value.
34
-
35
- - Colors: `primary`, `secondary`, `accent`, `info`, `success`, `warning`, `destructive`, `contrast` (each with `-foreground` and `-50` to `-950`), `surface`, `foreground`, `muted`, `divider`, `overlay`, plus `bg-container` and `bg-input`. Example: `bg-surface text-foreground border-divider`, `bg-primary text-primary-foreground`, `text-muted`.
36
- - Never use the default Tailwind palette (`bg-blue-500`, `text-gray-600`, `bg-white`, `text-black`) nor hard-coded colors (`#fff`, `rgb()`, `bg-[#...]`). Theme colors already adapt to dark mode: do not add `dark:` color overrides.
49
+ - **Project tokens first**: the Tailwind entry of the project adds its own `@theme` tokens, variants and utilities, and the `definePreset` file sets the brand values. `get_theme_tokens` lists both (or read these files). When a value is missing, add a token to the project `@theme` instead of an arbitrary value.
50
+ - Colors: `primary`, `secondary`, `accent`, `info`, `success`, `warning`, `destructive`, `contrast` (each with `-foreground` and `-50` to `-950`), `surface`, `foreground`, `muted`, `divider`, `overlay`, `bg-container`, `bg-input`. Example: `bg-surface text-foreground border-divider`.
51
+ - Never the default Tailwind palette (`bg-blue-500`, `text-gray-600`, `bg-white`, `text-black`) nor hard-coded colors (`#fff`, `rgb()`, `bg-[#...]`). Theme colors already adapt to dark mode: no `dark:` color overrides.
37
52
  - Radius `rounded-*`, shadows `shadow-sm` to `shadow-xl` and `shadow-elevation`, spacing scale (`p-4`, `gap-2`), breakpoints `mob-*`, `tab-*`, `lap-*` (plus `sm` to `2xl`), utilities `flex-center`, `padded-container`.
38
- - **No `maz:` prefix** in this project: it is internal to the maz-ui library and its documentation.
53
+ - **No `maz:` prefix** in this project: it is internal to the maz-ui library.
39
54
  - In custom CSS, use the variables: `var(--maz-primary)`, `var(--maz-rounded-md)`, `calc(var(--maz-space) * 4)`.
40
55
 
41
56
  ### Theme
@@ -44,8 +59,8 @@ Brand colors, fonts, radius and spacing come from a `@maz-ui/themes` preset (`de
44
59
 
45
60
  ### Imports
46
61
 
47
- - Deep imports: `maz-ui/components/MazBtn`, `maz-ui/composables/useToast`, `maz-ui/directives/vTooltip`, `@maz-ui/utils/helpers/debounce`, `@maz-ui/icons/static/MazTrash`. The `maz-ui` root entry only exports types. Never import from `maz-ui/src` or `maz-ui/dist`.
48
- - With `@maz-ui/nuxt`, components and composables are auto-imported: do not import them.
62
+ - Deep imports: `maz-ui/components/MazBtn`, `maz-ui/composables/useToast`, `maz-ui/directives/vTooltip`, `maz-ui/plugins/toast`, `@maz-ui/utils/helpers/debounce`, `@maz-ui/icons/raw/MazTrash`. The `maz-ui` root entry only exports types. Never import from `maz-ui/src` or `maz-ui/dist`.
63
+ - With `@maz-ui/nuxt`, components and composables are auto-imported: do not import them. Icons are not: import them. The theme and the translations are set in the `mazUi` options of `nuxt.config`, not with the `MazUi` Vue plugin.
49
64
 
50
65
  ### Before you finish
51
66
 
@@ -1,41 +1,56 @@
1
1
  # maz-ui
2
2
 
3
- This project is built with **maz-ui** and its ecosystem (`@maz-ui/themes`, `@maz-ui/icons`, `@maz-ui/utils`, `@maz-ui/translations`, `@maz-ui/nuxt`). Reuse what it provides instead of re-implementing it: most UI elements, helpers, icons and styles you need already exist.
3
+ This project is built with **maz-ui** and its ecosystem. Reuse what it provides instead of re-implementing it: most UI elements, helpers, icons and styles you need already exist.
4
4
 
5
5
  ### Look it up before you write it
6
6
 
7
- Before creating a component, composable, helper, icon or style, check what maz-ui offers:
7
+ - **MCP server `maz-ui`** (when available): `search_docs` (describe the need: "confirm before delete"), `get_component_api`, `find_icons`, `get_theme_tokens`, `get_doc`, `review_code`.
8
+ - **Version-matched docs** in `node_modules/maz-ui/docs/` (start with `README.md`; in a monorepo, the `maz-ui` of the app).
8
9
 
9
- - **MCP server `maz-ui`** (when available): `search_docs` (describe the need: "confirm before delete", "phone input"), `get_component_api` (exact props, events, slots), `find_icons`, `get_theme_tokens` (Tailwind classes of the project and of maz-ui), `get_doc`, `review_code`.
10
- - **Version-matched docs** in `node_modules/maz-ui/docs/` (start with `README.md`; in a monorepo, resolve `maz-ui` from the app package). Read the relevant page before using an API.
10
+ Never guess an API: only use documented props, events, slots and imports.
11
11
 
12
- Never guess an API: only use props, events, slots and imports that are documented.
12
+ ### Which package for what
13
+
14
+ `maz-ui` (components, composables, directives, plugins), `@maz-ui/themes` (brand colors, fonts, dark mode), `@maz-ui/icons` (icons, logos, flags), `@maz-ui/utils` (helpers), `@maz-ui/translations` (texts of the components), `@maz-ui/nuxt` (Nuxt module).
13
15
 
14
16
  ### Components
15
17
 
16
- - Use `Maz*` components instead of native elements or hand-made widgets: `MazBtn` (not `<button>`), `MazInput`, `MazSelect`, `MazCheckbox`, `MazSwitch`, `MazTextarea`, `MazDialog`, `MazDialogConfirm`, `MazDrawer`, `MazBottomSheet`, `MazPopover`, `MazDropdown`, `MazTabs`, `MazTable`, `MazCard`, `MazAvatar`, `MazBadge`, `MazAlert`, `MazSkeleton`, `MazSpinner`, `MazDatePicker`, `MazInputPhoneNumber`, `MazDropzone`, `MazStepper`, `MazSidebar`, `MazPagination`...
18
+ - Use `Maz*` components instead of native elements or hand-made widgets: `MazBtn` (not `<button>`), `MazLink`, `MazInput`, `MazSelect`, `MazCheckbox`, `MazDialog`, `MazDrawer`, `MazPopover`, `MazDropdown`, `MazTabs`, `MazTable`, `MazCard`, `MazAvatar`, `MazBadge`, `MazAlert`, `MazDatePicker`, `MazInputPhoneNumber`, `MazDropzone`, `MazPagination`...
17
19
  - Prop values are typed: colors are `primary | secondary | accent | info | success | warning | destructive | contrast | transparent` (plus `surface` on some components), sizes `mini | xs | sm | md | lg | xl`.
18
- - Feedback and overlays: `useToast()` for notifications, `useDialog()` or `MazDialogConfirm` for confirmations, `useWait()` for loading states.
20
+ - A button with only an icon needs an `aria-label`.
21
+
22
+ ### Feedback, overlays and forms
23
+
24
+ - `useToast()` for notifications, `useDialog()` or `MazDialogConfirm` for confirmations, `useWait()` for loading states, `MazSkeleton` / `MazSpinner` while data loads.
25
+ - These composables need their plugin. Vue: `app.use(ToastPlugin)` from `maz-ui/plugins/toast` (`DialogPlugin`, `WaitPlugin`, `AosPlugin` likewise). Nuxt: `mazUi: { plugins: { toast: true } }`, off by default like the directives (`mazUi.directives.vTooltip`, or import the directive).
19
26
  - Forms: `useFormValidator` / `useFormField` with your Standard Schema library (Zod, Valibot, ArkType).
20
27
 
21
28
  ### Icons
22
29
 
23
- Use `@maz-ui/icons` (860+ icons: `MazTrash`, `MazXMark`, `MazMagnifyingGlass`, `MazFlagFR`, `MazLogoVue`...). Never inline SVG or add another icon library. Pass icon components to icon props: `<MazBtn :start-icon="MazTrash">`.
30
+ Use `@maz-ui/icons`, never inline SVG nor another icon library. Pick the format by usage:
31
+
32
+ - **Icon props** (`<MazBtn :start-icon>`, `<MazIcon :icon>`...): the raw SVG string, the lightest, `@maz-ui/icons/raw/MazTrash`.
33
+ - **Directly in a template**: the component, `@maz-ui/icons/static/MazTrash`, then `<MazTrash class="size-5 text-muted" />` (size and color from the text: `1em`, `currentColor`).
34
+ - **Not visible at first render** (`v-if`, menus, dialogs, tabs): the lazy component, `@maz-ui/icons/lazy/MazTrash`. Never for icons visible on load: each one is an extra request.
35
+ - `<img>` or CSS only for multicolor icons (flags, logos): `@maz-ui/icons/svg/<name>.svg`, the text color does not apply there.
24
36
 
25
- ### Helpers and composables
37
+ ### Helpers
26
38
 
27
- Use `@maz-ui/utils` and maz-ui composables instead of lodash, VueUse or hand-written code: `debounce`, `throttle`, `sleep`, `isEqual`, `capitalize`, `formatCurrency`, `formatDate`, `formatNumber`, `formatPhoneNumber`, `getCookie`/`setCookie`, `useBreakpoints`, `useWindowSize`, `useTimer`, `useIdleTimeout`, `useSwipe`, `vClickOutside`, `vTooltip`, `vLazyImg`...
39
+ Use `@maz-ui/utils/helpers/<name>` and the maz-ui composables instead of lodash, VueUse or hand-written code: `debounce`, `throttle`, `sleep`, `isEqual`, `formatCurrency`, `formatDate`, `formatNumber`, `formatPhoneNumber`, `capitalize`, `normalizeString`, `getCookie` / `setCookie`, `useBreakpoints`, `useWindowSize`, `useTimer`, `useIdleTimeout`, `useSwipe`, `vClickOutside`, `vTooltip`, `vLazyImg`...
40
+
41
+ ### Texts and languages
42
+
43
+ The texts built in the components come from `@maz-ui/translations`: change the language with `useTranslations().setLocale('fr')` and customize the texts in its options, not in every component.
28
44
 
29
45
  ### Styling with Tailwind
30
46
 
31
47
  The maz-ui theme is exposed to Tailwind (`@import 'maz-ui/tailwindcss/theme.css'`) and the project usually extends it. Only use theme tokens:
32
48
 
33
- - **Project tokens first**: the Tailwind entry of the project (the CSS file that imports `maz-ui/tailwindcss/theme.css`) adds its own `@theme` tokens (fonts, animations, colors...), `@custom-variant` and `@utility`, and the `definePreset` file sets the brand values of the maz-ui tokens. `get_theme_tokens` lists both; without the MCP server, read these files. When a value is missing, add a token to the project `@theme` and use its class instead of an arbitrary value.
34
-
35
- - Colors: `primary`, `secondary`, `accent`, `info`, `success`, `warning`, `destructive`, `contrast` (each with `-foreground` and `-50` to `-950`), `surface`, `foreground`, `muted`, `divider`, `overlay`, plus `bg-container` and `bg-input`. Example: `bg-surface text-foreground border-divider`, `bg-primary text-primary-foreground`, `text-muted`.
36
- - Never use the default Tailwind palette (`bg-blue-500`, `text-gray-600`, `bg-white`, `text-black`) nor hard-coded colors (`#fff`, `rgb()`, `bg-[#...]`). Theme colors already adapt to dark mode: do not add `dark:` color overrides.
49
+ - **Project tokens first**: the Tailwind entry of the project adds its own `@theme` tokens, variants and utilities, and the `definePreset` file sets the brand values. `get_theme_tokens` lists both (or read these files). When a value is missing, add a token to the project `@theme` instead of an arbitrary value.
50
+ - Colors: `primary`, `secondary`, `accent`, `info`, `success`, `warning`, `destructive`, `contrast` (each with `-foreground` and `-50` to `-950`), `surface`, `foreground`, `muted`, `divider`, `overlay`, `bg-container`, `bg-input`. Example: `bg-surface text-foreground border-divider`.
51
+ - Never the default Tailwind palette (`bg-blue-500`, `text-gray-600`, `bg-white`, `text-black`) nor hard-coded colors (`#fff`, `rgb()`, `bg-[#...]`). Theme colors already adapt to dark mode: no `dark:` color overrides.
37
52
  - Radius `rounded-*`, shadows `shadow-sm` to `shadow-xl` and `shadow-elevation`, spacing scale (`p-4`, `gap-2`), breakpoints `mob-*`, `tab-*`, `lap-*` (plus `sm` to `2xl`), utilities `flex-center`, `padded-container`.
38
- - **No `maz:` prefix** in this project: it is internal to the maz-ui library and its documentation.
53
+ - **No `maz:` prefix** in this project: it is internal to the maz-ui library.
39
54
  - In custom CSS, use the variables: `var(--maz-primary)`, `var(--maz-rounded-md)`, `calc(var(--maz-space) * 4)`.
40
55
 
41
56
  ### Theme
@@ -44,8 +59,8 @@ Brand colors, fonts, radius and spacing come from a `@maz-ui/themes` preset (`de
44
59
 
45
60
  ### Imports
46
61
 
47
- - Deep imports: `maz-ui/components/MazBtn`, `maz-ui/composables/useToast`, `maz-ui/directives/vTooltip`, `@maz-ui/utils/helpers/debounce`, `@maz-ui/icons/static/MazTrash`. The `maz-ui` root entry only exports types. Never import from `maz-ui/src` or `maz-ui/dist`.
48
- - With `@maz-ui/nuxt`, components and composables are auto-imported: do not import them.
62
+ - Deep imports: `maz-ui/components/MazBtn`, `maz-ui/composables/useToast`, `maz-ui/directives/vTooltip`, `maz-ui/plugins/toast`, `@maz-ui/utils/helpers/debounce`, `@maz-ui/icons/raw/MazTrash`. The `maz-ui` root entry only exports types. Never import from `maz-ui/src` or `maz-ui/dist`.
63
+ - With `@maz-ui/nuxt`, components and composables are auto-imported: do not import them. Icons are not: import them. The theme and the translations are set in the `mazUi` options of `nuxt.config`, not with the `MazUi` Vue plugin.
49
64
 
50
65
  ### Before you finish
51
66
 
@@ -227,7 +227,7 @@ You can use either title, content, or both.
227
227
 
228
228
  - `title` (`string`): Title of the alert.
229
229
  - `content` (`string`): Content of the alert.
230
- - `icon` (`any`): Icon of the alert - can be a component or icon name string.
230
+ - `icon` (`string | IconComponent`): Icon of the alert - can be a component or icon name string.
231
231
  - `hide-icon` (`boolean`, default: `false`): Hide the icon.
232
232
  - `color` (`MazAlertColor`, default: `"info"`): Color of the alert. Values: `'success'`, `'warning'`, `'destructive'`, `'info'`, `'primary'`, `'secondary'`, `'accent'`, `'contrast'` (non exhaustive).
233
233
  - `icon-size` (`MazIconSize`, default: `"md"`): Size of the icon.
@@ -217,7 +217,7 @@ The bottom sheet is a modal `dialog` labelled by its `title` and described by it
217
217
 
218
218
  - `model-value` (`boolean`, `v-model`): Modal's model value.
219
219
  - `title` (`string`): Title of the bottom sheet in the header.
220
- - `icon` (`any`): Icon displayed on the left of the header. Accepts an icon value or a full `MazIconProps` object.
220
+ - `icon` (`MazIconLike`): Icon displayed on the left of the header. Accepts an icon value or a full `MazIconProps` object.
221
221
  - `max-width` (`` `${number}rem` | `${number}px` | `${number}em` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | `${number}%` | `${number}ch` | `${number}cm` | `${number}mm` | `${number}in` | `${number}ex` | `${number}pc` | `${number... ``, default: `"40rem"`): Bottom sheet's max-width, applied from the tablet breakpoint and up (full-width below).
222
222
  - `hide-close-button` (`boolean`, default: `false`): Remove the close button in the header.
223
223
  - `hide-header` (`boolean`, default: `false`): Remove the whole header.
@@ -406,9 +406,9 @@ When `to` attribute is provided, the component automatically becomes a `<RouterL
406
406
  - `loading` (`boolean`, default: `false`): Enable the button loader.
407
407
  - `disabled` (`boolean`, default: `false`): Disable the button.
408
408
  - `fab` (`boolean`, default: `false`): If true, the button will have a fab style.
409
- - `icon` (`any`): The icon to display in the fab variant. Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) for the common case, or a full `MazIconProps` object for fine-grained control (size, title, svgAttributes, fallback, flipIconForRtl, …).
410
- - `start-icon` (`any`): The icon to display on the inline-start edge (left in LTR, right in RTL). Accepts a bare value or a full `MazIconProps` object.
411
- - `end-icon` (`any`): The icon to display on the inline-end edge (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
409
+ - `icon` (`MazIconLike`): The icon to display in the fab variant. Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) for the common case, or a full `MazIconProps` object for fine-grained control (size, title, svgAttributes, fallback, flipIconForRtl, …).
410
+ - `start-icon` (`MazIconLike`): The icon to display on the inline-start edge (left in LTR, right in RTL). Accepts a bare value or a full `MazIconProps` object.
411
+ - `end-icon` (`MazIconLike`): The icon to display on the inline-end edge (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
412
412
  - `padding` (`boolean`, default: `true`): Apply the padding of the button, set it to `false` to remove it.
413
413
  - `justify` (`"center" | "end" | "start" | "space-between" | "space-around" | "space-evenly"`, default: `"center"`): Choose how the elements are aligned in the button.
414
414
  - `active` (`boolean`, default: `false`): If true, the button will have an active state.
@@ -288,7 +288,7 @@ type MazGalleryImage =
288
288
 
289
289
  ### Props
290
290
 
291
- - `orientation` (`"column" | "column-reverse" | "row" | "row-reverse"`, default: `"column"`): Card variant: Must be `column | row | row-reverse | column-reverse`.
291
+ - `orientation` (`"row" | "column" | "column-reverse" | "row-reverse"`, default: `"column"`): Card variant: Must be `column | row | row-reverse | column-reverse`.
292
292
  - `href` (`string`): Make card a link (footer area excluded).
293
293
  - `to` (`string | et | X`): Make card a link with a router-link or nuxt-link (footer area excluded).
294
294
  - `href-target` (`string`, default: `"_self"`): Target option of link: Muse be one of `_blank | _self | _parent | _top | framename`.
@@ -226,8 +226,8 @@ Use the `header` slot to fully customize the header, or use `title`, `icon-start
226
226
  - `rounded-size` (`MazRoundedSize`, default: `'md'`): Size of the rounded. Values: `'none'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'full'` (non exhaustive).
227
227
  - `transparent` (`boolean`, default: `false`): Remove background color.
228
228
  - `overflow-hidden` (`boolean`, default: `true`): Hide overflow.
229
- - `start-icon` (`any`): Icon displayed on the inline-start edge of the header (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object.
230
- - `end-icon` (`any`): Icon displayed on the inline-end edge of the header (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
229
+ - `start-icon` (`MazIconLike`): Icon displayed on the inline-start edge of the header (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object.
230
+ - `end-icon` (`MazIconLike`): Icon displayed on the inline-end edge of the header (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
231
231
  - `icon-size` (`MazIconSize`, default: `"md"`): Size of the icon.
232
232
  - `block` (`boolean`, default: `false`): Display the container in full width.
233
233
  - `content-class` (`string`): Additional class to add to the content wrapper.
@@ -174,10 +174,10 @@ type Size = 'mini' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
174
174
  - `message` (`string`): Dialog message displayed in the body.
175
175
  - `reject-text` (`string`): Text for the reject button - will be applied only if buttons props is not provided.
176
176
  - `reject-props` (`(Omit<MazBtnProps, "type"> & MazDialogConfirmButton)`, default: `{ color: 'destructive', type: 'reject', text: 'Cancel', response: 'reject' }`): Props for the reject button - will be applied only if buttons props is not provided.
177
- - `hide-reject-button` (`boolean`, default: `true`): Whether to display the reject button.
177
+ - `hide-reject-button` (`boolean`, default: `false`): Hide the reject button (unset: the value of `useMazDialogConfirm().data`, else shown).
178
178
  - `accept-text` (`string`): Text for the accept button.
179
179
  - `accept-props` (`(Omit<MazBtnProps, "type"> & MazDialogConfirmButton)`, default: `{ color: 'success', type: 'accept', text: 'Confirm', response: 'accept' }`): Props for the accept button - will be applied only if buttons props is not provided.
180
- - `hide-accept-button` (`boolean`, default: `true`): Whether to display the accept button.
180
+ - `hide-accept-button` (`boolean`, default: `false`): Hide the accept button (unset: the value of `useMazDialogConfirm().data`, else shown).
181
181
  - `buttons` (`MazDialogConfirmButton[]`): Buttons to display in the footer.
182
182
  - `model-value` (`boolean`): Modal's model value.
183
183
  - `hide-close-button` (`boolean`): Remove the close button in header.
@@ -376,7 +376,7 @@ The trigger button exposes the menu state (`aria-haspopup="menu"`, `aria-expande
376
376
  - `menu-panel-class` (`ClassValue`): Additional CSS classes to apply to the dropdown menu panel Useful for customizing the dropdown appearance (background, border, etc.).
377
377
  - `menu-panel-style` (`StyleValue`): Inline styles to apply to the dropdown menu panel Useful for custom styling. You may use `!important` to override default styles.
378
378
  - `block` (`boolean`, default: `false`): Makes the dropdown button expand to full width of its container.
379
- - `dropdown-icon` (`any`): Icon to use instead of the default chevron for the dropdown indicator Custom icon to display in place of the default chevron. Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object.
379
+ - `dropdown-icon` (`MazIconLike`): Icon to use instead of the default chevron for the dropdown indicator Custom icon to display in place of the default chevron. Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object.
380
380
  - `dropdown-icon-animation` (`boolean`, default: `true`): Controls whether the dropdown icon rotates when the dropdown is opened.
381
381
  - `size` (`"xs" | "sm" | "md" | "lg" | "xl" | "mini"`, default: `'md'`): Size of the dropdown button.
382
382
  - `transition` (`string`, default: `"scale-pop"`): Transition to use when the dropdown is opened or closed. Values: `'scale-pop'`, `'scale-fade'`, `'string'` (non exhaustive).
@@ -355,8 +355,8 @@ Customize the upload request using `uploadUrl`, `requestOptions` and `transformB
355
355
 
356
356
  ### Events
357
357
 
358
- - `@error` (payload: `values: { files: File[] | null; event: DragEvent | null; code: MazDropzoneErrorCode; }`): Event emitted when an error occurs
359
358
  - `@add` (payload: `value: File`): Event emitted when a file is added to the dropzone
359
+ - `@error` (payload: `values: { files: File[] | null; event: DragEvent | null; code: MazDropzoneErrorCode; }`): Event emitted when an error occurs
360
360
  - `@drop` (payload: `values: { files: File[] | null; event: DragEvent; }`): Event emitted when files are dropped in the dropzone
361
361
  - `@update:modelValue` (payload: `value: MazDropzoneFileData[]`)
362
362
  - `@enter` (payload: `values: { files: File[] | null; event: DragEvent; }`): Event emitted when dragged files enter the dropzone
@@ -191,8 +191,8 @@ Source: [Heroicons](https://heroicons.com/) - see also the [icon set page](../ec
191
191
 
192
192
  ### Props
193
193
 
194
- - `icon` (`any`): The icon to render. Accepts: - A Vue component (e.g. `import { MazStar } from '@maz-ui/icons/static/MazStar'`) - A URL or `data:` URI to a `.svg` file (`'/icons/star.svg'`, `'data:image/svg+xml,…'`) - A raw SVG string (`'<svg viewBox="0 0 24 24">…</svg>'`) The component detects the format and renders accordingly.
195
- - `fallback` (`any`, default: `MazQuestionMarkCircle`): Fallback icon used when: - `icon` is not provided - `icon` is a URL that fails to load or returns invalid SVG Same shape as `icon`. Defaults to the imported `MazQuestionMarkCircle` if neither `icon` nor `fallback` resolves to anything renderable.
194
+ - `icon` (`MazIconValue`): The icon to render. Accepts: - A Vue component (e.g. `import { MazStar } from '@maz-ui/icons/static/MazStar'`) - A URL or `data:` URI to a `.svg` file (`'/icons/star.svg'`, `'data:image/svg+xml,…'`) - A raw SVG string (`'<svg viewBox="0 0 24 24">…</svg>'`) The component detects the format and renders accordingly.
195
+ - `fallback` (`MazIconValue`, default: `MazQuestionMarkCircle`): Fallback icon used when: - `icon` is not provided - `icon` is a URL that fails to load or returns invalid SVG Same shape as `icon`. Defaults to the imported `MazQuestionMarkCircle` if neither `icon` nor `fallback` resolves to anything renderable.
196
196
  - `size` (`MazIconSize`): Predefined keyword (`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) or any CSS length.
197
197
  - `title` (`string`): Sets a `<title>` element inside the SVG for screen-reader accessibility.
198
198
  - `svg-attributes` (`Record<string, string | number>`): Extra attributes to merge onto the rendered `<svg>` root.
@@ -310,8 +310,8 @@ Use the attribute `rounded-size` with a value in `'none' | 'sm' | 'md' | 'lg' |
310
310
  - `debounce` (`number | boolean`, default: `false`): Enables input debouncing to limit the frequency of value updates. When true, uses 500ms delay. When a number, uses that value as delay in milliseconds.
311
311
  - `auto-focus` (`boolean`, default: `false`): Automatically focuses the input when the component mounts.
312
312
  - `border-active` (`boolean`, default: `false`): When true, shows the colored border immediately instead of only on focus.
313
- - `start-icon` (`any`): Icon displayed on the inline-start edge of the input (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object for fine-grained control (size, title, svgAttributes, fallback, …).
314
- - `end-icon` (`any`): Icon displayed on the inline-end edge of the input (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
313
+ - `start-icon` (`MazIconLike`): Icon displayed on the inline-start edge of the input (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object for fine-grained control (size, title, svgAttributes, fallback, …).
314
+ - `end-icon` (`MazIconLike`): Icon displayed on the inline-end edge of the input (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
315
315
  - `rounded-size` (`MazRoundedSize`, default: `'md'`): Controls the border radius of the input component. Values: `'none'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'full'` (non exhaustive).
316
316
  - `block` (`boolean`): Makes the input expand to the full width of its container.
317
317
  - `name` (`string`): The name of the input field. Used for form submission and validation.
@@ -130,12 +130,12 @@ If no `to` or `href` is provided, the component will be a `button` by default. Y
130
130
  - `target` (`string`, default: `"_self"`): The target of the link. Values: `'_blank'`, `'_self'`, `'_parent'`, `'_top'` (non exhaustive).
131
131
  - `download` (`string`): The download of the link.
132
132
  - `rel` (`string`): The rel of the link.
133
- - `aria-label` (`string`): The aria-label of the link.
133
+ - `aria-label` (`string`): The aria-label of the link (or of the button).
134
134
  - `underline` (`boolean`, default: `false`): Add an underline to the link.
135
135
  - `underline-hover` (`boolean`, default: `true`): Add an underline only on hover.
136
136
  - `auto-external` (`boolean`, default: `true`): Add an external icon to the link if target is '_blank'.
137
- - `start-icon` (`any`): Icon displayed on the inline-start edge (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object for fine-grained control.
138
- - `end-icon` (`any`): Icon displayed on the inline-end edge (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
137
+ - `start-icon` (`MazIconLike`): Icon displayed on the inline-start edge (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object for fine-grained control.
138
+ - `end-icon` (`MazIconLike`): Icon displayed on the inline-end edge (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
139
139
  - `disabled` (`boolean`, default: `false`): The disabled state of the link if the component is a button.
140
140
 
141
141
  ### Slots
@@ -22,7 +22,7 @@ Used inside [MazSidebar](./maz-sidebar.md): read its page for complete examples.
22
22
 
23
23
  - `to` (`string | Record<string, unknown>`): Route for router-link navigation.
24
24
  - `href` (`string`): URL for anchor navigation.
25
- - `icon` (`any`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control (size, title, fallback, …).
25
+ - `icon` (`MazIconLike`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control (size, title, fallback, …).
26
26
  - `label` (`string`): Label text.
27
27
  - `badge` (`MazSidebarMenuButtonBadge`): Badge content. Pass a `string`/`number` for a simple primary badge, or a full `MazBadgeProps` object (with optional `text`) to customise color, size, outlined, ….
28
28
  - `tooltip` (`string`): Tooltip text. When provided, shows a tooltip on hover via the `v-tooltip` directive.
@@ -21,7 +21,7 @@ Used inside [MazSidebar](./maz-sidebar.md): read its page for complete examples.
21
21
  ### Props
22
22
 
23
23
  - `label` (`string`): Label for the sub-menu trigger button.
24
- - `icon` (`any`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control.
24
+ - `icon` (`MazIconLike`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control.
25
25
  - `default-open` (`boolean`, default: `false`): Whether the sub-menu is open by default.
26
26
 
27
27
  ### Slots
@@ -455,7 +455,7 @@ Customize the sidebar width using these CSS custom properties (also settable via
455
455
 
456
456
  - `to` (`string | Record<string, unknown>`): Route for router-link navigation.
457
457
  - `href` (`string`): URL for anchor navigation.
458
- - `icon` (`any`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control (size, title, fallback, …).
458
+ - `icon` (`MazIconLike`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control (size, title, fallback, …).
459
459
  - `label` (`string`): Label text.
460
460
  - `badge` (`MazSidebarMenuButtonBadge`): Badge content. Pass a `string`/`number` for a simple primary badge, or a full `MazBadgeProps` object (with optional `text`) to customise color, size, outlined, ….
461
461
  - `tooltip` (`string`): Tooltip text. When provided, shows a tooltip on hover via the `v-tooltip` directive.
@@ -482,7 +482,7 @@ Customize the sidebar width using these CSS custom properties (also settable via
482
482
  ### Props
483
483
 
484
484
  - `label` (`string`): Label for the sub-menu trigger button.
485
- - `icon` (`any`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control.
485
+ - `icon` (`MazIconLike`): Icon to display before the label. Accepts a bare icon value (Vue component, raw SVG string, URL) or a full `MazIconProps` object for fine-grained control.
486
486
  - `default-open` (`boolean`, default: `false`): Whether the sub-menu is open by default.
487
487
 
488
488
  ### Slots
@@ -26,7 +26,8 @@ More info about [dialog plugin](../plugins/dialog.md) in its documentation
26
26
 
27
27
  ```vue
28
28
  <script lang="ts" setup>
29
- import { useDialog, useToast } from 'maz-ui/composables'
29
+ import { useDialog } from 'maz-ui/composables/useDialog'
30
+ import { useToast } from 'maz-ui/composables/useToast'
30
31
 
31
32
  const dialog = useDialog()
32
33
 
@@ -79,16 +79,16 @@ import { MazCheck, MazHeart, MazUser } from '@maz-ui/icons'
79
79
 
80
80
  <template>
81
81
  <div>
82
- <MazCheck class="text-green-500" />
83
- <MazUser class="w-6 h-6" />
84
- <MazHeart class="text-red-500 hover:scale-110 transition-transform" />
82
+ <MazCheck class="text-success" />
83
+ <MazUser class="size-6" />
84
+ <MazHeart class="text-destructive hover:scale-110 transition-transform" />
85
85
  </div>
86
86
  </template>
87
87
  ```
88
88
 
89
89
  #### Lazy Icons
90
90
 
91
- Lazy icons are prefixed with `Lazy` and use `defineAsyncComponent` under the hood. Use them when you want to reduce your initial bundle size:
91
+ Lazy icons use `defineAsyncComponent` under the hood. Use them when you want to reduce your initial bundle size. From the `lazy/` sub-paths they keep their name; from the `@maz-ui/icons` root (and with the resolver) they are prefixed with `Lazy` (`LazyMazCheck`):
92
92
 
93
93
  ```vue
94
94
  <script setup lang="ts">
@@ -99,9 +99,9 @@ import { MazUser } from '@maz-ui/icons/lazy/MazUser'
99
99
 
100
100
  <template>
101
101
  <div>
102
- <LazyMazCheck class="text-green-500" />
103
- <LazyMazUser class="w-6 h-6" />
104
- <LazyMazHeart class="text-red-500 hover:scale-110 transition-transform" />
102
+ <MazCheck class="text-success" />
103
+ <MazUser class="size-6" />
104
+ <MazHeart class="text-destructive hover:scale-110 transition-transform" />
105
105
  </div>
106
106
  </template>
107
107
  ```
@@ -138,11 +138,14 @@ import { MazStar } from '@maz-ui/icons/raw/MazStar'
138
138
 
139
139
  **When to use which variant:**
140
140
 
141
- | Variant | Bundle cost | Use case |
141
+ | Usage | Variant | Import |
142
142
  | --- | --- | --- |
143
- | `static` | Vue component, eager | Default. Few icons per page, simplest path. |
144
- | `lazy` | Vue component, async chunk | Many icons but most off-screen at first paint. |
145
- | `raw` | Inline SVG string | Same icon repeated many times in a list/table; or you want zero component overhead. |
143
+ | Icon props of the components (`<MazBtn :start-icon>`, `<MazIcon :icon>`...) | `raw`: SVG string, the lightest, no component nor async chunk | `@maz-ui/icons/raw/MazStar` |
144
+ | Directly in a template (`<MazStar class="size-5" />`) | `static`: Vue component, rendered immediately | `@maz-ui/icons/static/MazStar` |
145
+ | Icons not visible at first render (`v-if`, menus, dialogs, tabs) | `lazy`: async component, loaded when displayed | `@maz-ui/icons/lazy/MazStar` |
146
+ | `<img>` or CSS, for multicolor icons (flags, logos) | SVG file | `@maz-ui/icons/svg/star.svg` |
147
+
148
+ A `lazy` icon is a separate request: do not use it for icons visible on load. In an `<img>`, an icon does not inherit the color of the text (`currentColor`): keep it for multicolor icons.
146
149
 
147
150
  **Benefits:**
148
151
 
@@ -191,17 +194,17 @@ export default defineConfig({
191
194
  <!-- Static icons (eagerly loaded) -->
192
195
  <MazHome class="nav-icon" />
193
196
  <MazUser class="nav-icon" />
194
- <MazSettings class="nav-icon" />
197
+ <MazCog6Tooth class="nav-icon" />
195
198
 
196
199
  <!-- Lazy icons (async loaded) - prefix with "Lazy" -->
197
- <LazyMazLogout class="nav-icon" />
200
+ <LazyMazArrowRightStartOnRectangle class="nav-icon" />
198
201
  </div>
199
202
  </template>
200
203
 
201
204
  <style scoped>
202
205
  @reference "../../.vitepress/theme/main.css";
203
206
  .nav-icon {
204
- @apply w-6 h-6 text-gray-600 hover:text-blue-500 transition-colors cursor-pointer;
207
+ @apply size-6 text-muted hover:text-primary transition-colors cursor-pointer;
205
208
  }
206
209
  </style>
207
210
  ```
@@ -250,9 +253,9 @@ import UserIcon from '@maz-ui/icons/svg/user.svg?component'
250
253
 
251
254
  <template>
252
255
  <div class="flex items-center gap-2">
253
- <CheckIcon class="w-5 h-5 text-green-600" />
254
- <UserIcon class="w-6 h-6 text-blue-500" />
255
- <HeartIcon class="w-4 h-4 text-red-500 animate-pulse" />
256
+ <CheckIcon class="size-5 text-success" />
257
+ <UserIcon class="size-6 text-primary" />
258
+ <HeartIcon class="size-4 text-destructive animate-pulse" />
256
259
  </div>
257
260
  </template>
258
261
  ```
@@ -286,7 +289,7 @@ onMounted(async () => {
286
289
  <img src="@maz-ui/icons/svg/check.svg" alt="Check" class="w-6 h-6">
287
290
 
288
291
  <!-- Inline SVG with fetch -->
289
- <div class="text-blue-500" v-html="checkSvg" />
292
+ <div class="text-primary" v-html="checkSvg" />
290
293
  </div>
291
294
  </template>
292
295
  ```
@@ -311,19 +314,19 @@ Icons inherit the current text color and can be styled like any other element:
311
314
  <MazStar class="text-2xl" />
312
315
 
313
316
  <!-- Colors -->
314
- <MazHeart class="text-red-500" />
315
- <MazLeaf class="text-green-600" />
316
- <MazSky class="text-blue-400" />
317
+ <MazHeart class="text-destructive" />
318
+ <MazCheckCircle class="text-success" />
319
+ <MazSun class="text-warning" />
317
320
 
318
321
  <!-- Interactive states -->
319
- <MazBtn class="hover:text-blue-500 transition-colors cursor-pointer" />
322
+ <MazStar class="hover:text-primary transition-colors cursor-pointer" />
320
323
 
321
324
  <!-- Animations -->
322
325
  <MazSpinner class="animate-spin" />
323
326
  <MazHeart class="hover:scale-110 transition-transform" />
324
327
 
325
328
  <!-- With background -->
326
- <MazCheck class="p-2 bg-green-100 text-green-600 rounded-full" />
329
+ <MazCheck class="p-2 bg-success/15 text-success rounded-full" />
327
330
  </div>
328
331
  </template>
329
332
  ```
@@ -504,9 +507,9 @@ export function iconOptimizer(): Plugin {
504
507
  ```vue
505
508
  <template>
506
509
  <div class="flex items-center space-x-4">
507
- <MazHome class="w-5 h-5 text-gray-500 hover:text-blue-500 transition-colors" />
508
- <MazUser class="w-6 h-6 text-indigo-600" />
509
- <MazSettings class="w-4 h-4 text-gray-400 hover:text-gray-600" />
510
+ <MazHome class="size-5 text-muted hover:text-primary transition-colors" />
511
+ <MazUser class="size-6 text-secondary" />
512
+ <MazCog6Tooth class="size-4 text-muted hover:text-foreground" />
510
513
  </div>
511
514
  </template>
512
515
  ```
@@ -43,13 +43,42 @@ In Claude Code, they are available as `/maz-ui:build`, `/maz-ui:audit` and `/maz
43
43
 
44
44
  ## Version-matched docs
45
45
 
46
- The server serves the documentation of the **maz-ui version installed in your project** (`node_modules/maz-ui/docs`), found from the directory it is started in (monorepos: the root, then `apps/*` and `packages/*`). Without maz-ui installed, it serves the docs bundled with `@maz-ui/mcp` (latest release).
46
+ The server serves the documentation of the **maz-ui version installed in your project** (`node_modules/maz-ui/docs`), found from the directory it is started in (monorepos: the root, then the workspaces of `pnpm-workspace.yaml` or of the `workspaces` field of `package.json`, `apps/*` and `packages/*` by default). Without maz-ui installed, it serves the docs bundled with `@maz-ui/mcp` (latest release).
47
47
 
48
48
  To force a folder, pass `--docs <dir>` or set `MAZ_UI_DOCS_DIR`.
49
49
 
50
+ In a monorepo whose apps install different maz-ui versions, the first maz-ui found wins: an agent working on one app can get the docs of another app. Align the versions, or choose the app whose docs are served:
51
+
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "maz-ui": {
56
+ "type": "stdio",
57
+ "command": "npx",
58
+ "args": ["-y", "@maz-ui/mcp@latest", "--docs", "apps/web/node_modules/maz-ui/docs"]
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
50
64
  ## Configuration
51
65
 
52
- `npx @maz-ui/mcp init` writes the configuration of Claude Code, Cursor and VS Code for you. To configure an agent by hand, start the server with `npx -y @maz-ui/mcp@latest`.
66
+ `npx @maz-ui/mcp init` writes the configuration of Claude Code, Cursor and VS Code for you.
67
+
68
+ ### In a project: install it
69
+
70
+ Install `@maz-ui/mcp` as a dev dependency of the project root, then run `init`:
71
+
72
+ ```bash
73
+ pnpm add -D @maz-ui/mcp
74
+ pnpm exec maz-ui-mcp init
75
+ ```
76
+
77
+ The MCP configs then start the installed version through your package manager (`pnpm exec maz-ui-mcp`, `yarn run maz-ui-mcp`, `npx --no-install maz-ui-mcp`...): it starts in about a second, needs no download and follows your lockfile. Without it, `init` writes `npx -y @maz-ui/mcp@<version>`, pinned to its own version.
78
+
79
+ ### By hand
80
+
81
+ The examples below use `npx -y @maz-ui/mcp@latest`, which works without installing anything. In a project, prefer the installed version (`pnpm exec maz-ui-mcp`) or a pinned version (`@maz-ui/mcp@5.1.0`): with a dist-tag, `npx` queries the registry at every start.
53
82
 
54
83
  ### Claude Code
55
84
 
@@ -158,6 +187,22 @@ const findings = reviewCode('<template><MazBtn color="red" /></template>', {
158
187
  })
159
188
  ```
160
189
 
190
+ ## Troubleshooting
191
+
192
+ ### The server does not start: `connection timed out`
193
+
194
+ Claude Code waits 30 seconds for a MCP server to start. The first `npx -y @maz-ui/mcp@latest` downloads the package, and behind a slow or proxied registry (Nexus, Artifactory...) it can exceed this delay. Then:
195
+
196
+ - install `@maz-ui/mcp` in the project and run `init` again (see In a project: install it),
197
+ - or pin a version instead of `@latest`: `npx -y @maz-ui/mcp@5.1.0` only queries the registry on the first start,
198
+ - or raise the timeout of Claude Code: `MCP_TIMEOUT=60000 claude`.
199
+
200
+ Measure the start time of a command up to the `initialize` response:
201
+
202
+ ```bash
203
+ time (echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}' | npx -y @maz-ui/mcp@latest | head -1)
204
+ ```
205
+
161
206
  ## Debugging
162
207
 
163
208
  ```bash