@slidev/client 0.38.4 → 0.38.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.
- package/builtin/Toc.vue +1 -1
- package/builtin/TocList.vue +1 -1
- package/composables/useNav.ts +1 -1
- package/logic/nav.ts +1 -11
- package/package.json +7 -7
- package/setup/root.ts +2 -1
package/builtin/Toc.vue
CHANGED
|
@@ -9,7 +9,7 @@ Usage:
|
|
|
9
9
|
-->
|
|
10
10
|
<script setup lang='ts'>
|
|
11
11
|
import { computed, inject } from 'vue'
|
|
12
|
-
import type { TocItem } from '
|
|
12
|
+
import type { TocItem } from '@slidev/types'
|
|
13
13
|
import { injectionSlidevContext } from '../constants'
|
|
14
14
|
|
|
15
15
|
const props = withDefaults(
|
package/builtin/TocList.vue
CHANGED
|
@@ -9,9 +9,9 @@ Usage:
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { computed } from 'vue'
|
|
11
11
|
import { toArray } from '@antfu/utils'
|
|
12
|
+
import type { TocItem } from '@slidev/types'
|
|
12
13
|
// @ts-expect-error virtual module
|
|
13
14
|
import Titles from '/@slidev/titles.md'
|
|
14
|
-
import type { TocItem } from '../logic/nav'
|
|
15
15
|
|
|
16
16
|
const props = withDefaults(defineProps<{
|
|
17
17
|
level: number
|
package/composables/useNav.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue'
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
import type { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router'
|
|
4
|
-
import type { TocItem } from '
|
|
4
|
+
import type { TocItem } from '@slidev/types'
|
|
5
5
|
import { addToTree, filterTree, getPath, getTreeWithActiveStatuses } from '../logic/nav'
|
|
6
6
|
import { rawRoutes } from '../routes'
|
|
7
7
|
|
package/logic/nav.ts
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import type { Ref } from 'vue'
|
|
2
2
|
import type { RouteRecordRaw } from 'vue-router'
|
|
3
3
|
import { computed, nextTick, ref } from 'vue'
|
|
4
|
+
import type { TocItem } from '@slidev/types'
|
|
4
5
|
import { SwipeDirection, isString, timestamp, usePointerSwipe } from '@vueuse/core'
|
|
5
6
|
import { rawRoutes, router } from '../routes'
|
|
6
7
|
import { configs } from '../env'
|
|
7
8
|
import { useRouteQuery } from './route'
|
|
8
9
|
import { isDrawing } from './drawings'
|
|
9
10
|
|
|
10
|
-
export interface TocItem {
|
|
11
|
-
active?: boolean
|
|
12
|
-
activeParent?: boolean
|
|
13
|
-
children: TocItem[]
|
|
14
|
-
hasActiveParent?: boolean
|
|
15
|
-
level: number
|
|
16
|
-
path: string
|
|
17
|
-
hideInToc?: boolean
|
|
18
|
-
title?: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
11
|
export { rawRoutes, router }
|
|
22
12
|
|
|
23
13
|
// force update collected elements when the route is fully resolved
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.5",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.7.2",
|
|
19
19
|
"@unocss/reset": "^0.48.4",
|
|
20
|
-
"@vueuse/core": "^9.11.
|
|
21
|
-
"@vueuse/head": "^1.0.
|
|
22
|
-
"@vueuse/math": "^9.11.
|
|
20
|
+
"@vueuse/core": "^9.11.1",
|
|
21
|
+
"@vueuse/head": "^1.0.23",
|
|
22
|
+
"@vueuse/math": "^9.11.1",
|
|
23
23
|
"@vueuse/motion": "^2.0.0-beta.26",
|
|
24
24
|
"codemirror": "^5.65.5",
|
|
25
|
-
"defu": "^6.1.
|
|
25
|
+
"defu": "^6.1.2",
|
|
26
26
|
"drauu": "^0.3.2",
|
|
27
27
|
"file-saver": "^2.0.5",
|
|
28
28
|
"js-base64": "^3.7.4",
|
|
@@ -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.
|
|
44
|
-
"@slidev/types": "0.38.
|
|
43
|
+
"@slidev/parser": "0.38.5",
|
|
44
|
+
"@slidev/types": "0.38.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"vite": "^4.0.4"
|
package/setup/root.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* __imports__ */
|
|
2
2
|
import { watch } from 'vue'
|
|
3
|
-
import { useHead } from '@vueuse/head'
|
|
3
|
+
import { useHead, useHtmlAttrs } from '@vueuse/head'
|
|
4
4
|
import { configs } from '../env'
|
|
5
5
|
import { initSharedState, onPatch, patch } from '../state/shared'
|
|
6
6
|
import { initDrawingState } from '../state/drawings'
|
|
@@ -16,6 +16,7 @@ export default function setupRoot() {
|
|
|
16
16
|
|
|
17
17
|
const title = configs.titleTemplate.replace('%s', configs.title || 'Slidev')
|
|
18
18
|
useHead({ title })
|
|
19
|
+
useHtmlAttrs(configs.htmlAttrs)
|
|
19
20
|
initSharedState(`${title} - shared`)
|
|
20
21
|
initDrawingState(`${title} - drawings`)
|
|
21
22
|
|