@slidev/client 51.8.0 → 51.8.1
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.
|
@@ -9,6 +9,7 @@ import { useNav } from '../composables/useNav'
|
|
|
9
9
|
import { CLICKS_MAX } from '../constants'
|
|
10
10
|
import { useSlideContext } from '../context'
|
|
11
11
|
import { configs } from '../env'
|
|
12
|
+
import TitleIcon from '../internals/TitleIcon.vue'
|
|
12
13
|
import { makeId, updateCodeHighlightRange } from '../logic/utils'
|
|
13
14
|
|
|
14
15
|
const props = defineProps({
|
|
@@ -28,6 +29,10 @@ const props = defineProps({
|
|
|
28
29
|
type: Boolean,
|
|
29
30
|
default: configs.lineNumbers,
|
|
30
31
|
},
|
|
32
|
+
title: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
31
36
|
})
|
|
32
37
|
|
|
33
38
|
const steps = JSON.parse(lz.decompressFromBase64(props.stepsLz)) as KeyedTokensInfo[]
|
|
@@ -112,6 +117,12 @@ onMounted(() => {
|
|
|
112
117
|
|
|
113
118
|
<template>
|
|
114
119
|
<div ref="container" class="slidev-code-wrapper slidev-code-magic-move relative">
|
|
120
|
+
<div v-if="title" class="slidev-code-block-title">
|
|
121
|
+
<TitleIcon :title="title" />
|
|
122
|
+
<div class="leading-1em">
|
|
123
|
+
{{ title.replace(/~([^~]+)~/g, '').trim() }}
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
115
126
|
<ShikiMagicMovePrecompiled
|
|
116
127
|
class="slidev-code relative shiki overflow-visible"
|
|
117
128
|
:steps="steps"
|
package/composables/useClicks.ts
CHANGED
|
@@ -15,6 +15,10 @@ export function normalizeSingleAtValue(at: RawSingleAtValue): NormalizedSingleCl
|
|
|
15
15
|
console.error(`Invalid "at" prop value: ${at}`)
|
|
16
16
|
return null
|
|
17
17
|
}
|
|
18
|
+
if (v <= 0) {
|
|
19
|
+
console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${at}, has been set to 1`)
|
|
20
|
+
return 1
|
|
21
|
+
}
|
|
18
22
|
return v
|
|
19
23
|
}
|
|
20
24
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "51.8.
|
|
4
|
+
"version": "51.8.1",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@slidev/rough-notation": "^0.1.0",
|
|
39
39
|
"@typescript/ata": "^0.9.8",
|
|
40
40
|
"@unhead/vue": "^2.0.10",
|
|
41
|
-
"@unocss/reset": "^66.1.
|
|
42
|
-
"@vueuse/core": "^13.
|
|
43
|
-
"@vueuse/math": "^13.
|
|
41
|
+
"@unocss/reset": "^66.1.3",
|
|
42
|
+
"@vueuse/core": "^13.3.0",
|
|
43
|
+
"@vueuse/math": "^13.3.0",
|
|
44
44
|
"@vueuse/motion": "^3.0.3",
|
|
45
45
|
"drauu": "^0.4.3",
|
|
46
46
|
"file-saver": "^2.0.5",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"shiki": "^3.4.2",
|
|
58
58
|
"shiki-magic-move": "^1.1.0",
|
|
59
59
|
"typescript": "^5.8.3",
|
|
60
|
-
"unocss": "^66.1.
|
|
61
|
-
"vue": "^3.5.
|
|
60
|
+
"unocss": "^66.1.3",
|
|
61
|
+
"vue": "^3.5.16",
|
|
62
62
|
"vue-router": "^4.5.1",
|
|
63
63
|
"yaml": "^2.8.0",
|
|
64
|
-
"@slidev/parser": "51.8.
|
|
65
|
-
"@slidev/types": "51.8.
|
|
64
|
+
"@slidev/parser": "51.8.1",
|
|
65
|
+
"@slidev/types": "51.8.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"vite": "^6.3.5"
|