@slidev/docs 52.14.0 → 52.14.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.
@@ -64,7 +64,7 @@ The runner can either return a text or HTML output, or an element to be mounted.
64
64
 
65
65
  ## Additional Runner Dependencies
66
66
 
67
- By default, Slidev will scan the Markdown source and automatically import the necessary dependencies for the code runners. If you want to manually import dependencies, you can use the `monacoRunAdditionalDeps` option in the slide frontmatter:
67
+ By default, Slidev will scan the Markdown source and automatically import the necessary dependencies for the code runners. If you want to manually import dependencies, you can use the `monacoRunAdditionalDeps` option in the [headmatter](./index#headmatter):
68
68
 
69
69
  ```yaml
70
70
  monacoRunAdditionalDeps:
@@ -0,0 +1,19 @@
1
+ # Configure Mermaid Renderer
2
+
3
+ <Environment type="client" />
4
+
5
+ 1. The user installs the Mermaid library they want to use. e.g.) `npm install beautiful-mermaid`
6
+ 2. Create `./setup/mermaid-renderer.ts` with the following content:
7
+
8
+ ```ts
9
+ // setup/mermaid-renderer.ts
10
+ import { defineMermaidRendererSetup } from '@slidev/types'
11
+ // example. https://github.com/lukilabs/beautiful-mermaid?tab=readme-ov-file#readme
12
+ import { renderMermaid } from 'beautiful-mermaid'
13
+
14
+ export default defineMermaidRendererSetup(() => {
15
+ return (code, _options) => renderMermaid(code)
16
+ })
17
+ ```
18
+
19
+ This setting allows you to use the 3rd party Mermaid library. Replace the `renderMermaid()` part with the render function of the library.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/docs",
3
3
  "type": "module",
4
- "version": "52.14.0",
4
+ "version": "52.14.1",
5
5
  "license": "MIT",
6
6
  "funding": "https://github.com/sponsors/antfu",
7
7
  "homepage": "https://sli.dev",
@@ -17,14 +17,14 @@
17
17
  ],
18
18
  "devDependencies": {
19
19
  "@antfu/utils": "^9.3.0",
20
- "@iconify/json": "^2.2.443",
21
- "@shikijs/vitepress-twoslash": "^4.0.0",
22
- "@types/node": "^25.3.2",
23
- "@unocss/reset": "^66.6.2",
20
+ "@iconify/json": "^2.2.445",
21
+ "@shikijs/vitepress-twoslash": "^4.0.1",
22
+ "@types/node": "^25.3.3",
23
+ "@unocss/reset": "^66.6.3",
24
24
  "@vueuse/core": "^14.2.1",
25
25
  "fast-glob": "^3.3.3",
26
26
  "gray-matter": "^4.0.3",
27
- "shiki": "^4.0.0",
27
+ "shiki": "^4.0.1",
28
28
  "typeit": "8.1.0",
29
29
  "typescript": "^5.9.3",
30
30
  "unocss": "^66.6.2",
@@ -35,9 +35,9 @@
35
35
  "vitepress-plugin-group-icons": "^1.7.1",
36
36
  "vitepress-plugin-llms": "^1.11.0",
37
37
  "vue": "^3.5.29",
38
- "@slidev/parser": "52.14.0",
39
- "@slidev/client": "52.14.0",
40
- "@slidev/types": "52.14.0"
38
+ "@slidev/client": "52.14.1",
39
+ "@slidev/parser": "52.14.1",
40
+ "@slidev/types": "52.14.1"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "vitepress",