create-slidev 0.48.0-beta.2 → 0.48.0-beta.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-slidev",
3
3
  "type": "module",
4
- "version": "0.48.0-beta.2",
4
+ "version": "0.48.0-beta.21",
5
5
  "description": "Create starter template for Slidev",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -8,9 +8,9 @@
8
8
  "export": "slidev export"
9
9
  },
10
10
  "dependencies": {
11
- "@slidev/cli": "^0.48.0-beta.2",
11
+ "@slidev/cli": "^0.48.0-beta.21",
12
12
  "@slidev/theme-default": "latest",
13
13
  "@slidev/theme-seriph": "latest",
14
- "vue": "^3.4.19"
14
+ "vue": "^3.4.21"
15
15
  }
16
16
  }
@@ -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,73 @@ 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
+
205
+ ```ts
206
+ export default {
207
+ data() {
208
+ return {
209
+ author: {
210
+ name: 'John Doe',
211
+ books: [
212
+ 'Vue 2 - Advanced Guide',
213
+ 'Vue 3 - Basic Guide',
214
+ 'Vue 4 - The Mystery'
215
+ ]
216
+ }
217
+ }
218
+ }
219
+ }
220
+ ```
221
+
222
+ ```ts
223
+ export default {
224
+ data: () => ({
225
+ author: {
226
+ name: 'John Doe',
227
+ books: [
228
+ 'Vue 2 - Advanced Guide',
229
+ 'Vue 3 - Basic Guide',
230
+ 'Vue 4 - The Mystery'
231
+ ]
232
+ }
233
+ })
234
+ }
235
+ ```
236
+ ````
237
+
169
238
  ---
170
239
 
171
240
  # Components
@@ -239,13 +308,50 @@ theme: seriph
239
308
  Read more about [How to use a theme](https://sli.dev/themes/use.html) and
240
309
  check out the [Awesome Themes Gallery](https://sli.dev/themes/gallery.html).
241
310
 
311
+ ---
312
+
313
+ # Clicks Animations
314
+
315
+ You can add `v-click` to elements to add a click animation.
316
+
317
+ <div v-click>
318
+
319
+ This shows up when you click the slide:
320
+
321
+ ```html
322
+ <div v-click>This shows up when you click the slide.</div>
323
+ ```
324
+
325
+ </div>
326
+
327
+ <br>
328
+
329
+ <v-click>
330
+
331
+ The <span v-mark.red="3"><code>v-mark</code> directive</span>
332
+ also allows you to add
333
+ <span v-mark.circle.orange="4">inline marks</span>
334
+ , powered by [Rough Notation](https://roughnotation.com/):
335
+
336
+ ```html
337
+ <span v-mark.underline.orange>inline markers</span>
338
+ ```
339
+
340
+ </v-click>
341
+
342
+ <div mt-20 v-click>
343
+
344
+ [Learn More](https://sli.dev/guide/animations#click-animations)
345
+
346
+ </div>
347
+
242
348
  ---
243
349
  preload: false
244
350
  ---
245
351
 
246
- # Animations
352
+ # Motions
247
353
 
248
- Animations are powered by [@vueuse/motion](https://motion.vueuse.org/).
354
+ Motion animations are powered by [@vueuse/motion](https://motion.vueuse.org/), triggered by `v-motion` directive.
249
355
 
250
356
  ```html
251
357
  <div
@@ -429,6 +535,18 @@ src: ./pages/multiple-entries.md
429
535
  hide: false
430
536
  ---
431
537
 
538
+ ---
539
+
540
+ # Monaco Editor
541
+
542
+ ```ts {monaco}
543
+ import { ref } from 'vue'
544
+ import hello from './external'
545
+
546
+ const code = ref('const a = 1')
547
+ hello()
548
+ ```
549
+
432
550
  ---
433
551
  layout: center
434
552
  class: text-center