slidev-pane 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 xunz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # slidev-pane
2
+
3
+ PowerPoint-style pane presenter for Slidev.
4
+
5
+ ## What it does
6
+
7
+ - Adds a dedicated `/pane-presenter/:no` page with a two-pane layout.
8
+ - Left side shows slide thumbnails.
9
+ - Right side shows the active slide.
10
+ - Keeps Slidev's built-in presenter mode intact.
11
+ - Adds a `Pane` entry to Slidev's standard nav controls.
12
+ - Adds a `p` shortcut to toggle this presenter mode.
13
+
14
+ ## Usage
15
+
16
+ Install the addon in your Slidev project:
17
+
18
+ ```bash
19
+ pnpm add -D slidev-pane
20
+ ```
21
+
22
+ Then add it to the deck's `package.json`:
23
+
24
+ ```json
25
+ {
26
+ "slidev": {
27
+ "addons": ["slidev-pane"]
28
+ }
29
+ }
30
+ ```
31
+
32
+ Press `p` to enter or leave the pane presenter mode.
33
+
34
+ ## Notes
35
+
36
+ - This addon keeps Slidev's built-in `/presenter/:no` route unchanged.
37
+ - The pane presenter lives at `/pane-presenter/:no`.
38
+ - It keeps `o` for Slidev's quick overview instead of rebinding it.
39
+ - The implementation depends on Slidev client internals and is pinned to `0.51.x`.
@@ -0,0 +1,177 @@
1
+ <script setup lang="ts">
2
+ import TitleRenderer from '#slidev/title-renderer'
3
+ import Fuse from 'fuse.js'
4
+ import { computed, ref, watch } from 'vue'
5
+ import { activeElement, showGotoDialog } from '@slidev/client/state/index.ts'
6
+ import { useNav } from '@slidev/client/composables/useNav.ts'
7
+ import { useSidebarPresenterNav } from '../composables/useSidebarPresenterNav'
8
+
9
+ const container = ref<HTMLDivElement>()
10
+ const input = ref<HTMLInputElement>()
11
+ const list = ref<HTMLUListElement>()
12
+ const items = ref<HTMLLIElement[]>()
13
+ const text = ref('')
14
+ const selectedIndex = ref(0)
15
+
16
+ const { slides } = useNav()
17
+ const { goSidebar } = useSidebarPresenterNav()
18
+
19
+ function notNull<T>(value: T | null | undefined): value is T {
20
+ return value !== null && value !== undefined
21
+ }
22
+
23
+ const fuse = computed(() => new Fuse(slides.value.map(i => i.meta?.slide).filter(notNull), {
24
+ keys: ['no', 'title'],
25
+ threshold: 0.3,
26
+ shouldSort: true,
27
+ minMatchCharLength: 1,
28
+ }))
29
+
30
+ const path = computed(() => text.value.startsWith('/') ? text.value.substring(1) : text.value)
31
+ const result = computed(() => fuse.value.search(path.value).map(result => result.item))
32
+ const valid = computed(() => !!result.value.length)
33
+
34
+ function close() {
35
+ text.value = ''
36
+ showGotoDialog.value = false
37
+ }
38
+
39
+ function goTo() {
40
+ if (valid.value) {
41
+ const item = result.value.at(selectedIndex.value || 0)
42
+ if (item)
43
+ goSidebar(item.no)
44
+ }
45
+ close()
46
+ }
47
+
48
+ function focusDown(event: Event) {
49
+ event.preventDefault()
50
+ selectedIndex.value++
51
+ if (selectedIndex.value >= result.value.length)
52
+ selectedIndex.value = 0
53
+ scroll()
54
+ }
55
+
56
+ function focusUp(event: Event) {
57
+ event.preventDefault()
58
+ selectedIndex.value--
59
+ if (selectedIndex.value <= -2)
60
+ selectedIndex.value = result.value.length - 1
61
+ scroll()
62
+ }
63
+
64
+ function scroll() {
65
+ const item = items.value?.[selectedIndex.value]
66
+ if (item && list.value) {
67
+ if (item.offsetTop + item.offsetHeight > list.value.offsetHeight + list.value.scrollTop) {
68
+ list.value.scrollTo({
69
+ behavior: 'smooth',
70
+ top: item.offsetTop + item.offsetHeight - list.value.offsetHeight + 1,
71
+ })
72
+ }
73
+ else if (item.offsetTop < list.value.scrollTop) {
74
+ list.value.scrollTo({
75
+ behavior: 'smooth',
76
+ top: item.offsetTop,
77
+ })
78
+ }
79
+ }
80
+ }
81
+
82
+ function updateText(event: Event) {
83
+ selectedIndex.value = 0
84
+ text.value = (event.target as HTMLInputElement).value
85
+ }
86
+
87
+ function select(no: number) {
88
+ goSidebar(no)
89
+ close()
90
+ }
91
+
92
+ watch(showGotoDialog, async (show) => {
93
+ if (show) {
94
+ text.value = ''
95
+ selectedIndex.value = 0
96
+ setTimeout(() => input.value?.focus(), 0)
97
+ }
98
+ else {
99
+ input.value?.blur()
100
+ }
101
+ })
102
+
103
+ watch(activeElement, () => {
104
+ if (!container.value?.contains(activeElement.value as Node))
105
+ close()
106
+ })
107
+ </script>
108
+
109
+ <template>
110
+ <div
111
+ id="slidev-goto-dialog"
112
+ ref="container"
113
+ class="fixed right-5 transition-all"
114
+ w-90 max-w-90 min-w-90
115
+ :class="showGotoDialog ? 'top-5' : '-top-20'"
116
+ >
117
+ <div
118
+ class="bg-main transform"
119
+ shadow="~"
120
+ p="x-4 y-2"
121
+ border="~ transparent rounded dark:main"
122
+ >
123
+ <input
124
+ id="slidev-goto-input"
125
+ ref="input"
126
+ :value="text"
127
+ type="text"
128
+ :disabled="!showGotoDialog"
129
+ class="outline-none bg-transparent"
130
+ placeholder="Goto..."
131
+ :class="{ 'text-red-400': !valid && text }"
132
+ @keydown.enter="goTo"
133
+ @keydown.escape="close"
134
+ @keydown.down="focusDown"
135
+ @keydown.up="focusUp"
136
+ @input="updateText"
137
+ >
138
+ </div>
139
+ <div
140
+ v-if="result.length > 0"
141
+ ref="list"
142
+ class="autocomplete-list"
143
+ shadow="~"
144
+ border="~ transparent rounded dark:main"
145
+ >
146
+ <ul table w-full border-collapse>
147
+ <li
148
+ v-for="(item, index) of result"
149
+ ref="items"
150
+ :key="item.id"
151
+ role="button"
152
+ tabindex="0"
153
+ cursor-pointer
154
+ hover="op100"
155
+ table-row
156
+ items-center
157
+ :border="index === 0 ? undefined : 't main'"
158
+ :class="selectedIndex === index ? 'bg-active op100' : 'op80'"
159
+ @click.stop.prevent="select(item.no)"
160
+ >
161
+ <div text-right op50 text-sm table-cell py-2 pl-4 pr-3 vertical-middle>
162
+ {{ item.no }}
163
+ </div>
164
+ <TitleRenderer table-cell py-2 pr-4 w-full :no="item.no" />
165
+ </li>
166
+ </ul>
167
+ </div>
168
+ </div>
169
+ </template>
170
+
171
+ <style scoped>
172
+ .autocomplete-list {
173
+ --uno: bg-main mt-1;
174
+ overflow: auto;
175
+ max-height: calc(100vh - 100px);
176
+ }
177
+ </style>
@@ -0,0 +1,230 @@
1
+ <script setup lang="ts">
2
+ import { computed, ref } from 'vue'
3
+ import { useDrawings } from '@slidev/client/composables/useDrawings.ts'
4
+ import { useNav } from '@slidev/client/composables/useNav.ts'
5
+ import { configs } from '@slidev/client/env.ts'
6
+ import { isColorSchemaConfigured, isDark, toggleDark } from '@slidev/client/logic/dark.ts'
7
+ import { activeElement, fullscreen, hasViewerCssFilter, showEditor, showInfoDialog, toggleOverview } from '@slidev/client/state/index.ts'
8
+ import { downloadPDF } from '@slidev/client/utils.ts'
9
+ import IconButton from '@slidev/client/internals/IconButton.vue'
10
+ import MenuButton from '@slidev/client/internals/MenuButton.vue'
11
+ import Settings from '@slidev/client/internals/Settings.vue'
12
+ import VerticalDivider from '@slidev/client/internals/VerticalDivider.vue'
13
+ import { useSidebarPresenterNav } from '../composables/useSidebarPresenterNav'
14
+
15
+ const {
16
+ currentSlideNo,
17
+ hasNext,
18
+ hasPrev,
19
+ isEmbedded,
20
+ total,
21
+ } = useNav()
22
+ const {
23
+ enterClassicPresenter,
24
+ exitSidebarPresenter,
25
+ nextSidebar,
26
+ prevSidebar,
27
+ } = useSidebarPresenterNav()
28
+ const {
29
+ brush,
30
+ drawingEnabled,
31
+ isDrawing,
32
+ } = useDrawings()
33
+
34
+ const { isFullscreen, toggle: toggleFullscreen } = fullscreen
35
+ const root = ref<HTMLDivElement>()
36
+
37
+ function onMouseLeave() {
38
+ if (root.value && activeElement.value && root.value.contains(activeElement.value))
39
+ activeElement.value.blur()
40
+ }
41
+
42
+ const wrapperClass = computed(() => isDrawing.value ? 'pointer-events-none' : '')
43
+ </script>
44
+
45
+ <template>
46
+ <div
47
+ class="fixed left-0 bottom-0 z-[45] p-3 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100"
48
+ :class="wrapperClass"
49
+ >
50
+ <nav
51
+ ref="root"
52
+ class="pane-nav"
53
+ @mouseleave="onMouseLeave"
54
+ >
55
+ <IconButton v-if="!isEmbedded" :title="isFullscreen ? 'Close fullscreen' : 'Enter fullscreen'" @click="toggleFullscreen">
56
+ <div v-if="isFullscreen" class="i-carbon:minimize" />
57
+ <div v-else class="i-carbon:maximize" />
58
+ </IconButton>
59
+ <IconButton :class="{ disabled: !hasPrev }" title="Go to previous slide" @click="prevSidebar">
60
+ <div class="i-carbon:arrow-left" />
61
+ </IconButton>
62
+ <IconButton :class="{ disabled: !hasNext }" title="Go to next slide" @click="nextSidebar">
63
+ <div class="i-carbon:arrow-right" />
64
+ </IconButton>
65
+ <IconButton v-if="!isEmbedded" title="Show slide overview" @click="toggleOverview()">
66
+ <div class="i-carbon:apps" />
67
+ </IconButton>
68
+ <IconButton
69
+ v-if="!isColorSchemaConfigured"
70
+ :title="isDark ? 'Switch to light mode theme' : 'Switch to dark mode theme'"
71
+ @click="toggleDark()"
72
+ >
73
+ <carbon-moon v-if="isDark" />
74
+ <carbon-sun v-else />
75
+ </IconButton>
76
+
77
+ <VerticalDivider />
78
+
79
+ <template v-if="__SLIDEV_FEATURE_DRAWINGS__ && !isEmbedded">
80
+ <IconButton class="relative" :title="drawingEnabled ? 'Hide drawing toolbar' : 'Show drawing toolbar'" @click="drawingEnabled = !drawingEnabled">
81
+ <div class="i-carbon:pen" />
82
+ <div
83
+ v-if="drawingEnabled"
84
+ class="absolute left-1 right-1 bottom-0 h-0.7 rounded-full"
85
+ :style="{ background: brush.color }"
86
+ />
87
+ </IconButton>
88
+ <VerticalDivider />
89
+ </template>
90
+
91
+ <template v-if="!isEmbedded">
92
+ <IconButton title="Classic Presenter" @click="enterClassicPresenter">
93
+ <div class="i-carbon:user-speaker" />
94
+ </IconButton>
95
+ <IconButton title="Play Mode" @click="exitSidebarPresenter">
96
+ <div class="i-carbon:presentation-file" />
97
+ </IconButton>
98
+
99
+ <IconButton
100
+ v-if="__DEV__ && __SLIDEV_FEATURE_EDITOR__"
101
+ :title="showEditor ? 'Hide editor' : 'Show editor'"
102
+ class="lt-md:hidden"
103
+ @click="showEditor = !showEditor"
104
+ >
105
+ <div class="i-carbon:text-annotation-toggle" />
106
+ </IconButton>
107
+ </template>
108
+
109
+ <template v-if="!__DEV__">
110
+ <IconButton v-if="configs.download" title="Download as PDF" @click="downloadPDF">
111
+ <div class="i-carbon:download" />
112
+ </IconButton>
113
+ </template>
114
+
115
+ <template v-if="__SLIDEV_FEATURE_BROWSER_EXPORTER__ && !isEmbedded">
116
+ <IconButton title="Browser Exporter" to="/export">
117
+ <div class="i-carbon:document-pdf" />
118
+ </IconButton>
119
+ </template>
120
+
121
+ <IconButton
122
+ v-if="configs.info && !isEmbedded"
123
+ title="Show info"
124
+ @click="showInfoDialog = !showInfoDialog"
125
+ >
126
+ <div class="i-carbon:information" />
127
+ </IconButton>
128
+
129
+ <template v-if="!isEmbedded">
130
+ <VerticalDivider />
131
+
132
+ <MenuButton>
133
+ <template #button>
134
+ <IconButton title="More Options">
135
+ <div class="i-carbon:settings-adjust" />
136
+ <div v-if="hasViewerCssFilter" w-2 h-2 bg-primary rounded-full absolute top-0.5 right-0.5 />
137
+ </IconButton>
138
+ </template>
139
+ <template #menu>
140
+ <Settings />
141
+ </template>
142
+ </MenuButton>
143
+ </template>
144
+
145
+ <VerticalDivider v-if="!isEmbedded" />
146
+
147
+ <div class="pane-nav__counter">
148
+ <div>
149
+ {{ currentSlideNo }}
150
+ <span class="opacity-50">/ {{ total }}</span>
151
+ </div>
152
+ </div>
153
+ </nav>
154
+ </div>
155
+ </template>
156
+
157
+ <style scoped>
158
+ .pane-nav {
159
+ --pane-nav-border: rgba(15, 23, 42, 0.08);
160
+ --pane-nav-bg: rgba(250, 250, 250, 0.76);
161
+ --pane-nav-hover: rgba(15, 23, 42, 0.06);
162
+ --pane-nav-ink: rgba(15, 23, 42, 0.78);
163
+ --pane-nav-counter: rgba(15, 23, 42, 0.68);
164
+ display: flex;
165
+ flex-wrap: wrap-reverse;
166
+ align-items: center;
167
+ gap: 0.15rem;
168
+ padding: 0.32rem 0.45rem;
169
+ border-radius: 999px;
170
+ border: 1px solid var(--pane-nav-border);
171
+ background: var(--pane-nav-bg);
172
+ box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
173
+ backdrop-filter: blur(18px);
174
+ color: var(--pane-nav-ink);
175
+ }
176
+
177
+ .pane-nav :deep(.slidev-icon-btn) {
178
+ display: inline-flex;
179
+ align-items: center;
180
+ justify-content: center;
181
+ width: 1.95rem;
182
+ min-width: 1.95rem;
183
+ height: 1.95rem;
184
+ border-radius: 999px;
185
+ font-size: 0.95rem;
186
+ color: inherit;
187
+ opacity: 0.9;
188
+ transition:
189
+ background-color 150ms ease,
190
+ transform 150ms ease,
191
+ opacity 150ms ease,
192
+ color 150ms ease;
193
+ }
194
+
195
+ .pane-nav :deep(.slidev-icon-btn:hover) {
196
+ transform: translateY(-1px);
197
+ background: var(--pane-nav-hover);
198
+ opacity: 1;
199
+ }
200
+
201
+ .pane-nav :deep(.slidev-icon-btn.disabled) {
202
+ opacity: 0.32;
203
+ }
204
+
205
+ .pane-nav :deep(.w-1px) {
206
+ height: 1rem;
207
+ margin: 0 0.2rem;
208
+ opacity: 0.12;
209
+ }
210
+
211
+ .pane-nav__counter {
212
+ display: flex;
213
+ align-items: center;
214
+ height: 1.95rem;
215
+ padding: 0 0.45rem 0 0.25rem;
216
+ font-size: 0.76rem;
217
+ line-height: 1;
218
+ letter-spacing: 0.01em;
219
+ color: var(--pane-nav-counter);
220
+ }
221
+
222
+ :global(html.dark) .pane-nav {
223
+ --pane-nav-border: rgba(226, 232, 240, 0.08);
224
+ --pane-nav-bg: rgba(17, 24, 31, 0.76);
225
+ --pane-nav-hover: rgba(255, 255, 255, 0.08);
226
+ --pane-nav-ink: rgba(226, 232, 240, 0.86);
227
+ --pane-nav-counter: rgba(226, 232, 240, 0.72);
228
+ box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
229
+ }
230
+ </style>
@@ -0,0 +1,193 @@
1
+ <script setup lang="ts">
2
+ import { useEventListener } from '@vueuse/core'
3
+ import { computed, ref, watchEffect } from 'vue'
4
+ import { currentOverviewPage, overviewRowCount } from '@slidev/client/logic/overview.ts'
5
+ import { isScreenshotSupported } from '@slidev/client/logic/screenshot.ts'
6
+ import { snapshotManager } from '@slidev/client/logic/snapshot.ts'
7
+ import { breakpoints, showOverview, windowSize } from '@slidev/client/state/index.ts'
8
+ import { CLICKS_MAX } from '@slidev/client/constants.ts'
9
+ import { pathPrefix } from '@slidev/client/env.ts'
10
+ import { createFixedClicks } from '@slidev/client/composables/useClicks.ts'
11
+ import { useNav } from '@slidev/client/composables/useNav.ts'
12
+ import DrawingPreview from '@slidev/client/internals/DrawingPreview.vue'
13
+ import IconButton from '@slidev/client/internals/IconButton.vue'
14
+ import SlideContainer from '@slidev/client/internals/SlideContainer.vue'
15
+ import SlideWrapper from '@slidev/client/internals/SlideWrapper.vue'
16
+ import { useSidebarPresenterNav } from '../composables/useSidebarPresenterNav'
17
+
18
+ const nav = useNav()
19
+ const { currentSlideNo, slides } = nav
20
+ const { goSidebar } = useSidebarPresenterNav()
21
+
22
+ function close() {
23
+ showOverview.value = false
24
+ }
25
+
26
+ function go(page: number) {
27
+ goSidebar(page)
28
+ close()
29
+ }
30
+
31
+ function focus(page: number) {
32
+ if (page === currentOverviewPage.value)
33
+ return true
34
+ return false
35
+ }
36
+
37
+ const xs = breakpoints.smaller('xs')
38
+ const sm = breakpoints.smaller('sm')
39
+
40
+ const padding = 4 * 16 * 2
41
+ const gap = 2 * 16
42
+ const cardWidth = computed(() => {
43
+ if (xs.value)
44
+ return windowSize.width.value - padding
45
+ else if (sm.value)
46
+ return (windowSize.width.value - padding - gap) / 2
47
+ return 300
48
+ })
49
+
50
+ const rowCount = computed(() => {
51
+ return Math.floor((windowSize.width.value - padding) / (cardWidth.value + gap))
52
+ })
53
+
54
+ const keyboardBuffer = ref('')
55
+
56
+ async function captureSlidesOverview() {
57
+ showOverview.value = false
58
+ await snapshotManager.startCapturing(nav)
59
+ showOverview.value = true
60
+ }
61
+
62
+ useEventListener('keypress', (e) => {
63
+ if (!showOverview.value) {
64
+ keyboardBuffer.value = ''
65
+ return
66
+ }
67
+ if (e.key === 'Enter') {
68
+ e.preventDefault()
69
+ if (keyboardBuffer.value) {
70
+ go(+keyboardBuffer.value)
71
+ keyboardBuffer.value = ''
72
+ }
73
+ else {
74
+ go(currentOverviewPage.value)
75
+ }
76
+ return
77
+ }
78
+ const num = Number.parseInt(e.key.replace(/\D/g, ''))
79
+ if (Number.isNaN(num)) {
80
+ keyboardBuffer.value = ''
81
+ return
82
+ }
83
+ if (!keyboardBuffer.value && num === 0)
84
+ return
85
+
86
+ keyboardBuffer.value += String(num)
87
+
88
+ if (+keyboardBuffer.value >= slides.value.length) {
89
+ keyboardBuffer.value = ''
90
+ return
91
+ }
92
+
93
+ const extactMatch = slides.value.findIndex(i => `/${i.no}` === keyboardBuffer.value)
94
+ if (extactMatch !== -1)
95
+ currentOverviewPage.value = extactMatch + 1
96
+
97
+ if (+keyboardBuffer.value * 10 > slides.value.length) {
98
+ go(+keyboardBuffer.value)
99
+ keyboardBuffer.value = ''
100
+ }
101
+ })
102
+
103
+ watchEffect(() => {
104
+ currentOverviewPage.value = currentSlideNo.value
105
+ overviewRowCount.value = rowCount.value
106
+ })
107
+ </script>
108
+
109
+ <template>
110
+ <Transition
111
+ enter-active-class="duration-150 ease-out"
112
+ enter-from-class="opacity-0 scale-102 !backdrop-blur-0px"
113
+ leave-active-class="duration-200 ease-in"
114
+ leave-to-class="opacity-0 scale-102 !backdrop-blur-0px"
115
+ >
116
+ <div
117
+ v-if="showOverview"
118
+ class="fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-modal bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none"
119
+ @click="close"
120
+ >
121
+ <div
122
+ class="grid gap-y-4 gap-x-8 w-full"
123
+ :style="`grid-template-columns: repeat(auto-fit,minmax(${cardWidth}px,1fr))`"
124
+ >
125
+ <div
126
+ v-for="(route, idx) of slides"
127
+ :key="route.no"
128
+ class="relative"
129
+ >
130
+ <div
131
+ class="inline-block border rounded overflow-hidden bg-main hover:border-primary transition"
132
+ :class="(focus(idx + 1) || currentOverviewPage === idx + 1) ? 'border-primary' : 'border-main'"
133
+ @click="go(route.no)"
134
+ >
135
+ <SlideContainer
136
+ :key="route.no"
137
+ :no="route.no"
138
+ :use-snapshot="true"
139
+ :width="cardWidth"
140
+ class="pointer-events-none"
141
+ >
142
+ <SlideWrapper
143
+ :clicks-context="createFixedClicks(route, CLICKS_MAX)"
144
+ :route="route"
145
+ render-context="overview"
146
+ />
147
+ <DrawingPreview :page="route.no" />
148
+ </SlideContainer>
149
+ </div>
150
+ <div
151
+ class="absolute top-0"
152
+ :style="`left: ${cardWidth + 5}px`"
153
+ >
154
+ <template v-if="keyboardBuffer && String(idx + 1).startsWith(keyboardBuffer)">
155
+ <span class="text-green font-bold">{{ keyboardBuffer }}</span>
156
+ <span class="opacity-50">{{ String(idx + 1).slice(keyboardBuffer.length) }}</span>
157
+ </template>
158
+ <span v-else class="opacity-50">
159
+ {{ idx + 1 }}
160
+ </span>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </Transition>
166
+ <div
167
+ v-show="showOverview"
168
+ class="fixed top-4 right-4 z-modal text-gray-400 flex flex-col items-center gap-2"
169
+ >
170
+ <IconButton title="Close" class="text-2xl" @click="close">
171
+ <div class="i-carbon:close" />
172
+ </IconButton>
173
+ <IconButton
174
+ v-if="__SLIDEV_FEATURE_PRESENTER__"
175
+ as="a"
176
+ title="Slides Overview"
177
+ target="_blank"
178
+ :href="`${pathPrefix}overview`"
179
+ tab-index="-1"
180
+ class="text-2xl"
181
+ >
182
+ <div class="i-carbon:list-boxes" />
183
+ </IconButton>
184
+ <IconButton
185
+ v-if="__DEV__ && isScreenshotSupported"
186
+ title="Capture slides as images"
187
+ class="text-2xl"
188
+ @click="captureSlidesOverview"
189
+ >
190
+ <div class="i-carbon:drop-photo" />
191
+ </IconButton>
192
+ </div>
193
+ </template>