@slidev/client 0.50.0-beta.5 → 0.50.0-beta.6
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/builtin/TocList.vue
CHANGED
|
@@ -11,6 +11,7 @@ import type { TocItem } from '@slidev/types'
|
|
|
11
11
|
import TitleRenderer from '#slidev/title-renderer'
|
|
12
12
|
import { toArray } from '@antfu/utils'
|
|
13
13
|
import { computed } from 'vue'
|
|
14
|
+
import { useNav } from '../composables/useNav'
|
|
14
15
|
|
|
15
16
|
const props = withDefaults(defineProps<{
|
|
16
17
|
level: number
|
|
@@ -20,6 +21,8 @@ const props = withDefaults(defineProps<{
|
|
|
20
21
|
listClass?: string | string[]
|
|
21
22
|
}>(), { level: 1 })
|
|
22
23
|
|
|
24
|
+
const { isPresenter } = useNav()
|
|
25
|
+
|
|
23
26
|
const classes = computed(() => {
|
|
24
27
|
return [
|
|
25
28
|
...toArray(props.listClass || []),
|
|
@@ -47,7 +50,7 @@ const styles = computed(() => {
|
|
|
47
50
|
:key="item.path" class="slidev-toc-item"
|
|
48
51
|
:class="[{ 'slidev-toc-item-active': item.active }, { 'slidev-toc-item-parent-active': item.activeParent }]"
|
|
49
52
|
>
|
|
50
|
-
<Link :to="item.path">
|
|
53
|
+
<Link :to="isPresenter ? `/presenter${item.path}` : item.path">
|
|
51
54
|
<TitleRenderer :no="item.no" />
|
|
52
55
|
</Link>
|
|
53
56
|
<TocList
|
|
@@ -17,7 +17,7 @@ export function useViewTransition() {
|
|
|
17
17
|
const toMeta = getSlide(to.params.no as string)?.meta
|
|
18
18
|
const fromNo = fromMeta?.slide?.no
|
|
19
19
|
const toNo = toMeta?.slide?.no
|
|
20
|
-
const transitionType = fromNo != null && toNo != null
|
|
20
|
+
const transitionType = fromNo != null && toNo != null && fromNo !== toNo
|
|
21
21
|
&& ((fromNo < toNo ? fromMeta?.transition : toMeta?.transition) ?? configs.transition)
|
|
22
22
|
if (transitionType !== 'view-transition') {
|
|
23
23
|
isViewTransition.value = false
|
|
@@ -41,7 +41,6 @@ export function useViewTransition() {
|
|
|
41
41
|
|
|
42
42
|
// Wait for `TransitionGroup` to become normal `div`
|
|
43
43
|
setTimeout(() => {
|
|
44
|
-
// @ts-expect-error missing types
|
|
45
44
|
document.startViewTransition(() => {
|
|
46
45
|
changeRoute()
|
|
47
46
|
return promise
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.50.0-beta.
|
|
4
|
+
"version": "0.50.0-beta.6",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"vue": "^3.5.12",
|
|
60
60
|
"vue-router": "^4.4.5",
|
|
61
61
|
"yaml": "^2.6.0",
|
|
62
|
-
"@slidev/
|
|
63
|
-
"@slidev/
|
|
62
|
+
"@slidev/types": "0.50.0-beta.6",
|
|
63
|
+
"@slidev/parser": "0.50.0-beta.6"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"vite": "^5.4.9"
|