@slidev/docs 52.14.0 → 52.14.2

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.
@@ -43,6 +43,12 @@ Pattern: `./style.css` | `./styles/index.{css,js,ts}`
43
43
 
44
44
  Files following this convention will be injected to the App root. If you need to import multiple CSS entries, you can create the following structure and manage the import order yourself.
45
45
 
46
+ :::warning
47
+ Global CSS here also applies to the presenter UI. Prefer scoping styles to individual slides, or wrap your selectors under `.slidev-layout` to avoid leaking styles into presenter mode.
48
+
49
+ **Example:** Use `.slidev-layout .grid { ... }` instead of just `.grid { ... }`.
50
+ :::
51
+
46
52
  ```bash
47
53
  your-slidev/
48
54
  ├── ...
package/features/index.md CHANGED
@@ -17,7 +17,7 @@ const query = useUrlSearchParams('hash-params', { removeFalsyValues: true })
17
17
  const search = toRef(query, 'search') as Ref<string | null>
18
18
  const tags = toRef(query, 'tags') as Ref<string | null>
19
19
  const tagsArr = computed({
20
- get: () => tags.value?.toLowerCase().split(',').map(t => t.trim()).filter(Boolean) ?? [],
20
+ get: () => tags.value?.split(',').map(t => t.trim()).filter(Boolean) ?? [],
21
21
  set: (val: string[]) => query.tags = val.join(','),
22
22
  })
23
23
 
@@ -25,8 +25,17 @@ const filteredFeatures = computed(() => {
25
25
  const s = search.value?.toLowerCase().trim()
26
26
  const t = tagsArr.value
27
27
  return Object.values(features).filter(feature => {
28
- return (!s || feature.title.toLowerCase().includes(s) || feature.description.toLowerCase().includes(s))
29
- && (!t?.length || t.every(tag => feature.tags?.includes(tag)))
28
+ const matchSearch = !s ||
29
+ feature.name.toLowerCase().includes(s) ||
30
+ feature.title.toLowerCase().includes(s) ||
31
+ feature.description.toLowerCase().includes(s)
32
+
33
+ const matchTags = !t?.length || t.every(tag =>
34
+ feature.tags?.some(featureTag =>
35
+ featureTag.toLowerCase() === tag.toLowerCase()
36
+ )
37
+ )
38
+ return matchSearch && matchTags
30
39
  })
31
40
  })
32
41
 
package/guide/hosting.md CHANGED
@@ -188,6 +188,28 @@ Create `vercel.json` in your project root with the following content:
188
188
 
189
189
  Then go to your [Vercel dashboard](https://vercel.com/) and create a new site with the repository.
190
190
 
191
+ ### Zephyr Cloud {#zephyr-cloud}
192
+
193
+ To deploy your Slidev deck on [Zephyr Cloud](https://zephyr-cloud.io/), you can add Zephyr support to an existing Slidev project with:
194
+
195
+ ```bash
196
+ npx with-zephyr@latest
197
+ ```
198
+
199
+ This codemod detects your bundler (Slidev uses Vite) and updates your config for Zephyr Cloud.
200
+
201
+ After setup, run your normal build command, for example:
202
+
203
+ ```bash
204
+ npm run build
205
+ ```
206
+
207
+ When the build runs with Zephyr enabled, your app is deployed and Zephyr Cloud returns a preview URL.
208
+
209
+ ::: info
210
+ Zephyr Cloud is a bit different from most hosting providers: every `build` run triggers a deployment.
211
+ :::
212
+
191
213
  ### Host on Docker {#docker}
192
214
 
193
215
  If you need a rapid way to run a presentation with containers, you can use the prebuilt [docker image](https://hub.docker.com/r/tangramor/slidev) maintained by [tangramor](https://github.com/tangramor), or build your own.
package/guide/index.md CHANGED
@@ -40,7 +40,7 @@ Start Slidev right in your browser with StackBlitz: [sli.dev/new](https://sli.de
40
40
 
41
41
  ### Create Locally
42
42
 
43
- > Requires [Node.js](https://nodejs.org) >= 18.0 installed.
43
+ > Requires [Node.js](https://nodejs.org) >= 20.12.0 installed.
44
44
 
45
45
  Run the following command to create a new Slidev project locally:
46
46
 
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.2",
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.2",
39
+ "@slidev/parser": "52.14.2",
40
+ "@slidev/types": "52.14.2"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "vitepress",
@@ -12,11 +12,11 @@ Browse awesome addons available for Slidev here.
12
12
 
13
13
  Read more about <LinkInline link="guide/theme-addon#use-addon" /> to use them, and <LinkInline link="guide/write-addon" /> to create your own addon.
14
14
 
15
- ## Official Addons
15
+ <!-- ## Official Addons
16
16
 
17
17
  <ClientOnly>
18
18
  <AddonGallery collection="official"/>
19
- </ClientOnly>
19
+ </ClientOnly> -->
20
20
 
21
21
  ## Community Addons
22
22