create-slidev 0.48.0-beta.2 → 0.48.0-beta.20
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/package.json +1 -1
- package/template/package.json +2 -2
- package/template/slides.md +118 -2
package/package.json
CHANGED
package/template/package.json
CHANGED
package/template/slides.md
CHANGED
|
@@ -16,6 +16,8 @@ defaults:
|
|
|
16
16
|
transition: slide-left
|
|
17
17
|
title: Welcome to Slidev
|
|
18
18
|
mdc: true
|
|
19
|
+
monaco: true
|
|
20
|
+
monacoTypesSource: local # or cdn or none
|
|
19
21
|
---
|
|
20
22
|
|
|
21
23
|
# Welcome to Slidev
|
|
@@ -166,6 +168,71 @@ doubled.value = 2
|
|
|
166
168
|
}
|
|
167
169
|
</style>
|
|
168
170
|
|
|
171
|
+
<!--
|
|
172
|
+
Notes can also sync with clicks
|
|
173
|
+
|
|
174
|
+
[click] This will be highlighted after the first click
|
|
175
|
+
|
|
176
|
+
[click] Highlighted with `count = ref(0)`
|
|
177
|
+
|
|
178
|
+
[click:3] Last click (skip two clicks)
|
|
179
|
+
-->
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
level: 2
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
# Shiki Magic Move
|
|
186
|
+
|
|
187
|
+
(this feature is still experimental)
|
|
188
|
+
|
|
189
|
+
Powered by [shiki-magic-move](https://shiki-magic-move.netlify.app/), Slidev supports animations across multiple code snippets.
|
|
190
|
+
|
|
191
|
+
Add multiple code blocks and wrap them with <code>````md magic-move</code> (four backticks) to enable the magic move. For example:
|
|
192
|
+
|
|
193
|
+
````md magic-move
|
|
194
|
+
```ts
|
|
195
|
+
const author = reactive({
|
|
196
|
+
name: 'John Doe',
|
|
197
|
+
books: [
|
|
198
|
+
'Vue 2 - Advanced Guide',
|
|
199
|
+
'Vue 3 - Basic Guide',
|
|
200
|
+
'Vue 4 - The Mystery'
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
```
|
|
204
|
+
```ts
|
|
205
|
+
export default {
|
|
206
|
+
data() {
|
|
207
|
+
return {
|
|
208
|
+
author: {
|
|
209
|
+
name: 'John Doe',
|
|
210
|
+
books: [
|
|
211
|
+
'Vue 2 - Advanced Guide',
|
|
212
|
+
'Vue 3 - Basic Guide',
|
|
213
|
+
'Vue 4 - The Mystery'
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
```ts
|
|
221
|
+
export default {
|
|
222
|
+
data: () => ({
|
|
223
|
+
author: {
|
|
224
|
+
name: 'John Doe',
|
|
225
|
+
books: [
|
|
226
|
+
'Vue 2 - Advanced Guide',
|
|
227
|
+
'Vue 3 - Basic Guide',
|
|
228
|
+
'Vue 4 - The Mystery'
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
````
|
|
235
|
+
|
|
169
236
|
---
|
|
170
237
|
|
|
171
238
|
# Components
|
|
@@ -239,13 +306,50 @@ theme: seriph
|
|
|
239
306
|
Read more about [How to use a theme](https://sli.dev/themes/use.html) and
|
|
240
307
|
check out the [Awesome Themes Gallery](https://sli.dev/themes/gallery.html).
|
|
241
308
|
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
# Clicks Animations
|
|
312
|
+
|
|
313
|
+
You can add `v-click` to elements to add a click animation.
|
|
314
|
+
|
|
315
|
+
<div v-click>
|
|
316
|
+
|
|
317
|
+
This shows up when you click the slide:
|
|
318
|
+
|
|
319
|
+
```html
|
|
320
|
+
<div v-click>This shows up when you click the slide.</div>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
<br>
|
|
326
|
+
|
|
327
|
+
<v-click>
|
|
328
|
+
|
|
329
|
+
The <span v-mark.red="3"><code>v-mark</code> directive</span>
|
|
330
|
+
also allows you to add
|
|
331
|
+
<span v-mark.circle.orange="4">inline marks</span>
|
|
332
|
+
, powered by [Rough Notation](https://roughnotation.com/):
|
|
333
|
+
|
|
334
|
+
```html
|
|
335
|
+
<span v-mark.underline.orange>inline markers</span>
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
</v-click>
|
|
339
|
+
|
|
340
|
+
<div mt-20 v-click>
|
|
341
|
+
|
|
342
|
+
[Learn More](https://sli.dev/guide/animations#click-animations)
|
|
343
|
+
|
|
344
|
+
</div>
|
|
345
|
+
|
|
242
346
|
---
|
|
243
347
|
preload: false
|
|
244
348
|
---
|
|
245
349
|
|
|
246
|
-
#
|
|
350
|
+
# Motions
|
|
247
351
|
|
|
248
|
-
|
|
352
|
+
Motion animations are powered by [@vueuse/motion](https://motion.vueuse.org/), triggered by `v-motion` directive.
|
|
249
353
|
|
|
250
354
|
```html
|
|
251
355
|
<div
|
|
@@ -429,6 +533,18 @@ src: ./pages/multiple-entries.md
|
|
|
429
533
|
hide: false
|
|
430
534
|
---
|
|
431
535
|
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
# Monaco Editor
|
|
539
|
+
|
|
540
|
+
```ts {monaco}
|
|
541
|
+
import { ref } from 'vue'
|
|
542
|
+
import hello from './external'
|
|
543
|
+
|
|
544
|
+
const code = ref('const a = 1')
|
|
545
|
+
hello()
|
|
546
|
+
```
|
|
547
|
+
|
|
432
548
|
---
|
|
433
549
|
layout: center
|
|
434
550
|
class: text-center
|