@slidev/client 0.49.26 → 0.49.28

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/Toc.vue CHANGED
@@ -11,6 +11,7 @@ Usage:
11
11
  import { computed } from 'vue'
12
12
  import type { TocItem } from '@slidev/types'
13
13
  import { useSlideContext } from '../context'
14
+ import TocList from './TocList.vue'
14
15
 
15
16
  const props = withDefaults(
16
17
  defineProps<{
@@ -14,7 +14,7 @@ import TitleRenderer from '#slidev/title-renderer'
14
14
 
15
15
  const props = withDefaults(defineProps<{
16
16
  level: number
17
- start?: number
17
+ start?: string | number
18
18
  listStyle?: string | string[]
19
19
  list: TocItem[]
20
20
  listClass?: string | string[]
@@ -1,13 +1,14 @@
1
1
  import { useWakeLock as useVueUseWakeLock } from '@vueuse/core'
2
- import { watchEffect } from 'vue'
2
+ import { watch } from 'vue'
3
3
  import { wakeLockEnabled } from '../state'
4
4
 
5
5
  export function useWakeLock() {
6
6
  const { request, release } = useVueUseWakeLock()
7
7
 
8
- watchEffect((onCleanup) => {
9
- if (wakeLockEnabled.value)
8
+ watch(wakeLockEnabled, (enabled) => {
9
+ if (enabled)
10
10
  request('screen')
11
- onCleanup(release)
12
- })
11
+ else
12
+ release()
13
+ }, { immediate: true })
13
14
  }
@@ -151,6 +151,7 @@ export function useRecording() {
151
151
  cursor: 'motion',
152
152
  resizeMode: 'crop-and-scale',
153
153
  },
154
+ selfBrowserSurface: 'include',
154
155
  })
155
156
  streamCapture.value.addEventListener('inactive', stopRecording)
156
157
 
@@ -44,7 +44,7 @@ export function getCurrentTransition(direction: number, currentRoute?: SlideRout
44
44
  ? prevRoute?.meta?.transition
45
45
  : currentRoute?.meta?.transition
46
46
  if (!transition)
47
- transition = configs.transition
47
+ transition = configs.transition || undefined
48
48
 
49
49
  return resolveTransition(transition, direction < 0)
50
50
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "0.49.26",
4
+ "version": "0.49.28",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -58,8 +58,8 @@
58
58
  "vue": "^3.4.38",
59
59
  "vue-router": "^4.4.3",
60
60
  "yaml": "^2.5.0",
61
- "@slidev/parser": "0.49.26",
62
- "@slidev/types": "0.49.26"
61
+ "@slidev/parser": "0.49.28",
62
+ "@slidev/types": "0.49.28"
63
63
  },
64
64
  "devDependencies": {
65
65
  "vite": "^5.4.1"
package/styles/code.css CHANGED
@@ -5,7 +5,6 @@ html.dark:root {
5
5
  /* Shiki */
6
6
  html.dark .shiki {
7
7
  color: var(--shiki-dark, inherit);
8
- background: var(--shiki-dark-bg, inherit);
9
8
  --twoslash-popup-bg: var(--shiki-dark-bg, inherit);
10
9
  }
11
10