create-slidev 0.46.3 → 0.47.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-slidev",
3
3
  "type": "module",
4
- "version": "0.46.3",
4
+ "version": "0.47.0",
5
5
  "description": "Create starter template for Slidev",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "export": "slidev export"
9
9
  },
10
10
  "dependencies": {
11
- "@slidev/cli": "^0.46.3",
11
+ "@slidev/cli": "^0.47.0",
12
12
  "@slidev/theme-default": "latest",
13
13
  "@slidev/theme-seriph": "latest"
14
14
  }
@@ -2,7 +2,7 @@
2
2
  theme: seriph
3
3
  background: https://source.unsplash.com/collection/94734566/1920x1080
4
4
  class: text-center
5
- highlighter: shikiji
5
+ highlighter: shiki
6
6
  lineNumbers: false
7
7
  info: |
8
8
  ## Slidev Starter Template
@@ -11,6 +11,8 @@ info: |
11
11
  Learn more at [Sli.dev](https://sli.dev)
12
12
  drawings:
13
13
  persist: false
14
+ defaults:
15
+ foo: true
14
16
  transition: slide-left
15
17
  title: Welcome to Slidev
16
18
  mdc: true
@@ -130,38 +132,31 @@ image: https://source.unsplash.com/collection/94734566/1920x1080
130
132
 
131
133
  Use code snippets and get the highlighting directly, and even types hover![^1]
132
134
 
133
- ```ts {all|5|1-6|9|all} twoslash
134
- // TwoSlash enables TypeScript hover information and errors in markdown code blocks
135
- // Learn more at https://www.typescriptlang.org/dev/twoslash/
136
- function getUser(id: number): User {
137
- return undefined as any
138
- }
139
- function saveUser(id: number, user: User) {
140
- // ...
141
- }
142
- // ---cut---
143
- interface User {
144
- id: number
145
- firstName: string
146
- lastName: string
147
- role: string
148
- // ^?
149
- }
135
+ ```ts {all|5|7|7-8|10|all} twoslash
136
+ // TwoSlash enables TypeScript hover information
137
+ // and errors in markdown code blocks
138
+ // More at https://shiki.style/packages/twoslash
150
139
 
151
- function updateUser(id: number, update: User) {
152
- const user = getUser(id)
153
- const newUser = { ...user, ...update }
154
- saveUser(id, newUser)
155
- }
140
+ import { computed, ref } from 'vue'
141
+
142
+ const count = ref(0)
143
+ const doubled = computed(() => count.value * 2)
144
+
145
+ doubled.value = 2
156
146
  ```
157
147
 
158
- <arrow v-click="[3, 4]" x1="400" y1="420" x2="230" y2="330" color="#564" width="3" arrowSize="1" />
148
+ <arrow v-click="[4, 5]" x1="350" y1="310" x2="195" y2="334" color="#953" width="2" arrowSize="1" />
149
+
150
+ <!-- This allow you to embed external code blocks -->
151
+ <<< @/snippets/external.ts#snippet
159
152
 
153
+ <!-- Footer -->
160
154
  [^1]: [Learn More](https://sli.dev/guide/syntax.html#line-highlighting)
161
155
 
156
+ <!-- Inline style -->
162
157
  <style>
163
158
  .footnotes-sep {
164
- @apply mt-20 opacity-10;
159
+ @apply mt-5 opacity-10;
165
160
  }
166
161
  .footnotes {
167
162
  @apply text-sm opacity-75;