@slidev/client 0.32.4 → 0.33.0
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/NavControls.vue +1 -1
- package/internals/NoteEditor.vue +8 -16
- package/internals/NoteStatic.vue +20 -0
- package/internals/NoteViewer.vue +26 -0
- package/internals/Presenter.vue +30 -5
- package/internals/VerticalDivider.vue +1 -1
- package/package.json +3 -3
- package/routes.ts +1 -0
- package/styles/index.css +7 -1
|
@@ -47,7 +47,7 @@ if (__SLIDEV_FEATURE_DRAWINGS__)
|
|
|
47
47
|
<template>
|
|
48
48
|
<nav ref="root" class="flex flex-col">
|
|
49
49
|
<div
|
|
50
|
-
class="flex flex-wrap-reverse text-xl p-
|
|
50
|
+
class="flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:(gap-1 p-2)"
|
|
51
51
|
:class="barStyle"
|
|
52
52
|
@mouseleave="onMouseLeave"
|
|
53
53
|
>
|
package/internals/NoteEditor.vue
CHANGED
|
@@ -3,6 +3,7 @@ import { ignorableWatch, onClickOutside } from '@vueuse/core'
|
|
|
3
3
|
import { nextTick, ref, watch } from 'vue'
|
|
4
4
|
import { currentSlideId } from '../logic/nav'
|
|
5
5
|
import { useDynamicSlideInfo } from '../logic/note'
|
|
6
|
+
import NoteViewer from './NoteViewer.vue'
|
|
6
7
|
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
class: {
|
|
@@ -59,22 +60,13 @@ onClickOutside(input, () => {
|
|
|
59
60
|
</script>
|
|
60
61
|
|
|
61
62
|
<template>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/>
|
|
70
|
-
<div
|
|
71
|
-
v-else
|
|
72
|
-
class="prose overflow-auto outline-none"
|
|
73
|
-
:class="props.class"
|
|
74
|
-
@click="switchNoteEdit"
|
|
75
|
-
v-text="note"
|
|
76
|
-
/>
|
|
77
|
-
</template>
|
|
63
|
+
<NoteViewer
|
|
64
|
+
v-if="!editing && note"
|
|
65
|
+
:class="props.class"
|
|
66
|
+
:note="note"
|
|
67
|
+
:note-html="info?.notesHTML"
|
|
68
|
+
@click="switchNoteEdit"
|
|
69
|
+
/>
|
|
78
70
|
<textarea
|
|
79
71
|
v-else
|
|
80
72
|
ref="input"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { currentRoute } from '../logic/nav'
|
|
4
|
+
import NoteViewer from './NoteViewer.vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: string
|
|
8
|
+
}>()
|
|
9
|
+
|
|
10
|
+
const note = computed(() => currentRoute.value?.meta?.slide?.note)
|
|
11
|
+
const noteHtml = computed(() => currentRoute.value?.meta?.slide?.notesHTML)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<NoteViewer
|
|
16
|
+
:class="props.class"
|
|
17
|
+
:note="note"
|
|
18
|
+
:note-html="noteHtml"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
class?: string
|
|
4
|
+
noteHtml?: string
|
|
5
|
+
note?: string
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
defineEmits(['click'])
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div
|
|
13
|
+
v-if="noteHtml"
|
|
14
|
+
class="prose overflow-auto outline-none"
|
|
15
|
+
:class="props.class"
|
|
16
|
+
@click="$emit('click')"
|
|
17
|
+
v-html="noteHtml"
|
|
18
|
+
/>
|
|
19
|
+
<div
|
|
20
|
+
v-else
|
|
21
|
+
class="prose overflow-auto outline-none"
|
|
22
|
+
:class="props.class"
|
|
23
|
+
@click="$emit('click')"
|
|
24
|
+
v-text="note"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
package/internals/Presenter.vue
CHANGED
|
@@ -14,6 +14,7 @@ import SlideContainer from './SlideContainer.vue'
|
|
|
14
14
|
import NavControls from './NavControls.vue'
|
|
15
15
|
import SlidesOverview from './SlidesOverview.vue'
|
|
16
16
|
import NoteEditor from './NoteEditor.vue'
|
|
17
|
+
import NoteStatic from './NoteStatic.vue'
|
|
17
18
|
import Goto from './Goto.vue'
|
|
18
19
|
import SlidesShow from './SlidesShow.vue'
|
|
19
20
|
import SlideWrapper from './SlideWrapper'
|
|
@@ -83,7 +84,7 @@ onMounted(() => {
|
|
|
83
84
|
<div class="bg-main h-full slidev-presenter">
|
|
84
85
|
<div class="grid-container">
|
|
85
86
|
<div class="grid-section top flex">
|
|
86
|
-
<img src="../assets/logo-title-horizontal.png" class="h-
|
|
87
|
+
<img src="../assets/logo-title-horizontal.png" class="ml-2 my-auto h-10 py-1 lg:(h-14 py-2)">
|
|
87
88
|
<div class="flex-auto" />
|
|
88
89
|
<div
|
|
89
90
|
class="timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg"
|
|
@@ -97,7 +98,7 @@ onMounted(() => {
|
|
|
97
98
|
{{ timer }}
|
|
98
99
|
</div>
|
|
99
100
|
</div>
|
|
100
|
-
<div ref="main" class="grid-section main flex flex-col p-4" :style="themeVars">
|
|
101
|
+
<div ref="main" class="relative grid-section main flex flex-col p-2 lg:(p-4)" :style="themeVars">
|
|
101
102
|
<SlideContainer
|
|
102
103
|
key="main"
|
|
103
104
|
class="h-full w-full"
|
|
@@ -106,8 +107,11 @@ onMounted(() => {
|
|
|
106
107
|
<SlidesShow context="presenter" />
|
|
107
108
|
</template>
|
|
108
109
|
</SlideContainer>
|
|
110
|
+
<div class="context">
|
|
111
|
+
current
|
|
112
|
+
</div>
|
|
109
113
|
</div>
|
|
110
|
-
<div class="grid-section next flex flex-col p-4">
|
|
114
|
+
<div class="relative grid-section next flex flex-col p-2 lg:(p-4)">
|
|
111
115
|
<SlideContainer
|
|
112
116
|
v-if="nextSlide"
|
|
113
117
|
key="next"
|
|
@@ -123,9 +127,13 @@ onMounted(() => {
|
|
|
123
127
|
context="previewNext"
|
|
124
128
|
/>
|
|
125
129
|
</SlideContainer>
|
|
130
|
+
<div class="context">
|
|
131
|
+
next
|
|
132
|
+
</div>
|
|
126
133
|
</div>
|
|
127
134
|
<div class="grid-section note overflow-auto">
|
|
128
|
-
<NoteEditor class="w-full h-full p-
|
|
135
|
+
<NoteEditor v-if="__DEV__" class="w-full h-full overflow-auto p-2 lg:(p-4)" />
|
|
136
|
+
<NoteStatic v-else class="w-full h-full overflow-auto p-2 lg:(p-4)" />
|
|
129
137
|
</div>
|
|
130
138
|
<div class="grid-section bottom">
|
|
131
139
|
<NavControls :persist="true" />
|
|
@@ -174,7 +182,20 @@ onMounted(() => {
|
|
|
174
182
|
"bottom bottom";
|
|
175
183
|
}
|
|
176
184
|
|
|
177
|
-
@
|
|
185
|
+
@media (max-aspect-ratio: 3/5) {
|
|
186
|
+
.grid-container {
|
|
187
|
+
grid-template-columns: 1fr;
|
|
188
|
+
grid-template-rows: min-content 1fr 1fr 1fr min-content;
|
|
189
|
+
grid-template-areas:
|
|
190
|
+
"top"
|
|
191
|
+
"main"
|
|
192
|
+
"note"
|
|
193
|
+
"next"
|
|
194
|
+
"bottom";
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@media (min-aspect-ratio: 1/1) {
|
|
178
199
|
.grid-container {
|
|
179
200
|
grid-template-columns: 1fr 1.1fr 0.9fr;
|
|
180
201
|
grid-template-rows: min-content 1fr 2fr min-content;
|
|
@@ -209,4 +230,8 @@ onMounted(() => {
|
|
|
209
230
|
grid-area: bottom;
|
|
210
231
|
}
|
|
211
232
|
}
|
|
233
|
+
|
|
234
|
+
.context {
|
|
235
|
+
@apply absolute top-0 left-0 px-1 text-xs bg-gray-400 bg-opacity-50 opacity-75 rounded-br-md;
|
|
236
|
+
}
|
|
212
237
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@antfu/utils": "^0.5.2",
|
|
19
|
-
"@slidev/parser": "0.
|
|
20
|
-
"@slidev/types": "0.
|
|
19
|
+
"@slidev/parser": "0.33.0",
|
|
20
|
+
"@slidev/types": "0.33.0",
|
|
21
21
|
"@vueuse/core": "^8.6.0",
|
|
22
22
|
"@vueuse/head": "^0.7.6",
|
|
23
23
|
"@vueuse/motion": "^2.0.0-beta.18",
|
package/routes.ts
CHANGED
package/styles/index.css
CHANGED
|
@@ -16,10 +16,16 @@ html {
|
|
|
16
16
|
|
|
17
17
|
.icon-btn {
|
|
18
18
|
@apply inline-block cursor-pointer select-none !outline-none;
|
|
19
|
-
@apply opacity-75 transition duration-200 ease-in-out align-middle rounded p-
|
|
19
|
+
@apply opacity-75 transition duration-200 ease-in-out align-middle rounded p-1;
|
|
20
20
|
@apply hover:(opacity-100 bg-gray-400 bg-opacity-10);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
@screen md {
|
|
24
|
+
.icon-btn {
|
|
25
|
+
@apply p-2;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
.icon-btn.shallow {
|
|
24
30
|
@apply opacity-30
|
|
25
31
|
}
|