@slidev/client 0.43.0-beta.6 → 0.43.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/constants.ts +1 -0
- package/internals/SlidesOverview.vue +5 -1
- package/package.json +3 -3
package/constants.ts
CHANGED
|
@@ -13,6 +13,7 @@ export const injectionSlidevContext: InjectionKey<UnwrapNestedRefs<SlidevContext
|
|
|
13
13
|
export const injectionRoute: InjectionKey<RouteRecordRaw> = Symbol('slidev-route')
|
|
14
14
|
export const injectionSlideContext: InjectionKey<RenderContext> = Symbol('slidev-slide-context')
|
|
15
15
|
export const injectionActive: InjectionKey<Ref<boolean>> = Symbol('slidev-active')
|
|
16
|
+
export const injectionFrontmatter: InjectionKey<Record<string, any>> = Symbol('slidev-fontmatter')
|
|
16
17
|
|
|
17
18
|
export const CLASS_VCLICK_TARGET = 'slidev-vclick-target'
|
|
18
19
|
export const CLASS_VCLICK_HIDDEN = 'slidev-vclick-hidden'
|
|
@@ -76,6 +76,10 @@ useEventListener('keypress', (e) => {
|
|
|
76
76
|
return
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
const extactMatch = rawRoutes.findIndex(i => i.path === keyboardBuffer.value)
|
|
80
|
+
if (extactMatch !== -1)
|
|
81
|
+
currentOverviewPage.value = extactMatch + 1
|
|
82
|
+
|
|
79
83
|
// When the input number is the largest at the number of digits, we go to that page directly.
|
|
80
84
|
if (+keyboardBuffer.value * 10 > rawRoutes.length) {
|
|
81
85
|
go(+keyboardBuffer.value)
|
|
@@ -115,7 +119,7 @@ watchEffect(() => {
|
|
|
115
119
|
>
|
|
116
120
|
<div
|
|
117
121
|
class="inline-block border rounded border-opacity-50 overflow-hidden bg-main hover:border-$slidev-theme-primary transition"
|
|
118
|
-
:class="
|
|
122
|
+
:class="(focus(idx + 1) || currentOverviewPage === idx + 1) ? 'border-$slidev-theme-primary' : 'border-gray-400'"
|
|
119
123
|
:style="themeVars"
|
|
120
124
|
@click="go(+route.path)"
|
|
121
125
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.43.0
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"vue-router": "^4.2.4",
|
|
42
42
|
"vue-starport": "^0.3.0",
|
|
43
43
|
"windicss": "^3.5.6",
|
|
44
|
-
"@slidev/parser": "0.43.0
|
|
45
|
-
"@slidev/types": "0.43.0
|
|
44
|
+
"@slidev/parser": "0.43.0",
|
|
45
|
+
"@slidev/types": "0.43.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"vite": "^4.4.9"
|