@slidev/client 0.30.1 → 0.30.2

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/Link.vue CHANGED
@@ -17,8 +17,8 @@ defineProps<{
17
17
  </script>
18
18
 
19
19
  <template>
20
- <RouterLink v-if="!isPrintMode && title" :to="to" v-html="title" />
21
- <RouterLink v-else-if="!isPrintMode && !title" :to="to">
20
+ <RouterLink v-if="!isPrintMode && title" :to="to" @click="$event.target.blur()" v-html="title" />
21
+ <RouterLink v-else-if="!isPrintMode && !title" :to="to" @click="$event.target.blur()">
22
22
  <slot />
23
23
  </RouterLink>
24
24
  <a v-else-if="isPrintMode && title" :href="'#' + to" v-html="title" />
@@ -9,6 +9,8 @@ Usage:
9
9
  <script setup lang="ts">
10
10
  import { computed } from 'vue'
11
11
  import { toArray } from '@antfu/utils'
12
+ // @ts-expect-error virtual module
13
+ import Titles from '/@slidev/titles.md'
12
14
  import type { TocItem } from '../logic/nav'
13
15
 
14
16
  const props = withDefaults(defineProps<{
@@ -29,8 +31,10 @@ const classes = computed(() => {
29
31
  <template>
30
32
  <ol v-if="list && list.length > 0" :class="classes">
31
33
  <li v-for="item in list" :key="item.path" :class="['slidev-toc-item', {'slidev-toc-item-active': item.active}, {'slidev-toc-item-parent-active': item.activeParent}]">
32
- <Link :to="item.path" :title="item.title" />
33
- <TocList :level="level + 1" :list="item.children" :list-class="listClass" />
34
+ <Link :to="item.path">
35
+ <Titles :no="item.path" />
36
+ </Link>
37
+ <TocList v-if="item.children.length > 0" :level="level + 1" :list="item.children" :list-class="listClass" />
34
38
  </li>
35
39
  </ol>
36
40
  </template>
package/logic/nav.ts CHANGED
@@ -158,7 +158,9 @@ export async function downloadPDF() {
158
158
  saveAs(
159
159
  isString(configs.download)
160
160
  ? configs.download
161
- : `${import.meta.env.BASE_URL}slidev-exported.pdf`,
161
+ : configs.exportFilename
162
+ ? `${configs.exportFilename}.pdf`
163
+ : `${import.meta.env.BASE_URL}slidev-exported.pdf`,
162
164
  `${configs.title}.pdf`,
163
165
  )
164
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.30.1",
3
+ "version": "0.30.2",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -13,8 +13,8 @@
13
13
  "funding": "https://github.com/sponsors/antfu",
14
14
  "dependencies": {
15
15
  "@antfu/utils": "^0.5.1",
16
- "@slidev/parser": "0.30.1",
17
- "@slidev/types": "0.30.1",
16
+ "@slidev/parser": "0.30.2",
17
+ "@slidev/types": "0.30.2",
18
18
  "@vueuse/core": "^8.2.5",
19
19
  "@vueuse/head": "^0.7.5",
20
20
  "@vueuse/motion": "^2.0.0-beta.18",