You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Όταν χρησιμοποιείτε TypeScript με το Monaco, οι τύποι εξαρτήσεων θα εγκατασταθούν αυτόματα στο client-side.
58
62
@@ -65,10 +69,39 @@ const counter = ref(0)
65
69
```
66
70
~~~
67
71
72
+
<<<<<<< HEAD
68
73
Στο παραπάνω παράδειγμα, βεβαιωθείτε ότι τα `vue` και `@vueuse/core` είναι εγκατεστημένα τοπικά ως dependencies / devDependencies, το Slidev θα αναλάβει τα υπόλοιπα, ώστε οι τύποι να λειτουργούν αυτόματα για τον συντάκτη!
74
+
=======
75
+
In the example above, make sure `vue` and `@vueuse/core` are installed locally as dependencies / devDependencies, Slidev will handle the rest to get the types working for the editor automatically. When deploy as SPA, those types will also be bundled for static hosting.
76
+
77
+
### Additional Types
78
+
79
+
Slidev will scan all the monaco codeblocks in your slides and import the types for those used libraries for you. In case it missed some, you can explicitly specify extra packages to import the types for:
80
+
81
+
```md
82
+
---
83
+
monacoTypesAdditionalPackages:
84
+
- lodash-es
85
+
- foo
86
+
---
87
+
```
88
+
89
+
### Auto Type Acquisition
90
+
91
+
You can optionally switch to load types from CDN by setting the following headmatter:
92
+
93
+
```md
94
+
---
95
+
monacoTypesSource: ata
96
+
---
97
+
```
98
+
99
+
This feature is powered by [`@typescript/ata`](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/ata) and runs completely on the client-side.
100
+
>>>>>>> 4ee072e055e04965fad621e5941c6905ef2a2be0
69
101
70
102
## Ρύθμιση Θεμάτων
71
103
104
+
<<<<<<< HEAD
72
105
Το θέμα ελέγχεται από το Slidev με βάση το φωτεινό/σκοτεινό θέμα. Αν θέλετε να το προσαρμόσετε, μπορείτε να περάσετε το id του θέματος στη συνάρτηση setup:
> Εάν δημιουργείτε ένα θέμα για το Slidev, χρησιμοποιήστε δυναμικά `import()` μέσα στη συνάρτηση setup για να έχετε καλύτερα αποτελέσματα σε tree-shaking και code-splitting.
144
+
=======
145
+
Since v0.48.0, Monaco will reuse the Shiki theme you configured in [Shiki's setup file](/custom/highlighters#configure-shiki), powered by [`@shikijs/monaco`](https://shiki.style/packages/monaco). You don't need to worry about it anymore and it will have a consistent style with the rest of your code blocks.
Since v0.48.0, Monaco editor is enabled by default and only be bundled when you use it. If you want to disable it, you can set `monaco` to `false` in the frontmatter of your slide:
178
+
179
+
```yaml
180
+
---
181
+
monaco: false # can also be `dev` or `build` tp conditionally enable it
Copy file name to clipboardExpand all lines: guide/animations.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ clicks: 10
239
239
Για παράδειγμα, μπορείτε να επιτύχετε τις μεταβάσεις κλιμάκωσης προς τα πάνω με:
240
240
241
241
```css
242
-
// styles.css
242
+
/* styles.css*/
243
243
244
244
.slidev-vclick-target {
245
245
transition: all500msease;
@@ -267,7 +267,47 @@ clicks: 10
267
267
268
268
Μάθετε περισσότερα για την [προσαρμογή των styles](/custom/directory-structure#style).
269
269
270
+
<<<<<<< HEAD
270
271
## Κίνηση
272
+
=======
273
+
## Rough Markers
274
+
275
+
> Available since v0.48.0
276
+
277
+
Slidev integrates [Rough Notation](https://github.com/linkstrifer/react-rough-notation) to allow marking or highlighting elements in your slides.
278
+
279
+
### `v-mark`
280
+
281
+
Rough Notation integrates comes with the `v-mark` directive.
282
+
283
+
#### Type
284
+
285
+
`v-mark.underline` for Underline mark, `v-mark.circle` for Circle mark, etc. Default to `underline`
286
+
287
+
#### Color
288
+
289
+
`v-mark.red` make the notation `red`. Supported builtin color themes from UnoCSS. For custom colors, use object syntax `v-mark="{ color: '#234' }"`
290
+
291
+
#### Clicks
292
+
293
+
`v-mark` works like `v-click` and will trigger after a click. Same as `v-click`, it allows you to pass a custom click value, like `v-mark="5"` or `v-mark="'+1'"`.
294
+
295
+
#### Options
296
+
297
+
Optionally you can pass an object to `v-mark` to specify the options, for example:
Το Slidev έχει ενσωματωμένο το [@vueuse/motion](https://motion.vueuse.org/). Μπορείτε να χρησιμοποιήσετε την οδηγία `v-motion` σε οποιαδήποτε στοιχεία για να εφαρμόσετε κίνηση σε αυτά. Για παράδειγμα
Copy file name to clipboardExpand all lines: guide/syntax.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,10 +124,14 @@ function add(
124
124
```
125
125
~~~
126
126
127
+
<<<<<<< HEAD
127
128
Μπορείτε να ενεργοποιήσετε τον αριθμό γραμμής σε όλες τις διαφάνειες θέτοντας τη ρύθμιση `lineNumbers: true` στο config ή να το ενεργοποιήσετε σε κάθε μπλοκ κώδικα ξεχωριστά θέτοντας τη ρύθμιση `lines:true`. Μπορείτε επίσης να ορίσετε τη γραμμή έναρξης για κάθε code block και να επισημάνετε τις γραμμές ανάλογα, με προεπιλογή 1:
129
+
=======
130
+
You can enable line number to all slides by setting `lineNumbers: true` on the config or enable each code block individually by setting `lines: true`. You can also set the starting line for each code block and highlight the lines accordingly, defaults to 1:
131
+
>>>>>>> 4ee072e055e04965fad621e5941c6905ef2a2be0
128
132
129
133
~~~md
130
-
```ts {6,7}{lines:true,startLine:5}
134
+
```ts {6,7}{lines:true,startLine:5}
131
135
function add(
132
136
a: Ref<number> | number,
133
137
b: Ref<number> | number
@@ -219,12 +223,17 @@ const count = ref(0)
219
223
220
224
> Διαθέσιμο από v0.48
221
225
226
+
<<<<<<< HEAD
222
227
Το Shiki Magic Move σας επιτρέπει να έχετε λεπτομερή μετάβαση μεταξύ των αλλαγών κώδικα όπως το Magic Move του Keynote. Μπορείτε να παρακολουθήσετε [αυτό το demo](https://shiki-magic-move.netlify.app/) για να δείτε πώς λειτουργεί.
228
+
=======
229
+
[Shiki Magic Move](https://github.com/shikijs/shiki-magic-move) enables you to have granular transition between code changes, similar to Keynote's Magic Move. You can check [the playground](https://shiki-magic-move.netlify.app/) to see how it works.
230
+
>>>>>>> 4ee072e055e04965fad621e5941c6905ef2a2be0
223
231
224
232
Στο Slidev, το συνδέουμε με το [σύστημα clicks](/guide/animations#κινησεις-click). Η σύνταξη είναι να τυλίξετε πολλαπλά μπλοκ κώδικα που αντιπροσωπεύουν κάθε βήμα με <code>````md magic-move</code> (προσέξτε ότι είναι **4** backticks), αυτό θα μετατραπεί σε ένα μπλοκ κώδικα, που μεταμορφώνεται σε κάθε βήμα καθώς κάνετε click.
225
233
226
234
~~~~md
227
235
````md magic-move
236
+
<<<<<<< HEAD
228
237
```ts
229
238
console.log(`Βήμα ${1}`)
230
239
```
@@ -233,6 +242,36 @@ console.log(`Βήμα ${1 + 1}`)
233
242
```
234
243
```ts
235
244
console.log(`Βήμα ${3}`)
245
+
=======
246
+
```js
247
+
console.log(`Step ${1}`)
248
+
```
249
+
```js
250
+
console.log(`Step ${1 + 1}`)
251
+
```
252
+
```ts
253
+
console.log(`Step ${3}` as string)
254
+
```
255
+
````
256
+
~~~~
257
+
258
+
It's also possible mix Magic Move with [line highlighting](#line-highlighting), for example:
259
+
260
+
~~~~md
261
+
````md magic-move {at:4} // [!code hl]
262
+
```js {*|1|2-5} // [!code hl]
263
+
let count = 1
264
+
function add() {
265
+
count++
266
+
}
267
+
```
268
+
269
+
Non-code blocks in between as ignored, you can put some comments.
0 commit comments