@maz-ui/mcp 5.0.1-beta.0 → 5.1.0-beta.1

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 (343) hide show
  1. package/README.md +61 -228
  2. package/bin/maz-ui-mcp.mjs +2 -5
  3. package/dist/cli.d.mts +7 -0
  4. package/dist/cli.d.ts +7 -0
  5. package/dist/cli.mjs +16 -0
  6. package/dist/index.d.mts +345 -0
  7. package/dist/index.d.ts +345 -0
  8. package/dist/index.mjs +16 -0
  9. package/dist/shared/mcp.DseFuKdl.mjs +2968 -0
  10. package/docs/README.md +207 -0
  11. package/docs/agents/agents-md.md +52 -0
  12. package/docs/agents/claude-rule.md +52 -0
  13. package/docs/components/maz-accordion.md +78 -0
  14. package/docs/{src/components → components}/maz-alert.md +31 -164
  15. package/docs/components/maz-animated-counter.md +87 -0
  16. package/docs/components/maz-animated-element.md +46 -0
  17. package/docs/components/maz-animated-text.md +53 -0
  18. package/docs/components/maz-avatar.md +193 -0
  19. package/docs/components/maz-backdrop.md +178 -0
  20. package/docs/{src/components → components}/maz-badge.md +26 -67
  21. package/docs/components/maz-bottom-sheet.md +257 -0
  22. package/docs/{src/components → components}/maz-btn-group.md +27 -189
  23. package/docs/{src/components → components}/maz-btn.md +62 -245
  24. package/docs/components/maz-card-spotlight.md +84 -0
  25. package/docs/{src/components → components}/maz-card.md +67 -192
  26. package/docs/components/maz-carousel.md +153 -0
  27. package/docs/{src/components → components}/maz-chart.md +17 -161
  28. package/docs/components/maz-checkbox.md +138 -0
  29. package/docs/components/maz-checklist.md +251 -0
  30. package/docs/components/maz-circular-progress-bar.md +109 -0
  31. package/docs/{src/components → components}/maz-code-highlight.md +15 -93
  32. package/docs/components/maz-container.md +241 -0
  33. package/docs/{src/components → components}/maz-date-picker.md +85 -454
  34. package/docs/components/maz-dialog-confirm.md +215 -0
  35. package/docs/components/maz-dialog.md +143 -0
  36. package/docs/components/maz-drawer.md +107 -0
  37. package/docs/components/maz-dropdown.md +419 -0
  38. package/docs/{src/components → components}/maz-dropzone.md +80 -221
  39. package/docs/components/maz-expand-animation.md +82 -0
  40. package/docs/components/maz-fullscreen-loader.md +58 -0
  41. package/docs/components/maz-gallery.md +79 -0
  42. package/docs/{src/components → components}/maz-icon.md +32 -83
  43. package/docs/components/maz-input-code.md +73 -0
  44. package/docs/components/maz-input-number.md +79 -0
  45. package/docs/components/maz-input-phone-number.md +536 -0
  46. package/docs/components/maz-input-price.md +68 -0
  47. package/docs/components/maz-input-tags.md +112 -0
  48. package/docs/{src/components → components}/maz-input.md +74 -221
  49. package/docs/components/maz-lazy-img.md +113 -0
  50. package/docs/components/maz-link.md +146 -0
  51. package/docs/components/maz-loading-bar.md +38 -0
  52. package/docs/{src/components → components}/maz-markdown-editor.md +72 -125
  53. package/docs/components/maz-pagination.md +82 -0
  54. package/docs/components/maz-popover.md +794 -0
  55. package/docs/{src/components → components}/maz-pull-to-refresh.md +59 -45
  56. package/docs/components/maz-radio-buttons.md +313 -0
  57. package/docs/components/maz-radio.md +119 -0
  58. package/docs/{src/components → components}/maz-read-more.md +31 -122
  59. package/docs/components/maz-reading-progress-bar.md +96 -0
  60. package/docs/{src/components → components}/maz-select-country.md +80 -340
  61. package/docs/{src/components → components}/maz-select.md +76 -206
  62. package/docs/components/maz-sidebar-content.md +25 -0
  63. package/docs/components/maz-sidebar-footer.md +25 -0
  64. package/docs/components/maz-sidebar-group.md +27 -0
  65. package/docs/components/maz-sidebar-header.md +25 -0
  66. package/docs/components/maz-sidebar-menu-button.md +41 -0
  67. package/docs/components/maz-sidebar-menu-item.md +25 -0
  68. package/docs/components/maz-sidebar-menu-sub.md +32 -0
  69. package/docs/components/maz-sidebar-menu.md +25 -0
  70. package/docs/components/maz-sidebar-separator.md +21 -0
  71. package/docs/components/maz-sidebar-trigger.md +25 -0
  72. package/docs/{src/components → components}/maz-sidebar.md +117 -329
  73. package/docs/{src/components → components}/maz-skeleton.md +27 -156
  74. package/docs/{src/components → components}/maz-slider.md +33 -66
  75. package/docs/components/maz-spinner.md +84 -0
  76. package/docs/{src/components → components}/maz-stepper.md +48 -185
  77. package/docs/components/maz-switch.md +86 -0
  78. package/docs/components/maz-table-cell.md +27 -0
  79. package/docs/components/maz-table-row.md +28 -0
  80. package/docs/components/maz-table-title.md +27 -0
  81. package/docs/components/maz-table-virtualizer.md +31 -0
  82. package/docs/components/maz-table.md +426 -0
  83. package/docs/components/maz-tabs-bar.md +43 -0
  84. package/docs/components/maz-tabs-content-item.md +27 -0
  85. package/docs/components/maz-tabs-content.md +27 -0
  86. package/docs/{src/components → components}/maz-tabs.md +89 -126
  87. package/docs/components/maz-textarea.md +255 -0
  88. package/docs/components/maz-ticker.md +427 -0
  89. package/docs/components/maz-timeline.md +304 -0
  90. package/docs/components/maz-ui-provider.md +26 -0
  91. package/docs/{src/components → components}/maz-window-mockup.md +38 -105
  92. package/docs/composables/use-aos.md +41 -0
  93. package/docs/composables/use-breakpoints.md +42 -0
  94. package/docs/composables/use-dialog.md +58 -0
  95. package/docs/{src/composables → composables}/use-display-names.md +12 -59
  96. package/docs/{src/composables → composables}/use-drag.md +14 -68
  97. package/docs/{src/composables → composables}/use-form-validator.md +22 -696
  98. package/docs/{src/composables → composables}/use-idle-timeout.md +13 -97
  99. package/docs/{src/composables → composables}/use-pull-to-refresh.md +14 -7
  100. package/docs/{src/composables → composables}/use-reading-time.md +20 -56
  101. package/docs/composables/use-string-matching.md +41 -0
  102. package/docs/{src/composables → composables}/use-swipe.md +14 -81
  103. package/docs/{src/composables → composables}/use-timer.md +12 -38
  104. package/docs/composables/use-toast.md +50 -0
  105. package/docs/{src/composables → composables}/use-user-visibility.md +14 -56
  106. package/docs/composables/use-wait.md +50 -0
  107. package/docs/composables/use-window-size.md +25 -0
  108. package/docs/{src/directives → directives}/click-outside.md +13 -99
  109. package/docs/{src/directives → directives}/fullscreen-img.md +10 -28
  110. package/docs/{src/directives → directives}/lazy-img.md +14 -49
  111. package/docs/{src/directives → directives}/tooltip.md +12 -217
  112. package/docs/{src/directives → directives}/zoom-img.md +11 -38
  113. package/docs/{src/ecosystem → ecosystem}/eslint-config.md +37 -29
  114. package/docs/ecosystem/icons/icon-set.md +25 -0
  115. package/docs/{src/ecosystem → ecosystem}/icons/index.md +21 -15
  116. package/docs/ecosystem/mcp.md +165 -0
  117. package/docs/{src/ecosystem → ecosystem}/node/exec-promise.md +12 -6
  118. package/docs/ecosystem/node/index.md +53 -0
  119. package/docs/{src/ecosystem → ecosystem}/node/logger.md +12 -6
  120. package/docs/{src/ecosystem → ecosystem}/node/print-banner.md +12 -4
  121. package/docs/ecosystem/node/setup-agents.md +102 -0
  122. package/docs/{src/ecosystem → ecosystem}/nuxt.md +50 -19
  123. package/docs/{src/ecosystem → ecosystem}/stylelint-config.md +33 -25
  124. package/docs/{src/ecosystem → ecosystem}/themes.md +72 -235
  125. package/docs/{src/ecosystem → ecosystem}/translations.md +25 -23
  126. package/docs/ecosystem/utils/camel-case.md +37 -0
  127. package/docs/ecosystem/utils/capitalize.md +37 -0
  128. package/docs/{src/ecosystem → ecosystem}/utils/check-availability.md +14 -8
  129. package/docs/{src/ecosystem → ecosystem}/utils/cookie.md +18 -12
  130. package/docs/ecosystem/utils/country-code-to-unicode-flag.md +128 -0
  131. package/docs/{src/ecosystem → ecosystem}/utils/currency.md +12 -26
  132. package/docs/{src/ecosystem → ecosystem}/utils/date.md +10 -24
  133. package/docs/ecosystem/utils/debounce-callback.md +44 -0
  134. package/docs/{src/ecosystem → ecosystem}/utils/debounce-id.md +14 -8
  135. package/docs/{src/ecosystem → ecosystem}/utils/debounce.md +14 -8
  136. package/docs/ecosystem/utils/fetch-locale-ip.md +39 -0
  137. package/docs/{src/ecosystem → ecosystem}/utils/format-json.md +11 -5
  138. package/docs/{src/ecosystem → ecosystem}/utils/format-phone-number.md +12 -6
  139. package/docs/ecosystem/utils/get-browser-locale.md +35 -0
  140. package/docs/ecosystem/utils/get-country-flag-url.md +67 -0
  141. package/docs/{src/ecosystem → ecosystem}/utils/get-error-message.md +10 -4
  142. package/docs/{src/ecosystem → ecosystem}/utils/idle-timeout.md +15 -9
  143. package/docs/{src/ecosystem → ecosystem}/utils/index.md +10 -13
  144. package/docs/{src/ecosystem → ecosystem}/utils/is-client.md +11 -5
  145. package/docs/{src/ecosystem → ecosystem}/utils/is-equal.md +14 -8
  146. package/docs/{src/ecosystem → ecosystem}/utils/is-ios.md +12 -6
  147. package/docs/ecosystem/utils/is-server.md +37 -0
  148. package/docs/ecosystem/utils/is-standalone-mode.md +49 -0
  149. package/docs/{src/ecosystem → ecosystem}/utils/kebab-case.md +10 -4
  150. package/docs/{src/ecosystem → ecosystem}/utils/normalize-string.md +10 -4
  151. package/docs/{src/ecosystem → ecosystem}/utils/number.md +10 -24
  152. package/docs/{src/ecosystem → ecosystem}/utils/pascal-case.md +11 -5
  153. package/docs/{src/ecosystem → ecosystem}/utils/prevent-ios-input-zoom.md +14 -8
  154. package/docs/{src/ecosystem → ecosystem}/utils/script-loader.md +16 -8
  155. package/docs/{src/ecosystem → ecosystem}/utils/sleep.md +10 -4
  156. package/docs/{src/ecosystem → ecosystem}/utils/snake-case.md +10 -4
  157. package/docs/{src/ecosystem → ecosystem}/utils/swipe-handler.md +14 -8
  158. package/docs/{src/ecosystem → ecosystem}/utils/textarea-autogrow.md +12 -6
  159. package/docs/{src/ecosystem → ecosystem}/utils/throttle-id.md +13 -7
  160. package/docs/{src/ecosystem → ecosystem}/utils/throttle.md +14 -8
  161. package/docs/ecosystem/utils/truthy-filter.md +37 -0
  162. package/docs/{src/ecosystem → ecosystem}/utils/types/deep-key-of.md +11 -5
  163. package/docs/{src/ecosystem → ecosystem}/utils/types/deep-partial.md +10 -4
  164. package/docs/ecosystem/utils/types/deep-required.md +45 -0
  165. package/docs/ecosystem/utils/types/flatten-object-keys.md +50 -0
  166. package/docs/{src/ecosystem → ecosystem}/utils/types/generic-instance-type.md +10 -4
  167. package/docs/{src/ecosystem → ecosystem}/utils/types/infer-maybe-ref.md +10 -4
  168. package/docs/ecosystem/utils/upper-first.md +38 -0
  169. package/docs/{src/ecosystem → ecosystem}/utils/user-visibility.md +12 -6
  170. package/docs/guide/ai-agents.md +239 -0
  171. package/docs/{src/guide → guide}/browser-support.md +22 -15
  172. package/docs/{src/guide → guide}/getting-started.md +34 -139
  173. package/docs/{src/guide → guide}/global-defaults.md +12 -11
  174. package/docs/{src/guide → guide}/maz-ui-provider.md +17 -16
  175. package/docs/{src/guide → guide}/migration-v5.md +95 -88
  176. package/docs/{src/guide → guide}/resolvers.md +33 -100
  177. package/docs/guide/tailwind.md +507 -0
  178. package/docs/{src/guide → guide}/vue.md +33 -39
  179. package/docs/manifest.json +1 -0
  180. package/docs/{src/plugins → plugins}/aos.md +20 -55
  181. package/docs/{src/plugins → plugins}/dialog.md +14 -161
  182. package/docs/plugins/toast.md +221 -0
  183. package/docs/plugins/wait.md +78 -0
  184. package/docs/reference/icons.md +46 -0
  185. package/docs/reference/tailwind-tokens.md +191 -0
  186. package/docs/rules.md +59 -0
  187. package/package.json +86 -22
  188. package/dist/mcp.d.mts +0 -153
  189. package/dist/mcp.d.ts +0 -153
  190. package/dist/mcp.mjs +0 -1511
  191. package/docs/generated-docs/maz-accordion.doc.md +0 -21
  192. package/docs/generated-docs/maz-alert.doc.md +0 -20
  193. package/docs/generated-docs/maz-animated-counter.doc.md +0 -17
  194. package/docs/generated-docs/maz-animated-element.doc.md +0 -14
  195. package/docs/generated-docs/maz-animated-text.doc.md +0 -17
  196. package/docs/generated-docs/maz-avatar.doc.md +0 -45
  197. package/docs/generated-docs/maz-backdrop.doc.md +0 -55
  198. package/docs/generated-docs/maz-badge.doc.md +0 -16
  199. package/docs/generated-docs/maz-bottom-sheet.doc.md +0 -24
  200. package/docs/generated-docs/maz-btn-group.doc.md +0 -20
  201. package/docs/generated-docs/maz-btn.doc.md +0 -33
  202. package/docs/generated-docs/maz-card-spotlight.doc.md +0 -16
  203. package/docs/generated-docs/maz-card.doc.md +0 -39
  204. package/docs/generated-docs/maz-carousel.doc.md +0 -17
  205. package/docs/generated-docs/maz-chart.doc.md +0 -10
  206. package/docs/generated-docs/maz-checkbox.doc.md +0 -33
  207. package/docs/generated-docs/maz-checklist.doc.md +0 -30
  208. package/docs/generated-docs/maz-circular-progress-bar.doc.md +0 -27
  209. package/docs/generated-docs/maz-code-highlight.doc.md +0 -11
  210. package/docs/generated-docs/maz-container.doc.md +0 -26
  211. package/docs/generated-docs/maz-date-picker.doc.md +0 -56
  212. package/docs/generated-docs/maz-dialog-confirm.doc.md +0 -24
  213. package/docs/generated-docs/maz-dialog.doc.md +0 -22
  214. package/docs/generated-docs/maz-drawer.doc.md +0 -25
  215. package/docs/generated-docs/maz-dropdown.doc.md +0 -45
  216. package/docs/generated-docs/maz-dropzone.doc.md +0 -82
  217. package/docs/generated-docs/maz-expand-animation.doc.md +0 -12
  218. package/docs/generated-docs/maz-fullscreen-loader.doc.md +0 -13
  219. package/docs/generated-docs/maz-gallery.doc.md +0 -17
  220. package/docs/generated-docs/maz-icon.doc.md +0 -16
  221. package/docs/generated-docs/maz-input-code.doc.md +0 -25
  222. package/docs/generated-docs/maz-input-number.doc.md +0 -33
  223. package/docs/generated-docs/maz-input-phone-number.doc.md +0 -62
  224. package/docs/generated-docs/maz-input-price.doc.md +0 -26
  225. package/docs/generated-docs/maz-input-tags.doc.md +0 -24
  226. package/docs/generated-docs/maz-input.doc.md +0 -54
  227. package/docs/generated-docs/maz-lazy-img.doc.md +0 -49
  228. package/docs/generated-docs/maz-link.doc.md +0 -31
  229. package/docs/generated-docs/maz-loading-bar.doc.md +0 -6
  230. package/docs/generated-docs/maz-markdown-editor.doc.md +0 -65
  231. package/docs/generated-docs/maz-pagination.doc.md +0 -21
  232. package/docs/generated-docs/maz-popover.doc.md +0 -79
  233. package/docs/generated-docs/maz-pull-to-refresh.doc.md +0 -50
  234. package/docs/generated-docs/maz-radio-buttons.doc.md +0 -34
  235. package/docs/generated-docs/maz-radio.doc.md +0 -33
  236. package/docs/generated-docs/maz-read-more.doc.md +0 -18
  237. package/docs/generated-docs/maz-reading-progress-bar.doc.md +0 -18
  238. package/docs/generated-docs/maz-select-country.doc.md +0 -45
  239. package/docs/generated-docs/maz-select.doc.md +0 -32
  240. package/docs/generated-docs/maz-sidebar-content.doc.md +0 -5
  241. package/docs/generated-docs/maz-sidebar-footer.doc.md +0 -5
  242. package/docs/generated-docs/maz-sidebar-group.doc.md +0 -11
  243. package/docs/generated-docs/maz-sidebar-header.doc.md +0 -5
  244. package/docs/generated-docs/maz-sidebar-menu-button.doc.md +0 -27
  245. package/docs/generated-docs/maz-sidebar-menu-item.doc.md +0 -5
  246. package/docs/generated-docs/maz-sidebar-menu-sub.doc.md +0 -16
  247. package/docs/generated-docs/maz-sidebar-menu.doc.md +0 -5
  248. package/docs/generated-docs/maz-sidebar-separator.doc.md +0 -0
  249. package/docs/generated-docs/maz-sidebar-trigger.doc.md +0 -5
  250. package/docs/generated-docs/maz-sidebar.doc.md +0 -36
  251. package/docs/generated-docs/maz-skeleton.doc.md +0 -12
  252. package/docs/generated-docs/maz-slider.doc.md +0 -20
  253. package/docs/generated-docs/maz-spinner.doc.md +0 -6
  254. package/docs/generated-docs/maz-stepper.doc.md +0 -30
  255. package/docs/generated-docs/maz-switch.doc.md +0 -31
  256. package/docs/generated-docs/maz-table-cell.doc.md +0 -5
  257. package/docs/generated-docs/maz-table-row.doc.md +0 -12
  258. package/docs/generated-docs/maz-table-title.doc.md +0 -5
  259. package/docs/generated-docs/maz-table-virtualizer.doc.md +0 -20
  260. package/docs/generated-docs/maz-table.doc.md +0 -72
  261. package/docs/generated-docs/maz-tabs-bar.doc.md +0 -29
  262. package/docs/generated-docs/maz-tabs-content-item.doc.md +0 -11
  263. package/docs/generated-docs/maz-tabs-content.doc.md +0 -5
  264. package/docs/generated-docs/maz-tabs.doc.md +0 -20
  265. package/docs/generated-docs/maz-textarea.doc.md +0 -46
  266. package/docs/generated-docs/maz-ticker.doc.md +0 -25
  267. package/docs/generated-docs/maz-timeline.doc.md +0 -32
  268. package/docs/generated-docs/maz-ui-provider.doc.md +0 -12
  269. package/docs/generated-docs/maz-window-mockup.doc.md +0 -23
  270. package/docs/src/blog/v4.md +0 -276
  271. package/docs/src/blog/v5.md +0 -184
  272. package/docs/src/changelog.md +0 -7
  273. package/docs/src/components/index.md +0 -8
  274. package/docs/src/components/maz-accordion.md +0 -80
  275. package/docs/src/components/maz-animated-counter.md +0 -124
  276. package/docs/src/components/maz-animated-element.md +0 -36
  277. package/docs/src/components/maz-animated-text.md +0 -36
  278. package/docs/src/components/maz-avatar.md +0 -227
  279. package/docs/src/components/maz-backdrop.md +0 -250
  280. package/docs/src/components/maz-bottom-sheet.md +0 -533
  281. package/docs/src/components/maz-card-spotlight.md +0 -163
  282. package/docs/src/components/maz-carousel.md +0 -231
  283. package/docs/src/components/maz-checkbox.md +0 -168
  284. package/docs/src/components/maz-checklist.md +0 -414
  285. package/docs/src/components/maz-circular-progress-bar.md +0 -145
  286. package/docs/src/components/maz-container.md +0 -363
  287. package/docs/src/components/maz-dialog-confirm.md +0 -240
  288. package/docs/src/components/maz-dialog.md +0 -164
  289. package/docs/src/components/maz-drawer.md +0 -181
  290. package/docs/src/components/maz-dropdown.md +0 -691
  291. package/docs/src/components/maz-expand-animation.md +0 -99
  292. package/docs/src/components/maz-fullscreen-loader.md +0 -58
  293. package/docs/src/components/maz-gallery.md +0 -85
  294. package/docs/src/components/maz-input-code.md +0 -61
  295. package/docs/src/components/maz-input-number.md +0 -81
  296. package/docs/src/components/maz-input-phone-number.md +0 -942
  297. package/docs/src/components/maz-input-price.md +0 -67
  298. package/docs/src/components/maz-input-tags.md +0 -114
  299. package/docs/src/components/maz-lazy-img.md +0 -88
  300. package/docs/src/components/maz-link.md +0 -178
  301. package/docs/src/components/maz-loading-bar.md +0 -26
  302. package/docs/src/components/maz-pagination.md +0 -79
  303. package/docs/src/components/maz-popover.md +0 -1416
  304. package/docs/src/components/maz-radio-buttons.md +0 -462
  305. package/docs/src/components/maz-radio.md +0 -142
  306. package/docs/src/components/maz-reading-progress-bar.md +0 -74
  307. package/docs/src/components/maz-spinner.md +0 -93
  308. package/docs/src/components/maz-switch.md +0 -92
  309. package/docs/src/components/maz-table.md +0 -732
  310. package/docs/src/components/maz-textarea.md +0 -400
  311. package/docs/src/components/maz-ticker.md +0 -692
  312. package/docs/src/components/maz-timeline.md +0 -478
  313. package/docs/src/composables/use-aos.md +0 -34
  314. package/docs/src/composables/use-breakpoints.md +0 -35
  315. package/docs/src/composables/use-dialog.md +0 -88
  316. package/docs/src/composables/use-string-matching.md +0 -63
  317. package/docs/src/composables/use-toast.md +0 -71
  318. package/docs/src/composables/use-wait.md +0 -62
  319. package/docs/src/composables/use-window-size.md +0 -18
  320. package/docs/src/ecosystem/icons/icon-set.md +0 -123
  321. package/docs/src/ecosystem/mcp.md +0 -210
  322. package/docs/src/ecosystem/node/index.md +0 -53
  323. package/docs/src/ecosystem/utils/camel-case.md +0 -31
  324. package/docs/src/ecosystem/utils/capitalize.md +0 -50
  325. package/docs/src/ecosystem/utils/country-code-to-unicode-flag.md +0 -213
  326. package/docs/src/ecosystem/utils/debounce-callback.md +0 -38
  327. package/docs/src/ecosystem/utils/fetch-locale-ip.md +0 -33
  328. package/docs/src/ecosystem/utils/get-browser-locale.md +0 -29
  329. package/docs/src/ecosystem/utils/get-country-flag-url.md +0 -156
  330. package/docs/src/ecosystem/utils/is-server.md +0 -31
  331. package/docs/src/ecosystem/utils/is-standalone-mode.md +0 -43
  332. package/docs/src/ecosystem/utils/truthy-filter.md +0 -31
  333. package/docs/src/ecosystem/utils/types/deep-required.md +0 -39
  334. package/docs/src/ecosystem/utils/types/flatten-object-keys.md +0 -44
  335. package/docs/src/ecosystem/utils/upper-first.md +0 -32
  336. package/docs/src/guide/cli.md +0 -144
  337. package/docs/src/guide/migration-v4.md +0 -925
  338. package/docs/src/guide/tailwind.md +0 -158
  339. package/docs/src/index.md +0 -603
  340. package/docs/src/made-with-maz-ui.md +0 -58
  341. package/docs/src/plugins/toast.md +0 -349
  342. package/docs/src/plugins/wait.md +0 -109
  343. package/docs/src/theme-editor.md +0 -21
@@ -1,213 +0,0 @@
1
- ---
2
- title: country-code-to-unicode-flag
3
- description: Convert country code in unicode flag
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ::: warning
11
- This feature does not work with Windows but you can use this polyfill: [https://www.npmjs.com/package/country-flag-emoji-polyfill](https://www.npmjs.com/package/country-flag-emoji-polyfill)
12
-
13
- Use can also use [get-country-flag-url](./get-country-flag-url.md) instead.
14
- :::
15
-
16
- ## Basic usage
17
-
18
- <span style="font-size: 2rem;">
19
- {{ unicodeFlag }}
20
- </span>
21
-
22
- ```vue
23
- <template>
24
- <span style="font-size: 2rem;">
25
- {{ unicodeFlag }}
26
- </span>
27
- </template>
28
-
29
- <script lang="ts" setup >
30
- import { countryCodeToUnicodeFlag } from '@maz-ui/utils'
31
-
32
- const unicodeFlag = countryCodeToUnicodeFlag('FR')
33
- </script>
34
- ```
35
-
36
- ## Example
37
-
38
- <div class="maz:gap-2 maz:flex maz:flex-wrap maz:items-center">
39
- <span class="maz:text-xs">{{ flag }}</span>
40
- <span class="maz:text-sm">{{ flag }}</span>
41
- <span class="maz:text-base">{{ flag }}</span>
42
- <span class="maz:text-lg">{{ flag }}</span>
43
- <span class="maz:text-xl">{{ flag }}</span>
44
- <span class="maz:text-2xl">{{ flag }}</span>
45
- <span class="maz:text-3xl">{{ flag }}</span>
46
- <span class="maz:text-4xl">{{ flag }}</span>
47
- <span class="maz:text-5xl">{{ flag }}</span>
48
- <span class="maz:text-6xl">{{ flag }}</span>
49
- <span class="maz:text-7xl">{{ flag }}</span>
50
- </div>
51
-
52
- <MazSelect
53
- v-model="countryCode"
54
- :options="countryOptions"
55
- label="Select country"
56
- search
57
- search-placeholder="Search country"
58
- @selected-option="(option) => console.log('option', option)"
59
- >
60
- <template #default="{ option, isSelected }">
61
- <div
62
- class="maz:flex maz:items-center maz:gap-3"
63
- >
64
- <span class="maz:text-lg">
65
- {{ option.unicodeFlag }}
66
- </span>
67
- <MazBadge
68
- pastel
69
- size="0.7rem"
70
- class="maz:w-9"
71
- :class="{ 'maz:text-muted': !isSelected }"
72
- >
73
- {{ option.value }}
74
- </MazBadge>
75
- <span :class="{ 'maz:font-semibold': isSelected }">
76
- {{ option.label }}
77
- </span>
78
- </div>
79
- </template>
80
- </MazSelect>
81
-
82
- <script lang="ts" setup>
83
- import { computed, ref, onMounted } from 'vue'
84
- import { countryCodeToUnicodeFlag } from '@maz-ui/utils'
85
- import { getCountries } from 'libphonenumber-js'
86
-
87
- const unicodeFlag = countryCodeToUnicodeFlag('FR')
88
-
89
- const countryCode = ref('FR')
90
- const flag = computed(() => countryCodeToUnicodeFlag(countryCode.value))
91
-
92
- const countryOptions = ref(getCountriesList())
93
-
94
- onMounted(() => {
95
- const listOfCountries = getCountriesList(window.navigator.language)
96
- if (listOfCountries.length > 1) {
97
- countryOptions.value = listOfCountries
98
- }
99
- })
100
-
101
- function getCountriesList(
102
- locale?: string,
103
- ) {
104
- const countriesList = []
105
- const isoList = getCountries()
106
-
107
- for (const iso2 of isoList) {
108
- const name = new Intl.DisplayNames([locale ?? 'en-US'], { type: 'region' }).of(iso2)
109
-
110
- if (name) {
111
- countriesList.push({
112
- value: iso2,
113
- label: name,
114
- unicodeFlag: countryCodeToUnicodeFlag(iso2)
115
- })
116
- }
117
- }
118
-
119
- return countriesList
120
- }
121
- </script>
122
-
123
- ::: details Show full code
124
-
125
- ```vue
126
-
127
- <template>
128
- <div class="maz:gap-2 maz:flex maz:flex-wrap maz:items-center">
129
- <span class="maz:text-xs">{{ flag }}</span>
130
- <span class="maz:text-sm">{{ flag }}</span>
131
- <span class="maz:text-base">{{ flag }}</span>
132
- <span class="maz:text-lg">{{ flag }}</span>
133
- <span class="maz:text-xl">{{ flag }}</span>
134
- <span class="maz:text-2xl">{{ flag }}</span>
135
- <span class="maz:text-3xl">{{ flag }}</span>
136
- <span class="maz:text-4xl">{{ flag }}</span>
137
- <span class="maz:text-5xl">{{ flag }}</span>
138
- <span class="maz:text-6xl">{{ flag }}</span>
139
- <span class="maz:text-7xl">{{ flag }}</span>
140
- </div>
141
-
142
- <MazSelect
143
- v-model="countryCode"
144
- :options="countryOptions"
145
- label="Select country"
146
- search
147
- search-placeholder="Search country"
148
- @selected-option="(option) => console.log('option', option)"
149
- >
150
- <template #default="{ option, isSelected }">
151
- <div
152
- class="maz:flex maz:items-center maz:gap-3"
153
- >
154
- <span class="maz:text-lg">
155
- {{ option.unicodeFlag }}
156
- </span>
157
- <MazBadge
158
- pastel
159
- size="0.7rem"
160
- class="maz:w-9"
161
- :class="{ 'maz:text-muted': !isSelected }"
162
- >
163
- {{ option.value }}
164
- </MazBadge>
165
- <span :class="{ 'maz:font-semibold': isSelected }">
166
- {{ option.label }}
167
- </span>
168
- </div>
169
- </template>
170
- </MazSelect>
171
- </template>
172
-
173
- <script lang="ts" setup>
174
- import { computed, ref, onMounted } from 'vue'
175
- import { countryCodeToUnicodeFlag } from '@maz-ui/utils'
176
- import { getCountries } from 'libphonenumber-js'
177
-
178
- const countryCode = ref('FR')
179
- const flag = computed(() => countryCodeToUnicodeFlag(countryCode.value))
180
-
181
- const countryOptions = ref(getCountriesList())
182
-
183
- onMounted(() => {
184
- const listOfCountries = getCountriesList(window.navigator.language)
185
- if (listOfCountries.length > 1) {
186
- countryOptions.value = listOfCountries
187
- }
188
- })
189
-
190
- function getCountriesList(
191
- locale?: string,
192
- ) {
193
- const countriesList = []
194
- const isoList = getCountries()
195
-
196
- for (const iso2 of isoList) {
197
- const name = new Intl.DisplayNames([locale ?? 'en-US'], { type: 'region' }).of(iso2)
198
-
199
- if (name) {
200
- countriesList.push({
201
- value: iso2,
202
- label: name,
203
- unicodeFlag: countryCodeToUnicodeFlag(iso2)
204
- })
205
- }
206
- }
207
-
208
- return countriesList
209
- }
210
- </script>
211
- ```
212
-
213
- :::
@@ -1,38 +0,0 @@
1
- ---
2
- title: debounceCallback
3
- description: Module-scoped one-shot debounce — schedule a callback that gets reset on each new call.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- Unlike [`debounce`](./debounce), which builds a debounced wrapper around a function, `debounceCallback` is a procedural helper: each call schedules a callback after `delay` ms, cancelling any previous pending callback.
11
-
12
- ::: warning Shared module state
13
- `debounceCallback` uses a single module-level timer. All consumers of this function share the same timer slot, so calling it from two unrelated places will cancel each other. Use [`debounceId`](./debounce-id) for isolated debounces.
14
- :::
15
-
16
- ## Usage
17
-
18
- ```ts
19
- import { debounceCallback } from '@maz-ui/utils'
20
-
21
- debounceCallback(() => {
22
- console.log('runs only if no other call happens in the next 300 ms')
23
- }, 300)
24
- ```
25
-
26
- ## API
27
-
28
- ```ts
29
- function debounceCallback(
30
- callback: (...args: unknown[]) => unknown,
31
- delay: number,
32
- ): void
33
- ```
34
-
35
- | Parameter | Type | Description |
36
- | ---------- | ---------- | ------------------------------------------ |
37
- | `callback` | `Function` | Function to run after the quiet window |
38
- | `delay` | `number` | Quiet window before firing, in milliseconds |
@@ -1,33 +0,0 @@
1
- ---
2
- title: fetchLocaleIp
3
- description: Resolve the visitor's ISO country code from their IP address using the free `ipwho.is` service.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- Useful for pre-filling locale-aware UI — phone-number country selectors, currency hints, default language — before the user has interacted with the page.
11
-
12
- ## Usage
13
-
14
- ```ts
15
- import { fetchLocaleIp } from '@maz-ui/utils'
16
-
17
- const countryCode = await fetchLocaleIp()
18
- // 'FR' | 'US' | … or undefined if the request fails
19
- ```
20
-
21
- ## API
22
-
23
- ```ts
24
- function fetchLocaleIp(): Promise<string | undefined>
25
- ```
26
-
27
- Returns the ISO 3166-1 alpha-2 country code (e.g. `'FR'`), or `undefined` if the request fails. Errors are caught and logged via `console.error` — the call never throws.
28
-
29
- ## Notes
30
-
31
- - Hits `https://ipwho.is` — a public, no-key service. Consider rate limits and privacy for production usage.
32
- - Returns `undefined` rather than throwing so a fallback path (default locale, manual selection) can be wired without `try/catch`.
33
- - For a static locale source, see [`getBrowserLocale`](./get-browser-locale).
@@ -1,29 +0,0 @@
1
- ---
2
- title: getBrowserLocale
3
- description: Read the user's browser language tag (e.g. `'fr-FR'`, `'en-US'`) — returns `undefined` on the server.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ## Usage
11
-
12
- ```ts
13
- import { getBrowserLocale } from '@maz-ui/utils'
14
-
15
- const locale = getBrowserLocale() // 'fr-FR' | 'en-US' | … | undefined
16
- ```
17
-
18
- ## API
19
-
20
- ```ts
21
- function getBrowserLocale(): string | undefined
22
- ```
23
-
24
- Returns `navigator.language` on the client. On the server (no `navigator`), returns `undefined`.
25
-
26
- ## Notes
27
-
28
- - For IP-based country detection instead of the browser-declared locale, see [`fetchLocaleIp`](./fetch-locale-ip).
29
- - The returned tag follows [BCP 47](https://www.rfc-editor.org/info/bcp47).
@@ -1,156 +0,0 @@
1
- ---
2
- title: getCountryFlagUrl
3
- description: Get country flag from flagcdn.com with a simple function call
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- <MazSelect
11
- v-model="countryCode"
12
- :options="countryOptions"
13
- label="Select country"
14
- search
15
- search-placeholder="Search country"
16
- @selected-option="(option) => console.log('option', option)"
17
- >
18
- <template #default="{ option, isSelected }">
19
- <div
20
- class="maz:flex maz:items-center maz:gap-3"
21
- >
22
- <img :src="option.flagSrc" class="maz:text-lg" :alt="`Flag of ${option.label}`" />
23
- <MazBadge
24
- pastel
25
- size="0.7rem"
26
- class="maz:w-9"
27
- :class="{ 'maz:text-muted': !isSelected }"
28
- >
29
- {{ option.value }}
30
- </MazBadge>
31
- <span :class="{ 'maz:font-semibold': isSelected }">
32
- {{ option.label }}
33
- </span>
34
- </div>
35
- </template>
36
- </MazSelect>
37
-
38
- ## Basic usage
39
-
40
- <img :src="flagSrc" alt="Flag of France" />
41
-
42
- ```vue
43
- <template>
44
- <img :src="flagSrc" alt="Flag of France" />
45
- </template>
46
-
47
- <script lang="ts" setup >
48
- import { getCountryFlagUrl } from '@maz-ui/utils'
49
-
50
- const flagSrc = getCountryFlagUrl('FR')
51
- </script>
52
- ```
53
-
54
- ## Sizing
55
-
56
- <div class="maz:gap-2 maz:flex maz:flex-wrap maz:items-center">
57
- <img
58
- v-for="{ src, size, countryCode } in sizedFlags"
59
- :key="src"
60
- :src="src"
61
- :alt="`${countryCode} Flag`"
62
- />
63
- </div>
64
-
65
- ::: details Show full code
66
-
67
- ```vue
68
- <template>
69
- <img
70
- v-for="{ src, size, countryCode } in sizedFlags"
71
- :key="src"
72
- :src="src"
73
- :alt="`${countryCode} Flag`"
74
- />
75
- </template>
76
-
77
- <script lang="ts" setup>
78
- import { computed } from 'vue'
79
- import { getCountryFlagUrl } from '@maz-ui/utils'
80
-
81
- const countryCode = ref('FR')
82
-
83
- const sizedFlags = computed(() => {
84
- const sizes: Size[] = [
85
- '16x12',
86
- '20x15',
87
- '24x18',
88
- '80x60',
89
- 'h80',
90
- 'w160',
91
- ]
92
-
93
- return sizes.map(size => ({
94
- src: getCountryFlagUrl(countryCode.value, size),
95
- size: size,
96
- countryCode: countryCode.value
97
- }))
98
- })
99
- </script>
100
- ```
101
-
102
- :::
103
-
104
- <script lang="ts" setup>
105
- import { computed, ref, onMounted } from 'vue'
106
- import { getCountryFlagUrl } from '@maz-ui/utils'
107
- import { getCountries } from 'libphonenumber-js'
108
-
109
- const countryCode = ref('FR')
110
- const flagSrc = computed(() => getCountryFlagUrl(countryCode.value))
111
-
112
- const sizedFlags = computed(() => {
113
- const sizes: Size[] = [
114
- '16x12',
115
- '20x15',
116
- '24x18',
117
- '80x60',
118
- 'h80',
119
- 'w160',
120
- ]
121
-
122
- return sizes.map(size => ({
123
- src: getCountryFlagUrl(countryCode.value, size),
124
- size: size,
125
- countryCode: countryCode.value
126
- }))
127
- })
128
-
129
- const countryOptions = ref(getCountriesList())
130
-
131
- onMounted(() => {
132
- const listOfCountries = getCountriesList(window.navigator.language)
133
- if (listOfCountries.length > 1) {
134
- countryOptions.value = listOfCountries
135
- }
136
- })
137
-
138
- function getCountriesList(locale?: string) {
139
- const countriesList = []
140
- const isoList = getCountries()
141
-
142
- for (const iso2 of isoList) {
143
- const name = new Intl.DisplayNames([locale ?? 'en-US'], { type: 'region' }).of(iso2)
144
-
145
- if (name) {
146
- countriesList.push({
147
- value: iso2,
148
- label: name,
149
- flagSrc: getCountryFlagUrl(iso2)
150
- })
151
- }
152
- }
153
-
154
- return countriesList
155
- }
156
- </script>
@@ -1,31 +0,0 @@
1
- ---
2
- title: isServer
3
- description: Check whether the code is running on the server (no `window` or `document`).
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ## Usage
11
-
12
- ```ts
13
- import { isServer } from '@maz-ui/utils'
14
-
15
- if (isServer()) {
16
- return placeholder
17
- }
18
- ```
19
-
20
- ## API
21
-
22
- ```ts
23
- function isServer(): boolean
24
- ```
25
-
26
- Returns `true` when either `document` or `window` is undefined — covers Node.js, Bun, Deno, Edge runtimes and Web Workers.
27
-
28
- ## Notes
29
-
30
- - The opposite is [`isClient`](./is-client).
31
- - Useful for guarding `window`-dependent code from SSR errors.
@@ -1,43 +0,0 @@
1
- ---
2
- title: isStandaloneMode
3
- description: Check whether the app is running as an installed Progressive Web App (PWA) rather than inside a browser tab.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ## Usage
11
-
12
- ```ts
13
- import { isStandaloneMode } from '@maz-ui/utils'
14
-
15
- if (isStandaloneMode()) {
16
- console.log('Running as installed PWA')
17
- }
18
- ```
19
-
20
- ## API
21
-
22
- ```ts
23
- function isStandaloneMode(): boolean
24
- ```
25
-
26
- Returns `true` if the page is rendered in standalone display mode, `false` otherwise (including during SSR).
27
-
28
- ## Detection rules
29
-
30
- The check returns `true` when **either**:
31
-
32
- - `window.matchMedia('(display-mode: standalone)').matches` — covers Chrome, Edge, Firefox, etc.
33
- - `navigator.standalone` is truthy — iOS Safari's legacy property.
34
-
35
- ## Examples
36
-
37
- Hide install prompts when already installed:
38
-
39
- ```ts
40
- if (!isStandaloneMode()) {
41
- showInstallBanner()
42
- }
43
- ```
@@ -1,31 +0,0 @@
1
- ---
2
- title: truthyFilter
3
- description: Type guard that filters out falsy values (`false`, `''`, `0`, `null`, `undefined`) while narrowing the TypeScript type.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- Pass it directly to `Array.prototype.filter` to drop nullish/empty entries while telling TypeScript the result no longer contains those types.
11
-
12
- ## Usage
13
-
14
- ```ts
15
- import { truthyFilter } from '@maz-ui/utils'
16
-
17
- const items: (string | null | undefined)[] = ['a', null, 'b', undefined, '']
18
- const cleaned = items.filter(truthyFilter)
19
- // cleaned has type string[]
20
- // cleaned = ['a', 'b']
21
- ```
22
-
23
- ## API
24
-
25
- ```ts
26
- type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T
27
-
28
- function truthyFilter<T>(value: T): value is Truthy<T>
29
- ```
30
-
31
- The function returns `Boolean(value)` — its real value is in the type predicate, which narrows away the falsy variants for downstream type-checking.
@@ -1,39 +0,0 @@
1
- ---
2
- title: DeepRequired
3
- description: Recursive variant of TypeScript's `Required<T>` — strips `?` from every property at every depth.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- The mirror image of [`DeepPartial`](./deep-partial). Useful when you want a fully-resolved internal type derived from a public options interface.
11
-
12
- ## Usage
13
-
14
- ```ts
15
- import type { DeepRequired } from '@maz-ui/utils'
16
-
17
- interface Options {
18
- cache?: {
19
- ttl?: number
20
- strategy?: 'memory' | 'disk'
21
- }
22
- }
23
-
24
- type ResolvedOptions = DeepRequired<Options>
25
- // {
26
- // cache: {
27
- // ttl: number
28
- // strategy: 'memory' | 'disk'
29
- // }
30
- // }
31
- ```
32
-
33
- ## API
34
-
35
- ```ts
36
- type DeepRequired<T> = Required<{
37
- [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>
38
- }>
39
- ```
@@ -1,44 +0,0 @@
1
- ---
2
- title: FlattenObjectKeys
3
- description: Build a union of dot-separated leaf paths for a nested object, with an optional prefix.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- Similar to [`DeepKeyOf`](./deep-key-of) but only yields **leaf** paths (skips intermediate object keys), and accepts a `Prefix` parameter for namespacing.
11
-
12
- ## Usage
13
-
14
- ```ts
15
- import type { FlattenObjectKeys } from '@maz-ui/utils'
16
-
17
- interface Config {
18
- app: {
19
- name: string
20
- version: number
21
- }
22
- debug: boolean
23
- }
24
-
25
- type Leaves = FlattenObjectKeys<Config>
26
- // → 'app.name' | 'app.version' | 'debug'
27
-
28
- type Namespaced = FlattenObjectKeys<Config, 'config.'>
29
- // → 'config.app.name' | 'config.app.version' | 'config.debug'
30
- ```
31
-
32
- ## API
33
-
34
- ```ts
35
- type FlattenObjectKeys<T extends Record<string, any>, Prefix extends string = ''> = {
36
- [K in keyof T]: T[K] extends Record<string, any>
37
- ? FlattenObjectKeys<T[K], `${Prefix}${K extends string ? K : ''}.`>
38
- : `${Prefix}${K extends string ? K : ''}`
39
- }[keyof T]
40
- ```
41
-
42
- ## Notes
43
-
44
- - Unlike `DeepKeyOf`, intermediate object keys (e.g. `'app'` in the example) are not included — only the paths that resolve to non-object leaves.
@@ -1,32 +0,0 @@
1
- ---
2
- title: upperFirst
3
- description: Uppercase the first character of a string and leave the rest unchanged.
4
- ---
5
-
6
- # {{ $frontmatter.title }}
7
-
8
- {{ $frontmatter.description }}
9
-
10
- ## Usage
11
-
12
- ```ts
13
- import { upperFirst } from '@maz-ui/utils'
14
-
15
- upperFirst('hello') // → 'Hello'
16
- upperFirst('hELLO') // → 'HELLO'
17
- upperFirst('') // → ''
18
- ```
19
-
20
- ## API
21
-
22
- ```ts
23
- function upperFirst(value: string): string
24
- ```
25
-
26
- | Parameter | Type | Description |
27
- | --------- | -------- | --------------------- |
28
- | `value` | `string` | The string to process |
29
-
30
- ## Notes
31
-
32
- - Does **not** lowercase the remaining characters — use [`capitalize`](./capitalize) for the same behaviour when you control the input shape.