@slidev/client 0.42.3 → 0.42.4

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.
@@ -8,7 +8,7 @@ import { rawRoutes } from '../routes'
8
8
 
9
9
  export function useNav(route: ComputedRef<RouteRecordRaw | RouteLocationNormalizedLoaded>): SlidevContextNav {
10
10
  const path = computed(() => route.value.path)
11
- const total = computed(() => rawRoutes.length - 1)
11
+ const total = computed(() => rawRoutes.length)
12
12
 
13
13
  const currentPage = computed(() => parseInt(path.value.split(/\//g).slice(-1)[0]) || 1)
14
14
  const currentPath = computed(() => getPath(currentPage.value))
package/logic/nav.ts CHANGED
@@ -32,7 +32,7 @@ export const presenterPassword = computed(() => route.value.query.password)
32
32
  export const showPresenter = computed(() => !isPresenter.value && (!configs.remote || presenterPassword.value === configs.remote))
33
33
 
34
34
  export const queryClicks = useRouteQuery('clicks', '0')
35
- export const total = computed(() => rawRoutes.length - 1)
35
+ export const total = computed(() => rawRoutes.length)
36
36
  export const path = computed(() => route.value.path)
37
37
 
38
38
  export const currentPage = computed(() => parseInt(path.value.split(/\//g).slice(-1)[0]) || 1)
package/logic/overview.ts CHANGED
@@ -3,9 +3,7 @@ import { rawRoutes } from '../routes'
3
3
 
4
4
  // To have same format(.value) as max, wrap it with ref.
5
5
  const min = ref(1)
6
- // The last page is an end page generated by slidev,
7
- // so we need to subtract 1.
8
- const max = computed(() => rawRoutes.length - 1)
6
+ const max = computed(() => rawRoutes.length)
9
7
 
10
8
  export const currentOverviewPage = ref(0)
11
9
  export const overviewRowCount = ref(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
- "version": "0.42.3",
3
+ "version": "0.42.4",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -15,8 +15,8 @@
15
15
  "node": ">=14.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@antfu/utils": "^0.7.2",
19
- "@unocss/reset": "^0.52.4",
18
+ "@antfu/utils": "^0.7.4",
19
+ "@unocss/reset": "^0.53.0",
20
20
  "@vueuse/core": "^10.1.2",
21
21
  "@vueuse/head": "^1.1.26",
22
22
  "@vueuse/math": "^10.1.2",
@@ -29,20 +29,20 @@
29
29
  "js-base64": "^3.7.5",
30
30
  "js-yaml": "^4.1.0",
31
31
  "katex": "^0.16.7",
32
- "mermaid": "^10.2.0",
32
+ "mermaid": "^10.2.2",
33
33
  "monaco-editor": "^0.37.1",
34
34
  "nanoid": "^4.0.2",
35
35
  "prettier": "^2.8.8",
36
36
  "recordrtc": "^5.6.2",
37
37
  "resolve": "^1.22.2",
38
- "unocss": "^0.52.4",
38
+ "unocss": "^0.53.0",
39
39
  "vite-plugin-windicss": "^1.9.0",
40
40
  "vue": "^3.3.4",
41
41
  "vue-router": "^4.2.2",
42
42
  "vue-starport": "^0.3.0",
43
43
  "windicss": "^3.5.6",
44
- "@slidev/parser": "0.42.3",
45
- "@slidev/types": "0.42.3"
44
+ "@slidev/parser": "0.42.4",
45
+ "@slidev/types": "0.42.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "vite": "^4.3.9"
@@ -5,6 +5,10 @@
5
5
  @apply select-text;
6
6
  }
7
7
 
8
+ code {
9
+ @apply font-mono;
10
+ }
11
+
8
12
  h1 {
9
13
  @apply text-4xl mb-4;
10
14
  }