@maz-ui/mcp 5.3.0 → 5.3.1-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.
- package/dist/chunks/files.mjs +2 -2
- package/dist/chunks/index.mjs +1 -1
- package/dist/chunks/theme.mjs +2 -2
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/shared/{mcp.CXId5vdl.mjs → mcp.BhjfgyTl.mjs} +17 -17
- package/dist/shared/{mcp.ByQS-5Nc.mjs → mcp.Cctc-qvC.mjs} +1 -1
- package/docs/components/maz-input-number.md +1 -1
- package/docs/components/maz-input-phone-number.md +1 -1
- package/docs/components/maz-input.md +1 -1
- package/docs/ecosystem/eslint-config.md +17 -0
- package/docs/ecosystem/nuxt.md +10 -0
- package/docs/guide/getting-started.md +35 -0
- package/docs/manifest.json +1 -1
- package/package.json +4 -16
package/dist/chunks/files.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { readFileSync, existsSync, statSync } from 'node:fs';
|
|
2
2
|
import { dirname, join, relative, isAbsolute, resolve } from 'node:path';
|
|
3
|
-
import { g as glob } from '../shared/mcp.
|
|
3
|
+
import { g as glob } from '../shared/mcp.Cctc-qvC.mjs';
|
|
4
4
|
import { filterBySeverity, reviewCode } from './index.mjs';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'url';
|
|
8
8
|
import 'module';
|
|
9
|
-
import '../shared/mcp.
|
|
9
|
+
import '../shared/mcp.BhjfgyTl.mjs';
|
|
10
10
|
import 'node:buffer';
|
|
11
11
|
import 'node:util';
|
|
12
12
|
import 'node:url';
|
package/dist/chunks/index.mjs
CHANGED
package/dist/chunks/theme.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { existsSync, statSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { a as globSync } from '../shared/mcp.
|
|
4
|
+
import { a as globSync } from '../shared/mcp.Cctc-qvC.mjs';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'url';
|
|
8
8
|
import 'module';
|
|
9
|
-
import '../shared/mcp.
|
|
9
|
+
import '../shared/mcp.BhjfgyTl.mjs';
|
|
10
10
|
import 'node:buffer';
|
|
11
11
|
import 'node:util';
|
|
12
12
|
import 'node:url';
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'node:buffer';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'node:util';
|
|
4
|
-
export { H as HELP, m as main, r as runCli, j as runInit, k as runReview } from './shared/mcp.
|
|
4
|
+
export { H as HELP, m as main, r as runCli, j as runInit, k as runReview } from './shared/mcp.BhjfgyTl.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:crypto';
|
package/dist/index.d.mts
CHANGED
|
@@ -218,7 +218,7 @@ interface LoadKnowledgeOptions {
|
|
|
218
218
|
cwd?: string;
|
|
219
219
|
/** Bundle shipped with @maz-ui/mcp */
|
|
220
220
|
bundledDir?: string;
|
|
221
|
-
/** Version of the bundled docs, default: the
|
|
221
|
+
/** Version of the bundled docs, default: the maz-ui version of their manifest */
|
|
222
222
|
bundledVersion?: string;
|
|
223
223
|
}
|
|
224
224
|
declare class Knowledge {
|
package/dist/index.d.ts
CHANGED
|
@@ -218,7 +218,7 @@ interface LoadKnowledgeOptions {
|
|
|
218
218
|
cwd?: string;
|
|
219
219
|
/** Bundle shipped with @maz-ui/mcp */
|
|
220
220
|
bundledDir?: string;
|
|
221
|
-
/** Version of the bundled docs, default: the
|
|
221
|
+
/** Version of the bundled docs, default: the maz-ui version of their manifest */
|
|
222
222
|
bundledVersion?: string;
|
|
223
223
|
}
|
|
224
224
|
declare class Knowledge {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DocSearch, K as Knowledge, T as TOOLS, b as buildInstructions, c as createContext, a as createMazUiMcpServer, f as findProjectMazUi, l as loadKnowledge, m as main, r as runCli, s as searchIcons, d as setupAgents, e as startStdioServer } from './shared/mcp.
|
|
1
|
+
export { D as DocSearch, K as Knowledge, T as TOOLS, b as buildInstructions, c as createContext, a as createMazUiMcpServer, f as findProjectMazUi, l as loadKnowledge, m as main, r as runCli, s as searchIcons, d as setupAgents, e as startStdioServer } from './shared/mcp.BhjfgyTl.mjs';
|
|
2
2
|
export { countBySeverity, filterBySeverity, formatFindings, reviewCode } from './chunks/index.mjs';
|
|
3
3
|
export { reviewFiles } from './chunks/files.mjs';
|
|
4
4
|
import 'node:buffer';
|
|
@@ -8,7 +8,7 @@ import 'node:fs';
|
|
|
8
8
|
import 'node:url';
|
|
9
9
|
import 'node:crypto';
|
|
10
10
|
import 'node:process';
|
|
11
|
-
import './shared/mcp.
|
|
11
|
+
import './shared/mcp.Cctc-qvC.mjs';
|
|
12
12
|
import 'fs';
|
|
13
13
|
import 'path';
|
|
14
14
|
import 'url';
|
|
@@ -2087,22 +2087,6 @@ function getErrorMessage(error) {
|
|
|
2087
2087
|
return error instanceof Error ? error.message : typeof error == "string" ? error : error && typeof error == "object" && "message" in error ? String(error.message) : error ? String(error) : "An unexpected error occurred";
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
|
-
function readOwnVersion(from = dirname(fileURLToPath(import.meta.url))) {
|
|
2091
|
-
let directory = from;
|
|
2092
|
-
for (; ; ) {
|
|
2093
|
-
const file = join(directory, "package.json");
|
|
2094
|
-
if (existsSync(file)) {
|
|
2095
|
-
const { name, version } = JSON.parse(readFileSync(file, "utf8"));
|
|
2096
|
-
if (name === "@maz-ui/mcp" && version)
|
|
2097
|
-
return version;
|
|
2098
|
-
}
|
|
2099
|
-
const parent = dirname(directory);
|
|
2100
|
-
if (parent === directory)
|
|
2101
|
-
return "0.0.0";
|
|
2102
|
-
directory = parent;
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
2090
|
function getEnumValues(entries) {
|
|
2107
2091
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
2108
2092
|
const values = Object.entries(entries)
|
|
@@ -9219,7 +9203,7 @@ function loadKnowledge(options = {}) {
|
|
|
9219
9203
|
const manifest = readManifest(bundledDir);
|
|
9220
9204
|
if (!manifest)
|
|
9221
9205
|
throw new Error(`The docs bundle of @maz-ui/mcp is missing or invalid (${bundledDir}). Reinstall the package.`);
|
|
9222
|
-
return new Knowledge(manifest, { kind: "bundled", directory: bundledDir, projectVersion: project?.version }, options.bundledVersion ??
|
|
9206
|
+
return new Knowledge(manifest, { kind: "bundled", directory: bundledDir, projectVersion: project?.version }, options.bundledVersion ?? manifest.version);
|
|
9223
9207
|
}
|
|
9224
9208
|
|
|
9225
9209
|
/** @ignore */
|
|
@@ -31536,6 +31520,22 @@ const reviewCodeToolDefinition = defineTool({
|
|
|
31536
31520
|
run: reviewCodeTool
|
|
31537
31521
|
});
|
|
31538
31522
|
|
|
31523
|
+
function readOwnVersion(from = dirname(fileURLToPath(import.meta.url))) {
|
|
31524
|
+
let directory = from;
|
|
31525
|
+
for (; ; ) {
|
|
31526
|
+
const file = join(directory, "package.json");
|
|
31527
|
+
if (existsSync(file)) {
|
|
31528
|
+
const { name, version } = JSON.parse(readFileSync(file, "utf8"));
|
|
31529
|
+
if (name === "@maz-ui/mcp" && version)
|
|
31530
|
+
return version;
|
|
31531
|
+
}
|
|
31532
|
+
const parent = dirname(directory);
|
|
31533
|
+
if (parent === directory)
|
|
31534
|
+
return "0.0.0";
|
|
31535
|
+
directory = parent;
|
|
31536
|
+
}
|
|
31537
|
+
}
|
|
31538
|
+
|
|
31539
31539
|
const TOOLS = [
|
|
31540
31540
|
searchDocsTool,
|
|
31541
31541
|
getComponentApiTool,
|
|
@@ -3,7 +3,7 @@ import { statSync, stat, realpathSync, realpath, readdirSync, readdir } from 'fs
|
|
|
3
3
|
import { sep, basename, dirname, resolve, normalize, relative, posix, isAbsolute } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import { createRequire } from 'module';
|
|
6
|
-
import { g as getDefaultExportFromCjs } from './mcp.
|
|
6
|
+
import { g as getDefaultExportFromCjs } from './mcp.BhjfgyTl.mjs';
|
|
7
7
|
|
|
8
8
|
//#region rolldown:runtime
|
|
9
9
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
@@ -61,7 +61,7 @@ You can remove the buttons with the props `hide-buttons`
|
|
|
61
61
|
- `size` (`"xs" | "sm" | "md" | "lg" | "xl" | "mini"`, default: `'md'`): The size of the input number component.
|
|
62
62
|
- `hide-buttons` (`boolean`, default: `false`): Whether to hide the increment and decrement buttons or not.
|
|
63
63
|
- `text-center` (`boolean`, default: `true`): Whether to center the text inside the input or not.
|
|
64
|
-
- `inputmode` (`"none" | "text" | "search" | "
|
|
64
|
+
- `inputmode` (`"none" | "text" | "search" | "email" | "tel" | "url" | "numeric" | "decimal"`, default: `"numeric"`): The inputmode attribute for the input.
|
|
65
65
|
- `block` (`boolean`): The input will be displayed in full width.
|
|
66
66
|
- `error` (`boolean`, default: `false`): Will display the input in error state.
|
|
67
67
|
- `hint` (`string`): The hint text to display below the input.
|
|
@@ -518,7 +518,7 @@ interface MazInputPhoneNumberData {
|
|
|
518
518
|
- `block` (`boolean`, default: `false`): The input will be displayed in full width.
|
|
519
519
|
- `orientation` (`"row" | "col" | "responsive"`, default: `"responsive"`): Orientation of the inputs in the component.
|
|
520
520
|
- `country-select-attributes` (`Record<string, unknown>`, default: `{ name: "country", autocomplete: "off", style: { width: "14rem", }, }`): Meta attributes of the country input.
|
|
521
|
-
- `phone-input-attributes` (`(Record<string, unknown> & { name: string; inputmode: "none" | "text" | "search" | "
|
|
521
|
+
- `phone-input-attributes` (`(Record<string, unknown> & { name: string; inputmode: "none" | "text" | "search" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined; autocomplete: string; })`, default: `{ name: "phone", autocomplete: "tel", inputmode: "tel", }`): Meta attributes of the phone number input.
|
|
522
522
|
- `assistive-text` (`string`): Helper text displayed below the input to provide additional context or validation feedback.
|
|
523
523
|
- `hint` (`string`): Alternative text that replaces the label when provided. Useful for contextual hints.
|
|
524
524
|
|
|
@@ -305,7 +305,7 @@ Use the attribute `rounded-size` with a value in `'none' | 'sm' | 'md' | 'lg' |
|
|
|
305
305
|
- `hint` (`string`): Alternative text that replaces the label when provided. Useful for contextual hints.
|
|
306
306
|
- `input-classes` (`string`): Additional CSS classes to apply specifically to the input wrapper element.
|
|
307
307
|
- `border` (`boolean`, default: `true`): Controls whether the input has a visible border. Set to false for borderless inputs.
|
|
308
|
-
- `inputmode` (`"none" | "text" | "search" | "
|
|
308
|
+
- `inputmode` (`"none" | "text" | "search" | "email" | "tel" | "url" | "numeric" | "decimal"`, default: `"text"`): HTML inputmode attribute that provides hints for virtual keyboards on mobile devices.
|
|
309
309
|
- `size` (`"xs" | "sm" | "md" | "lg" | "xl" | "mini"`): Controls the height and text size of the input component.
|
|
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.
|
|
@@ -145,6 +145,23 @@ defineConfig({
|
|
|
145
145
|
|
|
146
146
|
The plugin recognizes the most common class-name utilities out of the box (`clsx`, `cn`, `tw-merge`, `cva`, `tv`, …); see the [plugin docs](https://github.com/schoero/eslint-plugin-better-tailwindcss) for the full list and how to register your own.
|
|
147
147
|
|
|
148
|
+
## pnpm workspace
|
|
149
|
+
|
|
150
|
+
In a pnpm workspace (a `pnpm-workspace.yaml` in the project or one of its parent directories), the pnpm rules of `@antfu/eslint-config` lint the `package.json` files and the `pnpm-workspace.yaml`, without `pnpm/json-enforce-catalog`: a dependency moves to the [catalog](https://pnpm.io/catalogs) only when you decide it.
|
|
151
|
+
|
|
152
|
+
| Value | Behavior |
|
|
153
|
+
| ----------------------- | --------------------------------------------------------------------------- |
|
|
154
|
+
| `undefined` _(default)_ | Enabled in a pnpm workspace, without enforcing the catalog. |
|
|
155
|
+
| `true` | Enabled, and enforces the catalog when `pnpm-workspace.yaml` has a catalog. |
|
|
156
|
+
| `{ catalogs: true }` | Enabled, and enforces the catalog for every dependency. |
|
|
157
|
+
| `false` | Disabled. |
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
defineConfig({
|
|
161
|
+
pnpm: { catalogs: true },
|
|
162
|
+
})
|
|
163
|
+
```
|
|
164
|
+
|
|
148
165
|
## Custom rules
|
|
149
166
|
|
|
150
167
|
`@maz-ui/eslint-config` ships its own ESLint plugin under the **`maz/*`** namespace. Rules are grouped by category - `maz/tailwind-*` today, with room for `maz/js-*` and others as they get added.
|
package/docs/ecosystem/nuxt.md
CHANGED
|
@@ -525,6 +525,16 @@ You can use [`MazUiProvider`](../guide/maz-ui-provider.md) within a Nuxt app to
|
|
|
525
525
|
|
|
526
526
|
## Troubleshooting
|
|
527
527
|
|
|
528
|
+
### Two versions of maz-ui
|
|
529
|
+
|
|
530
|
+
If the module warns `The app installs maz-ui X and @maz-ui/nuxt uses maz-ui Y`, your app and the module load two copies of `maz-ui`: the options of the module (`mazUi.general`, `mazUi.plugins`...) may not apply to the components. Install the same version of `maz-ui` and `@maz-ui/nuxt`, they are released together:
|
|
531
|
+
|
|
532
|
+
```bash
|
|
533
|
+
npm install maz-ui@latest @maz-ui/nuxt@latest
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
See [Keep the packages on the same version](../guide/getting-started.md#keep-the-packages-on-the-same-version).
|
|
537
|
+
|
|
528
538
|
### Theme System Issues
|
|
529
539
|
|
|
530
540
|
If you encounter the error `"useTheme must be used within MazUi plugin or MazUiTheme plugin installation"`, ensure that:
|
|
@@ -122,6 +122,41 @@ npx @maz-ui/mcp init
|
|
|
122
122
|
|
|
123
123
|
[→ View AI agents guide](./ai-agents.md)
|
|
124
124
|
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### Keep the packages on the same version
|
|
128
|
+
|
|
129
|
+
`maz-ui` and the packages of its ecosystem (`@maz-ui/themes`, `@maz-ui/translations`, `@maz-ui/icons`, `@maz-ui/utils`, `@maz-ui/nuxt`, `@maz-ui/node`, `@maz-ui/mcp`) are released together, always on the same version. When you install several of them, keep them on this version: two versions of a package install two copies of it, which make your bundle heavier, and two copies of `maz-ui` do not share the global configuration (`@maz-ui/nuxt` warns about it when it starts).
|
|
130
|
+
|
|
131
|
+
Group their updates in a single pull request. With Dependabot (`.github/dependabot.yml`):
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
version: 2
|
|
135
|
+
updates:
|
|
136
|
+
- package-ecosystem: npm
|
|
137
|
+
directory: /
|
|
138
|
+
schedule:
|
|
139
|
+
interval: weekly
|
|
140
|
+
groups:
|
|
141
|
+
maz-ui:
|
|
142
|
+
patterns:
|
|
143
|
+
- maz-ui
|
|
144
|
+
- '@maz-ui/*'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
With Renovate (`renovate.json`):
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"packageRules": [
|
|
152
|
+
{
|
|
153
|
+
"groupName": "maz-ui",
|
|
154
|
+
"matchPackageNames": ["maz-ui", "@maz-ui/*"]
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
125
160
|
## Performance Optimizations
|
|
126
161
|
|
|
127
162
|
### Tree-Shaking Benefits
|