@slidev/client 0.48.4 → 0.48.5

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.
@@ -3,6 +3,7 @@ import { useFetch } from '@vueuse/core'
3
3
  import type { Ref } from 'vue'
4
4
  import { computed, ref, unref } from 'vue'
5
5
  import type { SlideInfo, SlidePatch } from '@slidev/types'
6
+ import { getSlide } from '../logic/slides'
6
7
 
7
8
  export interface UseSlideInfo {
8
9
  info: Ref<SlideInfo | undefined>
@@ -10,9 +11,9 @@ export interface UseSlideInfo {
10
11
  }
11
12
 
12
13
  export function useSlideInfo(no: number): UseSlideInfo {
13
- if (no == null) {
14
+ if (!__SLIDEV_HAS_SERVER__) {
14
15
  return {
15
- info: ref() as Ref<SlideInfo | undefined>,
16
+ info: ref(getSlide(no)?.meta.slide) as Ref<SlideInfo | undefined>,
16
17
  update: async () => {},
17
18
  }
18
19
  }
@@ -92,10 +92,9 @@ function onAfterLeave() {
92
92
  height: 100%;
93
93
  }
94
94
 
95
- #slideshow > div {
95
+ #slideshow > div:not(#twoslash-container) {
96
96
  position: absolute;
97
97
  height: 100%;
98
98
  width: 100%;
99
99
  }
100
100
  </style>
101
- ../logic/hmr
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "0.48.4",
4
+ "version": "0.48.5",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -60,8 +60,8 @@
60
60
  "vue": "^3.4.21",
61
61
  "vue-demi": "^0.14.7",
62
62
  "vue-router": "^4.3.0",
63
- "@slidev/parser": "0.48.4",
64
- "@slidev/types": "0.48.4"
63
+ "@slidev/parser": "0.48.5",
64
+ "@slidev/types": "0.48.5"
65
65
  },
66
66
  "devDependencies": {
67
67
  "vite": "^5.1.6"