@slidev/client 0.43.7 → 0.43.9
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/internals/EntrySelect.vue +25 -0
- package/internals/NotesView.vue +0 -9
- package/internals/PrintSlideClick.vue +3 -2
- package/package.json +16 -12
- package/routes.ts +16 -7
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="h-full w-full flex items-center justify-center gap-5 lt-md:flex-col">
|
|
3
|
+
<RouterLink
|
|
4
|
+
to="/"
|
|
5
|
+
class="flex flex-col gap-2 items-center justify-center h-40 min-w-40 rounded bg-gray:10 p4 hover:bg-gray/20"
|
|
6
|
+
>
|
|
7
|
+
<carbon:presentation-file class="text-3em op50" />
|
|
8
|
+
Slides
|
|
9
|
+
</RouterLink>
|
|
10
|
+
<RouterLink
|
|
11
|
+
to="/presenter"
|
|
12
|
+
class="flex flex-col gap-2 items-center justify-center h-40 min-w-40 rounded bg-gray:10 p4 hover:bg-gray/20"
|
|
13
|
+
>
|
|
14
|
+
<carbon:user-speaker class="text-3em op50" />
|
|
15
|
+
Presenter
|
|
16
|
+
</RouterLink>
|
|
17
|
+
<RouterLink
|
|
18
|
+
to="/notes"
|
|
19
|
+
class="flex flex-col gap-2 items-center justify-center h-40 min-w-40 rounded bg-gray:10 p4 hover:bg-gray/20"
|
|
20
|
+
>
|
|
21
|
+
<carbon:catalog class="text-3em op50" />
|
|
22
|
+
Notes
|
|
23
|
+
</RouterLink>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
package/internals/NotesView.vue
CHANGED
|
@@ -20,7 +20,6 @@ const { isFullscreen, toggle: toggleFullscreen } = fullscreen
|
|
|
20
20
|
const fontSize = useLocalStorage('slidev-notes-font-size', 18)
|
|
21
21
|
const pageNo = computed(() => sharedState.lastUpdate?.type === 'viewer' ? sharedState.viewerPage : sharedState.page)
|
|
22
22
|
const currentRoute = computed(() => rawRoutes.find(i => i.path === `${pageNo.value}`))
|
|
23
|
-
const nextRoute = computed(() => rawRoutes.find(i => i.path === `${pageNo.value + 1}`))
|
|
24
23
|
|
|
25
24
|
function increaseFontSize() {
|
|
26
25
|
fontSize.value = fontSize.value + 1
|
|
@@ -47,14 +46,6 @@ function decreaseFontSize() {
|
|
|
47
46
|
:placeholder="`No notes for Slide ${pageNo}.`"
|
|
48
47
|
/>
|
|
49
48
|
</div>
|
|
50
|
-
<div v-if="nextRoute" class="px-5 py-2 max-h-60 overflow-auto border-t border-gray-400 border-opacity-20">
|
|
51
|
-
<NoteDisplay
|
|
52
|
-
class="opacity-50"
|
|
53
|
-
:note="nextRoute?.meta?.slide?.note"
|
|
54
|
-
:note-html="nextRoute?.meta?.slide?.noteHTML"
|
|
55
|
-
placeholder="No notes for next slide."
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
49
|
<div class="flex-none border-t border-gray-400 border-opacity-20">
|
|
59
50
|
<div class="flex gap-1 items-center px-6 py-3">
|
|
60
51
|
<button class="slidev-icon-btn" @click="toggleFullscreen">
|
|
@@ -4,6 +4,7 @@ import { computed, provide, reactive, shallowRef } from 'vue'
|
|
|
4
4
|
import { useVModel } from '@vueuse/core'
|
|
5
5
|
import { useNavClicks } from '../composables/useNavClicks'
|
|
6
6
|
import { injectionSlidevContext } from '../constants'
|
|
7
|
+
import { isClicksDisabled } from '../logic/nav'
|
|
7
8
|
import { configs, slideHeight, slideWidth } from '../env'
|
|
8
9
|
import { getSlideClass } from '../utils'
|
|
9
10
|
import type { SlidevContextNav } from '../modules/context'
|
|
@@ -53,8 +54,8 @@ provide(injectionSlidevContext, reactive({
|
|
|
53
54
|
<SlideWrapper
|
|
54
55
|
:is="route?.component!"
|
|
55
56
|
v-model:clicks-elements="clicksElements"
|
|
56
|
-
:clicks="clicks"
|
|
57
|
-
:clicks-disabled="
|
|
57
|
+
:clicks="isClicksDisabled ? undefined : clicks"
|
|
58
|
+
:clicks-disabled="isClicksDisabled"
|
|
58
59
|
:class="getSlideClass(route)"
|
|
59
60
|
:route="route"
|
|
60
61
|
/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.9",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,40 +11,44 @@
|
|
|
11
11
|
"url": "https://github.com/slidevjs/slidev"
|
|
12
12
|
},
|
|
13
13
|
"bugs": "https://github.com/slidevjs/slidev/issues",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": "./package.json",
|
|
16
|
+
"./*": "./*"
|
|
17
|
+
},
|
|
14
18
|
"engines": {
|
|
15
19
|
"node": ">=18.0.0"
|
|
16
20
|
},
|
|
17
21
|
"dependencies": {
|
|
18
22
|
"@antfu/utils": "^0.7.6",
|
|
19
|
-
"@unocss/reset": "^0.
|
|
23
|
+
"@unocss/reset": "^0.57.1",
|
|
20
24
|
"@vueuse/core": "^10.5.0",
|
|
21
25
|
"@vueuse/head": "^2.0.0",
|
|
22
26
|
"@vueuse/math": "^10.5.0",
|
|
23
27
|
"@vueuse/motion": "^2.0.0",
|
|
24
28
|
"codemirror": "^5.65.5",
|
|
25
|
-
"defu": "^6.1.
|
|
29
|
+
"defu": "^6.1.3",
|
|
26
30
|
"drauu": "^0.3.7",
|
|
27
31
|
"file-saver": "^2.0.5",
|
|
28
|
-
"fuse.js": "^
|
|
32
|
+
"fuse.js": "^7.0.0",
|
|
29
33
|
"js-base64": "^3.7.5",
|
|
30
34
|
"js-yaml": "^4.1.0",
|
|
31
35
|
"katex": "^0.16.9",
|
|
32
|
-
"mermaid": "^10.
|
|
36
|
+
"mermaid": "^10.6.0",
|
|
33
37
|
"monaco-editor": "^0.37.1",
|
|
34
|
-
"nanoid": "^5.0.
|
|
38
|
+
"nanoid": "^5.0.2",
|
|
35
39
|
"prettier": "^3.0.3",
|
|
36
40
|
"recordrtc": "^5.6.2",
|
|
37
|
-
"resolve": "^1.22.
|
|
38
|
-
"unocss": "^0.
|
|
41
|
+
"resolve": "^1.22.8",
|
|
42
|
+
"unocss": "^0.57.1",
|
|
39
43
|
"vite-plugin-windicss": "^1.9.1",
|
|
40
|
-
"vue": "^3.3.
|
|
44
|
+
"vue": "^3.3.7",
|
|
41
45
|
"vue-router": "^4.2.5",
|
|
42
46
|
"vue-starport": "^0.4.0",
|
|
43
47
|
"windicss": "^3.5.6",
|
|
44
|
-
"@slidev/parser": "0.43.
|
|
45
|
-
"@slidev/types": "0.43.
|
|
48
|
+
"@slidev/parser": "0.43.9",
|
|
49
|
+
"@slidev/types": "0.43.9"
|
|
46
50
|
},
|
|
47
51
|
"devDependencies": {
|
|
48
|
-
"vite": "^4.
|
|
52
|
+
"vite": "^4.5.0"
|
|
49
53
|
}
|
|
50
54
|
}
|
package/routes.ts
CHANGED
|
@@ -42,12 +42,19 @@ if (__SLIDEV_FEATURE_PRESENTER__) {
|
|
|
42
42
|
return { path: '' }
|
|
43
43
|
}
|
|
44
44
|
routes.push({ path: '/presenter/print', component: () => import('./internals/PresenterPrint.vue') })
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
if (__SLIDEV_HAS_SERVER__) {
|
|
46
|
+
routes.push({
|
|
47
|
+
name: 'entry',
|
|
48
|
+
path: '/entry',
|
|
49
|
+
component: () => import('./internals/EntrySelect.vue'),
|
|
50
|
+
})
|
|
51
|
+
routes.push({
|
|
52
|
+
name: 'notes',
|
|
53
|
+
path: '/notes',
|
|
54
|
+
component: () => import('./internals/NotesView.vue'),
|
|
55
|
+
beforeEnter: passwordGuard,
|
|
56
|
+
})
|
|
57
|
+
}
|
|
51
58
|
routes.push({
|
|
52
59
|
name: 'presenter',
|
|
53
60
|
path: '/presenter/:no',
|
|
@@ -61,7 +68,9 @@ if (__SLIDEV_FEATURE_PRESENTER__) {
|
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
export const router = createRouter({
|
|
64
|
-
history: __SLIDEV_HASH_ROUTE__
|
|
71
|
+
history: __SLIDEV_HASH_ROUTE__
|
|
72
|
+
? createWebHashHistory(import.meta.env.BASE_URL)
|
|
73
|
+
: createWebHistory(import.meta.env.BASE_URL),
|
|
65
74
|
routes,
|
|
66
75
|
})
|
|
67
76
|
|