@maz-ui/mcp 5.0.0-beta.48 → 5.0.0-beta.49
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/mcp.mjs +1 -1
- package/docs/src/components/maz-icon.md +14 -3
- package/package.json +2 -2
package/dist/mcp.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
|
7
7
|
import { resolve, join, dirname } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
|
|
10
|
-
const version = "5.0.0-beta.
|
|
10
|
+
const version = "5.0.0-beta.48";
|
|
11
11
|
|
|
12
12
|
class MetadataExtractor {
|
|
13
13
|
extract(name, type, content, manualTags = []) {
|
|
@@ -177,15 +177,26 @@ Inject extra attributes onto the rendered `<svg>` (or onto the inlined raw SVG)
|
|
|
177
177
|
<MazIcon :icon="MazStar" :svg-attributes="{ 'data-testid': 'star', fill: 'currentColor' }" />
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
## SSR
|
|
180
|
+
## SSR
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
Components, raw SVG strings and SVG `data:` URIs (e.g. a small `?url` import inlined by Vite) are always part of the server HTML, without any request.
|
|
183
|
+
|
|
184
|
+
The server never waits for the network to render a URL icon:
|
|
185
|
+
|
|
186
|
+
- once the server has the SVG in its cache, it inlines it;
|
|
187
|
+
- otherwise, it renders an empty placeholder reserving the icon box and fetches the SVG in the background for the next renders. The client loads the icon in the placeholder.
|
|
188
|
+
|
|
189
|
+
A relative URL (`/icons/star.svg`, from your `public/` directory) can only be fetched by the server with an absolute base URL, see below.
|
|
190
|
+
|
|
191
|
+
## Base URL for relative URLs
|
|
192
|
+
|
|
193
|
+
Prefix every relative URL icon by providing a base URL via Vue's `provide`. An absolute base also lets the server fetch them:
|
|
183
194
|
|
|
184
195
|
```ts
|
|
185
196
|
import { createApp } from 'vue'
|
|
186
197
|
|
|
187
198
|
const app = createApp(App)
|
|
188
|
-
app.provide('mazIconPath', 'https://your-app.com')
|
|
199
|
+
app.provide('mazIconPath', 'https://cdn.your-app.com')
|
|
189
200
|
```
|
|
190
201
|
|
|
191
202
|
In Nuxt, set `mazUi.general.defaultMazIconPath` in `nuxt.config` and `@maz-ui/nuxt` wires the provide for you.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maz-ui/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.49",
|
|
5
5
|
"description": "Maz-UI ModelContextProtocol Client",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@maz-ui/utils": "5.0.0-beta.46",
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
46
|
-
"maz-ui": "5.0.0-beta.
|
|
46
|
+
"maz-ui": "5.0.0-beta.49"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@maz-ui/eslint-config": "5.0.0-beta.47",
|