@maz-ui/mcp 5.3.0 → 5.3.1-0.canary-2a258c0

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.
@@ -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.ByQS-5Nc.mjs';
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.CXId5vdl.mjs';
9
+ import '../shared/mcp.BhjfgyTl.mjs';
10
10
  import 'node:buffer';
11
11
  import 'node:util';
12
12
  import 'node:url';
@@ -1,4 +1,4 @@
1
- import { h as commonjsGlobal, i as closest, t as toKebab } from '../shared/mcp.CXId5vdl.mjs';
1
+ import { h as commonjsGlobal, i as closest, t as toKebab } from '../shared/mcp.BhjfgyTl.mjs';
2
2
  import 'node:buffer';
3
3
  import 'node:path';
4
4
  import 'node:util';
@@ -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.ByQS-5Nc.mjs';
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.CXId5vdl.mjs';
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.CXId5vdl.mjs';
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 version of @maz-ui/mcp (released together with maz-ui) */
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 version of @maz-ui/mcp (released together with maz-ui) */
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.CXId5vdl.mjs';
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.ByQS-5Nc.mjs';
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 ?? readOwnVersion());
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.CXId5vdl.mjs';
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);
@@ -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.
@@ -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