@slidev/client 0.38.0 → 0.38.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.
@@ -1,8 +1,9 @@
1
1
  <script setup lang="ts">
2
+ import { parseRangeString } from '@slidev/parser/core'
2
3
  import { computed, provide } from 'vue'
3
4
  import { configs, slideAspect, slideWidth } from '../env'
4
5
  import { injectionSlideScale } from '../constants'
5
- import { rawRoutes } from '../logic/nav'
6
+ import { rawRoutes, route } from '../logic/nav'
6
7
  import PrintSlide from './PrintSlide.vue'
7
8
 
8
9
  const props = defineProps<{
@@ -21,7 +22,11 @@ const scale = computed(() => {
21
22
  })
22
23
 
23
24
  // Remove the "end" slide
24
- const routes = rawRoutes.slice(0, -1)
25
+ let routes = rawRoutes.slice(0, -1)
26
+ if (route.value.query.range) {
27
+ const r = parseRangeString(routes.length, route.value.query.range)
28
+ routes = r.map(i => routes[i - 1])
29
+ }
25
30
 
26
31
  const className = computed(() => ({
27
32
  'select-none': !configs.selectable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.38.0",
3
+ "version": "0.38.1",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -40,8 +40,8 @@
40
40
  "vue-router": "^4.1.6",
41
41
  "vue-starport": "^0.3.0",
42
42
  "windicss": "^3.5.6",
43
- "@slidev/parser": "0.38.0",
44
- "@slidev/types": "0.38.0"
43
+ "@slidev/parser": "0.38.1",
44
+ "@slidev/types": "0.38.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "vite": "^4.0.1"