@slidev/docs 52.13.0 → 52.14.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/custom/config-code-runners.md +1 -2
- package/custom/config-context-menu.md +0 -2
- package/custom/config-highlighter.md +0 -2
- package/custom/config-vite.md +1 -2
- package/custom/config-vue.md +1 -2
- package/features/code-groups.md +1 -1
- package/features/comark.md +31 -0
- package/guide/animations.md +2 -2
- package/guide/syntax.md +3 -3
- package/package.json +14 -14
- package/features/mdc.md +0 -31
|
@@ -8,9 +8,8 @@ By default, JavaScript, TypeScript runners are supported built-in. They run in t
|
|
|
8
8
|
|
|
9
9
|
Create `./setup/code-runners.ts` with the following content:
|
|
10
10
|
|
|
11
|
-
<!-- eslint-disable import/first -->
|
|
12
|
-
|
|
13
11
|
```ts twoslash [setup/code-runners.ts]
|
|
12
|
+
/* eslint-disable import/first */
|
|
14
13
|
declare const executePythonCodeRemotely: (code: string) => Promise<string>
|
|
15
14
|
declare const sanitizeHtml: (html: string) => string
|
|
16
15
|
// ---cut---
|
|
@@ -26,8 +26,6 @@ export default defineShikiSetup(() => {
|
|
|
26
26
|
|
|
27
27
|
If you want to add custom theme or language (TextMate grammar/themes in JSON), you can import them in the setup file:
|
|
28
28
|
|
|
29
|
-
<!-- eslint-disable import/first-->
|
|
30
|
-
|
|
31
29
|
```ts twoslash [setup/shiki.ts]
|
|
32
30
|
import { defineShikiSetup } from '@slidev/types'
|
|
33
31
|
// ---cut-start---
|
package/custom/config-vite.md
CHANGED
|
@@ -19,9 +19,8 @@ Slidev internally adds the following plugins to Vite:
|
|
|
19
19
|
|
|
20
20
|
To configure the built-in plugins listed above, create a `vite.config.ts` with the following content. Please note that Slidev has some [default configurations](https://github.com/slidevjs/slidev/blob/main/packages/slidev/node/vite/index.ts) for those plugins, this usage will override some of them, which may potentially cause the app to break. Please treat this as **an advanced feature**, and make sure you know what you are doing before moving on.
|
|
21
21
|
|
|
22
|
-
<!-- eslint-disable import/first -->
|
|
23
|
-
|
|
24
22
|
```ts twoslash [vite.config.ts]
|
|
23
|
+
/* eslint-disable import/first */
|
|
25
24
|
/// <reference types="@slidev/types" />
|
|
26
25
|
import type MarkdownExit from 'markdown-exit'
|
|
27
26
|
|
package/custom/config-vue.md
CHANGED
|
@@ -6,9 +6,8 @@ Slidev uses [Vue 3](https://v3.vuejs.org/) to render the application on the clie
|
|
|
6
6
|
|
|
7
7
|
Create `./setup/main.ts` with the following content:
|
|
8
8
|
|
|
9
|
-
<!-- eslint-disable import/first -->
|
|
10
|
-
|
|
11
9
|
```ts twoslash [setup/main.ts]
|
|
10
|
+
/* eslint-disable import/first */
|
|
12
11
|
import type { Plugin } from 'vue'
|
|
13
12
|
|
|
14
13
|
declare const YourPlugin: Plugin
|
package/features/code-groups.md
CHANGED
|
@@ -9,7 +9,7 @@ description: |
|
|
|
9
9
|
# Code Groups
|
|
10
10
|
|
|
11
11
|
> [!NOTE]
|
|
12
|
-
> This feature requires [
|
|
12
|
+
> This feature requires [Comark Syntax](/features/comark#comark-syntax). Enable `comark: true` to use it.
|
|
13
13
|
|
|
14
14
|
You can group multiple code blocks like this:
|
|
15
15
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
relates:
|
|
3
|
+
- Comark Syntax: https://comark.dev/syntax/markdown
|
|
4
|
+
- '@comark/markdown-it': https://github.com/comarkdown/comark
|
|
5
|
+
since: v0.43.0
|
|
6
|
+
tags: [syntax, styling]
|
|
7
|
+
description: |
|
|
8
|
+
A powerful syntax to enhance your markdown content with components and styles.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Comark Syntax
|
|
12
|
+
|
|
13
|
+
Slidev supports optional [Comark Syntax](https://comark.dev/syntax/markdown) (formerly known as MDC, Markdown Components) powered by [`@comark/markdown-it`](https://github.com/comarkdown/comark).
|
|
14
|
+
|
|
15
|
+
You can enable it by adding `comark: true` to the frontmatter of your markdown file.
|
|
16
|
+
|
|
17
|
+
```mdc
|
|
18
|
+
---
|
|
19
|
+
comark: true
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
This is a [red text]{style="color:red"} :inline-component{prop="value"}
|
|
23
|
+
|
|
24
|
+
{width=500px lazy}
|
|
25
|
+
|
|
26
|
+
::block-component{prop="value"}
|
|
27
|
+
The **default** slot
|
|
28
|
+
::
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Learn more about [Comark Syntax](https://comark.dev/syntax/markdown).
|
package/guide/animations.md
CHANGED
|
@@ -389,12 +389,12 @@ Experimental: This is not supported by all browsers. Check the [Browser compatib
|
|
|
389
389
|
|
|
390
390
|
You can use the `view-transition-name` CSS property to name view transitions, which creates connections between different page elements and smooth transitions when switching slides.
|
|
391
391
|
|
|
392
|
-
You can enable [
|
|
392
|
+
You can enable [Comark Syntax](/guide/syntax#comark-syntax) support to conveniently name view-transitions:
|
|
393
393
|
|
|
394
394
|
```md
|
|
395
395
|
---
|
|
396
396
|
transition: view-transition
|
|
397
|
-
|
|
397
|
+
comark: true
|
|
398
398
|
---
|
|
399
399
|
|
|
400
400
|
# View Transition {.inline-block.view-transition-title}
|
package/guide/syntax.md
CHANGED
|
@@ -163,11 +163,11 @@ Slidev supports [Mermaid](https://mermaid.js.org/) and [PlantUML](https://plantu
|
|
|
163
163
|
<LinkCard link="features/mermaid" />
|
|
164
164
|
<LinkCard link="features/plantuml" />
|
|
165
165
|
|
|
166
|
-
##
|
|
166
|
+
## Comark Syntax {#comark-syntax}
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
Comark Syntax is the easiest way to apply styles and classes to elements:
|
|
169
169
|
|
|
170
|
-
<LinkCard link="features/
|
|
170
|
+
<LinkCard link="features/comark" />
|
|
171
171
|
|
|
172
172
|
## Scoped CSS {#scoped-css}
|
|
173
173
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "52.
|
|
4
|
+
"version": "52.14.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"funding": "https://github.com/sponsors/antfu",
|
|
7
7
|
"homepage": "https://sli.dev",
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@antfu/utils": "^9.3.0",
|
|
20
|
-
"@iconify/json": "^2.2.
|
|
21
|
-
"@shikijs/vitepress-twoslash": "^
|
|
22
|
-
"@types/node": "^25.
|
|
23
|
-
"@unocss/reset": "^66.6.
|
|
24
|
-
"@vueuse/core": "^14.1
|
|
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",
|
|
24
|
+
"@vueuse/core": "^14.2.1",
|
|
25
25
|
"fast-glob": "^3.3.3",
|
|
26
26
|
"gray-matter": "^4.0.3",
|
|
27
|
-
"shiki": "^
|
|
27
|
+
"shiki": "^4.0.0",
|
|
28
28
|
"typeit": "8.1.0",
|
|
29
29
|
"typescript": "^5.9.3",
|
|
30
|
-
"unocss": "^66.6.
|
|
30
|
+
"unocss": "^66.6.2",
|
|
31
31
|
"unplugin-icons": "^23.0.1",
|
|
32
32
|
"unplugin-vue-components": "^31.0.0",
|
|
33
33
|
"vite-plugin-inspect": "^11.3.3",
|
|
34
|
-
"vitepress": "^2.0.0-alpha.
|
|
34
|
+
"vitepress": "^2.0.0-alpha.16",
|
|
35
35
|
"vitepress-plugin-group-icons": "^1.7.1",
|
|
36
|
-
"vitepress-plugin-llms": "^1.
|
|
37
|
-
"vue": "^3.5.
|
|
38
|
-
"@slidev/
|
|
39
|
-
"@slidev/
|
|
40
|
-
"@slidev/types": "52.
|
|
36
|
+
"vitepress-plugin-llms": "^1.11.0",
|
|
37
|
+
"vue": "^3.5.29",
|
|
38
|
+
"@slidev/parser": "52.14.0",
|
|
39
|
+
"@slidev/client": "52.14.0",
|
|
40
|
+
"@slidev/types": "52.14.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "vitepress",
|
package/features/mdc.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
relates:
|
|
3
|
-
- Nuxt's MDC Syntax: https://content.nuxt.com/docs/files/markdown#mdc-syntax
|
|
4
|
-
- markdown-it-mdc: https://github.com/antfu/markdown-it-mdc
|
|
5
|
-
since: v0.43.0
|
|
6
|
-
tags: [syntax, styling]
|
|
7
|
-
description: |
|
|
8
|
-
A powerful syntax to enhance your markdown content with components and styles.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# MDC Syntax
|
|
12
|
-
|
|
13
|
-
Slidev supports optional [MDC (Markdown Components) Syntax](https://content.nuxt.com/docs/files/markdown#mdc-syntax) powered by [`markdown-it-mdc`](https://github.com/antfu/markdown-it-mdc).
|
|
14
|
-
|
|
15
|
-
You can enable it by adding `mdc: true` to the frontmatter of your markdown file.
|
|
16
|
-
|
|
17
|
-
```mdc
|
|
18
|
-
---
|
|
19
|
-
mdc: true
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
This is a [red text]{style="color:red"} :inline-component{prop="value"}
|
|
23
|
-
|
|
24
|
-
{width=500px lazy}
|
|
25
|
-
|
|
26
|
-
::block-component{prop="value"}
|
|
27
|
-
The **default** slot
|
|
28
|
-
::
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Learn more about [MDC Syntax](https://content.nuxt.com/docs/files/markdown#mdc-syntax).
|