@slidev/client 0.45.0 → 0.46.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.
- package/README.md +0 -1
- package/builtin/CodeBlockWrapper.vue +1 -1
- package/layouts/image-left.vue +1 -1
- package/layouts/image-right.vue +1 -1
- package/package.json +10 -10
- package/styles/code.css +43 -10
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ onMounted(() => {
|
|
|
73
73
|
const targets = isDuoTone ? Array.from(el.value.querySelectorAll('.shiki')) : [el.value]
|
|
74
74
|
const startLine = props.startLine
|
|
75
75
|
for (const target of targets) {
|
|
76
|
-
const lines = Array.from(target.querySelectorAll('.line'))
|
|
76
|
+
const lines = Array.from(target.querySelectorAll('code > .line'))
|
|
77
77
|
const highlights: number[] = parseRangeString(lines.length + startLine - 1, rangeStr.value)
|
|
78
78
|
lines.forEach((line, idx) => {
|
|
79
79
|
const highlighted = highlights.includes(idx + startLine)
|
package/layouts/image-left.vue
CHANGED
|
@@ -20,7 +20,7 @@ const style = computed(() => handleBackground(props.image, false, props.backgrou
|
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
22
|
<div class="grid grid-cols-2 w-full h-full auto-rows-fr">
|
|
23
|
-
<div class="w-full
|
|
23
|
+
<div class="w-full h-full" :style="style" />
|
|
24
24
|
<div class="slidev-layout default" :class="props.class">
|
|
25
25
|
<slot />
|
|
26
26
|
</div>
|
package/layouts/image-right.vue
CHANGED
|
@@ -23,6 +23,6 @@ const style = computed(() => handleBackground(props.image, false, props.backgrou
|
|
|
23
23
|
<div class="slidev-layout default" :class="props.class">
|
|
24
24
|
<slot />
|
|
25
25
|
</div>
|
|
26
|
-
<div class="w-full
|
|
26
|
+
<div class="w-full h-full" :style="style" />
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"node": ">=18.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@antfu/utils": "^0.7.
|
|
23
|
-
"@unhead/vue": "^1.8.
|
|
22
|
+
"@antfu/utils": "^0.7.7",
|
|
23
|
+
"@unhead/vue": "^1.8.9",
|
|
24
24
|
"@unocss/reset": "^0.58.0",
|
|
25
|
-
"@vueuse/core": "^10.
|
|
26
|
-
"@vueuse/math": "^10.
|
|
25
|
+
"@vueuse/core": "^10.7.0",
|
|
26
|
+
"@vueuse/math": "^10.7.0",
|
|
27
27
|
"@vueuse/motion": "^2.0.0",
|
|
28
28
|
"codemirror": "^5.65.5",
|
|
29
29
|
"defu": "^6.1.3",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"mermaid": "^10.6.1",
|
|
37
37
|
"monaco-editor": "^0.37.1",
|
|
38
38
|
"nanoid": "^5.0.4",
|
|
39
|
-
"prettier": "^3.1.
|
|
39
|
+
"prettier": "^3.1.1",
|
|
40
40
|
"recordrtc": "^5.6.2",
|
|
41
41
|
"resolve": "^1.22.8",
|
|
42
42
|
"unocss": "^0.58.0",
|
|
43
43
|
"vite-plugin-windicss": "^1.9.2",
|
|
44
|
-
"vue": "^3.3.
|
|
44
|
+
"vue": "^3.3.12",
|
|
45
45
|
"vue-router": "^4.2.5",
|
|
46
46
|
"vue-starport": "^0.4.0",
|
|
47
47
|
"windicss": "^3.5.6",
|
|
48
|
-
"@slidev/parser": "0.
|
|
49
|
-
"@slidev/types": "0.
|
|
48
|
+
"@slidev/parser": "0.46.1",
|
|
49
|
+
"@slidev/types": "0.46.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"vite": "^5.0.
|
|
52
|
+
"vite": "^5.0.10"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/styles/code.css
CHANGED
|
@@ -2,6 +2,7 @@ html.dark:root {
|
|
|
2
2
|
color-scheme: dark;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
/* Shiki */
|
|
5
6
|
html.dark .shiki-light {
|
|
6
7
|
display: none;
|
|
7
8
|
}
|
|
@@ -10,6 +11,45 @@ html:not(.dark) .shiki-dark {
|
|
|
10
11
|
display: none;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
.shiki-container {
|
|
15
|
+
@apply relative flex flex-col;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.shiki-container > .shiki {
|
|
19
|
+
@apply h-full;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Shikiji */
|
|
23
|
+
html.dark .shikiji {
|
|
24
|
+
color: var(--shiki-dark, inherit);
|
|
25
|
+
background: var(--shiki-dark-bg, inherit);
|
|
26
|
+
--twoslash-popup-bg: var(--shiki-dark-bg, inherit);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html.dark .shikiji span {
|
|
30
|
+
color: var(--shiki-dark);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
html:not(.dark) .shikiji {
|
|
34
|
+
color: var(--shiki-light, inherit);
|
|
35
|
+
background: var(--shiki-light-bg, inherit);
|
|
36
|
+
--twoslash-popup-bg: var(--shiki-light-bg, inherit);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
html:not(.dark) .shikiji span {
|
|
40
|
+
color: var(--shiki-light);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.shikiji.twoslash {
|
|
44
|
+
/* Do not set overflow so the hover popover can be displayed */
|
|
45
|
+
overflow: inherit;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.twoslash-meta-line.twoslash-popover-line {
|
|
49
|
+
margin-top: -10px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Slidev */
|
|
13
53
|
.slidev-code-wrapper {
|
|
14
54
|
margin: var(--slidev-code-margin) !important;
|
|
15
55
|
scroll-padding: var(--slidev-code-padding);
|
|
@@ -31,14 +71,7 @@ html:not(.dark) .shiki-dark {
|
|
|
31
71
|
}
|
|
32
72
|
.slidev-code .line.dishonored {
|
|
33
73
|
opacity: 0.3;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.shiki-container {
|
|
37
|
-
@apply relative flex flex-col;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.shiki-container > .shiki {
|
|
41
|
-
@apply h-full;
|
|
74
|
+
pointer-events: none;
|
|
42
75
|
}
|
|
43
76
|
|
|
44
77
|
.slidev-code-line-numbers .slidev-code code {
|
|
@@ -52,12 +85,12 @@ html:not(.dark) .shiki-dark {
|
|
|
52
85
|
@apply w-4 mr-6 inline-block text-right text-gray-400 dark:text-gray-600;
|
|
53
86
|
}
|
|
54
87
|
|
|
55
|
-
/*
|
|
88
|
+
/* Revert CSS reset for KaTex */
|
|
56
89
|
.katex,
|
|
57
90
|
.katex :after,
|
|
58
91
|
.katex :before {
|
|
59
92
|
border-color: currentColor;
|
|
60
93
|
}
|
|
61
94
|
|
|
62
|
-
/*
|
|
95
|
+
/* CodeMirror */
|
|
63
96
|
.CodeMirror pre.CodeMirror-placeholder { opacity: 0.4; }
|